diff --git a/.idea/community.iml b/.idea/community.iml index d74b1107d..d7e475ab4 100644 --- a/.idea/community.iml +++ b/.idea/community.iml @@ -60,7 +60,6 @@ - @@ -142,7 +141,6 @@ - @@ -162,6 +160,10 @@ + + + + diff --git a/.idea/php.xml b/.idea/php.xml index 00774a86b..ed00b3146 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -57,7 +57,6 @@ - @@ -139,7 +138,6 @@ - @@ -159,6 +157,10 @@ + + + + diff --git a/composer.json b/composer.json index cabdeff0f..6bcdc52aa 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,8 @@ "nunomaduro/collision": "^5.10", "mockery/mockery": "^1.4.4", "fakerphp/faker": "^1.9.1", - "facade/ignition": "^2.5" + "facade/ignition": "^2.5", + "barryvdh/laravel-debugbar": "^3.7" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index bff6ccb94..44deceaa8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "10c14da42034189b9ee4d339988a2b39", + "content-hash": "a83da7ba7ade19a25bc73f56b0d27adc", "packages": [ { "name": "asm89/stack-cors", @@ -1144,30 +1144,32 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/65b2d8ee1f10915efb3b55597da3404f096acba2", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { - "php": "^7.0|^8.0" + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -1178,11 +1180,6 @@ "MIT" ], "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -1196,7 +1193,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v2.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -1204,7 +1201,7 @@ "type": "github" } ], - "time": "2020-10-13T00:52:37+00:00" + "time": "2022-09-10T18:51:20+00:00" }, { "name": "egulias/email-validator", @@ -1388,64 +1385,6 @@ }, "time": "2020-10-16T08:27:54+00:00" }, - { - "name": "fideloper/proxy", - "version": "4.4.2", - "source": { - "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", - "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", - "php": ">=5.4.0" - }, - "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.5.8|^9.3.3" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Fideloper\\Proxy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" - } - ], - "description": "Set trusted proxies for Laravel", - "keywords": [ - "load balancing", - "proxy", - "trusted proxy" - ], - "support": { - "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.2" - }, - "time": "2022-02-09T13:33:34+00:00" - }, { "name": "flowjs/flow-php-server", "version": "v1.2.0", @@ -1713,67 +1652,30 @@ "time": "2022-10-19T20:03:30+00:00" }, { - "name": "guzzle/guzzle", - "version": "v3.8.1", + "name": "graham-campbell/result-type", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", - "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": ">=2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" }, "require-dev": { - "doctrine/cache": "*", - "monolog/monolog": "1.*", - "phpunit/phpunit": "3.7.*", - "psr/log": "1.0.*", - "symfony/class-loader": "*", - "zendframework/zend-cache": "<2.3", - "zendframework/zend-log": "<2.3" + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.8-dev" - } - }, "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1782,32 +1684,34 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", + "description": "An Implementation Of The Result Type", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" ], "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/master" + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" }, - "abandoned": "guzzlehttp/guzzle", - "time": "2014-01-28T22:29:15+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2022-07-30T15:56:11+00:00" }, { "name": "guzzlehttp/guzzle", @@ -2226,60 +2130,63 @@ }, { "name": "laravel/framework", - "version": "v7.30.6", + "version": "v8.83.27", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ecdafad1dda3c790af186a6d18479ea4757ef9ee" + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ecdafad1dda3c790af186a6d18479ea4757ef9ee", - "reference": "ecdafad1dda3c790af186a6d18479ea4757ef9ee", + "url": "https://api.github.com/repos/laravel/framework/zipball/e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^2.3.1", + "dragonmantank/cron-expression": "^3.0.2", "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^1.3|^2.0.2", "league/flysystem": "^1.1", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.31", + "nesbot/carbon": "^2.53.1", "opis/closure": "^3.6", - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "psr/container": "^1.0", + "psr/log": "^1.0|^2.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7|^4.0", - "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.0", - "symfony/error-handler": "^5.0", - "symfony/finder": "^5.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0", - "symfony/polyfill-php73": "^1.17", - "symfony/process": "^5.0", - "symfony/routing": "^5.0", - "symfony/var-dumper": "^5.0", + "ramsey/uuid": "^4.2.2", + "swiftmailer/swiftmailer": "^6.3", + "symfony/console": "^5.4", + "symfony/error-handler": "^5.4", + "symfony/finder": "^5.4", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/mime": "^5.4", + "symfony/process": "^5.4", + "symfony/routing": "^5.4", + "symfony/var-dumper": "^5.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", - "vlucas/phpdotenv": "^4.0", - "voku/portable-ascii": "^1.4.8" + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^1.6.1" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", + "illuminate/collections": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -2292,6 +2199,7 @@ "illuminate/hashing": "self.version", "illuminate/http": "self.version", "illuminate/log": "self.version", + "illuminate/macroable": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", @@ -2307,22 +2215,24 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.155", - "doctrine/dbal": "^2.6", - "filp/whoops": "^2.8", - "guzzlehttp/guzzle": "^6.3.1|^7.0.1", + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.4", + "filp/whoops": "^2.14.3", + "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "~1.3.3|^1.4.2", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "^5.8", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^6.27", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.4|^9.3.3", - "predis/predis": "^1.1.1", - "symfony/cache": "^5.0" + "phpunit/phpunit": "^8.5.19|^9.5.8", + "predis/predis": "^1.1.9", + "symfony/cache": "^5.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "ext-bcmath": "Required to use the multiple_of validation rule.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", @@ -2330,38 +2240,43 @@ "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "filp/whoops": "Required for friendly error pages in development (^2.8).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "mockery/mockery": "Required to use mocking (~1.3.3|^1.4.2).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.3.3).", - "predis/predis": "Required to use the predis connector (^1.1.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", - "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { - "Illuminate\\": "src/Illuminate/" + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -2384,40 +2299,100 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-12-07T14:56:47+00:00" + "time": "2022-12-08T15:28:55+00:00" }, { - "name": "laravel/socialite", - "version": "v4.4.1", + "name": "laravel/serializable-closure", + "version": "v1.2.2", "source": { "type": "git", - "url": "https://github.com/laravel/socialite.git", - "reference": "80951df0d93435b773aa00efe1fad6d5015fac75" + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/80951df0d93435b773aa00efe1fad6d5015fac75", - "reference": "80951df0d93435b773aa00efe1fad6d5015fac75", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2022-09-08T13:45:54+00:00" + }, + { + "name": "laravel/socialite", + "version": "v5.5.7", + "source": { + "type": "git", + "url": "https://github.com/laravel/socialite.git", + "reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/socialite/zipball/ee6201f539ac47c3a55132449f9d20ee928f0ee2", + "reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/guzzle": "^6.0|^7.0", - "illuminate/http": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", - "league/oauth1-client": "^1.0", - "php": "^7.1.3" + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", + "illuminate/http": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "league/oauth1-client": "^1.10.1", + "php": "^7.2|^8.0" }, "require-dev": { - "illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0", "mockery/mockery": "^1.0", - "orchestra/testbench": "^3.7|^3.8|^4.0|^5.0", - "phpunit/phpunit": "^7.0|^8.0" + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", + "phpunit/phpunit": "^8.0|^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" }, "laravel": { "providers": [ @@ -2453,7 +2428,7 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2020-06-03T13:30:03+00:00" + "time": "2022-12-28T12:35:23+00:00" }, { "name": "laravel/tinker", @@ -2525,26 +2500,33 @@ }, { "name": "laravel/ui", - "version": "v2.5.0", + "version": "v3.4.6", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "d01a705763c243b07be795e9d1bb47f89260f73d" + "reference": "65ec5c03f7fee2c8ecae785795b829a15be48c2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/d01a705763c243b07be795e9d1bb47f89260f73d", - "reference": "d01a705763c243b07be795e9d1bb47f89260f73d", + "url": "https://api.github.com/repos/laravel/ui/zipball/65ec5c03f7fee2c8ecae785795b829a15be48c2c", + "reference": "65ec5c03f7fee2c8ecae785795b829a15be48c2c", "shasum": "" }, "require": { - "illuminate/console": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0" + "illuminate/console": "^8.42|^9.0", + "illuminate/filesystem": "^8.42|^9.0", + "illuminate/support": "^8.82|^9.0", + "illuminate/validation": "^8.42|^9.0", + "php": "^7.3|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^6.23|^7.0" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, "laravel": { "providers": [ "Laravel\\Ui\\UiServiceProvider" @@ -2573,10 +2555,9 @@ "ui" ], "support": { - "issues": "https://github.com/laravel/ui/issues", - "source": "https://github.com/laravel/ui/tree/v2.5.0" + "source": "https://github.com/laravel/ui/tree/v3.4.6" }, - "time": "2020-11-03T19:45:19+00:00" + "time": "2022-05-20T13:38:08+00:00" }, { "name": "laravelcollective/html", @@ -2908,23 +2889,23 @@ }, { "name": "league/iso3166", - "version": "3.0.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/thephpleague/iso3166.git", - "reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e" + "reference": "a0dd2a1d956f85811f9c667a1744d822fb2c63d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/iso3166/zipball/9976d382f270ad3f3df8a68719beb7a7179ffa1e", - "reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e", + "url": "https://api.github.com/repos/thephpleague/iso3166/zipball/a0dd2a1d956f85811f9c667a1744d822fb2c63d8", + "reference": "a0dd2a1d956f85811f9c667a1744d822fb2c63d8", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { @@ -2961,7 +2942,7 @@ "issues": "https://github.com/thephpleague/iso3166/issues", "source": "https://github.com/thephpleague/iso3166" }, - "time": "2020-12-05T06:50:42+00:00" + "time": "2022-09-07T09:14:19+00:00" }, { "name": "league/mime-type-detection", @@ -3521,26 +3502,36 @@ }, { "name": "mremi/url-shortener", - "version": "v1.0.3", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/mremi/UrlShortener.git", - "reference": "ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773" + "reference": "346dcc25f491f962cd380813631da9f2e939b092" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mremi/UrlShortener/zipball/ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773", - "reference": "ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773", + "url": "https://api.github.com/repos/mremi/UrlShortener/zipball/346dcc25f491f962cd380813631da9f2e939b092", + "reference": "346dcc25f491f962cd380813631da9f2e939b092", "shasum": "" }, "require": { - "guzzle/guzzle": "~3.7", - "php": ">=5.3.3" + "guzzlehttp/guzzle": "^6.0 || ^7.0", + "php": "^5.6 || ^7.0 || ^8.0", + "symfony/console": "^3.1 || ^4.1 || ^5.0 || ^6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "symfony/phpunit-bridge": "^5.0 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, "autoload": { - "psr-0": { - "Mremi\\UrlShortener": "src" + "psr-4": { + "Mremi\\UrlShortener\\": "src/Mremi/UrlShortener" } }, "notification-url": "https://packagist.org/downloads/", @@ -3553,7 +3544,7 @@ "email": "marseille.remi@gmail.com" } ], - "description": "A PHP5 library using API to shorten/expand URL", + "description": "A PHP5/PHP7/PHP8 library using API to shorten/expand URL", "homepage": "https://github.com/mremi/UrlShortener", "keywords": [ "api", @@ -3562,9 +3553,9 @@ ], "support": { "issues": "https://github.com/mremi/UrlShortener/issues", - "source": "https://github.com/mremi/UrlShortener/tree/master" + "source": "https://github.com/mremi/UrlShortener/tree/v2.4.0" }, - "time": "2013-10-18T21:34:40+00:00" + "time": "2021-09-06T07:20:54+00:00" }, { "name": "mtdowling/jmespath.php", @@ -4354,28 +4345,30 @@ }, { "name": "propaganistas/laravel-phone", - "version": "4.2.7", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/Propaganistas/Laravel-Phone.git", - "reference": "f2765e308977511c7ee42a48d635dca7026fa427" + "reference": "ba5aa49226793faf4bd37b38bd627d49269611d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/f2765e308977511c7ee42a48d635dca7026fa427", - "reference": "f2765e308977511c7ee42a48d635dca7026fa427", + "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/ba5aa49226793faf4bd37b38bd627d49269611d9", + "reference": "ba5aa49226793faf4bd37b38bd627d49269611d9", "shasum": "" }, "require": { "giggsey/libphonenumber-for-php": "^7.0|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0", - "illuminate/validation": "^6.0|^7.0|^8.0", - "league/iso3166": "^2.0|^3.0", - "php": "^7.1|^8.0" + "illuminate/contracts": "^8.9|^9.0", + "illuminate/support": "^8.0|^9.0", + "illuminate/validation": "^8.0|^9.0", + "league/iso3166": "^2.0|^3.0|^4.0", + "php": "^7.3|^8.0" }, "require-dev": { + "nunomaduro/larastan": "^1.0", "orchestra/testbench": "*", - "phpunit/phpunit": "*" + "phpunit/phpunit": "^9.5.10" }, "type": "library", "extra": { @@ -4403,19 +4396,18 @@ "email": "Propaganistas@users.noreply.github.com" } ], - "description": "Adds phone number functionality to Laravel and Lumen based on Google's libphonenumber API.", + "description": "Adds phone number functionality to Laravel based on Google's libphonenumber API.", "keywords": [ "laravel", "libphonenumber", - "lumen", "phone", "validation" ], "support": { "issues": "https://github.com/Propaganistas/Laravel-Phone/issues", - "source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.2.7" + "source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.4.0" }, - "time": "2020-12-06T10:57:11+00:00" + "time": "2022-11-10T09:52:44+00:00" }, { "name": "psr/container", @@ -7658,28 +7650,31 @@ }, { "name": "torann/geoip", - "version": "1.2.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/Torann/laravel-geoip.git", - "reference": "15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2" + "reference": "f16d5df66ecb6ba4ffaef52abef519fbc19596d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Torann/laravel-geoip/zipball/15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2", - "reference": "15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2", + "url": "https://api.github.com/repos/Torann/laravel-geoip/zipball/f16d5df66ecb6ba4ffaef52abef519fbc19596d3", + "reference": "f16d5df66ecb6ba4ffaef52abef519fbc19596d3", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "php": "^7.2" + "illuminate/cache": "^8.0", + "illuminate/console": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.2 || ^8.0" }, "require-dev": { "geoip2/geoip2": "~2.1", "mockery/mockery": "^1.3", + "phpstan/phpstan": "^0.12.14", "phpunit/phpunit": "^8.0", - "vlucas/phpdotenv": "^4.0" + "squizlabs/php_codesniffer": "^3.5", + "vlucas/phpdotenv": "^5.0" }, "suggest": { "geoip2/geoip2": "Required to use the MaxMind database or web service with GeoIP (~2.1).", @@ -7729,9 +7724,9 @@ ], "support": { "issues": "https://github.com/Torann/laravel-geoip/issues", - "source": "https://github.com/Torann/laravel-geoip/tree/1.2.1" + "source": "https://github.com/Torann/laravel-geoip/tree/3.0.2" }, - "time": "2020-03-10T18:35:08+00:00" + "time": "2020-12-21T19:12:11+00:00" }, { "name": "tymon/jwt-auth", @@ -7898,32 +7893,34 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.3.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "67a491df68208bef8c37092db11fa3885008efcf" + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67a491df68208bef8c37092db11fa3885008efcf", - "reference": "67a491df68208bef8c37092db11fa3885008efcf", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { @@ -7932,7 +7929,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -7964,7 +7961,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" }, "funding": [ { @@ -7976,7 +7973,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T00:51:09+00:00" + "time": "2022-10-16T01:01:54+00:00" }, { "name": "voku/portable-ascii", @@ -8103,29 +8100,87 @@ "time": "2015-03-20T13:30:34+00:00" }, { - "name": "yajra/laravel-datatables-oracle", - "version": "v9.10.0", + "name": "webmozart/assert", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/yajra/laravel-datatables.git", - "reference": "b0b9e2c37b5a17ca35bb2c6d3927bf6176393229" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/b0b9e2c37b5a17ca35bb2c6d3927bf6176393229", - "reference": "b0b9e2c37b5a17ca35bb2c6d3927bf6176393229", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "illuminate/database": "5.8.*|^6|^7", - "illuminate/filesystem": "5.8.*|^6|^7", - "illuminate/http": "5.8.*|^6|^7", - "illuminate/support": "5.8.*|^6|^7", - "illuminate/view": "5.8.*|^6|^7", - "php": "^7.1.3" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "orchestra/testbench": "^3.8" + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "yajra/laravel-datatables-oracle", + "version": "v9.21.2", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables.git", + "reference": "a7fd01f06282923e9c63fa27fe6b391e21dc321a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/a7fd01f06282923e9c63fa27fe6b391e21dc321a", + "reference": "a7fd01f06282923e9c63fa27fe6b391e21dc321a", + "shasum": "" + }, + "require": { + "illuminate/database": "5.8.*|^6|^7|^8|^9", + "illuminate/filesystem": "5.8.*|^6|^7|^8|^9", + "illuminate/http": "5.8.*|^6|^7|^8|^9", + "illuminate/support": "5.8.*|^6|^7|^8|^9", + "illuminate/view": "5.8.*|^6|^7|^8|^9", + "php": "^7.1.3|^8" + }, + "require-dev": { + "orchestra/testbench": "^3.8|^4.0|^5.0|^6.0|^7.0" }, "suggest": { "yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.", @@ -8165,7 +8220,7 @@ "email": "aqangeles@gmail.com" } ], - "description": "jQuery DataTables API for Laravel 4|5", + "description": "jQuery DataTables API for Laravel 5|6|7|8|9", "keywords": [ "datatables", "jquery", @@ -8173,7 +8228,7 @@ ], "support": { "issues": "https://github.com/yajra/laravel-datatables/issues", - "source": "https://github.com/yajra/laravel-datatables/tree/v9.10.0" + "source": "https://github.com/yajra/laravel-datatables/tree/v9.21.2" }, "funding": [ { @@ -8185,10 +8240,94 @@ "type": "patreon" } ], - "time": "2020-04-23T01:21:11+00:00" + "time": "2022-07-12T04:48:03+00:00" } ], "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "3372ed65e6d2039d663ed19aa699956f9d346271" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/3372ed65e6d2039d663ed19aa699956f9d346271", + "reference": "3372ed65e6d2039d663ed19aa699956f9d346271", + "shasum": "" + }, + "require": { + "illuminate/routing": "^7|^8|^9", + "illuminate/session": "^7|^8|^9", + "illuminate/support": "^7|^8|^9", + "maximebf/debugbar": "^1.17.2", + "php": ">=7.2.5", + "symfony/finder": "^5|^6" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^5|^6|^7", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2022-07-11T09:26:42+00:00" + }, { "name": "codacy/coverage", "version": "dev-master", @@ -8719,34 +8858,35 @@ }, { "name": "laravel/dusk", - "version": "v5.11.0", + "version": "v6.25.2", "source": { "type": "git", "url": "https://github.com/laravel/dusk.git", - "reference": "e07cc46a1e39767739e8197189780b4c2639806d" + "reference": "25a595ac3dc82089a91af10dd23b0d58fd3f6d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/e07cc46a1e39767739e8197189780b4c2639806d", - "reference": "e07cc46a1e39767739e8197189780b4c2639806d", + "url": "https://api.github.com/repos/laravel/dusk/zipball/25a595ac3dc82089a91af10dd23b0d58fd3f6d0b", + "reference": "25a595ac3dc82089a91af10dd23b0d58fd3f6d0b", "shasum": "" }, "require": { "ext-json": "*", "ext-zip": "*", - "illuminate/console": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", - "nesbot/carbon": "^1.20|^2.0", - "php": ">=7.1.0", - "php-webdriver/webdriver": "^1.8.1", - "symfony/console": "^4.0|^5.0", - "symfony/finder": "^4.0|^5.0", - "symfony/process": "^4.0|^5.0", - "vlucas/phpdotenv": "^2.2|^3.0|^4.0" + "illuminate/console": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "nesbot/carbon": "^2.0", + "php": "^7.2|^8.0", + "php-webdriver/webdriver": "^1.9.0", + "symfony/console": "^4.3|^5.0|^6.0", + "symfony/finder": "^4.3|^5.0|^6.0", + "symfony/process": "^4.3|^5.0|^6.0", + "vlucas/phpdotenv": "^3.0|^4.0|^5.2" }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.5|^8.0" + "orchestra/testbench": "^4.16|^5.17.1|^6.12.1|^7.0", + "phpunit/phpunit": "^7.5.15|^8.4|^9.0" }, "suggest": { "ext-pcntl": "Used to gracefully terminate Dusk when tests are running." @@ -8754,7 +8894,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.x-dev" }, "laravel": { "providers": [ @@ -8785,9 +8925,75 @@ ], "support": { "issues": "https://github.com/laravel/dusk/issues", - "source": "https://github.com/laravel/dusk/tree/v5.11.0" + "source": "https://github.com/laravel/dusk/tree/v6.25.2" }, - "time": "2020-03-24T16:21:49+00:00" + "time": "2022-09-29T09:37:07+00:00" + }, + { + "name": "maximebf/debugbar", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/ba0af68dd4316834701ecb30a00ce9604ced3ee9", + "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^2.6|^3|^4|^5|^6" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^9.4.2", + "twig/twig": "^1.38|^2.7|^3.0" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "support": { + "issues": "https://github.com/maximebf/php-debugbar/issues", + "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.1" + }, + "time": "2022-03-31T14:55:54+00:00" }, { "name": "mockery/mockery", @@ -8922,35 +9128,34 @@ }, { "name": "nunomaduro/collision", - "version": "v4.3.0", + "version": "v5.11.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "7c125dc2463f3e144ddc7e05e63077109508c94e" + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/7c125dc2463f3e144ddc7e05e63077109508c94e", - "reference": "7c125dc2463f3e144ddc7e05e63077109508c94e", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.4", - "php": "^7.2.5 || ^8.0", + "filp/whoops": "^2.14.3", + "php": "^7.3 || ^8.0", "symfony/console": "^5.0" }, "require-dev": { - "facade/ignition": "^2.0", - "fideloper/proxy": "^4.2", - "friendsofphp/php-cs-fixer": "^2.16", - "fruitcake/laravel-cors": "^1.0", - "laravel/framework": "^7.0", - "laravel/tinker": "^2.0", - "nunomaduro/larastan": "^0.6", - "orchestra/testbench": "^5.0", - "phpstan/phpstan": "^0.12.3", - "phpunit/phpunit": "^8.5.1 || ^9.0" + "brianium/paratest": "^6.1", + "fideloper/proxy": "^4.4.1", + "fruitcake/laravel-cors": "^2.0.3", + "laravel/framework": "8.x-dev", + "nunomaduro/larastan": "^0.6.2", + "nunomaduro/mock-final-classes": "^1.0", + "orchestra/testbench": "^6.0", + "phpstan/phpstan": "^0.12.64", + "phpunit/phpunit": "^9.5.0" }, "type": "library", "extra": { @@ -8994,7 +9199,7 @@ }, "funding": [ { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "url": "https://www.paypal.com/paypalme/enunomaduro", "type": "custom" }, { @@ -9006,7 +9211,7 @@ "type": "patreon" } ], - "time": "2020-10-29T15:12:23+00:00" + "time": "2022-01-10T16:22:52+00:00" }, { "name": "phar-io/manifest", @@ -11124,64 +11329,6 @@ } ], "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], @@ -11194,7 +11341,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2.5|^8.0" + "php": "^7.3|^8.0" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/config/app.php b/config/app.php index 0642bdf3e..ddd9754e5 100644 --- a/config/app.php +++ b/config/app.php @@ -180,7 +180,7 @@ return [ App\FaveoStorage\StorageServiceProvider::class, Yajra\Datatables\DatatablesServiceProvider::class, \App\Api\ApiServiceProvider::class, - + Barryvdh\Debugbar\ServiceProvider::class, ], /* |-------------------------------------------------------------------------- @@ -204,6 +204,7 @@ return [ 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'Date' => Illuminate\Support\Facades\Date::class, 'DB' => 'Illuminate\Support\Facades\DB', + 'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class, 'Eloquent' => 'Illuminate\Database\Eloquent\Model', 'Event' => 'Illuminate\Support\Facades\Event', 'File' => 'Illuminate\Support\Facades\File', diff --git a/vendor/autoload.php b/vendor/autoload.php index fcaa5cdd8..65d3d6301 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit9da6744efcb5435630815fb416a6752c::getLoader(); +return ComposerAutoloaderInite3a664ccc4def6142d1c80482606ee61::getLoader(); diff --git a/vendor/barryvdh/laravel-debugbar/LICENSE b/vendor/barryvdh/laravel-debugbar/LICENSE new file mode 100644 index 000000000..f724f7c29 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013-present Barry vd. Heuvel + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/barryvdh/laravel-debugbar/SECURITY.md b/vendor/barryvdh/laravel-debugbar/SECURITY.md new file mode 100644 index 000000000..c6138bc29 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report security issues to `barryvdh@gmail.com` diff --git a/vendor/barryvdh/laravel-debugbar/composer.json b/vendor/barryvdh/laravel-debugbar/composer.json new file mode 100644 index 000000000..b911a5e3d --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/composer.json @@ -0,0 +1,59 @@ +{ + "name": "barryvdh/laravel-debugbar", + "description": "PHP Debugbar integration for Laravel", + "keywords": ["laravel", "debugbar", "profiler", "debug", "webprofiler"], + "license": "MIT", + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "require": { + "php": ">=7.2.5", + "maximebf/debugbar": "^1.17.2", + "illuminate/routing": "^7|^8|^9", + "illuminate/session": "^7|^8|^9", + "illuminate/support": "^7|^8|^9", + "symfony/finder": "^5|^6" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^5|^6|^7", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Barryvdh\\Debugbar\\Tests\\": "tests" + } + }, + "minimum-stability": "dev", + "prefer-stable": true, + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" + } + } + }, + "scripts": { + "check-style": "phpcs -p --standard=PSR12 config/ src/ tests/", + "fix-style": "phpcbf -p --standard=PSR12 config/ src/ tests/", + "test": "phpunit" + } +} diff --git a/vendor/barryvdh/laravel-debugbar/config/debugbar.php b/vendor/barryvdh/laravel-debugbar/config/debugbar.php new file mode 100644 index 000000000..fe3b192d7 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/config/debugbar.php @@ -0,0 +1,275 @@ + env('DEBUGBAR_ENABLED', null), + 'except' => [ + 'telescope*', + 'horizon*', + ], + + /* + |-------------------------------------------------------------------------- + | Storage settings + |-------------------------------------------------------------------------- + | + | DebugBar stores data for session/ajax requests. + | You can disable this, so the debugbar stores data in headers/session, + | but this can cause problems with large data collectors. + | By default, file storage (in the storage folder) is used. Redis and PDO + | can also be used. For PDO, run the package migrations first. + | + */ + 'storage' => [ + 'enabled' => true, + 'driver' => 'file', // redis, file, pdo, socket, custom + 'path' => storage_path('debugbar'), // For file driver + 'connection' => null, // Leave null for default connection (Redis/PDO) + 'provider' => '', // Instance of StorageInterface for custom driver + 'hostname' => '127.0.0.1', // Hostname to use with the "socket" driver + 'port' => 2304, // Port to use with the "socket" driver + ], + + /* + |-------------------------------------------------------------------------- + | Editor + |-------------------------------------------------------------------------- + | + | Choose your preferred editor to use when clicking file name. + | + | Supported: "phpstorm", "vscode", "vscode-insiders", "vscode-remote", + | "vscode-insiders-remote", "vscodium", "textmate", "emacs", + | "sublime", "atom", "nova", "macvim", "idea", "netbeans", + | "xdebug", "espresso" + | + */ + + 'editor' => env('DEBUGBAR_EDITOR', 'phpstorm'), + + /* + |-------------------------------------------------------------------------- + | Remote Path Mapping + |-------------------------------------------------------------------------- + | + | If you are using a remote dev server, like Laravel Homestead, Docker, or + | even a remote VPS, it will be necessary to specify your path mapping. + | + | Leaving one, or both of these, empty or null will not trigger the remote + | URL changes and Debugbar will treat your editor links as local files. + | + | "remote_sites_path" is an absolute base path for your sites or projects + | in Homestead, Vagrant, Docker, or another remote development server. + | + | Example value: "/home/vagrant/Code" + | + | "local_sites_path" is an absolute base path for your sites or projects + | on your local computer where your IDE or code editor is running on. + | + | Example values: "/Users//Code", "C:\Users\\Documents\Code" + | + */ + + 'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH', ''), + 'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', ''), + + /* + |-------------------------------------------------------------------------- + | Vendors + |-------------------------------------------------------------------------- + | + | Vendor files are included by default, but can be set to false. + | This can also be set to 'js' or 'css', to only include javascript or css vendor files. + | Vendor files are for css: font-awesome (including fonts) and highlight.js (css files) + | and for js: jquery and and highlight.js + | So if you want syntax highlighting, set it to true. + | jQuery is set to not conflict with existing jQuery scripts. + | + */ + + 'include_vendors' => true, + + /* + |-------------------------------------------------------------------------- + | Capture Ajax Requests + |-------------------------------------------------------------------------- + | + | The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors), + | you can use this option to disable sending the data through the headers. + | + | Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools. + | + | Note for your request to be identified as ajax requests they must either send the header + | X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header. + */ + + 'capture_ajax' => true, + 'add_ajax_timing' => false, + + /* + |-------------------------------------------------------------------------- + | Custom Error Handler for Deprecated warnings + |-------------------------------------------------------------------------- + | + | When enabled, the Debugbar shows deprecated warnings for Symfony components + | in the Messages tab. + | + */ + 'error_handler' => false, + + /* + |-------------------------------------------------------------------------- + | Clockwork integration + |-------------------------------------------------------------------------- + | + | The Debugbar can emulate the Clockwork headers, so you can use the Chrome + | Extension, without the server-side code. It uses Debugbar collectors instead. + | + */ + 'clockwork' => false, + + /* + |-------------------------------------------------------------------------- + | DataCollectors + |-------------------------------------------------------------------------- + | + | Enable/disable DataCollectors + | + */ + + 'collectors' => [ + 'phpinfo' => true, // Php version + 'messages' => true, // Messages + 'time' => true, // Time Datalogger + 'memory' => true, // Memory usage + 'exceptions' => true, // Exception displayer + 'log' => true, // Logs from Monolog (merged in messages if enabled) + 'db' => true, // Show database (PDO) queries and bindings + 'views' => true, // Views with their data + 'route' => true, // Current route information + 'auth' => false, // Display Laravel authentication status + 'gate' => true, // Display Laravel Gate checks + 'session' => true, // Display session data + 'symfony_request' => true, // Only one can be enabled.. + 'mail' => true, // Catch mail messages + 'laravel' => false, // Laravel version and environment + 'events' => false, // All events fired + 'default_request' => false, // Regular or special Symfony request logger + 'logs' => false, // Add the latest log messages + 'files' => false, // Show the included files + 'config' => false, // Display config settings + 'cache' => false, // Display cache events + 'models' => true, // Display models + 'livewire' => true, // Display Livewire (when available) + ], + + /* + |-------------------------------------------------------------------------- + | Extra options + |-------------------------------------------------------------------------- + | + | Configure some DataCollectors + | + */ + + 'options' => [ + 'auth' => [ + 'show_name' => true, // Also show the users name/email in the debugbar + ], + 'db' => [ + 'with_params' => true, // Render SQL with the parameters substituted + 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. + 'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults) + 'timeline' => false, // Add the queries to the timeline + 'duration_background' => true, // Show shaded background on each query relative to how long it took to execute. + 'explain' => [ // Show EXPLAIN output on queries + 'enabled' => false, + 'types' => ['SELECT'], // Deprecated setting, is always only SELECT + ], + 'hints' => false, // Show hints for common mistakes + 'show_copy' => false, // Show copy button next to the query + ], + 'mail' => [ + 'full_log' => false, + ], + 'views' => [ + 'timeline' => false, // Add the views to the timeline (Experimental) + 'data' => false, //Note: Can slow down the application, because the data can be quite large.. + ], + 'route' => [ + 'label' => true, // show complete route on bar + ], + 'logs' => [ + 'file' => null, + ], + 'cache' => [ + 'values' => true, // collect cache values + ], + ], + + /* + |-------------------------------------------------------------------------- + | Inject Debugbar in Response + |-------------------------------------------------------------------------- + | + | Usually, the debugbar is added just before , by listening to the + | Response after the App is done. If you disable this, you have to add them + | in your template yourself. See http://phpdebugbar.com/docs/rendering.html + | + */ + + 'inject' => true, + + /* + |-------------------------------------------------------------------------- + | DebugBar route prefix + |-------------------------------------------------------------------------- + | + | Sometimes you want to set route prefix to be used by DebugBar to load + | its resources from. Usually the need comes from misconfigured web server or + | from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97 + | + */ + 'route_prefix' => '_debugbar', + + /* + |-------------------------------------------------------------------------- + | DebugBar route domain + |-------------------------------------------------------------------------- + | + | By default DebugBar route served from the same domain that request served. + | To override default domain, specify it as a non-empty value. + */ + 'route_domain' => null, + + /* + |-------------------------------------------------------------------------- + | DebugBar theme + |-------------------------------------------------------------------------- + | + | Switches between light and dark theme. If set to auto it will respect system preferences + | Possible values: auto, light, dark + */ + 'theme' => env('DEBUGBAR_THEME', 'auto'), + + /* + |-------------------------------------------------------------------------- + | Backtrace stack limit + |-------------------------------------------------------------------------- + | + | By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function. + | If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit. + */ + 'debug_backtrace_limit' => 50, +]; diff --git a/vendor/barryvdh/laravel-debugbar/database/migrations/2014_12_01_120000_create_phpdebugbar_storage_table.php b/vendor/barryvdh/laravel-debugbar/database/migrations/2014_12_01_120000_create_phpdebugbar_storage_table.php new file mode 100644 index 000000000..7e2637cee --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/database/migrations/2014_12_01_120000_create_phpdebugbar_storage_table.php @@ -0,0 +1,42 @@ +string('id'); + $table->longText('data'); + $table->string('meta_utime'); + $table->dateTime('meta_datetime'); + $table->string('meta_uri'); + $table->string('meta_ip'); + $table->string('meta_method'); + + $table->primary('id'); + $table->index('meta_utime'); + $table->index('meta_datetime'); + $table->index('meta_uri'); + $table->index('meta_ip'); + $table->index('meta_method'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('phpdebugbar'); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/readme.md b/vendor/barryvdh/laravel-debugbar/readme.md new file mode 100644 index 000000000..54eaafba1 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/readme.md @@ -0,0 +1,213 @@ +## Laravel Debugbar +![Unit Tests](https://github.com/barryvdh/laravel-debugbar/workflows/Unit%20Tests/badge.svg) +[![Packagist License](https://poser.pugx.org/barryvdh/laravel-debugbar/license.png)](http://choosealicense.com/licenses/mit/) +[![Latest Stable Version](https://poser.pugx.org/barryvdh/laravel-debugbar/version.png)](https://packagist.org/packages/barryvdh/laravel-debugbar) +[![Total Downloads](https://poser.pugx.org/barryvdh/laravel-debugbar/d/total.png)](https://packagist.org/packages/barryvdh/laravel-debugbar) +[![Fruitcake](https://img.shields.io/badge/Powered%20By-Fruitcake-b2bc35.svg)](https://fruitcake.nl/) + +This is a package to integrate [PHP Debug Bar](http://phpdebugbar.com/) with Laravel. +It includes a ServiceProvider to register the debugbar and attach it to the output. You can publish assets and configure it through Laravel. +It bootstraps some Collectors to work with Laravel and implements a couple custom DataCollectors, specific for Laravel. +It is configured to display Redirects and (jQuery) Ajax Requests. (Shown in a dropdown) +Read [the documentation](http://phpdebugbar.com/docs/) for more configuration options. + +![Debugbar 3.3 Screenshot](https://user-images.githubusercontent.com/973269/79428890-196cc680-7fc7-11ea-8229-189f5eac9009.png) + + +Note: Use the DebugBar only in development. It can slow the application down (because it has to gather data). So when experiencing slowness, try disabling some of the collectors. + +This package includes some custom collectors: + - QueryCollector: Show all queries, including binding + timing + - RouteCollector: Show information about the current Route. + - ViewCollector: Show the currently loaded views. (Optionally: display the shared data) + - EventsCollector: Show all events + - LaravelCollector: Show the Laravel version and Environment. (disabled by default) + - SymfonyRequestCollector: replaces the RequestCollector with more information about the request/response + - LogsCollector: Show the latest log entries from the storage logs. (disabled by default) + - FilesCollector: Show the files that are included/required by PHP. (disabled by default) + - ConfigCollector: Display the values from the config files. (disabled by default) + - CacheCollector: Display all cache events. (disabled by default) + +Bootstraps the following collectors for Laravel: + - LogCollector: Show all Log messages + - SwiftMailCollector and SwiftLogCollector for Mail + +And the default collectors: + - PhpInfoCollector + - MessagesCollector + - TimeDataCollector (With Booting and Application timing) + - MemoryCollector + - ExceptionsCollector + +It also provides a facade interface (`Debugbar`) for easy logging Messages, Exceptions and Time + +## Installation + +Require this package with composer. It is recommended to only require the package for development. + +```shell +composer require barryvdh/laravel-debugbar --dev +``` + +Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider. + +The Debugbar will be enabled when `APP_DEBUG` is `true`. + +> If you use a catch-all/fallback route, make sure you load the Debugbar ServiceProvider before your own App ServiceProviders. + +### Laravel without auto-discovery: + +If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php + +```php +Barryvdh\Debugbar\ServiceProvider::class, +``` + +If you want to use the facade to log messages, add this to your facades in app.php: + +```php +'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class, +``` + +The profiler is enabled by default, if you have APP_DEBUG=true. You can override that in the config (`debugbar.enabled`) or by setting `DEBUGBAR_ENABLED` in your `.env`. See more options in `config/debugbar.php` +You can also set in your config if you want to include/exclude the vendor files also (FontAwesome, Highlight.js and jQuery). If you already use them in your site, set it to false. +You can also only display the js or css vendors, by setting it to 'js' or 'css'. (Highlight.js requires both css + js, so set to `true` for syntax highlighting) + +#### Copy the package config to your local config with the publish command: + +```shell +php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider" +``` + +### Laravel with Octane: + +Make sure to add LaravelDebugbar to your flush list in `config/octane.php`. + +```php + 'flush' => [ + \Barryvdh\Debugbar\LaravelDebugbar::class, + ], +``` + +### Lumen: + +For Lumen, register a different Provider in `bootstrap/app.php`: + +```php +if (env('APP_DEBUG')) { + $app->register(Barryvdh\Debugbar\LumenServiceProvider::class); +} +``` + +To change the configuration, copy the file to your config folder and enable it: + +```php +$app->configure('debugbar'); +``` + +## Usage + +You can now add messages using the Facade (when added), using the PSR-3 levels (debug, info, notice, warning, error, critical, alert, emergency): + +```php +Debugbar::info($object); +Debugbar::error('Error!'); +Debugbar::warning('Watch out…'); +Debugbar::addMessage('Another message', 'mylabel'); +``` + +And start/stop timing: + +```php +Debugbar::startMeasure('render','Time for rendering'); +Debugbar::stopMeasure('render'); +Debugbar::addMeasure('now', LARAVEL_START, microtime(true)); +Debugbar::measure('My long operation', function() { + // Do something… +}); +``` + +Or log exceptions: + +```php +try { + throw new Exception('foobar'); +} catch (Exception $e) { + Debugbar::addThrowable($e); +} +``` + +There are also helper functions available for the most common calls: + +```php +// All arguments will be dumped as a debug message +debug($var1, $someString, $intValue, $object); + +// `$collection->debug()` will return the collection and dump it as a debug message. Like `$collection->dump()` +collect([$var1, $someString])->debug(); + +start_measure('render','Time for rendering'); +stop_measure('render'); +add_measure('now', LARAVEL_START, microtime(true)); +measure('My long operation', function() { + // Do something… +}); +``` + +If you want you can add your own DataCollectors, through the Container or the Facade: + +```php +Debugbar::addCollector(new DebugBar\DataCollector\MessagesCollector('my_messages')); +//Or via the App container: +$debugbar = App::make('debugbar'); +$debugbar->addCollector(new DebugBar\DataCollector\MessagesCollector('my_messages')); +``` + +By default, the Debugbar is injected just before ``. If you want to inject the Debugbar yourself, +set the config option 'inject' to false and use the renderer yourself and follow http://phpdebugbar.com/docs/rendering.html + +```php +$renderer = Debugbar::getJavascriptRenderer(); +``` + +Note: Not using the auto-inject, will disable the Request information, because that is added After the response. +You can add the default_request datacollector in the config as alternative. + +## Enabling/Disabling on run time +You can enable or disable the debugbar during run time. + +```php +\Debugbar::enable(); +\Debugbar::disable(); +``` + +NB. Once enabled, the collectors are added (and could produce extra overhead), so if you want to use the debugbar in production, disable in the config and only enable when needed. + + +## Twig Integration + +Laravel Debugbar comes with two Twig Extensions. These are tested with [rcrowe/TwigBridge](https://github.com/rcrowe/TwigBridge) 0.6.x + +Add the following extensions to your TwigBridge config/extensions.php (or register the extensions manually) + +```php +'Barryvdh\Debugbar\Twig\Extension\Debug', +'Barryvdh\Debugbar\Twig\Extension\Dump', +'Barryvdh\Debugbar\Twig\Extension\Stopwatch', +``` + +The Dump extension will replace the [dump function](http://twig.sensiolabs.org/doc/functions/dump.html) to output variables using the DataFormatter. The Debug extension adds a `debug()` function which passes variables to the Message Collector, +instead of showing it directly in the template. It dumps the arguments, or when empty; all context variables. + +```twig +{{ debug() }} +{{ debug(user, categories) }} +``` + +The Stopwatch extension adds a [stopwatch tag](http://symfony.com/blog/new-in-symfony-2-4-a-stopwatch-tag-for-twig) similar to the one in Symfony/Silex Twigbridge. + +```twig +{% stopwatch "foo" %} + …some things that gets timed +{% endstopwatch %} +``` diff --git a/vendor/barryvdh/laravel-debugbar/src/Console/ClearCommand.php b/vendor/barryvdh/laravel-debugbar/src/Console/ClearCommand.php new file mode 100644 index 000000000..abafae915 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Console/ClearCommand.php @@ -0,0 +1,39 @@ +debugbar = $debugbar; + + parent::__construct(); + } + + public function handle() + { + $this->debugbar->boot(); + + if ($storage = $this->debugbar->getStorage()) { + try { + $storage->clear(); + } catch (\InvalidArgumentException $e) { + // hide InvalidArgumentException if storage location does not exist + if (strpos($e->getMessage(), 'does not exist') === false) { + throw $e; + } + } + $this->info('Debugbar Storage cleared!'); + } else { + $this->error('No Debugbar Storage found..'); + } + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Controllers/AssetController.php b/vendor/barryvdh/laravel-debugbar/src/Controllers/AssetController.php new file mode 100644 index 000000000..646ab44ab --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Controllers/AssetController.php @@ -0,0 +1,64 @@ +debugbar->getJavascriptRenderer(); + + $content = $renderer->dumpAssetsToString('js'); + + $response = new Response( + $content, + 200, + [ + 'Content-Type' => 'text/javascript', + ] + ); + + return $this->cacheResponse($response); + } + + /** + * Return the stylesheets for the Debugbar + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function css() + { + $renderer = $this->debugbar->getJavascriptRenderer(); + + $content = $renderer->dumpAssetsToString('css'); + + $response = new Response( + $content, + 200, + [ + 'Content-Type' => 'text/css', + ] + ); + + return $this->cacheResponse($response); + } + + /** + * Cache the response 1 year (31536000 sec) + */ + protected function cacheResponse(Response $response) + { + $response->setSharedMaxAge(31536000); + $response->setMaxAge(31536000); + $response->setExpires(new \DateTime('+1 year')); + + return $response; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Controllers/BaseController.php b/vendor/barryvdh/laravel-debugbar/src/Controllers/BaseController.php new file mode 100644 index 000000000..3d2f15f7d --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Controllers/BaseController.php @@ -0,0 +1,49 @@ +debugbar = $debugbar; + + if ($request->hasSession()) { + $request->session()->reflash(); + } + + $this->middleware(function ($request, $next) { + if (class_exists(Telescope::class)) { + Telescope::stopRecording(); + } + return $next($request); + }); + } + } + +} else { + + class BaseController + { + protected $debugbar; + + public function __construct(Request $request, LaravelDebugbar $debugbar) + { + $this->debugbar = $debugbar; + + if ($request->hasSession()) { + $request->session()->reflash(); + } + } + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Controllers/CacheController.php b/vendor/barryvdh/laravel-debugbar/src/Controllers/CacheController.php new file mode 100644 index 000000000..c347700b6 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Controllers/CacheController.php @@ -0,0 +1,28 @@ +tags($tags); + } else { + unset($tags); + } + + $success = $cache->forget($key); + + return response()->json(compact('success')); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Controllers/OpenHandlerController.php b/vendor/barryvdh/laravel-debugbar/src/Controllers/OpenHandlerController.php new file mode 100644 index 000000000..e5c059fc3 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Controllers/OpenHandlerController.php @@ -0,0 +1,49 @@ +debugbar); + $data = $openHandler->handle($request->input(), false, false); + + return new Response( + $data, + 200, + [ + 'Content-Type' => 'application/json' + ] + ); + } + + /** + * Return Clockwork output + * + * @param $id + * @return mixed + * @throws \DebugBar\DebugBarException + */ + public function clockwork($id) + { + $request = [ + 'op' => 'get', + 'id' => $id, + ]; + + $openHandler = new OpenHandler($this->debugbar); + $data = $openHandler->handle($request, false, false); + + // Convert to Clockwork + $converter = new Converter(); + $output = $converter->convert(json_decode($data, true)); + + return response()->json($output); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Controllers/TelescopeController.php b/vendor/barryvdh/laravel-debugbar/src/Controllers/TelescopeController.php new file mode 100644 index 000000000..8f263b4c9 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Controllers/TelescopeController.php @@ -0,0 +1,23 @@ +find($uuid); + $result = $storage->get('request', (new EntryQueryOptions())->batchId($entry->batchId))->first(); + + return redirect(config('telescope.path') . '/requests/' . $result->id); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/CacheCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/CacheCollector.php new file mode 100644 index 000000000..19d0a3a12 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/CacheCollector.php @@ -0,0 +1,96 @@ + 'hit', + CacheMissed::class => 'missed', + KeyWritten::class => 'written', + KeyForgotten::class => 'forgotten', + ]; + + public function __construct($requestStartTime, $collectValues) + { + parent::__construct(); + + $this->collectValues = $collectValues; + } + + public function onCacheEvent(CacheEvent $event) + { + $class = get_class($event); + $params = get_object_vars($event); + + $label = $this->classMap[$class]; + + if (isset($params['value'])) { + if ($this->collectValues) { + $params['value'] = htmlspecialchars($this->getDataFormatter()->formatVar($event->value)); + } else { + unset($params['value']); + } + } + + + if (!empty($params['key']) && in_array($label, ['hit', 'written'])) { + $params['delete'] = route('debugbar.cache.delete', [ + 'key' => urlencode($params['key']), + 'tags' => !empty($params['tags']) ? json_encode($params['tags']) : '', + ]); + } + + $time = microtime(true); + $this->addMeasure($label . "\t" . $event->key, $time, $time, $params); + } + + + public function subscribe(Dispatcher $dispatcher) + { + foreach ($this->classMap as $eventClass => $type) { + $dispatcher->listen($eventClass, [$this, 'onCacheEvent']); + } + } + + public function collect() + { + $data = parent::collect(); + $data['nb_measures'] = count($data['measures']); + + return $data; + } + + public function getName() + { + return 'cache'; + } + + public function getWidgets() + { + return [ + 'cache' => [ + 'icon' => 'clipboard', + 'widget' => 'PhpDebugBar.Widgets.LaravelCacheWidget', + 'map' => 'cache', + 'default' => '{}', + ], + 'cache:badge' => [ + 'map' => 'cache.nb_measures', + 'default' => 'null', + ], + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/EventCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/EventCollector.php new file mode 100644 index 000000000..07b67af2e --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/EventCollector.php @@ -0,0 +1,116 @@ +previousTime = microtime(true); + $this->setDataFormatter(new SimpleFormatter()); + } + + public function onWildcardEvent($name = null, $data = []) + { + $params = $this->prepareParams($data); + $currentTime = microtime(true); + + // Find all listeners for the current event + foreach ($this->events->getListeners($name) as $i => $listener) { + // Check if it's an object + method name + if (is_array($listener) && count($listener) > 1 && is_object($listener[0])) { + list($class, $method) = $listener; + + // Skip this class itself + if ($class instanceof static) { + continue; + } + + // Format the listener to readable format + $listener = get_class($class) . '@' . $method; + + // Handle closures + } elseif ($listener instanceof \Closure) { + $reflector = new \ReflectionFunction($listener); + + // Skip our own listeners + if ($reflector->getNamespaceName() == 'Barryvdh\Debugbar') { + continue; + } + + // Format the closure to a readable format + $filename = ltrim(str_replace(base_path(), '', $reflector->getFileName()), '/'); + $lines = $reflector->getStartLine() . '-' . $reflector->getEndLine(); + $listener = $reflector->getName() . ' (' . $filename . ':' . $lines . ')'; + } else { + // Not sure if this is possible, but to prevent edge cases + $listener = $this->getDataFormatter()->formatVar($listener); + } + + $params['listeners.' . $i] = $listener; + } + $this->addMeasure($name, $this->previousTime, $currentTime, $params); + $this->previousTime = $currentTime; + } + + public function subscribe(Dispatcher $events) + { + $this->events = $events; + $events->listen('*', [$this, 'onWildcardEvent']); + } + + protected function prepareParams($params) + { + $data = []; + foreach ($params as $key => $value) { + if (is_object($value) && Str::is('Illuminate\*\Events\*', get_class($value))) { + $value = $this->prepareParams(get_object_vars($value)); + } + $data[$key] = htmlentities($this->getDataFormatter()->formatVar($value), ENT_QUOTES, 'UTF-8', false); + } + + return $data; + } + + public function collect() + { + $data = parent::collect(); + $data['nb_measures'] = count($data['measures']); + + return $data; + } + + public function getName() + { + return 'event'; + } + + public function getWidgets() + { + return [ + "events" => [ + "icon" => "tasks", + "widget" => "PhpDebugBar.Widgets.TimelineWidget", + "map" => "event", + "default" => "{}", + ], + 'events:badge' => [ + 'map' => 'event.nb_measures', + 'default' => 0, + ], + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/FilesCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/FilesCollector.php new file mode 100644 index 000000000..2371b95e6 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/FilesCollector.php @@ -0,0 +1,136 @@ +app = $app; + $this->basePath = base_path(); + } + + /** + * {@inheritDoc} + */ + public function collect() + { + $files = $this->getIncludedFiles(); + $compiled = $this->getCompiledFiles(); + + $included = []; + $alreadyCompiled = []; + foreach ($files as $file) { + // Skip the files from Debugbar, they are only loaded for Debugging and confuse the output. + // Of course some files are stil always loaded (ServiceProvider, Facade etc) + if ( + strpos($file, 'vendor/maximebf/debugbar/src') !== false || strpos( + $file, + 'vendor/barryvdh/laravel-debugbar/src' + ) !== false + ) { + continue; + } elseif (!in_array($file, $compiled)) { + $included[] = [ + 'message' => "'" . $this->stripBasePath($file) . "',", + // Use PHP syntax so we can copy-paste to compile config file. + 'is_string' => true, + ]; + } else { + $alreadyCompiled[] = [ + 'message' => "* '" . $this->stripBasePath($file) . "',", + // Mark with *, so know they are compiled anyways. + 'is_string' => true, + ]; + } + } + + // First the included files, then those that are going to be compiled. + $messages = array_merge($included, $alreadyCompiled); + + return [ + 'messages' => $messages, + 'count' => count($included), + ]; + } + + /** + * Get the files included on load. + * + * @return array + */ + protected function getIncludedFiles() + { + return get_included_files(); + } + + /** + * Get the files that are going to be compiled, so they aren't as important. + * + * @return array + */ + protected function getCompiledFiles() + { + if ($this->app && class_exists('Illuminate\Foundation\Console\OptimizeCommand')) { + $reflector = new \ReflectionClass('Illuminate\Foundation\Console\OptimizeCommand'); + $path = dirname($reflector->getFileName()) . '/Optimize/config.php'; + + if (file_exists($path)) { + $app = $this->app; + $core = require $path; + return array_merge($core, $app['config']['compile']); + } + } + return []; + } + + /** + * Remove the basePath from the paths, so they are relative to the base + * + * @param $path + * @return string + */ + protected function stripBasePath($path) + { + return ltrim(str_replace($this->basePath, '', $path), '/'); + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + $name = $this->getName(); + return [ + "$name" => [ + "icon" => "files-o", + "widget" => "PhpDebugBar.Widgets.MessagesWidget", + "map" => "$name.messages", + "default" => "{}" + ], + "$name:badge" => [ + "map" => "$name.count", + "default" => "null" + ] + ]; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'files'; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/GateCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/GateCollector.php new file mode 100644 index 000000000..e08235332 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/GateCollector.php @@ -0,0 +1,54 @@ +setDataFormatter(new SimpleFormatter()); + $gate->after(function ($user, $ability, $result, $arguments = []) { + $this->addCheck($user, $ability, $result, $arguments); + }); + } + + public function addCheck($user, $ability, $result, $arguments = []) + { + $userKey = 'user'; + $userId = null; + + if ($user) { + $userKey = Str::snake(class_basename($user)); + $userId = $user instanceof Authenticatable ? $user->getAuthIdentifier() : $user->id; + } + + $label = $result ? 'success' : 'error'; + + // Response::allowed() was added in Laravel 6.x + if ($result instanceof Response && method_exists($result, 'allowed')) { + $label = $result->allowed() ? 'success' : 'error'; + } + + $this->addMessage([ + 'ability' => $ability, + 'result' => $result, + $userKey => $userId, + 'arguments' => $this->getDataFormatter()->formatVar($arguments), + ], $label, false); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/LaravelCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/LaravelCollector.php new file mode 100644 index 000000000..4201058e2 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/LaravelCollector.php @@ -0,0 +1,71 @@ +app = $app; + } + + /** + * {@inheritDoc} + */ + public function collect() + { + // Fallback if not injected + $app = $this->app ?: app(); + + return [ + "version" => $app::VERSION, + "environment" => $app->environment(), + "locale" => $app->getLocale(), + ]; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'laravel'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return [ + "version" => [ + "icon" => "github", + "tooltip" => "Laravel Version", + "map" => "laravel.version", + "default" => "" + ], + "environment" => [ + "icon" => "desktop", + "tooltip" => "Environment", + "map" => "laravel.environment", + "default" => "" + ], + "locale" => [ + "icon" => "flag", + "tooltip" => "Current locale", + "map" => "laravel.locale", + "default" => "", + ], + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/LivewireCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/LivewireCollector.php new file mode 100644 index 000000000..fe8d29d86 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/LivewireCollector.php @@ -0,0 +1,82 @@ +getData()['_instance']; + + // Create an unique name for each compoent + $key = $component->getName() . ' #' . $component->id; + + $data = [ + 'data' => $component->getPublicPropertiesDefinedBySubClass(), + ]; + + if ($request->request->get('id') == $component->id) { + $data['oldData'] = $request->request->get('data'); + $data['actionQueue'] = $request->request->get('actionQueue'); + } + + $data['name'] = $component->getName(); + $data['view'] = $view->name(); + $data['component'] = get_class($component); + $data['id'] = $component->id; + + $this->data[$key] = $this->formatVar($data); + }); + } + + public function collect() + { + return ['data' => $this->data, 'count' => count($this->data)]; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'livewire'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return [ + "livewire" => [ + "icon" => "bolt", + "widget" => "PhpDebugBar.Widgets.VariableListWidget", + "map" => "livewire.data", + "default" => "{}" + ], + 'livewire:badge' => [ + 'map' => 'livewire.count', + 'default' => 0 + ] + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/LogsCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/LogsCollector.php new file mode 100644 index 000000000..ca2b3bcb8 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/LogsCollector.php @@ -0,0 +1,143 @@ +getLogsFile(); + $this->getStorageLogs($path); + } + + /** + * Get the path to the logs file + * + * @return string + */ + public function getLogsFile() + { + // default daily rotating logs (Laravel 5.0) + $path = storage_path() . '/logs/laravel-' . date('Y-m-d') . '.log'; + + // single file logs + if (!file_exists($path)) { + $path = storage_path() . '/logs/laravel.log'; + } + + return $path; + } + + /** + * get logs apache in app/storage/logs + * only 24 last of current day + * + * @param string $path + * + * @return array + */ + public function getStorageLogs($path) + { + if (!file_exists($path)) { + return; + } + + //Load the latest lines, guessing about 15x the number of log entries (for stack traces etc) + $file = implode("", $this->tailFile($path, $this->lines)); + + foreach ($this->getLogs($file) as $log) { + $this->addMessage($log['header'] . $log['stack'], $log['level'], false); + } + } + + /** + * By Ain Tohvri (ain) + * http://tekkie.flashbit.net/php/tail-functionality-in-php + * @param string $file + * @param int $lines + * @return array + */ + protected function tailFile($file, $lines) + { + $handle = fopen($file, "r"); + $linecounter = $lines; + $pos = -2; + $beginning = false; + $text = []; + while ($linecounter > 0) { + $t = " "; + while ($t != "\n") { + if (fseek($handle, $pos, SEEK_END) == -1) { + $beginning = true; + break; + } + $t = fgetc($handle); + $pos--; + } + $linecounter--; + if ($beginning) { + rewind($handle); + } + $text[$lines - $linecounter - 1] = fgets($handle); + if ($beginning) { + break; + } + } + fclose($handle); + return array_reverse($text); + } + + /** + * Search a string for log entries + * Based on https://github.com/mikemand/logviewer/blob/master/src/Kmd/Logviewer/Logviewer.php by mikemand + * + * @param $file + * @return array + */ + public function getLogs($file) + { + $pattern = "/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\].*/"; + + $log_levels = $this->getLevels(); + + // There has GOT to be a better way of doing this... + preg_match_all($pattern, $file, $headings); + $log_data = preg_split($pattern, $file); + + $log = []; + foreach ($headings as $h) { + for ($i = 0, $j = count($h); $i < $j; $i++) { + foreach ($log_levels as $ll) { + if (strpos(strtolower($h[$i]), strtolower('.' . $ll))) { + $log[] = ['level' => $ll, 'header' => $h[$i], 'stack' => $log_data[$i]]; + } + } + } + } + + $log = array_reverse($log); + + return $log; + } + + /** + * Get the log levels from psr/log. + * Based on https://github.com/mikemand/logviewer/blob/master/src/Kmd/Logviewer/Logviewer.php by mikemand + * + * @access public + * @return array + */ + public function getLevels() + { + $class = new ReflectionClass(new LogLevel()); + return $class->getConstants(); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/ModelsCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/ModelsCollector.php new file mode 100644 index 000000000..0ac99cf09 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/ModelsCollector.php @@ -0,0 +1,65 @@ +listen('eloquent.retrieved:*', function ($event, $models) { + foreach (array_filter($models) as $model) { + $class = get_class($model); + $this->models[$class] = ($this->models[$class] ?? 0) + 1; + $this->count++; + } + }); + } + + public function collect() + { + ksort($this->models, SORT_NUMERIC); + + return ['data' => array_reverse($this->models), 'count' => $this->count]; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'models'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return [ + "models" => [ + "icon" => "cubes", + "widget" => "PhpDebugBar.Widgets.HtmlVariableListWidget", + "map" => "models.data", + "default" => "{}" + ], + 'models:badge' => [ + 'map' => 'models.count', + 'default' => 0 + ] + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/MultiAuthCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/MultiAuthCollector.php new file mode 100644 index 000000000..c5c0aa720 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/MultiAuthCollector.php @@ -0,0 +1,168 @@ +auth = $auth; + $this->guards = $guards; + } + + /** + * Set to show the users name/email + * @param bool $showName + */ + public function setShowName($showName) + { + $this->showName = (bool) $showName; + } + + /** + * @{inheritDoc} + */ + public function collect() + { + $data = [ + 'guards' => [], + ]; + $names = ''; + + foreach ($this->guards as $guardName => $config) { + try { + $guard = $this->auth->guard($guardName); + if ($this->hasUser($guard)) { + $user = $guard->user(); + + if (!is_null($user)) { + $data['guards'][$guardName] = $this->getUserInformation($user); + $names .= $guardName . ": " . $data['guards'][$guardName]['name'] . ', '; + } + } else { + $data['guards'][$guardName] = null; + } + } catch (\Exception $e) { + continue; + } + } + + foreach ($data['guards'] as $key => $var) { + if (!is_string($data['guards'][$key])) { + $data['guards'][$key] = $this->formatVar($var); + } + } + + $data['names'] = rtrim($names, ', '); + + return $data; + } + + private function hasUser(Guard $guard) + { + if (method_exists($guard, 'hasUser')) { + return $guard->hasUser(); + } + + // For Laravel 5.5 + if (method_exists($guard, 'alreadyAuthenticated')) { + return $guard->alreadyAuthenticated(); + } + + return false; + } + + /** + * Get displayed user information + * @param \Illuminate\Auth\UserInterface $user + * @return array + */ + protected function getUserInformation($user = null) + { + // Defaults + if (is_null($user)) { + return [ + 'name' => 'Guest', + 'user' => ['guest' => true], + ]; + } + + // The default auth identifer is the ID number, which isn't all that + // useful. Try username and email. + $identifier = $user instanceof Authenticatable ? $user->getAuthIdentifier() : $user->id; + if (is_numeric($identifier)) { + try { + if (isset($user->username)) { + $identifier = $user->username; + } elseif (isset($user->email)) { + $identifier = $user->email; + } + } catch (\Throwable $e) { + } + } + + return [ + 'name' => $identifier, + 'user' => $user instanceof Arrayable ? $user->toArray() : $user, + ]; + } + + /** + * @{inheritDoc} + */ + public function getName() + { + return 'auth'; + } + + /** + * @{inheritDoc} + */ + public function getWidgets() + { + $widgets = [ + "auth" => [ + "icon" => "lock", + "widget" => "PhpDebugBar.Widgets.VariableListWidget", + "map" => "auth.guards", + "default" => "{}" + ] + ]; + + if ($this->showName) { + $widgets['auth.name'] = [ + 'icon' => 'user', + 'tooltip' => 'Auth status', + 'map' => 'auth.names', + 'default' => '', + ]; + } + + return $widgets; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/PhpInfoCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/PhpInfoCollector.php new file mode 100644 index 000000000..0c955e900 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/PhpInfoCollector.php @@ -0,0 +1,18 @@ +timeCollector = $timeCollector; + } + + /** + * Renders the SQL of traced statements with params embedded + * + * @param boolean $enabled + * @param string $quotationChar NOT USED + */ + public function setRenderSqlWithParams($enabled = true, $quotationChar = "'") + { + $this->renderSqlWithParams = $enabled; + } + + /** + * Show or hide the hints in the parameters + * + * @param boolean $enabled + */ + public function setShowHints($enabled = true) + { + $this->showHints = $enabled; + } + + /** + * Show or hide copy button next to the queries + * + * @param boolean $enabled + */ + public function setShowCopyButton($enabled = true) + { + $this->showCopyButton = $enabled; + } + + /** + * Enable/disable finding the source + * + * @param bool $value + * @param array $middleware + */ + public function setFindSource($value, array $middleware) + { + $this->findSource = (bool) $value; + $this->middleware = $middleware; + } + + /** + * Set additional paths to exclude from the backtrace + * + * @param array $excludePaths Array of file paths to exclude from backtrace + */ + public function mergeBacktraceExcludePaths(array $excludePaths) + { + $this->backtraceExcludePaths = array_merge($this->backtraceExcludePaths, $excludePaths); + } + + /** + * Enable/disable the shaded duration background on queries + * + * @param bool $enabled + */ + public function setDurationBackground($enabled) + { + $this->durationBackground = $enabled; + } + + /** + * Enable/disable the EXPLAIN queries + * + * @param bool $enabled + * @param array|null $types Array of types to explain queries (select/insert/update/delete) + */ + public function setExplainSource($enabled, $types) + { + $this->explainQuery = $enabled; + // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 +// if($types){ +// $this->explainTypes = $types; +// } + } + + /** + * + * @param string $query + * @param array $bindings + * @param float $time + * @param \Illuminate\Database\Connection $connection + */ + public function addQuery($query, $bindings, $time, $connection) + { + $explainResults = []; + $time = $time / 1000; + $endTime = microtime(true); + $startTime = $endTime - $time; + $hints = $this->performQueryAnalysis($query); + + $pdo = null; + try { + $pdo = $connection->getPdo(); + } catch (\Exception $e) { + // ignore error for non-pdo laravel drivers + } + $bindings = $connection->prepareBindings($bindings); + + // Run EXPLAIN on this query (if needed) + if ($this->explainQuery && $pdo && preg_match('/^\s*(' . implode('|', $this->explainTypes) . ') /i', $query)) { + $statement = $pdo->prepare('EXPLAIN ' . $query); + $statement->execute($bindings); + $explainResults = $statement->fetchAll(\PDO::FETCH_CLASS); + } + + $bindings = $this->getDataFormatter()->checkBindings($bindings); + if (!empty($bindings) && $this->renderSqlWithParams) { + foreach ($bindings as $key => $binding) { + // This regex matches placeholders only, not the question marks, + // nested in quotes, while we iterate through the bindings + // and substitute placeholders by suitable values. + $regex = is_numeric($key) + ? "/(?quote((string) $binding); + } catch (\Exception $e) { + $binding = $this->emulateQuote($binding); + } + } else { + $binding = $this->emulateQuote($binding); + } + } + + $query = preg_replace($regex, addcslashes($binding, '$'), $query, 1); + } + } + + $source = []; + + if ($this->findSource) { + try { + $source = array_slice($this->findSource(), 0, 5); + } catch (\Exception $e) { + } + } + + $this->queries[] = [ + 'query' => $query, + 'type' => 'query', + 'bindings' => $this->getDataFormatter()->escapeBindings($bindings), + 'time' => $time, + 'source' => $source, + 'explain' => $explainResults, + 'connection' => $connection->getDatabaseName(), + 'driver' => $connection->getConfig('driver'), + 'hints' => $this->showHints ? $hints : null, + 'show_copy' => $this->showCopyButton, + ]; + + if ($this->timeCollector !== null) { + $this->timeCollector->addMeasure(Str::limit($query, 100), $startTime, $endTime); + } + } + + /** + * Mimic mysql_real_escape_string + * + * @param string $value + * @return string + */ + protected function emulateQuote($value) + { + $search = ["\\", "\x00", "\n", "\r", "'", '"', "\x1a"]; + $replace = ["\\\\","\\0","\\n", "\\r", "\'", '\"', "\\Z"]; + + return "'" . str_replace($search, $replace, (string) $value) . "'"; + } + + /** + * Explainer::performQueryAnalysis() + * + * Perform simple regex analysis on the code + * + * @package xplain (https://github.com/rap2hpoutre/mysql-xplain-xplain) + * @author e-doceo + * @copyright 2014 + * @version $Id$ + * @access public + * @param string $query + * @return string[] + */ + protected function performQueryAnalysis($query) + { + // @codingStandardsIgnoreStart + $hints = []; + if (preg_match('/^\\s*SELECT\\s*`?[a-zA-Z0-9]*`?\\.?\\*/i', $query)) { + $hints[] = 'Use SELECT * only if you need all columns from table'; + } + if (preg_match('/ORDER BY RAND()/i', $query)) { + $hints[] = 'ORDER BY RAND() is slow, try to avoid if you can. + You can read this + or this'; + } + if (strpos($query, '!=') !== false) { + $hints[] = 'The != operator is not standard. Use the <> operator to test for inequality instead.'; + } + if (stripos($query, 'WHERE') === false && preg_match('/^(SELECT) /i', $query)) { + $hints[] = 'The SELECT statement has no WHERE clause and could examine many more rows than intended'; + } + if (preg_match('/LIMIT\\s/i', $query) && stripos($query, 'ORDER BY') === false) { + $hints[] = 'LIMIT without ORDER BY causes non-deterministic results, depending on the query execution plan'; + } + if (preg_match('/LIKE\\s[\'"](%.*?)[\'"]/i', $query, $matches)) { + $hints[] = 'An argument has a leading wildcard character: ' . $matches[1] . '. + The predicate with this argument is not sargable and cannot use an index if one exists.'; + } + return $hints; + + // @codingStandardsIgnoreEnd + } + + /** + * Use a backtrace to search for the origins of the query. + * + * @return array + */ + protected function findSource() + { + $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT, app('config')->get('debugbar.debug_backtrace_limit', 50)); + + $sources = []; + + foreach ($stack as $index => $trace) { + $sources[] = $this->parseTrace($index, $trace); + } + + return array_filter($sources); + } + + /** + * Parse a trace element from the backtrace stack. + * + * @param int $index + * @param array $trace + * @return object|bool + */ + protected function parseTrace($index, array $trace) + { + $frame = (object) [ + 'index' => $index, + 'namespace' => null, + 'name' => null, + 'line' => isset($trace['line']) ? $trace['line'] : '?', + ]; + + if (isset($trace['function']) && $trace['function'] == 'substituteBindings') { + $frame->name = 'Route binding'; + + return $frame; + } + + if ( + isset($trace['class']) && + isset($trace['file']) && + !$this->fileIsInExcludedPath($trace['file']) + ) { + $file = $trace['file']; + + if (isset($trace['object']) && is_a($trace['object'], 'Twig_Template')) { + list($file, $frame->line) = $this->getTwigInfo($trace); + } elseif (strpos($file, storage_path()) !== false) { + $hash = pathinfo($file, PATHINFO_FILENAME); + + if (! $frame->name = $this->findViewFromHash($hash)) { + $frame->name = $hash; + } + + $frame->namespace = 'view'; + + return $frame; + } elseif (strpos($file, 'Middleware') !== false) { + $frame->name = $this->findMiddlewareFromFile($file); + + if ($frame->name) { + $frame->namespace = 'middleware'; + } else { + $frame->name = $this->normalizeFilename($file); + } + + return $frame; + } + + $frame->name = $this->normalizeFilename($file); + + return $frame; + } + + + return false; + } + + /** + * Check if the given file is to be excluded from analysis + * + * @param string $file + * @return bool + */ + protected function fileIsInExcludedPath($file) + { + $normalizedPath = str_replace('\\', '/', $file); + + foreach ($this->backtraceExcludePaths as $excludedPath) { + if (strpos($normalizedPath, $excludedPath) !== false) { + return true; + } + } + + return false; + } + + /** + * Find the middleware alias from the file. + * + * @param string $file + * @return string|null + */ + protected function findMiddlewareFromFile($file) + { + $filename = pathinfo($file, PATHINFO_FILENAME); + + foreach ($this->middleware as $alias => $class) { + if (strpos($class, $filename) !== false) { + return $alias; + } + } + } + + /** + * Find the template name from the hash. + * + * @param string $hash + * @return null|string + */ + protected function findViewFromHash($hash) + { + $finder = app('view')->getFinder(); + + if (isset($this->reflection['viewfinderViews'])) { + $property = $this->reflection['viewfinderViews']; + } else { + $reflection = new \ReflectionClass($finder); + $property = $reflection->getProperty('views'); + $property->setAccessible(true); + $this->reflection['viewfinderViews'] = $property; + } + + foreach ($property->getValue($finder) as $name => $path) { + if (sha1($path) == $hash || md5($path) == $hash) { + return $name; + } + } + } + + /** + * Get the filename/line from a Twig template trace + * + * @param array $trace + * @return array The file and line + */ + protected function getTwigInfo($trace) + { + $file = $trace['object']->getTemplateName(); + + if (isset($trace['line'])) { + foreach ($trace['object']->getDebugInfo() as $codeLine => $templateLine) { + if ($codeLine <= $trace['line']) { + return [$file, $templateLine]; + } + } + } + + return [$file, -1]; + } + + /** + * Shorten the path by removing the relative links and base dir + * + * @param string $path + * @return string + */ + protected function normalizeFilename($path) + { + if (file_exists($path)) { + $path = realpath($path); + } + return str_replace(base_path(), '', $path); + } + + /** + * Collect a database transaction event. + * @param string $event + * @param \Illuminate\Database\Connection $connection + * @return array + */ + public function collectTransactionEvent($event, $connection) + { + $source = []; + + if ($this->findSource) { + try { + $source = $this->findSource(); + } catch (\Exception $e) { + } + } + + $this->queries[] = [ + 'query' => $event, + 'type' => 'transaction', + 'bindings' => [], + 'time' => 0, + 'source' => $source, + 'explain' => [], + 'connection' => $connection->getDatabaseName(), + 'driver' => $connection->getConfig('driver'), + 'hints' => null, + 'show_copy' => false, + ]; + } + + /** + * Reset the queries. + */ + public function reset() + { + $this->queries = []; + } + + /** + * {@inheritDoc} + */ + public function collect() + { + $totalTime = 0; + $queries = $this->queries; + + $statements = []; + foreach ($queries as $query) { + $totalTime += $query['time']; + + $statements[] = [ + 'sql' => $this->getDataFormatter()->formatSql($query['query']), + 'type' => $query['type'], + 'params' => [], + 'bindings' => $query['bindings'], + 'hints' => $query['hints'], + 'show_copy' => $query['show_copy'], + 'backtrace' => array_values($query['source']), + 'duration' => $query['time'], + 'duration_str' => ($query['type'] == 'transaction') ? '' : $this->formatDuration($query['time']), + 'stmt_id' => $this->getDataFormatter()->formatSource(reset($query['source'])), + 'connection' => $query['connection'], + ]; + + // Add the results from the explain as new rows + if ($query['driver'] === 'pgsql') { + $explainer = trim(implode("\n", array_map(function ($explain) { + return $explain->{'QUERY PLAN'}; + }, $query['explain']))); + + if ($explainer) { + $statements[] = [ + 'sql' => " - EXPLAIN: {$explainer}", + 'type' => 'explain', + ]; + } + } else { + foreach ($query['explain'] as $explain) { + $statements[] = [ + 'sql' => " - EXPLAIN # {$explain->id}: `{$explain->table}` ({$explain->select_type})", + 'type' => 'explain', + 'params' => $explain, + 'row_count' => $explain->rows, + 'stmt_id' => $explain->id, + ]; + } + } + } + + if ($this->durationBackground) { + if ($totalTime > 0) { + // For showing background measure on Queries tab + $start_percent = 0; + + foreach ($statements as $i => $statement) { + if (!isset($statement['duration'])) { + continue; + } + + $width_percent = $statement['duration'] / $totalTime * 100; + + $statements[$i] = array_merge($statement, [ + 'start_percent' => round($start_percent, 3), + 'width_percent' => round($width_percent, 3), + ]); + + $start_percent += $width_percent; + } + } + } + + $nb_statements = array_filter($queries, function ($query) { + return $query['type'] === 'query'; + }); + + $data = [ + 'nb_statements' => count($nb_statements), + 'nb_failed_statements' => 0, + 'accumulated_duration' => $totalTime, + 'accumulated_duration_str' => $this->formatDuration($totalTime), + 'statements' => $statements + ]; + return $data; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'queries'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return [ + "queries" => [ + "icon" => "database", + "widget" => "PhpDebugBar.Widgets.LaravelSQLQueriesWidget", + "map" => "queries", + "default" => "[]" + ], + "queries:badge" => [ + "map" => "queries.nb_statements", + "default" => 0 + ] + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/RequestCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/RequestCollector.php new file mode 100644 index 000000000..cc3fe866f --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/RequestCollector.php @@ -0,0 +1,199 @@ + + * + */ +class RequestCollector extends DataCollector implements DataCollectorInterface, Renderable +{ + /** @var \Symfony\Component\HttpFoundation\Request $request */ + protected $request; + /** @var \Symfony\Component\HttpFoundation\Request $response */ + protected $response; + /** @var \Symfony\Component\HttpFoundation\Session\SessionInterface $session */ + protected $session; + /** @var string|null */ + protected $currentRequestId; + + /** + * Create a new SymfonyRequestCollector + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session + */ + public function __construct($request, $response, $session = null, $currentRequestId = null) + { + $this->request = $request; + $this->response = $response; + $this->session = $session; + $this->currentRequestId = $currentRequestId; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'request'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return [ + "request" => [ + "icon" => "tags", + "widget" => "PhpDebugBar.Widgets.HtmlVariableListWidget", + "map" => "request", + "default" => "{}" + ] + ]; + } + + /** + * {@inheritdoc} + */ + public function collect() + { + $request = $this->request; + $response = $this->response; + + $responseHeaders = $response->headers->all(); + $cookies = []; + foreach ($response->headers->getCookies() as $cookie) { + $cookies[] = $this->getCookieHeader( + $cookie->getName(), + $cookie->getValue(), + $cookie->getExpiresTime(), + $cookie->getPath(), + $cookie->getDomain(), + $cookie->isSecure(), + $cookie->isHttpOnly() + ); + } + if (count($cookies) > 0) { + $responseHeaders['Set-Cookie'] = $cookies; + } + + $statusCode = $response->getStatusCode(); + + $data = [ + 'path_info' => $request->getPathInfo(), + 'status_code' => $statusCode, + 'status_text' => isset(Response::$statusTexts[$statusCode]) ? Response::$statusTexts[$statusCode] : '', + 'format' => $request->getRequestFormat(), + 'content_type' => $response->headers->get('Content-Type') ? $response->headers->get( + 'Content-Type' + ) : 'text/html', + 'request_query' => $request->query->all(), + 'request_request' => $request->request->all(), + 'request_headers' => $request->headers->all(), + 'request_server' => $request->server->all(), + 'request_cookies' => $request->cookies->all(), + 'response_headers' => $responseHeaders, + ]; + + if ($this->session) { + $sessionAttributes = []; + foreach ($this->session->all() as $key => $value) { + $sessionAttributes[$key] = $value; + } + $data['session_attributes'] = $sessionAttributes; + } + + foreach ($data['request_server'] as $key => $value) { + if ( + Str::is('*_KEY', $key) || Str::is('*_PASSWORD', $key) + || Str::is('*_SECRET', $key) || Str::is('*_PW', $key) + || Str::is('*_TOKEN', $key) || Str::is('*_PASS', $key) + ) { + $data['request_server'][$key] = '******'; + } + } + + if (isset($data['request_headers']['php-auth-pw'])) { + $data['request_headers']['php-auth-pw'] = '******'; + } + + if (isset($data['request_server']['PHP_AUTH_PW'])) { + $data['request_server']['PHP_AUTH_PW'] = '******'; + } + ; + + foreach ($data as $key => $var) { + if (!is_string($data[$key])) { + $data[$key] = DataCollector::getDefaultVarDumper()->renderVar($var); + } else { + $data[$key] = e($data[$key]); + } + } + + $htmlData = []; + if (class_exists(Telescope::class)) { + $entry = IncomingEntry::make([ + 'requestId' => $this->currentRequestId, + ])->type('debugbar'); + Telescope::$entriesQueue[] = $entry; + $url = route('debugbar.telescope', [$entry->uuid]); + $htmlData['telescope'] = 'View in Telescope'; + } + + return $htmlData + $data; + } + + private function getCookieHeader($name, $value, $expires, $path, $domain, $secure, $httponly) + { + $cookie = sprintf('%s=%s', $name, urlencode($value)); + + if (0 !== $expires) { + if (is_numeric($expires)) { + $expires = (int) $expires; + } elseif ($expires instanceof \DateTime) { + $expires = $expires->getTimestamp(); + } else { + $expires = strtotime($expires); + if (false === $expires || -1 == $expires) { + throw new \InvalidArgumentException( + sprintf('The "expires" cookie parameter is not valid.', $expires) + ); + } + } + + $cookie .= '; expires=' . substr( + \DateTime::createFromFormat('U', $expires, new \DateTimeZone('UTC'))->format('D, d-M-Y H:i:s T'), + 0, + -5 + ); + } + + if ($domain) { + $cookie .= '; domain=' . $domain; + } + + $cookie .= '; path=' . $path; + + if ($secure) { + $cookie .= '; secure'; + } + + if ($httponly) { + $cookie .= '; httponly'; + } + + return $cookie; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/RouteCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/RouteCollector.php new file mode 100644 index 000000000..a255302f3 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/RouteCollector.php @@ -0,0 +1,220 @@ + 'subl://open?url=file://%file&line=%line', + 'textmate' => 'txmt://open?url=file://%file&line=%line', + 'emacs' => 'emacs://open?url=file://%file&line=%line', + 'macvim' => 'mvim://open/?url=file://%file&line=%line', + 'phpstorm' => 'phpstorm://open?file=%file&line=%line', + 'idea' => 'idea://open?file=%file&line=%line', + 'vscode' => 'vscode://file/%file:%line', + 'vscode-insiders' => 'vscode-insiders://file/%file:%line', + 'vscode-remote' => 'vscode://vscode-remote/%file:%line', + 'vscode-insiders-remote' => 'vscode-insiders://vscode-remote/%file:%line', + 'vscodium' => 'vscodium://file/%file:%line', + 'nova' => 'nova://core/open/file?filename=%file&line=%line', + 'xdebug' => 'xdebug://%file@%line', + 'atom' => 'atom://core/open/file?filename=%file&line=%line', + 'espresso' => 'x-espresso://open?filepath=%file&lines=%line', + 'netbeans' => 'netbeans://open/?f=%file:%line', + ]; + + public function __construct(Router $router) + { + $this->router = $router; + } + + /** + * {@inheritDoc} + */ + public function collect() + { + $route = $this->router->current(); + return $this->getRouteInformation($route); + } + + /** + * Get the route information for a given route. + * + * @param \Illuminate\Routing\Route $route + * @return array + */ + protected function getRouteInformation($route) + { + if (!is_a($route, 'Illuminate\Routing\Route')) { + return []; + } + $uri = head($route->methods()) . ' ' . $route->uri(); + $action = $route->getAction(); + + $result = [ + 'uri' => $uri ?: '-', + ]; + + $result = array_merge($result, $action); + + + if ( + isset($action['controller']) + && is_string($action['controller']) + && strpos($action['controller'], '@') !== false + ) { + list($controller, $method) = explode('@', $action['controller']); + if (class_exists($controller) && method_exists($controller, $method)) { + $reflector = new \ReflectionMethod($controller, $method); + } + unset($result['uses']); + } elseif (isset($action['uses']) && $action['uses'] instanceof \Closure) { + $reflector = new \ReflectionFunction($action['uses']); + $result['uses'] = $this->formatVar($result['uses']); + } + + if (isset($reflector)) { + $filename = ltrim(str_replace(base_path(), '', $reflector->getFileName()), '/'); + + if ($href = $this->getEditorHref($reflector->getFileName(), $reflector->getStartLine())) { + $result['file'] = sprintf('%s:%s-%s', $href, $filename, $reflector->getStartLine(), $reflector->getEndLine()); + } else { + $result['file'] = sprintf('%s:%s-%s', $filename, $reflector->getStartLine(), $reflector->getEndLine()); + } + } + + if ($middleware = $this->getMiddleware($route)) { + $result['middleware'] = $middleware; + } + + + + return $result; + } + + /** + * Get middleware + * + * @param \Illuminate\Routing\Route $route + * @return string + */ + protected function getMiddleware($route) + { + return implode(', ', array_map(function ($middleware) { + return $middleware instanceof Closure ? 'Closure' : $middleware; + }, $route->middleware())); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'route'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + $widgets = [ + "route" => [ + "icon" => "share", + "widget" => "PhpDebugBar.Widgets.HtmlVariableListWidget", + "map" => "route", + "default" => "{}" + ] + ]; + if (Config::get('debugbar.options.route.label', true)) { + $widgets['currentroute'] = [ + "icon" => "share", + "tooltip" => "Route", + "map" => "route.uri", + "default" => "" + ]; + } + return $widgets; + } + + /** + * Display the route information on the console. + * + * @param array $routes + * @return void + */ + protected function displayRoutes(array $routes) + { + $this->table->setHeaders($this->headers)->setRows($routes); + + $this->table->render($this->getOutput()); + } + + /** + * Get the editor href for a given file and line, if available. + * + * @param string $filePath + * @param int $line + * + * @throws InvalidArgumentException If editor resolver does not return a string + * + * @return null|string + */ + protected function getEditorHref($filePath, $line) + { + if (empty(config('debugbar.editor'))) { + return null; + } + + if (empty($this->editors[config('debugbar.editor')])) { + throw new InvalidArgumentException( + 'Unknown editor identifier: ' . config('debugbar.editor') . '. Known editors:' . + implode(', ', array_keys($this->editors)) + ); + } + + $filePath = $this->replaceSitesPath($filePath); + + $url = str_replace(['%file', '%line'], [$filePath, $line], $this->editors[config('debugbar.editor')]); + + return $url; + } + + /** + * Replace remote path + * + * @param string $filePath + * + * @return string + */ + protected function replaceSitesPath($filePath) + { + return str_replace(config('debugbar.remote_sites_path'), config('debugbar.local_sites_path'), $filePath); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/SessionCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/SessionCollector.php new file mode 100644 index 000000000..8501646d6 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/SessionCollector.php @@ -0,0 +1,58 @@ +session = $session; + } + + /** + * {@inheritdoc} + */ + public function collect() + { + $data = []; + foreach ($this->session->all() as $key => $value) { + $data[$key] = is_string($value) ? $value : $this->formatVar($value); + } + return $data; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'session'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return [ + "session" => [ + "icon" => "archive", + "widget" => "PhpDebugBar.Widgets.VariableListWidget", + "map" => "session", + "default" => "{}" + ] + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataCollector/ViewCollector.php b/vendor/barryvdh/laravel-debugbar/src/DataCollector/ViewCollector.php new file mode 100644 index 000000000..7a1b0c577 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataCollector/ViewCollector.php @@ -0,0 +1,107 @@ +setDataFormatter(new SimpleFormatter()); + $this->collect_data = $collectData; + $this->name = 'views'; + $this->templates = []; + } + + public function getName() + { + return 'views'; + } + + public function getWidgets() + { + return [ + 'views' => [ + 'icon' => 'leaf', + 'widget' => 'PhpDebugBar.Widgets.TemplatesWidget', + 'map' => 'views', + 'default' => '[]' + ], + 'views:badge' => [ + 'map' => 'views.nb_templates', + 'default' => 0 + ] + ]; + } + + /** + * Add a View instance to the Collector + * + * @param \Illuminate\View\View $view + */ + public function addView(View $view) + { + $name = $view->getName(); + $path = $view->getPath(); + + if (!is_object($path)) { + if ($path) { + $path = ltrim(str_replace(base_path(), '', realpath($path)), '/'); + } + + if (substr($path, -10) == '.blade.php') { + $type = 'blade'; + } else { + $type = pathinfo($path, PATHINFO_EXTENSION); + } + } else { + $type = get_class($view); + $path = ''; + } + + if (!$this->collect_data) { + $params = array_keys($view->getData()); + } else { + $data = []; + foreach ($view->getData() as $key => $value) { + $data[$key] = $this->getDataFormatter()->formatVar($value); + } + $params = $data; + } + + $template = [ + 'name' => $path ? sprintf('%s (%s)', $name, $path) : $name, + 'param_count' => count($params), + 'params' => $params, + 'type' => $type, + ]; + + if ($this->getXdebugLink($path)) { + $template['xdebug_link'] = $this->getXdebugLink(realpath($view->getPath())); + } + + $this->templates[] = $template; + } + + public function collect() + { + $templates = $this->templates; + + return [ + 'nb_templates' => count($templates), + 'templates' => $templates, + ]; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php b/vendor/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php new file mode 100644 index 000000000..f8574f5d6 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php @@ -0,0 +1,87 @@ +checkBindings($binding); + $binding = '[' . implode(',', $binding) . ']'; + } + + if (is_object($binding)) { + $binding = json_encode($binding); + } + } + + return $bindings; + } + + /** + * Make the bindings safe for outputting. + * + * @param array $bindings + * @return array + */ + public function escapeBindings($bindings) + { + foreach ($bindings as &$binding) { + $binding = htmlentities((string) $binding, ENT_QUOTES, 'UTF-8', false); + } + + return $bindings; + } + + /** + * Format a source object. + * + * @param object|null $source If the backtrace is disabled, the $source will be null. + * @return string + */ + public function formatSource($source) + { + if (! is_object($source)) { + return ''; + } + + $parts = []; + + if ($source->namespace) { + $parts['namespace'] = $source->namespace . '::'; + } + + $parts['name'] = $source->name; + $parts['line'] = ':' . $source->line; + + return implode($parts); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DataFormatter/SimpleFormatter.php b/vendor/barryvdh/laravel-debugbar/src/DataFormatter/SimpleFormatter.php new file mode 100644 index 000000000..9825e9133 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DataFormatter/SimpleFormatter.php @@ -0,0 +1,106 @@ +exportValue($data); + } + + /** + * Converts a PHP value to a string. + * + * @param mixed $value The PHP value + * @param int $depth Only for internal usage + * @param bool $deep Only for internal usage + * + * @return string The string representation of the given value + * @author Bernhard Schussek + */ + private function exportValue($value, $depth = 1, $deep = false) + { + if ($value instanceof \__PHP_Incomplete_Class) { + return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value)); + } + + if (is_object($value)) { + if ($value instanceof \DateTimeInterface) { + return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ATOM)); + } + + return sprintf('Object(%s)', get_class($value)); + } + + if (is_array($value)) { + if (empty($value)) { + return '[]'; + } + + $indent = str_repeat(' ', $depth); + + $a = array(); + foreach ($value as $k => $v) { + if (is_array($v)) { + $deep = true; + } + $a[] = sprintf('%s => %s', $k, $this->exportValue($v, $depth + 1, $deep)); + } + + if ($deep) { + $args = [$indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1)]; + return sprintf("[\n%s%s\n%s]", ...$args); + } + + $s = sprintf('[%s]', implode(', ', $a)); + + if (80 > strlen($s)) { + return $s; + } + + return sprintf("[\n%s%s\n]", $indent, implode(sprintf(",\n%s", $indent), $a)); + } + + if (is_resource($value)) { + return sprintf('Resource(%s#%d)', get_resource_type($value), $value); + } + + if (null === $value) { + return 'null'; + } + + if (false === $value) { + return 'false'; + } + + if (true === $value) { + return 'true'; + } + + return (string) $value; + } + + /** + * @param \__PHP_Incomplete_Class $value + * @return mixed + * @author Bernhard Schussek + */ + private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value) + { + $array = new \ArrayObject($value); + + return $array['__PHP_Incomplete_Class_Name']; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/DebugbarViewEngine.php b/vendor/barryvdh/laravel-debugbar/src/DebugbarViewEngine.php new file mode 100644 index 000000000..d808193ae --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/DebugbarViewEngine.php @@ -0,0 +1,55 @@ +engine = $engine; + $this->laravelDebugbar = $laravelDebugbar; + } + + /** + * @param string $path + * @param array $data + * @return string + */ + public function get($path, array $data = []) + { + $shortPath = ltrim(str_replace(base_path(), '', realpath($path)), '/'); + + return $this->laravelDebugbar->measure($shortPath, function () use ($path, $data) { + return $this->engine->get($path, $data); + }); + } + + /** + * NOTE: This is done to support other Engine swap (example: Livewire). + * @param $name + * @param $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + return $this->engine->$name(...$arguments); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Facade.php b/vendor/barryvdh/laravel-debugbar/src/Facade.php new file mode 100644 index 000000000..933040d63 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Facade.php @@ -0,0 +1,30 @@ +cssFiles['laravel'] = __DIR__ . '/Resources/laravel-debugbar.css'; + $this->cssVendors['fontawesome'] = __DIR__ . '/Resources/vendor/font-awesome/style.css'; + $this->jsFiles['laravel-sql'] = __DIR__ . '/Resources/sqlqueries/widget.js'; + $this->jsFiles['laravel-cache'] = __DIR__ . '/Resources/cache/widget.js'; + + $theme = config('debugbar.theme', 'auto'); + switch ($theme) { + case 'dark': + $this->cssFiles['laravel-dark'] = __DIR__ . '/Resources/laravel-debugbar-dark-mode.css'; + break; + case 'auto': + $this->cssFiles['laravel-dark-0'] = __DIR__ . '/Resources/laravel-debugbar-dark-mode-media-start.css'; + $this->cssFiles['laravel-dark-1'] = __DIR__ . '/Resources/laravel-debugbar-dark-mode.css'; + $this->cssFiles['laravel-dark-2'] = __DIR__ . '/Resources/laravel-debugbar-dark-mode-media-end.css'; + } + } + + /** + * Set the URL Generator + * + * @param \Illuminate\Routing\UrlGenerator $url + * @deprecated + */ + public function setUrlGenerator($url) + { + } + + /** + * {@inheritdoc} + */ + public function renderHead() + { + $cssRoute = route('debugbar.assets.css', [ + 'v' => $this->getModifiedTime('css'), + 'theme' => config('debugbar.theme', 'auto'), + ]); + + $jsRoute = route('debugbar.assets.js', [ + 'v' => $this->getModifiedTime('js') + ]); + + $cssRoute = preg_replace('/\Ahttps?:/', '', $cssRoute); + $jsRoute = preg_replace('/\Ahttps?:/', '', $jsRoute); + + $html = ""; + $html .= ""; + + if ($this->isJqueryNoConflictEnabled()) { + $html .= '' . "\n"; + } + + $html .= $this->getInlineHtml(); + + + return $html; + } + + protected function getInlineHtml() + { + $html = ''; + + foreach (['head', 'css', 'js'] as $asset) { + foreach ($this->getAssets('inline_' . $asset) as $item) { + $html .= $item . "\n"; + } + } + + return $html; + } + /** + * Get the last modified time of any assets. + * + * @param string $type 'js' or 'css' + * @return int + */ + protected function getModifiedTime($type) + { + $files = $this->getAssets($type); + + $latest = 0; + foreach ($files as $file) { + $mtime = filemtime($file); + if ($mtime > $latest) { + $latest = $mtime; + } + } + return $latest; + } + + /** + * Return assets as a string + * + * @param string $type 'js' or 'css' + * @return string + */ + public function dumpAssetsToString($type) + { + $files = $this->getAssets($type); + + $content = ''; + foreach ($files as $file) { + $content .= file_get_contents($file) . "\n"; + } + + return $content; + } + + /** + * Makes a URI relative to another + * + * @param string|array $uri + * @param string $root + * @return string + */ + protected function makeUriRelativeTo($uri, $root) + { + if (!$root) { + return $uri; + } + + if (is_array($uri)) { + $uris = []; + foreach ($uri as $u) { + $uris[] = $this->makeUriRelativeTo($u, $root); + } + return $uris; + } + + if (substr($uri ?? '', 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri ?? '')) { + return $uri; + } + return rtrim($root, '/') . "/$uri"; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php b/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php new file mode 100644 index 000000000..1842aa5de --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php @@ -0,0 +1,1166 @@ +app = $app; + $this->version = $app->version(); + $this->is_lumen = Str::contains($this->version, 'Lumen'); + } + + /** + * Enable the Debugbar and boot, if not already booted. + */ + public function enable() + { + $this->enabled = true; + + if (!$this->booted) { + $this->boot(); + } + } + + /** + * Boot the debugbar (add collectors, renderer and listener) + */ + public function boot() + { + if ($this->booted) { + return; + } + + /** @var \Barryvdh\Debugbar\LaravelDebugbar $debugbar */ + $debugbar = $this; + + /** @var Application $app */ + $app = $this->app; + + // Set custom error handler + if ($app['config']->get('debugbar.error_handler', false)) { + set_error_handler([$this, 'handleError']); + } + + $this->selectStorage($debugbar); + + if ($this->shouldCollect('phpinfo', true)) { + $this->addCollector(new PhpInfoCollector()); + } + + if ($this->shouldCollect('messages', true)) { + $this->addCollector(new MessagesCollector()); + } + + if ($this->shouldCollect('time', true)) { + $startTime = $app['request']->server('REQUEST_TIME_FLOAT'); + $this->addCollector(new TimeDataCollector($startTime)); + + if (! $this->isLumen() && $startTime) { + $this->app->booted( + function () use ($debugbar, $startTime) { + $debugbar['time']->addMeasure('Booting', $startTime, microtime(true)); + } + ); + } + + $debugbar->startMeasure('application', 'Application'); + } + + if ($this->shouldCollect('memory', true)) { + $this->addCollector(new MemoryCollector()); + } + + if ($this->shouldCollect('exceptions', true)) { + try { + $exceptionCollector = new ExceptionsCollector(); + $exceptionCollector->setChainExceptions( + $this->app['config']->get('debugbar.options.exceptions.chain', true) + ); + $this->addCollector($exceptionCollector); + } catch (\Exception $e) { + } + } + + if ($this->shouldCollect('laravel', false)) { + $this->addCollector(new LaravelCollector($this->app)); + } + + if ($this->shouldCollect('default_request', false)) { + $this->addCollector(new RequestDataCollector()); + } + + if ($this->shouldCollect('events', false) && isset($this->app['events'])) { + try { + $startTime = $this->app['request']->server('REQUEST_TIME_FLOAT'); + $eventCollector = new EventCollector($startTime); + $this->addCollector($eventCollector); + $this->app['events']->subscribe($eventCollector); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add EventCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($this->shouldCollect('views', true) && isset($this->app['events'])) { + try { + $collectData = $this->app['config']->get('debugbar.options.views.data', true); + $this->addCollector(new ViewCollector($collectData)); + $this->app['events']->listen( + 'composing:*', + function ($view, $data = []) use ($debugbar) { + if ($data) { + $view = $data[0]; // For Laravel >= 5.4 + } + $debugbar['views']->addView($view); + } + ); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add ViewCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if (!$this->isLumen() && $this->shouldCollect('route')) { + try { + $this->addCollector($this->app->make('Barryvdh\Debugbar\DataCollector\RouteCollector')); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add RouteCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if (!$this->isLumen() && $this->shouldCollect('log', true)) { + try { + if ($this->hasCollector('messages')) { + $logger = new MessagesCollector('log'); + $this['messages']->aggregate($logger); + $this->app['log']->listen( + function ($level, $message = null, $context = null) use ($logger) { + // Laravel 5.4 changed how the global log listeners are called. We must account for + // the first argument being an "event object", where arguments are passed + // via object properties, instead of individual arguments. + if ($level instanceof \Illuminate\Log\Events\MessageLogged) { + $message = $level->message; + $context = $level->context; + $level = $level->level; + } + + try { + $logMessage = (string) $message; + if (mb_check_encoding($logMessage, 'UTF-8')) { + $logMessage .= (!empty($context) ? ' ' . json_encode($context) : ''); + } else { + $logMessage = "[INVALID UTF-8 DATA]"; + } + } catch (\Exception $e) { + $logMessage = "[Exception: " . $e->getMessage() . "]"; + } + $logger->addMessage( + '[' . date('H:i:s') . '] ' . "LOG.$level: " . $logMessage, + $level, + false + ); + } + ); + } else { + $this->addCollector(new MonologCollector($this->getMonologLogger())); + } + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add LogsCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($this->shouldCollect('db', true) && isset($this->app['db'])) { + $db = $this->app['db']; + if ( + $debugbar->hasCollector('time') && $this->app['config']->get( + 'debugbar.options.db.timeline', + false + ) + ) { + $timeCollector = $debugbar->getCollector('time'); + } else { + $timeCollector = null; + } + $queryCollector = new QueryCollector($timeCollector); + + $queryCollector->setDataFormatter(new QueryFormatter()); + + if ($this->app['config']->get('debugbar.options.db.with_params')) { + $queryCollector->setRenderSqlWithParams(true); + } + + if ($this->app['config']->get('debugbar.options.db.backtrace')) { + $middleware = ! $this->is_lumen ? $this->app['router']->getMiddleware() : []; + $queryCollector->setFindSource(true, $middleware); + } + + if ($this->app['config']->get('debugbar.options.db.backtrace_exclude_paths')) { + $excludePaths = $this->app['config']->get('debugbar.options.db.backtrace_exclude_paths'); + $queryCollector->mergeBacktraceExcludePaths($excludePaths); + } + + $queryCollector->setDurationBackground($this->app['config']->get('debugbar.options.db.duration_background')); + + if ($this->app['config']->get('debugbar.options.db.explain.enabled')) { + $types = $this->app['config']->get('debugbar.options.db.explain.types'); + $queryCollector->setExplainSource(true, $types); + } + + if ($this->app['config']->get('debugbar.options.db.hints', true)) { + $queryCollector->setShowHints(true); + } + + if ($this->app['config']->get('debugbar.options.db.show_copy', false)) { + $queryCollector->setShowCopyButton(true); + } + + $this->addCollector($queryCollector); + + try { + $db->listen( + function ( + $query, + $bindings = null, + $time = null, + $connectionName = null + ) use ( + $db, + $queryCollector + ) { + if (!app(static::class)->shouldCollect('db', true)) { + return; // Issue 776 : We've turned off collecting after the listener was attached + } + // Laravel 5.2 changed the way some core events worked. We must account for + // the first argument being an "event object", where arguments are passed + // via object properties, instead of individual arguments. + if ($query instanceof \Illuminate\Database\Events\QueryExecuted) { + $bindings = $query->bindings; + $time = $query->time; + $connection = $query->connection; + + $query = $query->sql; + } else { + $connection = $db->connection($connectionName); + } + + //allow collecting only queries slower than a specified amount of milliseconds + $threshold = app('config')->get('debugbar.options.db.slow_threshold', false); + if (!$threshold || $time > $threshold) { + $queryCollector->addQuery((string)$query, $bindings, $time, $connection); + } + } + ); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add listen to Queries for Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + + try { + $db->getEventDispatcher()->listen( + \Illuminate\Database\Events\TransactionBeginning::class, + function ($transaction) use ($queryCollector) { + $queryCollector->collectTransactionEvent('Begin Transaction', $transaction->connection); + } + ); + + $db->getEventDispatcher()->listen( + \Illuminate\Database\Events\TransactionCommitted::class, + function ($transaction) use ($queryCollector) { + $queryCollector->collectTransactionEvent('Commit Transaction', $transaction->connection); + } + ); + + $db->getEventDispatcher()->listen( + \Illuminate\Database\Events\TransactionRolledBack::class, + function ($transaction) use ($queryCollector) { + $queryCollector->collectTransactionEvent('Rollback Transaction', $transaction->connection); + } + ); + + $db->getEventDispatcher()->listen( + 'connection.*.beganTransaction', + function ($event, $params) use ($queryCollector) { + $queryCollector->collectTransactionEvent('Begin Transaction', $params[0]); + } + ); + + $db->getEventDispatcher()->listen( + 'connection.*.committed', + function ($event, $params) use ($queryCollector) { + $queryCollector->collectTransactionEvent('Commit Transaction', $params[0]); + } + ); + + $db->getEventDispatcher()->listen( + 'connection.*.rollingBack', + function ($event, $params) use ($queryCollector) { + $queryCollector->collectTransactionEvent('Rollback Transaction', $params[0]); + } + ); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add listen transactions to Queries for Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($this->shouldCollect('models', true)) { + try { + $modelsCollector = $this->app->make('Barryvdh\Debugbar\DataCollector\ModelsCollector'); + $this->addCollector($modelsCollector); + } catch (\Exception $e) { + // No Models collector + } + } + + if ($this->shouldCollect('livewire', true) && $this->app->bound('livewire')) { + try { + $livewireCollector = $this->app->make('Barryvdh\Debugbar\DataCollector\LivewireCollector'); + $this->addCollector($livewireCollector); + } catch (\Exception $e) { + $this->addThrowable( + new Exception('Cannot add Livewire Collector: ' . $e->getMessage(), $e->getCode(), $e) + ); + } + } + + if ($this->shouldCollect('mail', true) && class_exists('Illuminate\Mail\MailServiceProvider') && $this->checkVersion('9.0', '<')) { + try { + $mailer = $this->app['mailer']->getSwiftMailer(); + $this->addCollector(new SwiftMailCollector($mailer)); + if ( + $this->app['config']->get('debugbar.options.mail.full_log') && $this->hasCollector( + 'messages' + ) + ) { + $this['messages']->aggregate(new SwiftLogCollector($mailer)); + } + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add MailCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($this->shouldCollect('logs', false)) { + try { + $file = $this->app['config']->get('debugbar.options.logs.file'); + $this->addCollector(new LogsCollector($file)); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add LogsCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + if ($this->shouldCollect('files', false)) { + $this->addCollector(new FilesCollector($app)); + } + + if ($this->shouldCollect('auth', false)) { + try { + $guards = $this->app['config']->get('auth.guards', []); + $authCollector = new MultiAuthCollector($app['auth'], $guards); + + $authCollector->setShowName( + $this->app['config']->get('debugbar.options.auth.show_name') + ); + $this->addCollector($authCollector); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add AuthCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($this->shouldCollect('gate', false)) { + try { + $gateCollector = $this->app->make('Barryvdh\Debugbar\DataCollector\GateCollector'); + $this->addCollector($gateCollector); + } catch (\Exception $e) { + // No Gate collector + } + } + + if ($this->shouldCollect('cache', false) && isset($this->app['events'])) { + try { + $collectValues = $this->app['config']->get('debugbar.options.cache.values', true); + $startTime = $this->app['request']->server('REQUEST_TIME_FLOAT'); + $cacheCollector = new CacheCollector($startTime, $collectValues); + $this->addCollector($cacheCollector); + $this->app['events']->subscribe($cacheCollector); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add CacheCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + $renderer = $this->getJavascriptRenderer(); + $renderer->setIncludeVendors($this->app['config']->get('debugbar.include_vendors', true)); + $renderer->setBindAjaxHandlerToFetch($app['config']->get('debugbar.capture_ajax', true)); + $renderer->setBindAjaxHandlerToXHR($app['config']->get('debugbar.capture_ajax', true)); + + $this->booted = true; + } + + public function shouldCollect($name, $default = false) + { + return $this->app['config']->get('debugbar.collectors.' . $name, $default); + } + + /** + * Adds a data collector + * + * @param DataCollectorInterface $collector + * + * @throws DebugBarException + * @return $this + */ + public function addCollector(DataCollectorInterface $collector) + { + parent::addCollector($collector); + + if (method_exists($collector, 'useHtmlVarDumper')) { + $collector->useHtmlVarDumper(); + } + + return $this; + } + + /** + * Handle silenced errors + * + * @param $level + * @param $message + * @param string $file + * @param int $line + * @param array $context + * @throws \ErrorException + */ + public function handleError($level, $message, $file = '', $line = 0, $context = []) + { + if (error_reporting() & $level) { + throw new \ErrorException($message, 0, $level, $file, $line); + } else { + $this->addMessage($message, 'deprecation'); + } + } + + /** + * Starts a measure + * + * @param string $name Internal name, used to stop the measure + * @param string $label Public name + */ + public function startMeasure($name, $label = null) + { + if ($this->hasCollector('time')) { + /** @var \DebugBar\DataCollector\TimeDataCollector $collector */ + $collector = $this->getCollector('time'); + $collector->startMeasure($name, $label); + } + } + + /** + * Stops a measure + * + * @param string $name + */ + public function stopMeasure($name) + { + if ($this->hasCollector('time')) { + /** @var \DebugBar\DataCollector\TimeDataCollector $collector */ + $collector = $this->getCollector('time'); + try { + $collector->stopMeasure($name); + } catch (\Exception $e) { + // $this->addThrowable($e); + } + } + } + + /** + * Adds an exception to be profiled in the debug bar + * + * @param Exception $e + * @deprecated in favor of addThrowable + */ + public function addException(Exception $e) + { + return $this->addThrowable($e); + } + + /** + * Adds an exception to be profiled in the debug bar + * + * @param Exception $e + */ + public function addThrowable($e) + { + if ($this->hasCollector('exceptions')) { + /** @var \DebugBar\DataCollector\ExceptionsCollector $collector */ + $collector = $this->getCollector('exceptions'); + $collector->addThrowable($e); + } + } + + /** + * Returns a JavascriptRenderer for this instance + * + * @param string $baseUrl + * @param string $basePathng + * @return JavascriptRenderer + */ + public function getJavascriptRenderer($baseUrl = null, $basePath = null) + { + if ($this->jsRenderer === null) { + $this->jsRenderer = new JavascriptRenderer($this, $baseUrl, $basePath); + } + return $this->jsRenderer; + } + + /** + * Modify the response and inject the debugbar (or data in headers) + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response + * @return \Symfony\Component\HttpFoundation\Response + */ + public function modifyResponse(Request $request, Response $response) + { + $app = $this->app; + if (!$this->isEnabled() || $this->isDebugbarRequest()) { + return $response; + } + + // Show the Http Response Exception in the Debugbar, when available + if (isset($response->exception)) { + $this->addThrowable($response->exception); + } + + if ($this->shouldCollect('config', false)) { + try { + $configCollector = new ConfigCollector(); + $configCollector->setData($app['config']->all()); + $this->addCollector($configCollector); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add ConfigCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($this->app->bound(SessionManager::class)) { + + /** @var \Illuminate\Session\SessionManager $sessionManager */ + $sessionManager = $app->make(SessionManager::class); + $httpDriver = new SymfonyHttpDriver($sessionManager, $response); + $this->setHttpDriver($httpDriver); + + if ($this->shouldCollect('session') && ! $this->hasCollector('session')) { + try { + $this->addCollector(new SessionCollector($sessionManager)); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add SessionCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + } else { + $sessionManager = null; + } + + if ($this->shouldCollect('symfony_request', true) && !$this->hasCollector('request')) { + try { + $reqId = $this->getCurrentRequestId(); + $this->addCollector(new RequestCollector($request, $response, $sessionManager, $reqId)); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add SymfonyRequestCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + } + + if ($app['config']->get('debugbar.clockwork') && ! $this->hasCollector('clockwork')) { + try { + $this->addCollector(new ClockworkCollector($request, $response, $sessionManager)); + } catch (\Exception $e) { + $this->addThrowable( + new Exception( + 'Cannot add ClockworkCollector to Laravel Debugbar: ' . $e->getMessage(), + $e->getCode(), + $e + ) + ); + } + + $this->addClockworkHeaders($response); + } + + if ($response->isRedirection()) { + try { + $this->stackData(); + } catch (\Exception $e) { + $app['log']->error('Debugbar exception: ' . $e->getMessage()); + } + } elseif ( + $this->isJsonRequest($request) && + $app['config']->get('debugbar.capture_ajax', true) + ) { + try { + $this->sendDataInHeaders(true); + + if ($app['config']->get('debugbar.add_ajax_timing', false)) { + $this->addServerTimingHeaders($response); + } + } catch (\Exception $e) { + $app['log']->error('Debugbar exception: ' . $e->getMessage()); + } + } elseif ( + ($response->headers->has('Content-Type') && + strpos($response->headers->get('Content-Type'), 'html') === false) || + $request->getRequestFormat() !== 'html' || + $response->getContent() === false || + $this->isJsonRequest($request) + ) { + try { + // Just collect + store data, don't inject it. + $this->collect(); + } catch (\Exception $e) { + $app['log']->error('Debugbar exception: ' . $e->getMessage()); + } + } elseif ($app['config']->get('debugbar.inject', true)) { + try { + $this->injectDebugbar($response); + } catch (\Exception $e) { + $app['log']->error('Debugbar exception: ' . $e->getMessage()); + } + } + + + + return $response; + } + + /** + * Check if the Debugbar is enabled + * @return boolean + */ + public function isEnabled() + { + if ($this->enabled === null) { + $config = $this->app['config']; + $configEnabled = value($config->get('debugbar.enabled')); + + if ($configEnabled === null) { + $configEnabled = $config->get('app.debug'); + } + + $this->enabled = $configEnabled && !$this->app->runningInConsole() && !$this->app->environment('testing'); + } + + return $this->enabled; + } + + /** + * Check if this is a request to the Debugbar OpenHandler + * + * @return bool + */ + protected function isDebugbarRequest() + { + return $this->app['request']->segment(1) == $this->app['config']->get('debugbar.route_prefix'); + } + + /** + * @param \Symfony\Component\HttpFoundation\Request $request + * @return bool + */ + protected function isJsonRequest(Request $request) + { + // If XmlHttpRequest or Live, return true + if ($request->isXmlHttpRequest() || $request->headers->get('X-Livewire')) { + return true; + } + + // Check if the request wants Json + $acceptable = $request->getAcceptableContentTypes(); + return (isset($acceptable[0]) && $acceptable[0] == 'application/json'); + } + + /** + * Collects the data from the collectors + * + * @return array + */ + public function collect() + { + /** @var Request $request */ + $request = $this->app['request']; + + $this->data = [ + '__meta' => [ + 'id' => $this->getCurrentRequestId(), + 'datetime' => date('Y-m-d H:i:s'), + 'utime' => microtime(true), + 'method' => $request->getMethod(), + 'uri' => $request->getRequestUri(), + 'ip' => $request->getClientIp() + ] + ]; + + foreach ($this->collectors as $name => $collector) { + $this->data[$name] = $collector->collect(); + } + + // Remove all invalid (non UTF-8) characters + array_walk_recursive( + $this->data, + function (&$item) { + if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) { + $item = mb_convert_encoding($item, 'UTF-8', 'UTF-8'); + } + } + ); + + if ($this->storage !== null) { + $this->storage->save($this->getCurrentRequestId(), $this->data); + } + + return $this->data; + } + + /** + * Injects the web debug toolbar into the given Response. + * + * @param \Symfony\Component\HttpFoundation\Response $response A Response instance + * Based on https://github.com/symfony/WebProfilerBundle/blob/master/EventListener/WebDebugToolbarListener.php + */ + public function injectDebugbar(Response $response) + { + $content = $response->getContent(); + + $renderer = $this->getJavascriptRenderer(); + if ($this->getStorage()) { + $openHandlerUrl = route('debugbar.openhandler'); + $renderer->setOpenHandlerUrl($openHandlerUrl); + } + + $head = $renderer->renderHead(); + $widget = $renderer->render(); + + // Try to put the js/css directly before the + $pos = strripos($content, ''); + if (false !== $pos) { + $content = substr($content, 0, $pos) . $head . substr($content, $pos); + } else { + // Append the head before the widget + $widget = $head . $widget; + } + + // Try to put the widget at the end, directly before the + $pos = strripos($content, ''); + if (false !== $pos) { + $content = substr($content, 0, $pos) . $widget . substr($content, $pos); + } else { + $content = $content . $widget; + } + + $original = null; + if ($response instanceof \Illuminate\Http\Response && $response->getOriginalContent()) { + $original = $response->getOriginalContent(); + } + + // Update the new content and reset the content length + $response->setContent($content); + $response->headers->remove('Content-Length'); + + // Restore original response (eg. the View or Ajax data) + if ($original) { + $response->original = $original; + } + } + + /** + * Disable the Debugbar + */ + public function disable() + { + $this->enabled = false; + } + + /** + * Adds a measure + * + * @param string $label + * @param float $start + * @param float $end + */ + public function addMeasure($label, $start, $end) + { + if ($this->hasCollector('time')) { + /** @var \DebugBar\DataCollector\TimeDataCollector $collector */ + $collector = $this->getCollector('time'); + $collector->addMeasure($label, $start, $end); + } + } + + /** + * Utility function to measure the execution of a Closure + * + * @param string $label + * @param \Closure $closure + * @return mixed + */ + public function measure($label, \Closure $closure) + { + if ($this->hasCollector('time')) { + /** @var \DebugBar\DataCollector\TimeDataCollector $collector */ + $collector = $this->getCollector('time'); + $result = $collector->measure($label, $closure); + } else { + $result = $closure(); + } + return $result; + } + + /** + * Collect data in a CLI request + * + * @return array + */ + public function collectConsole() + { + if (!$this->isEnabled()) { + return; + } + + $this->data = [ + '__meta' => [ + 'id' => $this->getCurrentRequestId(), + 'datetime' => date('Y-m-d H:i:s'), + 'utime' => microtime(true), + 'method' => 'CLI', + 'uri' => isset($_SERVER['argv']) ? implode(' ', $_SERVER['argv']) : null, + 'ip' => isset($_SERVER['SSH_CLIENT']) ? $_SERVER['SSH_CLIENT'] : null + ] + ]; + + foreach ($this->collectors as $name => $collector) { + $this->data[$name] = $collector->collect(); + } + + // Remove all invalid (non UTF-8) characters + array_walk_recursive( + $this->data, + function (&$item) { + if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) { + $item = mb_convert_encoding($item, 'UTF-8', 'UTF-8'); + } + } + ); + + if ($this->storage !== null) { + $this->storage->save($this->getCurrentRequestId(), $this->data); + } + + return $this->data; + } + + /** + * Magic calls for adding messages + * + * @param string $method + * @param array $args + * @return mixed|void + */ + public function __call($method, $args) + { + $messageLevels = ['emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug', 'log']; + if (in_array($method, $messageLevels)) { + foreach ($args as $arg) { + $this->addMessage($arg, $method); + } + } + } + + /** + * Adds a message to the MessagesCollector + * + * A message can be anything from an object to a string + * + * @param mixed $message + * @param string $label + */ + public function addMessage($message, $label = 'info') + { + if ($this->hasCollector('messages')) { + /** @var \DebugBar\DataCollector\MessagesCollector $collector */ + $collector = $this->getCollector('messages'); + $collector->addMessage($message, $label); + } + } + + /** + * Check the version of Laravel + * + * @param string $version + * @param string $operator (default: '>=') + * @return boolean + */ + protected function checkVersion($version, $operator = ">=") + { + return version_compare($this->version, $version, $operator); + } + + protected function isLumen() + { + return $this->is_lumen; + } + + /** + * @param DebugBar $debugbar + */ + protected function selectStorage(DebugBar $debugbar) + { + $config = $this->app['config']; + if ($config->get('debugbar.storage.enabled')) { + $driver = $config->get('debugbar.storage.driver', 'file'); + + switch ($driver) { + case 'pdo': + $connection = $config->get('debugbar.storage.connection'); + $table = $this->app['db']->getTablePrefix() . 'phpdebugbar'; + $pdo = $this->app['db']->connection($connection)->getPdo(); + $storage = new PdoStorage($pdo, $table); + break; + case 'redis': + $connection = $config->get('debugbar.storage.connection'); + $client = $this->app['redis']->connection($connection); + if (is_a($client, 'Illuminate\Redis\Connections\Connection', false)) { + $client = $client->client(); + } + $storage = new RedisStorage($client); + break; + case 'custom': + $class = $config->get('debugbar.storage.provider'); + $storage = $this->app->make($class); + break; + case 'socket': + $hostname = $config->get('debugbar.storage.hostname', '127.0.0.1'); + $port = $config->get('debugbar.storage.port', 2304); + $storage = new SocketStorage($hostname, $port); + break; + case 'file': + default: + $path = $config->get('debugbar.storage.path'); + $storage = new FilesystemStorage($this->app['files'], $path); + break; + } + + $debugbar->setStorage($storage); + } + } + + protected function addClockworkHeaders(Response $response) + { + $prefix = $this->app['config']->get('debugbar.route_prefix'); + $response->headers->set('X-Clockwork-Id', $this->getCurrentRequestId(), true); + $response->headers->set('X-Clockwork-Version', 1, true); + $response->headers->set('X-Clockwork-Path', $prefix . '/clockwork/', true); + } + + /** + * Add Server-Timing headers for the TimeData collector + * + * @see https://www.w3.org/TR/server-timing/ + * @param Response $response + */ + protected function addServerTimingHeaders(Response $response) + { + if ($this->hasCollector('time')) { + $collector = $this->getCollector('time'); + + $headers = []; + foreach ($collector->collect()['measures'] as $k => $m) { + $headers[] = sprintf('app;desc="%s";dur=%F', str_replace(array("\n", "\r"), ' ', str_replace('"', "'", $m['label'])), $m['duration'] * 1000); + } + + $response->headers->set('Server-Timing', $headers, false); + } + } + + /** + * @return \Monolog\Logger + * @throws Exception + */ + private function getMonologLogger() + { + // The logging was refactored in Laravel 5.6 + if ($this->checkVersion('5.6')) { + $logger = $this->app['log']->getLogger(); + } else { + $logger = $this->app['log']->getMonolog(); + } + + if (get_class($logger) !== 'Monolog\Logger') { + throw new Exception('Logger is not a Monolog\Logger instance'); + } + + return $logger; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/LumenServiceProvider.php b/vendor/barryvdh/laravel-debugbar/src/LumenServiceProvider.php new file mode 100644 index 000000000..ed6297115 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/LumenServiceProvider.php @@ -0,0 +1,51 @@ +app->router; + } + + /** + * Get the config path + * + * @return string + */ + protected function getConfigPath() + { + return base_path('config/debugbar.php'); + } + + /** + * Register the Debugbar Middleware + * + * @param string $middleware + */ + protected function registerMiddleware($middleware) + { + $this->app->middleware([$middleware]); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['debugbar', 'command.debugbar.clear']; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Middleware/DebugbarEnabled.php b/vendor/barryvdh/laravel-debugbar/src/Middleware/DebugbarEnabled.php new file mode 100644 index 000000000..146ce2d18 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Middleware/DebugbarEnabled.php @@ -0,0 +1,43 @@ +debugbar = $debugbar; + } + + /** + * Handle an incoming request. + * + * @param Request $request + * @param Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + if (!$this->debugbar->isEnabled()) { + abort(404); + } + + return $next($request); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php b/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php new file mode 100644 index 000000000..48be02d8a --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php @@ -0,0 +1,120 @@ +container = $container; + $this->debugbar = $debugbar; + $this->except = config('debugbar.except') ?: []; + } + + /** + * Handle an incoming request. + * + * @param Request $request + * @param Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + if (!$this->debugbar->isEnabled() || $this->inExceptArray($request)) { + return $next($request); + } + + $this->debugbar->boot(); + + try { + /** @var \Illuminate\Http\Response $response */ + $response = $next($request); + } catch (Throwable $e) { + $response = $this->handleException($request, $e); + } + + // Modify the response to add the Debugbar + $this->debugbar->modifyResponse($request, $response); + + return $response; + } + + /** + * Handle the given exception. + * + * (Copy from Illuminate\Routing\Pipeline by Taylor Otwell) + * + * @param $passable + * @param Throwable $e + * @return mixed + * @throws Exception + */ + protected function handleException($passable, $e) + { + if (! $this->container->bound(ExceptionHandler::class) || ! $passable instanceof Request) { + throw $e; + } + + $handler = $this->container->make(ExceptionHandler::class); + + $handler->report($e); + + return $handler->render($passable, $e); + } + + /** + * Determine if the request has a URI that should be ignored. + * + * @param \Illuminate\Http\Request $request + * @return bool + */ + protected function inExceptArray($request) + { + foreach ($this->except as $except) { + if ($except !== '/') { + $except = trim($except, '/'); + } + + if ($request->is($except)) { + return true; + } + } + + return false; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/cache/widget.js b/vendor/barryvdh/laravel-debugbar/src/Resources/cache/widget.js new file mode 100644 index 000000000..5314eacec --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/cache/widget.js @@ -0,0 +1,59 @@ +(function ($) { + + var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); + + /** + * Widget for the displaying cache events + * + * Options: + * - data + */ + var LaravelCacheWidget = PhpDebugBar.Widgets.LaravelCacheWidget = PhpDebugBar.Widgets.TimelineWidget.extend({ + + tagName: 'ul', + + className: csscls('timeline cache'), + + onForgetClick: function (e, el) { + e.stopPropagation(); + + $.ajax({ + url: $(el).attr("data-url"), + type: 'DELETE', + success: function (result) { + $(el).fadeOut(200); + } + }); + }, + + render: function () { + LaravelCacheWidget.__super__.render.apply(this); + + this.bindAttr('data', function (data) { + + if (data.measures) { + var self = this; + var lines = this.$el.find('.' + csscls('measure')); + + for (var i = 0; i < data.measures.length; i++) { + var measure = data.measures[i]; + var m = lines[i]; + + if (measure.params && !$.isEmptyObject(measure.params)) { + if (measure.params.delete && measure.params.key) { + $('') + .addClass(csscls('forget')) + .text('forget') + .attr('data-url', measure.params.delete) + .one('click', function (e) { + self.onForgetClick(e, this); }) + .appendTo(m); + } + } + } + } + }); + } + }); + +})(PhpDebugBar.$); diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode-media-end.css b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode-media-end.css new file mode 100644 index 000000000..ff30235f0 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode-media-end.css @@ -0,0 +1 @@ +} \ No newline at end of file diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode-media-start.css b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode-media-start.css new file mode 100644 index 000000000..5b1a64706 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode-media-start.css @@ -0,0 +1 @@ +@media (prefers-color-scheme: dark) { \ No newline at end of file diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode.css b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode.css new file mode 100644 index 000000000..69baff9b9 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar-dark-mode.css @@ -0,0 +1,290 @@ +/* Dark mode */ + +div.phpdebugbar, +div.phpdebugbar-openhandler { + --color-gray-100: #F7FAFC; + --color-gray-200: #EDF2F7; + --color-gray-300: #E2E8F0; + --color-gray-400: #CBD5E0; + --color-gray-500: #A0AEC0; + --color-gray-600: #718096; + --color-gray-700: #4A5568; + --color-gray-800: #2D3748; + --color-gray-900: #1A202C; + --color-red-vivid: #FF0040; +} + +div.phpdebugbar, +div.phpdebugbar-openhandler { + background: var(--color-gray-800); +} + +div.phpdebugbar, +div.phpdebugbar-openhandler, +div.phpdebugbar div.phpdebugbar-header > div > *, +div.phpdebugbar ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label, +div.phpdebugbar ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-collector, +div.phpdebugbar code.phpdebugbar-widgets-sql span.hljs-keyword, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-header, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-header a { + color: var(--color-gray-200); +} + +div.phpdebugbar-openhandler, +div.phpdebugbar div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar, +div.phpdebugbar div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-file, +div.phpdebugbar ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item table.phpdebugbar-widgets-params, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > a, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions button, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form input, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select { + border-color: var(--color-gray-600); +} + +div.phpdebugbar div.phpdebugbar-header, +div.phpdebugbar div.phpdebugbar-panel div.phpdebugbar-widgets-status > span:first-child:before, +div.phpdebugbar-openhandler table th, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > a, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions button, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form input, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select { + text-shadow: 1px 1px var(--color-gray-700); +} + +div.phpdebugbar div.phpdebugbar-header > div > select, +div.phpdebugbar ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item table.phpdebugbar-widgets-params, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form input, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select, +div.phpdebugbar input[type='text'], +div.phpdebugbar input[type='password'] { + background-color: var(--color-gray-800); +} + +div.phpdebugbar div.phpdebugbar-header, +div.phpdebugbar a.phpdebugbar-restore-btn, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-header, +div.phpdebugbar dl.phpdebugbar-widgets-kvlist > :nth-child(4n-1), +div.phpdebugbar dl.phpdebugbar-widgets-kvlist > :nth-child(4n), +div.phpdebugbar ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item:nth-child(even), +div.phpdebugbar .hljs, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params th, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > a, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions button, +div.phpdebugbar div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params th { + background-color: var(--color-gray-900); +} + +div.phpdebugbar .phpdebugbar-widgets-mails ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-headers, +div.phpdebugbar ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item table.phpdebugbar-widgets-params { + border-left-color: var(--color-gray-600); +} + +div.phpdebugbar a.phpdebugbar-tab:hover, +div.phpdebugbar span.phpdebugbar-indicator:hover, +div.phpdebugbar a.phpdebugbar-indicator:hover, +div.phpdebugbar a.phpdebugbar-close-btn:hover, +div.phpdebugbar a.phpdebugbar-minimize-btn:hover, +div.phpdebugbar a.phpdebugbar-maximize-btn:hover, +div.phpdebugbar a.phpdebugbar-open-btn:hover, +div.phpdebugbar-openhandler table th, +div.phpdebugbar-openhandler table tr:nth-child(2n), +div.phpdebugbar div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar { + background-color: var(--color-gray-700); +} + +div.phpdebugbar .phpdebugbar-indicator span.phpdebugbar-tooltip, +div.phpdebugbar div.phpdebugbar-mini-design a.phpdebugbar-tab:hover span.phpdebugbar-text, +div.phpdebugbar pre.sf-dump, +div.phpdebugbar .hljs, +div.phpdebugbar code.phpdebugbar-widgets-sql span.hljs-operator { + color: var(--color-gray-100); +} + +div.phpdebugbar pre.sf-dump .sf-dump-public, +div.phpdebugbar pre.sf-dump .sf-dump-protected, +div.phpdebugbar pre.sf-dump .sf-dump-private { + color: var(--color-gray-100) !important; +} + +div.phpdebugbar div.phpdebugbar-panel div.phpdebugbar-widgets-status > span:first-child:before, +div.phpdebugbar-openhandler a { + color: var(--color-gray-500); +} + +div.phpdebugbar .phpdebugbar-indicator span.phpdebugbar-tooltip, +div.phpdebugbar div.phpdebugbar-mini-design a.phpdebugbar-tab:hover span.phpdebugbar-text { + background: var(--color-gray-900); +} + +div.phpdebugbar .hljs-tag .hljs-value, +div.phpdebugbar .hljs-phpdoc, +div.phpdebugbar .tex .hljs-formula, +div.phpdebugbar div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-message { + color: var(--color-red-vivid); +} + +div.phpdebugbar div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-filename, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-database, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-duration, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-memory, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-row-count, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-copy-clipboard, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-stmt-id, +div.phpdebugbar .phpdebugbar-widgets-callgraph pre, +div.phpdebugbar .phpdebugbar-text-muted, +div.phpdebugbar-openhandler .phpdebugbar-text-muted +{ + color: var(--color-gray-600); +} + +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate { + background-color: #6f6200; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value:before { + color: #7B7B7B; +} + +div.phpdebugbar-openhandler { + border-top-color: #fa5661; +} + +div.phpdebugbar div.phpdebugbar-header .phpdebugbar-tab { + border-left-color: var(--color-gray-800); +} + +div.phpdebugbar div.phpdebugbar-body { + border-top-color: var(--color-gray-800); +} + +div.phpdebugbar a.phpdebugbar-restore-btn { + border-right-color: var(--color-gray-800) !important; +} + +div.phpdebugbar span.phpdebugbar-indicator, +div.phpdebugbar a.phpdebugbar-indicator, +div.phpdebugbar a.phpdebugbar-close-btn { + border-right-color: var(--color-gray-800); +} + +div.phpdebugbar div.phpdebugbar-panel div.phpdebugbar-widgets-status { + background-color: var(--color-gray-900) !important; + border-bottom-color: var(--color-gray-800) !important; +} + +div.phpdebugbar div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status { + background: var(--color-gray-900) !important; +} + +div.phpdebugbar div.phpdebugbar-panel div.phpdebugbar-widgets-status > * { + color: var(--color-gray-200) !important; +} + +div.phpdebugbar div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time, +div.phpdebugbar div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory, +div.phpdebugbar div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count, +div.phpdebugbar div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type { + color: var(--color-gray-600) !important; +} + +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td { + border-color: var(--color-gray-600) !important; +} + +div.phpdebugbar code, +div.phpdebugbar pre { + color: #FFF; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > a, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions button, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form input, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select, +div.phpdebugbar input[type='text'], +div.phpdebugbar input[type='password'] { + color: var(--color-gray-300); +} + +div.phpdebugbar div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-filename, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-database, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-duration, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-memory, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-row-count, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-copy-clipboard, +div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate span.phpdebugbar-widgets-stmt-id { + color: var(--color-gray-500); +} + +div.phpdebugbar a.phpdebugbar-minimize-btn { + background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-down%22%3E%3Cpath%20d%3D%22M1683%20808l-742%20741q-19%2019-45%2019t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19%2045-19t45%2019l531%20531%20531-531q19-19%2045-19t45%2019l166%20165q19%2019%2019%2045.5t-19%2045.5z%22%20style%3D%22fill%3A%20%23EDF2F7%22%2F%3E%3C%2Fsvg%3E) no-repeat 6px 6px / 14px 14px; +} + +div.phpdebugbar a.phpdebugbar-maximize-btn { + background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-up%22%3E%3Cpath%20d%3D%22M1683%201331l-166%20165q-19%2019-45%2019t-45-19l-531-531-531%20531q-19%2019-45%2019t-45-19l-166-165q-19-19-19-45.5t19-45.5l742-741q19-19%2045-19t45%2019l742%20741q19%2019%2019%2045.5t-19%2045.5z%22%20style%3D%22fill%3A%20%23EDF2F7%22%2F%3E%3C%2Fsvg%3E) no-repeat 6px 6px / 14px 14px; +} + +div.phpdebugbar a.phpdebugbar-open-btn { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAOCAYAAADJ7fe0AAABL0lEQVQ4T63RvWqEQBAA4LkjdX46WQh5hoDpFnyAgGzKWKQJdgFfIT8vIKSwCSEQHyJN4AptomAlZMXAVRuxWAwibqMGBUVygdtAplmWmf1mmVnAP8RiNDjne0KINQDsz9wCIXSwrc+AMMa6tm0hz3PozzGWyyUoirJhIISm5n1yuIRh2G3rNs+rqvo7IoTIMMbnkthqXjf9JAiCO0LIR9d1T5JQXzbMbEA8z/vEGB9TSt/KsjyURZIkeTQM43JAHMe5JYS8Zlm2appG1gDXdbFt2/44IIVS+lCW5amswBh70XX9DADEuOIjzvlaCCFrgO/7F5ZlPU8rTtP0viiKK1mhqqpU07STfrATEsfxV13Xu7JIFEU3pmlej/XjTDAA7MgiAPAOANlP5A/vN0u/AXUIgA+u4l6FAAAAAElFTkSuQmCC) no-repeat 8px 6px; +} + +div.phpdebugbar a.phpdebugbar-close-btn { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABUElEQVQ4T52SMUsDMRTH3xUPChHCxeko3YrUqeFGEexym3boJ9DBufhJpLODfoIbTrcuFcSxxMki3Uq5yZRAAweRVp70HdfWQZolb3i/l/x/iQd7Lm9PDjbA2Wz24HmerFarbSGEwaFaa57n+XC1WqlarXZNBxUgQsaYK+ccCCHeGWPn2GStfdFat3zfB875I8EFOBqNPpbLZRObsQnh9YktHIarUqmMoyg6wboApZTtfr9/zxhrEIw7QdbaSa/Xu1FKDTdAADiQUp6VYcpTgl4B4HsbhCRJjsIwfPN9/7hs2zn3mWXZabfb/dqRg/ZIBF2PmigzCiPbRcbpdKrQXjkTguXMKKxer8uNqw4Gg6cgCC7WT/ArAuty5vl8/hzH8eV2xmaapnec88baHooAEmaMmXQ6nVsAGO/IAQB8x0MAUGQPbSMPAAuC/gL//XV/ALsvnQ+MsaHgAAAAAElFTkSuQmCC) no-repeat 9px 6px; +} + + +/* Dracula Theme v1.2.5 + * + * https://github.com/dracula/highlightjs + * + * Copyright 2016-present, All rights reserved + * + * Code licensed under the MIT license + * + * @author Denis Ciccale + * @author Zeno Rocha + */ + +div.phpdebugbar .hljs-built_in, +div.phpdebugbar .hljs-selector-tag, +div.phpdebugbar .hljs-section, +div.phpdebugbar .hljs-link { + color: #8be9fd; +} + +div.phpdebugbar .hljs-keyword { + color: #ff79c6; +} + +div.phpdebugbar .hljs, +div.phpdebugbar .hljs-subst { + color: #f8f8f2; +} + +div.phpdebugbar .hljs-title { + color: #50fa7b; +} + +div.phpdebugbar .hljs-string, +div.phpdebugbar .hljs-meta, +div.phpdebugbar .hljs-name, +div.phpdebugbar .hljs-type, +div.phpdebugbar .hljs-attr, +div.phpdebugbar .hljs-symbol, +div.phpdebugbar .hljs-bullet, +div.phpdebugbar .hljs-addition, +div.phpdebugbar .hljs-variable, +div.phpdebugbar .hljs-template-tag, +div.phpdebugbar .hljs-template-variable { + color: #f1fa8c; +} + +div.phpdebugbar .hljs-comment, +div.phpdebugbar .hljs-quote, +div.phpdebugbar .hljs-deletion { + color: #6272a4; +} + +div.phpdebugbar .hljs-literal, +div.phpdebugbar .hljs-number { + color: #bd93f9; +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar.css b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar.css new file mode 100644 index 000000000..424c6ad49 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/laravel-debugbar.css @@ -0,0 +1,801 @@ +/* Force Laravel Whoops exception handler to be displayed under the debug bar */ +.Whoops.container { + z-index: 5999999; +} + +div.phpdebugbar { + font-size: 13px; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + direction: ltr; + text-align: left; + z-index: 6000000; +} + +div.phpdebugbar * { + direction: ltr; + text-align: left; +} + +div.phpdebugbar-openhandler-overlay { + z-index: 6000001; + cursor: pointer; +} + +div.phpdebugbar-openhandler { + border: 1px solid #aaa; + border-top: 3px solid #fa5661; + width: 80%; + height: 70%; + padding: 10px; + border-radius: 5px; + overflow-y: scroll; + z-index: 6000002; + cursor: default; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > a, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions button { + display: inline-block; + cursor: pointer; + margin: 5px; + padding: 0px 12px 2px; + border-radius: 3px; + border: 1px solid #ddd; + background-color: #f5f5f5; + color: #000; + text-shadow: 1px 1px #fff; + font-size: 13px; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form { + margin: 15px 0px 5px; + text-transform: uppercase; + font-size: 13px; + font-weight: bold; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form br { + display: none; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form > b { + display: none; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form input, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select { + margin: 0px 10px 10px 2px; + border: 1px solid #aaa; + border-radius: 3px; + padding: 3px 6px 2px; + line-height: 16px; +} + +@media (max-width: 720px) { + div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select + br, + div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form input[name="uri"] + br { + display: block; + } +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions > form select { + padding: 2px 5px 1px; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions input[name="uri"] { + width: 200px; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions input[name="ip"] { + width: 90px; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions button { + outline: none; + margin: 0px 0px 10px 2px; + padding: 5px 15px 4px; + line-height: 12px; +} + +div.phpdebugbar-openhandler table { + margin: 15px 0px 10px; + table-layout: auto; + border-collapse: collapse; + width: 100%; +} + +div.phpdebugbar-openhandler table td, +div.phpdebugbar-openhandler table th { + width: auto!important; + text-align: left; + border: 0px solid #bbb; + padding: 2px 8px; + font-size: 14px; +} + +div.phpdebugbar-openhandler table th { + text-shadow: 1px 1px #fff; + font-size: 12px; + text-transform: uppercase; + padding: 5px 8px; +} + +div.phpdebugbar-openhandler table th, +div.phpdebugbar-openhandler table tr:nth-child(2n) { + background-color: #efefef; +} + +div.phpdebugbar-openhandler table th:nth-child(1), div.phpdebugbar-openhandler table td:nth-child(1), /* Date */ +div.phpdebugbar-openhandler table th:nth-child(2), div.phpdebugbar-openhandler table td:nth-child(2), /* Method */ +div.phpdebugbar-openhandler table th:nth-child(4), div.phpdebugbar-openhandler table td:nth-child(4), /* IP */ +div.phpdebugbar-openhandler table th:nth-child(5), div.phpdebugbar-openhandler table td:nth-child(5) { /* Filter */ + width: 5%!important; + white-space: nowrap; +} + +div.phpdebugbar-openhandler table th:nth-child(2), div.phpdebugbar-openhandler table td:nth-child(2), /* Method */ +div.phpdebugbar-openhandler table th:nth-child(4), div.phpdebugbar-openhandler table td:nth-child(4), /* IP */ +div.phpdebugbar-openhandler table th:nth-child(5), div.phpdebugbar-openhandler table td:nth-child(5) { /* Filter */ + text-align: center; +} + +div.phpdebugbar-openhandler table th:nth-child(3) { /* URL */ + width: calc(100vw - 100% - 196px)!important; +} + +div.phpdebugbar-openhandler table td a { + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer; +} + +div.phpdebugbar-resize-handle { + display: block!important; + height: 3px; + margin-top: -4px; + width: 100%; + background: none; + cursor: ns-resize; + border-top: none; + border-bottom: 0px; + background-color: #fa5661; +} + +.phpdebugbar.phpdebugbar-minimized div.phpdebugbar-resize-handle { + cursor: default!important; +} + +div.phpdebugbar-closed, +div.phpdebugbar-minimized { + border-top-color: #ddd; +} + +div.phpdebugbar code, div.phpdebugbar pre, div.phpdebugbar samp { + background: none; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1em; + border: 0; + padding: 0; +} + +div.phpdebugbar .hljs { + padding: 0; +} + +div.phpdebugbar .phpdebugbar-widgets-messages .hljs > code { + padding-bottom: 3px; +} + +div.phpdebugbar code, div.phpdebugbar pre { + color: #000; +} + +div.phpdebugbar-widgets-exceptions .phpdebugbar-widgets-filename { + margin-top: 4px; +} + +div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-file { + border: 1px solid #d2d2d2; + border-left: 2px solid #d2d2d2; +} + +div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-file[style="display: block;"] ~ div { + display: block; +} + +div.phpdebugbar pre.sf-dump { + color: #000; + outline: none; + padding: 0px!important; +} + +div.phpdebugbar-body { + border-top: 1px solid #ddd; +} + +div.phpdebugbar-header { + min-height: 30px; + line-height: 20px; + padding-left: 39px; + text-shadow: 1px 1px #FFF; +} + +div.phpdebugbar-header, +a.phpdebugbar-restore-btn, +div.phpdebugbar-openhandler .phpdebugbar-openhandler-header { + background: #f5f5f5 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIcAAACHCAYAAAA850oKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAmVAAAJlQBMwDy4QAAABJ0RVh0U29mdHdhcmUAZXpnaWYuY29toMOzWAAAGE5JREFUeJztnXt8VOWZx7/PyQURrK3YukUkZwJycXIGMF6KWqVbrNsLdq3A9qLW3W2hVatowUQEQUFNBNvS7dpCrb34sVtFe9N22zWraNeiSETmZOSazJmIvWxFViEqw+Q8+8dMQiDnTCbJzGQS5vtn5jlnnsz85pznvO9zEfKAVleXcfCNryB6DXAiog+hepfYrfvy8f5F+obk+g3UqpwJ7reA4FEv7QPq2c8acZx3c+1Hkd6TM3FosPJsDHc1cGEPpq2ILCUcfVBAc+VPkd6TdXFosHIsJe0rUbmil+d/EWSh2NFns+1Tkb6RNXFocMxJGGW3gl4HlPuYbUH0NVQ+lcajn2MYtfJyy65s+Vakbxj9PYFWV5epFZiHUbod9Ca8hfEayHwmOWdLODYLYTrwR+8T8hna3Yha5loNjftAf/0r0nf6deXQUGAWqt8ExvmYtCGsZkSiXjbueeeIY0GwArNB64BKn3c4gMi9vEVdMWjNP30Sh4bMc3F1NSIX+FgkQB7AZZlEnL+kPVcwWE5J21dRlgPv9bHaA8YK7Oj9Am5ffC7Se3olDp1aeTrt7p3AbP9jtQEpvVHCzU29OndwzEkYpTcDC4BhPu42orpQmpwNvTl3kb6RkTgy++J0MyqL+vvF6eRABWXuivRPO9oAJTeJ3WL3572KpCetODK75PMqyMpsX/I1ZJ6Lsgr4sI9FxreuIn3DUxxdgsV6IOB9aH6CxYyCXvgO7oiVEokcyJUfxyLdxKFWxXSQ1cB5PsccAn6IlCyVcPP/5tS7Dp+qq8uIv/HPoCuB9/uYvQZyB5OiP5D1tOfDr6FOpzg0FJiI6gpgjr+1PkF76Y0Sad6dD+eORq2x7wOjBrgBOM7H7BVUb5am2G/y6NqQRLS68kQOuXWof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handler .phpdebugbar-openhandler-header { + background-size: 20px; + padding: 2px 0px 3px 36px; + background-position: 9px 5px; + border-radius: 3px; +} + +div.phpdebugbar-openhandler .phpdebugbar-openhandler-header a { + cursor: pointer; +} + +a.phpdebugbar-close-btn { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAADDSURBVDhPxZCxCsIwFEUzuGdwCvQD7BIIcehUXDqVfGM/wsG/iG4ifkzMlRuSPLo4eeFBue8c6Iv6b4wxW557Hs0KnWa3seqDxTiOyVqbhmF4UND4Rofdruyce3rvE6bIRSo9GOI1McbLPM/vVm4l7MAQr0kpHaQsJTDE+6zrepym6SVFdNgR69M+hBTLzWCI10gJvydvBkO8ZlmWayvhJnkzGOI1+fBTCOHWPkT7YNiBId4HizxnCKy+r81uX/otSn0A7dioI/vYX+8AAAAASUVORK5CYII=) no-repeat 9px 6px; + color : #555; + border-right: none; +} + +a.phpdebugbar-open-btn { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAOCAYAAADJ7fe0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfdCgYULwwNKp3GAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjOM5pdQAAAA1UlEQVQ4T2OgKpCUlOQH4vdA/B8Jv4dKEwYgDdLS0v8NDQ3/GxsbwzGIj2YoGEO1oQJkjcRgqDZUAJKwsrJ6/v//fwdiMFQbKgAZkpGR0QR0ajy60wlgRJhBXSGhpqb2CNnZhHBkZORcqBEMDFBX2BsYGGBVjAv39vZaQ41gYIC6Ygs2hbiwr6/vdqA+DqgR4CiW19bWxqoYF87Ly4uFaocAZWXlydgU4sJ2dna3ga4QgGqHAC0trY/YFOPCKSkpDVCtCAA01QaIsaYJHFgCqpVagIEBACGlF2c3r4ViAAAAAElFTkSuQmCC) no-repeat 8px 6px; +} + + +div.phpdebugbar-header, +div.phpdebugbar-openhandler-header { + background-size: 21px auto; + background-position: 9px center; +} + +a.phpdebugbar-restore-btn { + border-right-color: #ddd!important; + height: 20px; + width: 23px; + background-position: center; + background-size: 21px; +} + +div.phpdebugbar-header > div > * { + font-size: 13px; + padding: 5px; +} + +div.phpdebugbar-header .phpdebugbar-tab { + padding: 5px 8px; + border-left: 1px solid #ddd; +} + +div.phpdebugbar-header .phpdebugbar-header-left { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.phpdebugbar .phpdebugbar-header select { + margin: 4px 0px 0px 8px; + padding: 2px 3px 3px 3px; + border-radius: 3px; + width: auto; + cursor: pointer; +} + +dl.phpdebugbar-widgets-kvlist dt, +dl.phpdebugbar-widgets-kvlist dd { + min-height: 20px; + line-height: 20px; + padding: 4px 5px 5px; + border-top: 0px; +} + +dl.phpdebugbar-widgets-kvlist dd.phpdebugbar-widgets-value.phpdebugbar-widgets-pretty .phpdebugbar-widgets-code-block { + padding: 0px 0px; + background: transparent; +} + +dl.phpdebugbar-widgets-kvlist dt { + width: 25%; +} + +dl.phpdebugbar-widgets-kvlist dd { + margin-left: 25%; +} + +ul.phpdebugbar-widgets-timeline .phpdebugbar-widgets-measure { + height: 28px; + line-height: 28px; + border: none; +} + +ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-value { + height: 16px; + background-color: #63abca; + border-bottom: 2px solid #477e96; +} + +ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label, +ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-collector { + top: 0px; + color: #000; + font-size: 11px; +} + +ul.phpdebugbar-widgets-timeline li .phpdebugbar-widgets-value span.phpdebugbar-widgets-label { + color: #fff; + text-shadow: 1px 1px #000; +} + +ul.phpdebugbar-widgets-timeline table.phpdebugbar-widgets-params { + font-size: 11px; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar { + width: calc(100% - 20px); + padding: 4px 0px 4px; + height: 20px; + border: 1px solid #ddd; + border-bottom: 0px; + background-color: #e8e8e8; + border-radius: 5px 5px 0px 0px; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar input { + width: calc(100% - 48px); + margin-left: 0px; + border-radius: 3px; + padding: 2px 6px; + height: 15px; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-label, +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-collector { + padding: 1px 0px 0px 10px; + margin: 0px; + text-transform: uppercase; + font-style: normal; + color: #333; +} + +.phpdebugbar-widgets-toolbar i.phpdebugbar-fa.phpdebugbar-fa-search { + position: relative; + top: -1px; + padding: 0px 10px; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter, +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded { + position: relative; + top: -48px; + display: inline-block; + background-color: #6d6d6d; + margin-left: 3px; + border-radius: 3px; + padding: 5px 8px 4px; + text-transform: uppercase; + font-size: 10px; + text-shadow: 1px 1px #585858; + transition: background-color .25s linear 0s, color .25s linear 0s; + color: #FFF; + + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter[rel="info"], +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded[rel="info"] { + background-color: #5896e2; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter[rel="error"], +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded[rel="error"] { + background-color: #fa5661; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter[rel="warning"], +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded[rel="warning"] { + background-color: #f99400; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter:hover { + color: #FFF; + opacity: 0.85; +} + +div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded { + opacity: 0.45; +} + +a.phpdebugbar-tab:hover, +span.phpdebugbar-indicator:hover, +a.phpdebugbar-indicator:hover, +a.phpdebugbar-close-btn:hover, +a.phpdebugbar-minimize-btn:hover, +a.phpdebugbar-maximize-btn:hover, +a.phpdebugbar-open-btn:hover { + background-color: #ebebeb; + /* transition: background-color .25s linear 0s, color .25s linear 0s; */ +} + +a.phpdebugbar-minimize-btn, +a.phpdebugbar-maximize-btn { + width: 28px!important; +} + +a.phpdebugbar-tab.phpdebugbar-active { + background: #fa5661; + background-image: none; + color: #fff !important; + text-shadow: 1px 1px #bf3039; +} + +a.phpdebugbar-tab.phpdebugbar-active span.phpdebugbar-badge { + background-color: white; + color: #fa5661; + text-shadow: 1px 1px #ebebeb; +} + +a.phpdebugbar-tab span.phpdebugbar-badge { + vertical-align: 0px; + padding: 2px 8px 3px 8px; + text-align: center; + background: #fa5661; + font-size: 11px; + font-family: monospace; + color: #fff; + text-shadow: 1px 1px #bf3039; + border-radius: 10px; + top: -1px; + position: relative; +} + +.phpdebugbar-indicator { + cursor: text; +} + +.phpdebugbar-indicator span.phpdebugbar-tooltip, +div.phpdebugbar-mini-design a.phpdebugbar-tab:hover span.phpdebugbar-text { + border: none; + border-radius: 5px; + background: #f5f5f5; + font-size: 12px; + width: auto; + white-space: nowrap; + padding: 2px 18px; + text-shadow: none; + + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.phpdebugbar-mini-design a.phpdebugbar-tab:hover span.phpdebugbar-text { + left: 0px; + right: auto; +} + +.phpdebugbar-widgets-toolbar > .fa { + width: 25px; + font-size: 15px; + color: #555; + text-align: center; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { + padding: 7px 10px; + border: none; + font-family: inherit; + overflow: visible; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item:hover, +ul.phpdebugbar-widgets-timeline li:hover { + background-color: initial; +} + +.phpdebugbar-widgets-sqlqueries ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { + display: flex; + flex-wrap: wrap; +} + +.phpdebugbar-widgets-templates ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { + display: block; +} + +.phpdebugbar-widgets-templates ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item, +.phpdebugbar-widgets-mails ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { + line-height: 15px; +} + +.phpdebugbar-widgets-mails ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { + cursor: pointer; + display: block; +} + +.phpdebugbar-widgets-mails ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-subject { + display: inline-block; + margin-right: 15px; +} + +.phpdebugbar-widgets-mails ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-headers { + margin: 10px 0px; + padding: 7px 10px; + border-left: 2px solid #ddd; + line-height: 17px; +} + +.phpdebugbar-widgets-list .phpdebugbar-widgets-list-item .phpdebugbar-widgets-name { + height: 15px; +} + +.phpdebugbar-widgets-sql.phpdebugbar-widgets-name { + font-weight: bold; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-sql { + flex: 1; + margin-right: 5px; + max-width: 100%; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-duration { + margin-left: auto; + margin-right: 5px; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-database { + margin-left: auto; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-stmt-id { + margin-left: auto; + margin-right: 5px; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item table.phpdebugbar-widgets-params { + background-color: #fdfdfd; + margin: 10px 0px; + font-size: 12px; + border-left: 2px solid #cecece; +} + +div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params th, +div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params td { + padding: 1px 10px!important; +} + +div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params th { + padding: 2px 10px!important; + background-color: #efefef; +} + +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td.phpdebugbar-widgets-name { + width: auto; +} + +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td.phpdebugbar-widgets-name .phpdebugbar-fa { + position: relative; + top: 1px; + margin-left: 3px; +} + +ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item:nth-child(even) { + background-color: #f5f5f5; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value { + display: inline-flex; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value:before { + font-family: PhpDebugbarFontAwesome; + content: "\f005"; + color: #333; + font-size: 13px; + margin-right: 8px; + float: left; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-info { + color: #1299DA; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-info:before { + font-family: PhpDebugbarFontAwesome; + content: "\f05a"; + color: #5896e2; + font-size: 15px; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error { + color: #e74c3c; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error:before { + color: #fa5661; + font-size: 15px; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before { + color: #FF9800; + font-size: 13px; +} + +div.phpdebugbar-widgets-messages .phpdebugbar-widgets-value.phpdebugbar-widgets-warning { + color: #FF9800; +} + +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item pre.sf-dump { + display: inline-block; + position: relative; + top: -1px; +} + +div.phpdebugbar-widgets-sqlqueries { + line-height: 20px; +} + + +div.phpdebugbar-panel div.phpdebugbar-widgets-status { + padding: 9px 20px!important; + width: calc(100% - 20px); + margin-left: -10px; + margin-top: -10px; + line-height: 11px!important; + font-weight: bold!important; + background: #f5f5f5!important; + border-bottom: 1px solid #cecece!important; +} + +div.phpdebugbar-panel div.phpdebugbar-widgets-status > * { + color: #383838!important; +} + +div.phpdebugbar-panel div.phpdebugbar-widgets-status > span:first-child:before { + font-family: PhpDebugbarFontAwesome; + content: "\f05a"; + color: #737373; + text-shadow: 1px 1px #fff; + font-size: 14px; + position: relative; + top: 1px; + margin-right: 8px; +} + +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params th, +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td { + padding: 4px 10px; +} + +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params th { + background-color: #efefef; +} + +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td.phpdebugbar-widgets-name { + text-align: right; + vertical-align: top; + white-space: nowrap; +} + +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td.phpdebugbar-widgets-value { + text-align: left; +} + +div.phpdebugbar-widgets-templates .phpdebugbar-widgets-list-item table.phpdebugbar-widgets-params { + width: auto!important; +} + +ul.phpdebugbar-widgets-list ul.phpdebugbar-widgets-table-list { + text-align: left; +} + +.phpdebugbar-text-muted { + color: #888; +} + +ul.phpdebugbar-widgets-cache a.phpdebugbar-widgets-forget { + float: right; + font-size: 12px; + padding: 0 4px; + background: #fa5661; + margin: 0 2px; + border-radius: 4px; + color: #fff; + text-decoration: none; + line-height: 1.5rem; +} + +a.phpdebugbar-tab i { + line-height: 20px; +} + +div.phpdebugbar-mini-design a.phpdebugbar-tab { + border-right: none; +} + +div.phpdebugbar-header-right > a { + height: 20px; + width: 20px; + background-position: center; +} + +div.phpdebugbar-header-right .phpdebugbar-indicator > i.phpdebugbar-fa { + vertical-align: baseline; + margin-top: 2px; +} + +div.phpdebugbar-panel { + width: calc(100% - 20px); + height: calc(100% - 20px); + padding: 10px; +} + +div.phpdebugbar-panel table { + margin: 10px 0px!important; + width: 100%!important; +} + +div.phpdebugbar-panel table .phpdebugbar-widgets-name { + font-size: 13px; +} + +dl.phpdebugbar-widgets-kvlist > :nth-child(4n-1), +dl.phpdebugbar-widgets-kvlist > :nth-child(4n) { + background-color: #f5f5f5; +} + +.phpdebugbar pre.sf-dump:after { + clear: none!important; +} + +div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-message { + color: #dd1044; +} + +div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item > div { + display: none; +} + + +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before { + margin-right: 6px!important; +} + +.phpdebugbar-widgets-list-item .phpdebugbar-widgets-bg-measure { + position: absolute; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + pointer-events: none; +} + +.phpdebugbar-widgets-bg-measure .phpdebugbar-widgets-value { + position: absolute; + height: 100%; + opacity: 0.2; + background: red; +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/sqlqueries/widget.js b/vendor/barryvdh/laravel-debugbar/src/Resources/sqlqueries/widget.js new file mode 100644 index 000000000..988dc2da9 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/sqlqueries/widget.js @@ -0,0 +1,274 @@ +(function ($) { + + var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); + + /** + * Widget for the displaying sql queries + * + * Options: + * - data + */ + var LaravelSQLQueriesWidget = PhpDebugBar.Widgets.LaravelSQLQueriesWidget = PhpDebugBar.Widget.extend({ + + className: csscls('sqlqueries'), + + onFilterClick: function (el) { + $(el).toggleClass(csscls('excluded')); + + var excludedLabels = []; + this.$toolbar.find(csscls('.filter') + csscls('.excluded')).each(function () { + excludedLabels.push(this.rel); + }); + + this.$list.$el.find("li[connection=" + $(el).attr("rel") + "]").toggle(); + + this.set('exclude', excludedLabels); + }, + + onCopyToClipboard: function (el) { + var code = $(el).parent('li').find('code').get(0); + var copy = function () { + try { + document.execCommand('copy'); + alert('Query copied to the clipboard'); + } catch (err) { + console.log('Oops, unable to copy'); + } + }; + var select = function (node) { + if (document.selection) { + var range = document.body.createTextRange(); + range.moveToElementText(node); + range.select(); + } else if (window.getSelection) { + var range = document.createRange(); + range.selectNodeContents(node); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + copy(); + window.getSelection().removeAllRanges(); + }; + select(code); + }, + + render: function () { + this.$status = $('
').addClass(csscls('status')).appendTo(this.$el); + + this.$toolbar = $('
').addClass(csscls('toolbar')).appendTo(this.$el); + + var filters = [], self = this; + + this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function (li, stmt) { + if (stmt.type === 'transaction') { + $('').addClass(csscls('sql')).addClass(csscls('name')).text(stmt.sql).appendTo(li); + } else { + $('').addClass(csscls('sql')).html(PhpDebugBar.Widgets.highlight(stmt.sql, 'sql')).appendTo(li); + } + if (stmt.width_percent) { + $('
').addClass(csscls('bg-measure')).append( + $('
').addClass(csscls('value')).css({ + left: stmt.start_percent + '%', + width: Math.max(stmt.width_percent, 0.01) + '%', + }) + ).appendTo(li); + } + if (stmt.duration_str) { + $('').addClass(csscls('duration')).text(stmt.duration_str).appendTo(li); + } + if (stmt.memory_str) { + $('').addClass(csscls('memory')).text(stmt.memory_str).appendTo(li); + } + if (typeof(stmt.row_count) != 'undefined') { + $('').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li); + } + if (typeof(stmt.stmt_id) != 'undefined' && stmt.stmt_id) { + $('').addClass(csscls('stmt-id')).text(stmt.stmt_id).appendTo(li); + } + if (stmt.connection) { + $('').addClass(csscls('database')).text(stmt.connection).appendTo(li); + li.attr("connection",stmt.connection); + if ( $.inArray(stmt.connection, filters) == -1 ) { + filters.push(stmt.connection); + $('
') + .addClass(csscls('filter')) + .text(stmt.connection) + .attr('rel', stmt.connection) + .on('click', function () { + self.onFilterClick(this); }) + .appendTo(self.$toolbar); + if (filters.length > 1) { + self.$toolbar.show(); + self.$list.$el.css("margin-bottom","20px"); + } + } + } + if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) { + li.addClass(csscls('error')); + li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message)); + } + if (stmt.show_copy) { + $('') + .addClass(csscls('copy-clipboard')) + .css('cursor', 'pointer') + .on('click', function (event) { + self.onCopyToClipboard(this); + event.stopPropagation(); + }) + .appendTo(li); + } + + var table = $('
Metadata
').addClass(csscls('params')).appendTo(li); + + if (stmt.bindings && stmt.bindings.length) { + table.append(function () { + var icon = 'thumb-tack'; + var $icon = ''; + var $name = $('').addClass(csscls('name')).html('Bindings ' + $icon); + var $value = $('').addClass(csscls('value')); + var $span = $('').addClass('phpdebugbar-text-muted'); + + var index = 0; + var $bindings = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function (li, binding) { + var $index = $span.clone().text(index++ + '.'); + li.append($index, ' ', binding).removeClass(csscls('list-item')).addClass(csscls('table-list-item')); + }}); + + $bindings.set('data', stmt.bindings); + + $bindings.$el + .removeClass(csscls('list')) + .addClass(csscls('table-list')) + .appendTo($value); + + return $('').append($name, $value); + }); + } + + if (stmt.hints && stmt.hints.length) { + table.append(function () { + var icon = 'question-circle'; + var $icon = ''; + var $name = $('').addClass(csscls('name')).html('Hints ' + $icon); + var $value = $('').addClass(csscls('value')); + + var $hints = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function (li, hint) { + li.append(hint).removeClass(csscls('list-item')).addClass(csscls('table-list-item')); + }}); + + $hints.set('data', stmt.hints); + $hints.$el + .removeClass(csscls('list')) + .addClass(csscls('table-list')) + .appendTo($value); + + return $('').append($name, $value); + }); + } + + if (stmt.backtrace && stmt.backtrace.length) { + table.append(function () { + var icon = 'list-ul'; + var $icon = ''; + var $name = $('').addClass(csscls('name')).html('Backtrace ' + $icon); + var $value = $('').addClass(csscls('value')); + var $span = $('').addClass('phpdebugbar-text-muted'); + + var $backtrace = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function (li, source) { + var $parts = [ + $span.clone().text(source.index + '.'), + ' ', + ]; + + if (source.namespace) { + $parts.push(source.namespace + '::'); + } + + $parts.push(source.name); + $parts.push($span.clone().text(':' + source.line)); + + li.append($parts).removeClass(csscls('list-item')).addClass(csscls('table-list-item')); + }}); + + $backtrace.set('data', stmt.backtrace); + + $backtrace.$el + .removeClass(csscls('list')) + .addClass(csscls('table-list')) + .appendTo($value); + + return $('').append($name, $value); + }); + } + + if (stmt.params && !$.isEmptyObject(stmt.params)) { + for (var key in stmt.params) { + if (typeof stmt.params[key] !== 'function') { + table.append('' + key + '' + stmt.params[key] + ''); + } + } + } + + li.css('cursor', 'pointer').click(function () { + if (table.is(':visible')) { + table.hide(); + } else { + table.show(); + } + }); + }}); + this.$list.$el.appendTo(this.$el); + + this.bindAttr('data', function (data) { + this.$list.set('data', data.statements); + this.$status.empty(); + var stmt; + + // Search for duplicate statements. + for (var sql = {}, duplicate = 0, i = 0; i < data.statements.length; i++) { + if (data.statements[i].type === 'query') { + stmt = data.statements[i].sql; + if (data.statements[i].bindings && data.statements[i].bindings.length) { + stmt += JSON.stringify(data.statements[i].bindings); + } + if (data.statements[i].connection) { + stmt += '@' + data.statements[i].connection; + } + sql[stmt] = sql[stmt] || { keys: [] }; + sql[stmt].keys.push(i); + } + } + // Add classes to all duplicate SQL statements. + for (stmt in sql) { + if (sql[stmt].keys.length > 1) { + duplicate += sql[stmt].keys.length; + + for (i = 0; i < sql[stmt].keys.length; i++) { + this.$list.$el.find('.' + csscls('list-item')).eq(sql[stmt].keys[i]) + .addClass(csscls('sql-duplicate')) + .addClass(csscls('sql-duplicate-' + duplicate)); + } + } + } + + var t = $('').text(data.nb_statements + " statements were executed").appendTo(this.$status); + if (data.nb_failed_statements) { + t.append(", " + data.nb_failed_statements + " of which failed"); + } + if (duplicate) { + t.append(", " + duplicate + " of which were duplicated"); + t.append(", " + (data.nb_statements - duplicate) + " unique"); + } + if (data.accumulated_duration_str) { + this.$status.append($('').addClass(csscls('duration')).text(data.accumulated_duration_str)); + } + if (data.memory_usage_str) { + this.$status.append($('').addClass(csscls('memory')).text(data.memory_usage_str)); + } + }); + } + + }); + +})(PhpDebugBar.$); diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/vendor/font-awesome/generator_config.txt b/vendor/barryvdh/laravel-debugbar/src/Resources/vendor/font-awesome/generator_config.txt new file mode 100644 index 000000000..f9985f0e0 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/vendor/font-awesome/generator_config.txt @@ -0,0 +1,5 @@ +# Font Squirrel Font-face Generator Configuration File +# Upload this file to the generator to recreate the settings +# you used to create these fonts. + +{"mode":"expert","formats":["woff"],"tt_instructor":"keep","fallback":"none","fallback_custom":"100","options_subset":"none","subset_custom":"","subset_custom_range":"","subset_ot_features":"all","subset_ot_features_list":"","base64":"Y","css_stylesheet":"style.css","filename_suffix":"","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"} \ No newline at end of file diff --git a/vendor/barryvdh/laravel-debugbar/src/Resources/vendor/font-awesome/style.css b/vendor/barryvdh/laravel-debugbar/src/Resources/vendor/font-awesome/style.css new file mode 100644 index 000000000..1a3fc43ec --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Resources/vendor/font-awesome/style.css @@ -0,0 +1,1665 @@ +/*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'PhpDebugbarFontAwesome'; + src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAX9wAA4AAAAChwgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAF/TAAAABwAAAAcdQuBPEdERUYAAX8sAAAAHgAAAB4AJwLLT1MvMgAAAcAAAAA/AAAAYIhGej5jbWFwAAAFHAAAAXUAAAMCLcREJ2dhc3AAAX8kAAAACAAAAAj//wADZ2x5ZgAADbAAAV+XAAJMzJBa56toZWFkAAABRAAAADYAAAA2CP8zRWhoZWEAAAF8AAAAIQAAACQO+gqUaG10eAAAAgAAAAMbAAAK+E6RFlVsb2NhAAAGlAAABxsAAAsYAvXOJG1heHAAAAGgAAAAHwAAACADLgIcbmFtZQABbUgAAAJEAAAEhuOXi6xwb3N0AAFvjAAAD5UAABqJJRjyKHdlYmYAAX9oAAAABgAAAAb701lxAAEAAAAEAcvfnz61Xw889QALBwAAAAAAy088MAAAAADVl6xR/+3+6Qk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RkVvi8W/EzAVXkQUVAFQFV5EFFaCpCUzHl5Ya0hKYiiElBTApCfFEWX5TFF2XxRVl8URZflMUX5UlBVAVRFYSYolwVRLWcahVjGdkU3IofCEJMYbApuJiQoihFSYqyFIYUphQVKSalqKbnFIdNboolDJnLEEsYYglDLGGIJQyxhCGWMCaEpCgkRUGIGQwxgyFmMMQMhpjBEDMYYgZDzGCIGQwxgyFmMMQMhoQvoySIkiBKghAPGCVBlAVRFkRZECK9IdIbIr0h0hsivSHSG2VBGIIQ3Q3R3RDdDdHdEN0N0d0Q3Q3R3RDdDdHdEN0N0d0Q3Q1TEKYgRHTDFIQpCBa9VWQEF4Jg0bklCBHdENGNiiAqghDRDRHdENENEd0Q0Q0R3RDRDRHdENENEd0Q0Q0R3RDRDRHdENENEd2oCkIigSGRwJBIYLDorWJFxTYtTo7rmnGmSG+K9KaOB8VJQ9emDFakmJSC+Uzxkin6m6K/Kfqbor8p+puivyn6m6K/Kfqbor8p+puivyn6m6K/Kfqbor8p+puiv1lMrmVxhV7higldF3Vd0rVe6gq91BWmriu6ntT1YL4Vup7S9bSuZ3Q9m9RTmndK805p3inNO6V5pzTvlOad0rxTmndK805p3inNO6V5pzTvlObVQbM4rXmnNe+05p3WvNOad1rzTmveac07rXmnNe+05p3WvNOad1rz6tha1LG1OKN5ZzTvjObVEbaoI2xxRvPOaN4ZzTujeWc074zmndG8M5p3VvPOat5ZzTureWc176zmndW8s+KUqiad1aSzmnRWk85q0llNOjv7P0KpDWMAAAAAAAAB//8AAgABAAAADAAAABYAAAACAAEAAQLEAAEABAAAAAIAAAAAAAAAAQAAAADUJJi6AAAAAMtPPDAAAAAA1ZesUQABWXH70gAA) format('woff'); + font-weight: normal; + font-style: normal; +} +.phpdebugbar-fa { + display: inline-block; + font: normal normal normal 14px/1 PhpDebugbarFontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +/* makes the font 33% larger relative to the icon container */ +.phpdebugbar-fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.phpdebugbar-fa-2x { + font-size: 2em; +} +.phpdebugbar-fa-3x { + font-size: 3em; +} +.phpdebugbar-fa-4x { + font-size: 4em; +} +.phpdebugbar-fa-5x { + font-size: 5em; +} +.phpdebugbar-fa-fw { + width: 1.28571429em; + text-align: center; +} +.phpdebugbar-fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.phpdebugbar-fa-ul > li { + position: relative; +} +.phpdebugbar-fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.phpdebugbar-fa-li.phpdebugbar-fa-lg { + left: -1.85714286em; +} +.phpdebugbar-fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.phpdebugbar-fa.pull-left { + margin-right: .3em; +} +.phpdebugbar-fa.pull-right { + margin-left: .3em; +} +.phpdebugbar-fa-spin { + -webkit-animation: phpdebugbar-fa-spin 2s infinite linear; + animation: phpdebugbar-fa-spin 2s infinite linear; +} +@-webkit-keyframes phpdebugbar-fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes phpdebugbar-fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.phpdebugbar-fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.phpdebugbar-fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.phpdebugbar-fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.phpdebugbar-fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.phpdebugbar-fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .phpdebugbar-fa-rotate-90, +:root .phpdebugbar-fa-rotate-180, +:root .phpdebugbar-fa-rotate-270, +:root .phpdebugbar-fa-flip-horizontal, +:root .phpdebugbar-fa-flip-vertical { + filter: none; +} +.phpdebugbar-fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.phpdebugbar-fa-stack-1x, +.phpdebugbar-fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.phpdebugbar-fa-stack-1x { + line-height: inherit; +} +.phpdebugbar-fa-stack-2x { + font-size: 2em; +} +.phpdebugbar-fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.phpdebugbar-fa-glass:before { + content: "\f000"; +} +.phpdebugbar-fa-music:before { + content: "\f001"; +} +.phpdebugbar-fa-search:before { + content: "\f002"; +} +.phpdebugbar-fa-envelope-o:before { + content: "\f003"; +} +.phpdebugbar-fa-heart:before { + content: "\f004"; +} +.phpdebugbar-fa-star:before { + content: "\f005"; +} +.phpdebugbar-fa-star-o:before { + content: "\f006"; +} +.phpdebugbar-fa-user:before { + content: "\f007"; +} +.phpdebugbar-fa-film:before { + content: "\f008"; +} +.phpdebugbar-fa-th-large:before { + content: "\f009"; +} +.phpdebugbar-fa-th:before { + content: "\f00a"; +} +.phpdebugbar-fa-th-list:before { + content: "\f00b"; +} +.phpdebugbar-fa-check:before { + content: "\f00c"; +} +.phpdebugbar-fa-remove:before, +.phpdebugbar-fa-close:before, +.phpdebugbar-fa-times:before { + content: "\f00d"; +} +.phpdebugbar-fa-search-plus:before { + content: "\f00e"; +} +.phpdebugbar-fa-search-minus:before { + content: "\f010"; +} +.phpdebugbar-fa-power-off:before { + content: "\f011"; +} +.phpdebugbar-fa-signal:before { + content: "\f012"; +} +.phpdebugbar-fa-gear:before, +.phpdebugbar-fa-cog:before { + content: "\f013"; +} +.phpdebugbar-fa-trash-o:before { + content: "\f014"; +} +.phpdebugbar-fa-home:before { + content: "\f015"; +} +.phpdebugbar-fa-file-o:before { + content: "\f016"; +} +.phpdebugbar-fa-clock-o:before { + content: "\f017"; +} +.phpdebugbar-fa-road:before { + content: "\f018"; +} +.phpdebugbar-fa-download:before { + content: "\f019"; +} +.phpdebugbar-fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.phpdebugbar-fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.phpdebugbar-fa-inbox:before { + content: "\f01c"; +} +.phpdebugbar-fa-play-circle-o:before { + content: "\f01d"; +} +.phpdebugbar-fa-rotate-right:before, +.phpdebugbar-fa-repeat:before { + content: "\f01e"; +} +.phpdebugbar-fa-refresh:before { + content: "\f021"; +} +.phpdebugbar-fa-list-alt:before { + content: "\f022"; +} +.phpdebugbar-fa-lock:before { + content: "\f023"; +} +.phpdebugbar-fa-flag:before { + content: "\f024"; +} +.phpdebugbar-fa-headphones:before { + content: "\f025"; +} +.phpdebugbar-fa-volume-off:before { + content: "\f026"; +} +.phpdebugbar-fa-volume-down:before { + content: "\f027"; +} +.phpdebugbar-fa-volume-up:before { + content: "\f028"; +} +.phpdebugbar-fa-qrcode:before { + content: "\f029"; +} +.phpdebugbar-fa-barcode:before { + content: "\f02a"; +} +.phpdebugbar-fa-tag:before { + content: "\f02b"; +} +.phpdebugbar-fa-tags:before { + content: "\f02c"; +} +.phpdebugbar-fa-book:before { + content: "\f02d"; +} +.phpdebugbar-fa-bookmark:before { + content: "\f02e"; +} +.phpdebugbar-fa-print:before { + content: "\f02f"; +} +.phpdebugbar-fa-camera:before { + content: "\f030"; +} +.phpdebugbar-fa-font:before { + content: "\f031"; +} +.phpdebugbar-fa-bold:before { + content: "\f032"; +} +.phpdebugbar-fa-italic:before { + content: "\f033"; +} +.phpdebugbar-fa-text-height:before { + content: "\f034"; +} +.phpdebugbar-fa-text-width:before { + content: "\f035"; +} +.phpdebugbar-fa-align-left:before { + content: "\f036"; +} +.phpdebugbar-fa-align-center:before { + content: "\f037"; +} +.phpdebugbar-fa-align-right:before { + content: "\f038"; +} +.phpdebugbar-fa-align-justify:before { + content: "\f039"; +} +.phpdebugbar-fa-list:before { + content: "\f03a"; +} +.phpdebugbar-fa-dedent:before, +.phpdebugbar-fa-outdent:before { + content: "\f03b"; +} +.phpdebugbar-fa-indent:before { + content: "\f03c"; +} +.phpdebugbar-fa-video-camera:before { + content: "\f03d"; +} +.phpdebugbar-fa-photo:before, +.phpdebugbar-fa-image:before, +.phpdebugbar-fa-picture-o:before { + content: "\f03e"; +} +.phpdebugbar-fa-pencil:before { + content: "\f040"; +} +.phpdebugbar-fa-map-marker:before { + content: "\f041"; +} +.phpdebugbar-fa-adjust:before { + content: "\f042"; +} +.phpdebugbar-fa-tint:before { + content: "\f043"; +} +.phpdebugbar-fa-edit:before, +.phpdebugbar-fa-pencil-square-o:before { + content: "\f044"; +} +.phpdebugbar-fa-share-square-o:before { + content: "\f045"; +} +.phpdebugbar-fa-check-square-o:before { + content: "\f046"; +} +.phpdebugbar-fa-arrows:before { + content: "\f047"; +} +.phpdebugbar-fa-step-backward:before { + content: "\f048"; +} +.phpdebugbar-fa-fast-backward:before { + content: "\f049"; +} +.phpdebugbar-fa-backward:before { + content: "\f04a"; +} +.phpdebugbar-fa-play:before { + content: "\f04b"; +} +.phpdebugbar-fa-pause:before { + content: "\f04c"; +} +.phpdebugbar-fa-stop:before { + content: "\f04d"; +} +.phpdebugbar-fa-forward:before { + content: "\f04e"; +} +.phpdebugbar-fa-fast-forward:before { + content: "\f050"; +} +.phpdebugbar-fa-step-forward:before { + content: "\f051"; +} +.phpdebugbar-fa-eject:before { + content: "\f052"; +} +.phpdebugbar-fa-chevron-left:before { + content: "\f053"; +} +.phpdebugbar-fa-chevron-right:before { + content: "\f054"; +} +.phpdebugbar-fa-plus-circle:before { + content: "\f055"; +} +.phpdebugbar-fa-minus-circle:before { + content: "\f056"; +} +.phpdebugbar-fa-times-circle:before { + content: "\f057"; +} +.phpdebugbar-fa-check-circle:before { + content: "\f058"; +} +.phpdebugbar-fa-question-circle:before { + content: "\f059"; +} +.phpdebugbar-fa-info-circle:before { + content: "\f05a"; +} +.phpdebugbar-fa-crosshairs:before { + content: "\f05b"; +} +.phpdebugbar-fa-times-circle-o:before { + content: "\f05c"; +} +.phpdebugbar-fa-check-circle-o:before { + content: "\f05d"; +} +.phpdebugbar-fa-ban:before { + content: "\f05e"; +} +.phpdebugbar-fa-arrow-left:before { + content: "\f060"; +} +.phpdebugbar-fa-arrow-right:before { + content: "\f061"; +} +.phpdebugbar-fa-arrow-up:before { + content: "\f062"; +} +.phpdebugbar-fa-arrow-down:before { + content: "\f063"; +} +.phpdebugbar-fa-mail-forward:before, +.phpdebugbar-fa-share:before { + content: "\f064"; +} +.phpdebugbar-fa-expand:before { + content: "\f065"; +} +.phpdebugbar-fa-compress:before { + content: "\f066"; +} +.phpdebugbar-fa-plus:before { + content: "\f067"; +} +.phpdebugbar-fa-minus:before { + content: "\f068"; +} +.phpdebugbar-fa-asterisk:before { + content: "\f069"; +} +.phpdebugbar-fa-exclamation-circle:before { + content: "\f06a"; +} +.phpdebugbar-fa-gift:before { + content: "\f06b"; +} +.phpdebugbar-fa-leaf:before { + content: "\f06c"; +} +.phpdebugbar-fa-fire:before { + content: "\f06d"; +} +.phpdebugbar-fa-eye:before { + content: "\f06e"; +} +.phpdebugbar-fa-eye-slash:before { + content: "\f070"; +} +.phpdebugbar-fa-warning:before, +.phpdebugbar-fa-exclamation-triangle:before { + content: "\f071"; +} +.phpdebugbar-fa-plane:before { + content: "\f072"; +} +.phpdebugbar-fa-calendar:before { + content: "\f073"; +} +.phpdebugbar-fa-random:before { + content: "\f074"; +} +.phpdebugbar-fa-comment:before { + content: "\f075"; +} +.phpdebugbar-fa-magnet:before { + content: "\f076"; +} +.phpdebugbar-fa-chevron-up:before { + content: "\f077"; +} +.phpdebugbar-fa-chevron-down:before { + content: "\f078"; +} +.phpdebugbar-fa-retweet:before { + content: "\f079"; +} +.phpdebugbar-fa-shopping-cart:before { + content: "\f07a"; +} +.phpdebugbar-fa-folder:before { + content: "\f07b"; +} +.phpdebugbar-fa-folder-open:before { + content: "\f07c"; +} +.phpdebugbar-fa-arrows-v:before { + content: "\f07d"; +} +.phpdebugbar-fa-arrows-h:before { + content: "\f07e"; +} +.phpdebugbar-fa-bar-chart-o:before, +.phpdebugbar-fa-bar-chart:before { + content: "\f080"; +} +.phpdebugbar-fa-twitter-square:before { + content: "\f081"; +} +.phpdebugbar-fa-facebook-square:before { + content: "\f082"; +} +.phpdebugbar-fa-camera-retro:before { + content: "\f083"; +} +.phpdebugbar-fa-key:before { + content: "\f084"; +} +.phpdebugbar-fa-gears:before, +.phpdebugbar-fa-cogs:before { + content: "\f085"; +} +.phpdebugbar-fa-comments:before { + content: "\f086"; +} +.phpdebugbar-fa-thumbs-o-up:before { + content: "\f087"; +} +.phpdebugbar-fa-thumbs-o-down:before { + content: "\f088"; +} +.phpdebugbar-fa-star-half:before { + content: "\f089"; +} +.phpdebugbar-fa-heart-o:before { + content: "\f08a"; +} +.phpdebugbar-fa-sign-out:before { + content: "\f08b"; +} +.phpdebugbar-fa-linkedin-square:before { + content: "\f08c"; +} +.phpdebugbar-fa-thumb-tack:before { + content: "\f08d"; +} +.phpdebugbar-fa-external-link:before { + content: "\f08e"; +} +.phpdebugbar-fa-sign-in:before { + content: "\f090"; +} +.phpdebugbar-fa-trophy:before { + content: "\f091"; +} +.phpdebugbar-fa-github-square:before { + content: "\f092"; +} +.phpdebugbar-fa-upload:before { + content: "\f093"; +} +.phpdebugbar-fa-lemon-o:before { + content: "\f094"; +} +.phpdebugbar-fa-phone:before { + content: "\f095"; +} +.phpdebugbar-fa-square-o:before { + content: "\f096"; +} +.phpdebugbar-fa-bookmark-o:before { + content: "\f097"; +} +.phpdebugbar-fa-phone-square:before { + content: "\f098"; +} +.phpdebugbar-fa-twitter:before { + content: "\f099"; +} +.phpdebugbar-fa-facebook:before { + content: "\f09a"; +} +.phpdebugbar-fa-github:before { + content: "\f09b"; +} +.phpdebugbar-fa-unlock:before { + content: "\f09c"; +} +.phpdebugbar-fa-credit-card:before { + content: "\f09d"; +} +.phpdebugbar-fa-rss:before { + content: "\f09e"; +} +.phpdebugbar-fa-hdd-o:before { + content: "\f0a0"; +} +.phpdebugbar-fa-bullhorn:before { + content: "\f0a1"; +} +.phpdebugbar-fa-bell:before { + content: "\f0f3"; +} +.phpdebugbar-fa-certificate:before { + content: "\f0a3"; +} +.phpdebugbar-fa-hand-o-right:before { + content: "\f0a4"; +} +.phpdebugbar-fa-hand-o-left:before { + content: "\f0a5"; +} +.phpdebugbar-fa-hand-o-up:before { + content: "\f0a6"; +} +.phpdebugbar-fa-hand-o-down:before { + content: "\f0a7"; +} +.phpdebugbar-fa-arrow-circle-left:before { + content: "\f0a8"; +} +.phpdebugbar-fa-arrow-circle-right:before { + content: "\f0a9"; +} +.phpdebugbar-fa-arrow-circle-up:before { + content: "\f0aa"; +} +.phpdebugbar-fa-arrow-circle-down:before { + content: "\f0ab"; +} +.phpdebugbar-fa-globe:before { + content: "\f0ac"; +} +.phpdebugbar-fa-wrench:before { + content: "\f0ad"; +} +.phpdebugbar-fa-tasks:before { + content: "\f0ae"; +} +.phpdebugbar-fa-filter:before { + content: "\f0b0"; +} +.phpdebugbar-fa-briefcase:before { + content: "\f0b1"; +} +.phpdebugbar-fa-arrows-alt:before { + content: "\f0b2"; +} +.phpdebugbar-fa-group:before, +.phpdebugbar-fa-users:before { + content: "\f0c0"; +} +.phpdebugbar-fa-chain:before, +.phpdebugbar-fa-link:before { + content: "\f0c1"; +} +.phpdebugbar-fa-cloud:before { + content: "\f0c2"; +} +.phpdebugbar-fa-flask:before { + content: "\f0c3"; +} +.phpdebugbar-fa-cut:before, +.phpdebugbar-fa-scissors:before { + content: "\f0c4"; +} +.phpdebugbar-fa-copy:before, +.phpdebugbar-fa-files-o:before { + content: "\f0c5"; +} +.phpdebugbar-fa-paperclip:before { + content: "\f0c6"; +} +.phpdebugbar-fa-save:before, +.phpdebugbar-fa-floppy-o:before { + content: "\f0c7"; +} +.phpdebugbar-fa-square:before { + content: "\f0c8"; +} +.phpdebugbar-fa-navicon:before, +.phpdebugbar-fa-reorder:before, +.phpdebugbar-fa-bars:before { + content: "\f0c9"; +} +.phpdebugbar-fa-list-ul:before { + content: "\f0ca"; +} +.phpdebugbar-fa-list-ol:before { + content: "\f0cb"; +} +.phpdebugbar-fa-strikethrough:before { + content: "\f0cc"; +} +.phpdebugbar-fa-underline:before { + content: "\f0cd"; +} +.phpdebugbar-fa-table:before { + content: "\f0ce"; +} +.phpdebugbar-fa-magic:before { + content: "\f0d0"; +} +.phpdebugbar-fa-truck:before { + content: "\f0d1"; +} +.phpdebugbar-fa-pinterest:before { + content: "\f0d2"; +} +.phpdebugbar-fa-pinterest-square:before { + content: "\f0d3"; +} +.phpdebugbar-fa-google-plus-square:before { + content: "\f0d4"; +} +.phpdebugbar-fa-google-plus:before { + content: "\f0d5"; +} +.phpdebugbar-fa-money:before { + content: "\f0d6"; +} +.phpdebugbar-fa-caret-down:before { + content: "\f0d7"; +} +.phpdebugbar-fa-caret-up:before { + content: "\f0d8"; +} +.phpdebugbar-fa-caret-left:before { + content: "\f0d9"; +} +.phpdebugbar-fa-caret-right:before { + content: "\f0da"; +} +.phpdebugbar-fa-columns:before { + content: "\f0db"; +} +.phpdebugbar-fa-unsorted:before, +.phpdebugbar-fa-sort:before { + content: "\f0dc"; +} +.phpdebugbar-fa-sort-down:before, +.phpdebugbar-fa-sort-desc:before { + content: "\f0dd"; +} +.phpdebugbar-fa-sort-up:before, +.phpdebugbar-fa-sort-asc:before { + content: "\f0de"; +} +.phpdebugbar-fa-envelope:before { + content: "\f0e0"; +} +.phpdebugbar-fa-linkedin:before { + content: "\f0e1"; +} +.phpdebugbar-fa-rotate-left:before, +.phpdebugbar-fa-undo:before { + content: "\f0e2"; +} +.phpdebugbar-fa-legal:before, +.phpdebugbar-fa-gavel:before { + content: "\f0e3"; +} +.phpdebugbar-fa-dashboard:before, +.phpdebugbar-fa-tachometer:before { + content: "\f0e4"; +} +.phpdebugbar-fa-comment-o:before { + content: "\f0e5"; +} +.phpdebugbar-fa-comments-o:before { + content: "\f0e6"; +} +.phpdebugbar-fa-flash:before, +.phpdebugbar-fa-bolt:before { + content: "\f0e7"; +} +.phpdebugbar-fa-sitemap:before { + content: "\f0e8"; +} +.phpdebugbar-fa-umbrella:before { + content: "\f0e9"; +} +.phpdebugbar-fa-paste:before, +.phpdebugbar-fa-clipboard:before { + content: "\f0ea"; +} +.phpdebugbar-fa-lightbulb-o:before { + content: "\f0eb"; +} +.phpdebugbar-fa-exchange:before { + content: "\f0ec"; +} +.phpdebugbar-fa-cloud-download:before { + content: "\f0ed"; +} +.phpdebugbar-fa-cloud-upload:before { + content: "\f0ee"; +} +.phpdebugbar-fa-user-md:before { + content: "\f0f0"; +} +.phpdebugbar-fa-stethoscope:before { + content: "\f0f1"; +} +.phpdebugbar-fa-suitcase:before { + content: "\f0f2"; +} +.phpdebugbar-fa-bell-o:before { + content: "\f0a2"; +} +.phpdebugbar-fa-coffee:before { + content: "\f0f4"; +} +.phpdebugbar-fa-cutlery:before { + content: "\f0f5"; +} +.phpdebugbar-fa-file-text-o:before { + content: "\f0f6"; +} +.phpdebugbar-fa-building-o:before { + content: "\f0f7"; +} +.phpdebugbar-fa-hospital-o:before { + content: "\f0f8"; +} +.phpdebugbar-fa-ambulance:before { + content: "\f0f9"; +} +.phpdebugbar-fa-medkit:before { + content: "\f0fa"; +} +.phpdebugbar-fa-fighter-jet:before { + content: "\f0fb"; +} +.phpdebugbar-fa-beer:before { + content: "\f0fc"; +} +.phpdebugbar-fa-h-square:before { + content: "\f0fd"; +} +.phpdebugbar-fa-plus-square:before { + content: "\f0fe"; +} +.phpdebugbar-fa-angle-double-left:before { + content: "\f100"; +} +.phpdebugbar-fa-angle-double-right:before { + content: "\f101"; +} +.phpdebugbar-fa-angle-double-up:before { + content: "\f102"; +} +.phpdebugbar-fa-angle-double-down:before { + content: "\f103"; +} +.phpdebugbar-fa-angle-left:before { + content: "\f104"; +} +.phpdebugbar-fa-angle-right:before { + content: "\f105"; +} +.phpdebugbar-fa-angle-up:before { + content: "\f106"; +} +.phpdebugbar-fa-angle-down:before { + content: "\f107"; +} +.phpdebugbar-fa-desktop:before { + content: "\f108"; +} +.phpdebugbar-fa-laptop:before { + content: "\f109"; +} +.phpdebugbar-fa-tablet:before { + content: "\f10a"; +} +.phpdebugbar-fa-mobile-phone:before, +.phpdebugbar-fa-mobile:before { + content: "\f10b"; +} +.phpdebugbar-fa-circle-o:before { + content: "\f10c"; +} +.phpdebugbar-fa-quote-left:before { + content: "\f10d"; +} +.phpdebugbar-fa-quote-right:before { + content: "\f10e"; +} +.phpdebugbar-fa-spinner:before { + content: "\f110"; +} +.phpdebugbar-fa-circle:before { + content: "\f111"; +} +.phpdebugbar-fa-mail-reply:before, +.phpdebugbar-fa-reply:before { + content: "\f112"; +} +.phpdebugbar-fa-github-alt:before { + content: "\f113"; +} +.phpdebugbar-fa-folder-o:before { + content: "\f114"; +} +.phpdebugbar-fa-folder-open-o:before { + content: "\f115"; +} +.phpdebugbar-fa-smile-o:before { + content: "\f118"; +} +.phpdebugbar-fa-frown-o:before { + content: "\f119"; +} +.phpdebugbar-fa-meh-o:before { + content: "\f11a"; +} +.phpdebugbar-fa-gamepad:before { + content: "\f11b"; +} +.phpdebugbar-fa-keyboard-o:before { + content: "\f11c"; +} +.phpdebugbar-fa-flag-o:before { + content: "\f11d"; +} +.phpdebugbar-fa-flag-checkered:before { + content: "\f11e"; +} +.phpdebugbar-fa-terminal:before { + content: "\f120"; +} +.phpdebugbar-fa-code:before { + content: "\f121"; +} +.phpdebugbar-fa-mail-reply-all:before, +.phpdebugbar-fa-reply-all:before { + content: "\f122"; +} +.phpdebugbar-fa-star-half-empty:before, +.phpdebugbar-fa-star-half-full:before, +.phpdebugbar-fa-star-half-o:before { + content: "\f123"; +} +.phpdebugbar-fa-location-arrow:before { + content: "\f124"; +} +.phpdebugbar-fa-crop:before { + content: "\f125"; +} +.phpdebugbar-fa-code-fork:before { + content: "\f126"; +} +.phpdebugbar-fa-unlink:before, +.phpdebugbar-fa-chain-broken:before { + content: "\f127"; +} +.phpdebugbar-fa-question:before { + content: "\f128"; +} +.phpdebugbar-fa-info:before { + content: "\f129"; +} +.phpdebugbar-fa-exclamation:before { + content: "\f12a"; +} +.phpdebugbar-fa-superscript:before { + content: "\f12b"; +} +.phpdebugbar-fa-subscript:before { + content: "\f12c"; +} +.phpdebugbar-fa-eraser:before { + content: "\f12d"; +} +.phpdebugbar-fa-puzzle-piece:before { + content: "\f12e"; +} +.phpdebugbar-fa-microphone:before { + content: "\f130"; +} +.phpdebugbar-fa-microphone-slash:before { + content: "\f131"; +} +.phpdebugbar-fa-shield:before { + content: "\f132"; +} +.phpdebugbar-fa-calendar-o:before { + content: "\f133"; +} +.phpdebugbar-fa-fire-extinguisher:before { + content: "\f134"; +} +.phpdebugbar-fa-rocket:before { + content: "\f135"; +} +.phpdebugbar-fa-maxcdn:before { + content: "\f136"; +} +.phpdebugbar-fa-chevron-circle-left:before { + content: "\f137"; +} +.phpdebugbar-fa-chevron-circle-right:before { + content: "\f138"; +} +.phpdebugbar-fa-chevron-circle-up:before { + content: "\f139"; +} +.phpdebugbar-fa-chevron-circle-down:before { + content: "\f13a"; +} +.phpdebugbar-fa-html5:before { + content: "\f13b"; +} +.phpdebugbar-fa-css3:before { + content: "\f13c"; +} +.phpdebugbar-fa-anchor:before { + content: "\f13d"; +} +.phpdebugbar-fa-unlock-alt:before { + content: "\f13e"; +} +.phpdebugbar-fa-bullseye:before { + content: "\f140"; +} +.phpdebugbar-fa-ellipsis-h:before { + content: "\f141"; +} +.phpdebugbar-fa-ellipsis-v:before { + content: "\f142"; +} +.phpdebugbar-fa-rss-square:before { + content: "\f143"; +} +.phpdebugbar-fa-play-circle:before { + content: "\f144"; +} +.phpdebugbar-fa-ticket:before { + content: "\f145"; +} +.phpdebugbar-fa-minus-square:before { + content: "\f146"; +} +.phpdebugbar-fa-minus-square-o:before { + content: "\f147"; +} +.phpdebugbar-fa-level-up:before { + content: "\f148"; +} +.phpdebugbar-fa-level-down:before { + content: "\f149"; +} +.phpdebugbar-fa-check-square:before { + content: "\f14a"; +} +.phpdebugbar-fa-pencil-square:before { + content: "\f14b"; +} +.phpdebugbar-fa-external-link-square:before { + content: "\f14c"; +} +.phpdebugbar-fa-share-square:before { + content: "\f14d"; +} +.phpdebugbar-fa-compass:before { + content: "\f14e"; +} +.phpdebugbar-fa-toggle-down:before, +.phpdebugbar-fa-caret-square-o-down:before { + content: "\f150"; +} +.phpdebugbar-fa-toggle-up:before, +.phpdebugbar-fa-caret-square-o-up:before { + content: "\f151"; +} +.phpdebugbar-fa-toggle-right:before, +.phpdebugbar-fa-caret-square-o-right:before { + content: "\f152"; +} +.phpdebugbar-fa-euro:before, +.phpdebugbar-fa-eur:before { + content: "\f153"; +} +.phpdebugbar-fa-gbp:before { + content: "\f154"; +} +.phpdebugbar-fa-dollar:before, +.phpdebugbar-fa-usd:before { + content: "\f155"; +} +.phpdebugbar-fa-rupee:before, +.phpdebugbar-fa-inr:before { + content: "\f156"; +} +.phpdebugbar-fa-cny:before, +.phpdebugbar-fa-rmb:before, +.phpdebugbar-fa-yen:before, +.phpdebugbar-fa-jpy:before { + content: "\f157"; +} +.phpdebugbar-fa-ruble:before, +.phpdebugbar-fa-rouble:before, +.phpdebugbar-fa-rub:before { + content: "\f158"; +} +.phpdebugbar-fa-won:before, +.phpdebugbar-fa-krw:before { + content: "\f159"; +} +.phpdebugbar-fa-bitcoin:before, +.phpdebugbar-fa-btc:before { + content: "\f15a"; +} +.phpdebugbar-fa-file:before { + content: "\f15b"; +} +.phpdebugbar-fa-file-text:before { + content: "\f15c"; +} +.phpdebugbar-fa-sort-alpha-asc:before { + content: "\f15d"; +} +.phpdebugbar-fa-sort-alpha-desc:before { + content: "\f15e"; +} +.phpdebugbar-fa-sort-amount-asc:before { + content: "\f160"; +} +.phpdebugbar-fa-sort-amount-desc:before { + content: "\f161"; +} +.phpdebugbar-fa-sort-numeric-asc:before { + content: "\f162"; +} +.phpdebugbar-fa-sort-numeric-desc:before { + content: "\f163"; +} +.phpdebugbar-fa-thumbs-up:before { + content: "\f164"; +} +.phpdebugbar-fa-thumbs-down:before { + content: "\f165"; +} +.phpdebugbar-fa-youtube-square:before { + content: "\f166"; +} +.phpdebugbar-fa-youtube:before { + content: "\f167"; +} +.phpdebugbar-fa-xing:before { + content: "\f168"; +} +.phpdebugbar-fa-xing-square:before { + content: "\f169"; +} +.phpdebugbar-fa-youtube-play:before { + content: "\f16a"; +} +.phpdebugbar-fa-dropbox:before { + content: "\f16b"; +} +.phpdebugbar-fa-stack-overflow:before { + content: "\f16c"; +} +.phpdebugbar-fa-instagram:before { + content: "\f16d"; +} +.phpdebugbar-fa-flickr:before { + content: "\f16e"; +} +.phpdebugbar-fa-adn:before { + content: "\f170"; +} +.phpdebugbar-fa-bitbucket:before { + content: "\f171"; +} +.phpdebugbar-fa-bitbucket-square:before { + content: "\f172"; +} +.phpdebugbar-fa-tumblr:before { + content: "\f173"; +} +.phpdebugbar-fa-tumblr-square:before { + content: "\f174"; +} +.phpdebugbar-fa-long-arrow-down:before { + content: "\f175"; +} +.phpdebugbar-fa-long-arrow-up:before { + content: "\f176"; +} +.phpdebugbar-fa-long-arrow-left:before { + content: "\f177"; +} +.phpdebugbar-fa-long-arrow-right:before { + content: "\f178"; +} +.phpdebugbar-fa-apple:before { + content: "\f179"; +} +.phpdebugbar-fa-windows:before { + content: "\f17a"; +} +.phpdebugbar-fa-android:before { + content: "\f17b"; +} +.phpdebugbar-fa-linux:before { + content: "\f17c"; +} +.phpdebugbar-fa-dribbble:before { + content: "\f17d"; +} +.phpdebugbar-fa-skype:before { + content: "\f17e"; +} +.phpdebugbar-fa-foursquare:before { + content: "\f180"; +} +.phpdebugbar-fa-trello:before { + content: "\f181"; +} +.phpdebugbar-fa-female:before { + content: "\f182"; +} +.phpdebugbar-fa-male:before { + content: "\f183"; +} +.phpdebugbar-fa-gittip:before { + content: "\f184"; +} +.phpdebugbar-fa-sun-o:before { + content: "\f185"; +} +.phpdebugbar-fa-moon-o:before { + content: "\f186"; +} +.phpdebugbar-fa-archive:before { + content: "\f187"; +} +.phpdebugbar-fa-bug:before { + content: "\f188"; +} +.phpdebugbar-fa-vk:before { + content: "\f189"; +} +.phpdebugbar-fa-weibo:before { + content: "\f18a"; +} +.phpdebugbar-fa-renren:before { + content: "\f18b"; +} +.phpdebugbar-fa-pagelines:before { + content: "\f18c"; +} +.phpdebugbar-fa-stack-exchange:before { + content: "\f18d"; +} +.phpdebugbar-fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.phpdebugbar-fa-arrow-circle-o-left:before { + content: "\f190"; +} +.phpdebugbar-fa-toggle-left:before, +.phpdebugbar-fa-caret-square-o-left:before { + content: "\f191"; +} +.phpdebugbar-fa-dot-circle-o:before { + content: "\f192"; +} +.phpdebugbar-fa-wheelchair:before { + content: "\f193"; +} +.phpdebugbar-fa-vimeo-square:before { + content: "\f194"; +} +.phpdebugbar-fa-turkish-lira:before, +.phpdebugbar-fa-try:before { + content: "\f195"; +} +.phpdebugbar-fa-plus-square-o:before { + content: "\f196"; +} +.phpdebugbar-fa-space-shuttle:before { + content: "\f197"; +} +.phpdebugbar-fa-slack:before { + content: "\f198"; +} +.phpdebugbar-fa-envelope-square:before { + content: "\f199"; +} +.phpdebugbar-fa-wordpress:before { + content: "\f19a"; +} +.phpdebugbar-fa-openid:before { + content: "\f19b"; +} +.phpdebugbar-fa-institution:before, +.phpdebugbar-fa-bank:before, +.phpdebugbar-fa-university:before { + content: "\f19c"; +} +.phpdebugbar-fa-mortar-board:before, +.phpdebugbar-fa-graduation-cap:before { + content: "\f19d"; +} +.phpdebugbar-fa-yahoo:before { + content: "\f19e"; +} +.phpdebugbar-fa-google:before { + content: "\f1a0"; +} +.phpdebugbar-fa-reddit:before { + content: "\f1a1"; +} +.phpdebugbar-fa-reddit-square:before { + content: "\f1a2"; +} +.phpdebugbar-fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.phpdebugbar-fa-stumbleupon:before { + content: "\f1a4"; +} +.phpdebugbar-fa-delicious:before { + content: "\f1a5"; +} +.phpdebugbar-fa-digg:before { + content: "\f1a6"; +} +.phpdebugbar-fa-pied-piper:before { + content: "\f1a7"; +} +.phpdebugbar-fa-pied-piper-alt:before { + content: "\f1a8"; +} +.phpdebugbar-fa-drupal:before { + content: "\f1a9"; +} +.phpdebugbar-fa-joomla:before { + content: "\f1aa"; +} +.phpdebugbar-fa-language:before { + content: "\f1ab"; +} +.phpdebugbar-fa-fax:before { + content: "\f1ac"; +} +.phpdebugbar-fa-building:before { + content: "\f1ad"; +} +.phpdebugbar-fa-child:before { + content: "\f1ae"; +} +.phpdebugbar-fa-paw:before { + content: "\f1b0"; +} +.phpdebugbar-fa-spoon:before { + content: "\f1b1"; +} +.phpdebugbar-fa-cube:before { + content: "\f1b2"; +} +.phpdebugbar-fa-cubes:before { + content: "\f1b3"; +} +.phpdebugbar-fa-behance:before { + content: "\f1b4"; +} +.phpdebugbar-fa-behance-square:before { + content: "\f1b5"; +} +.phpdebugbar-fa-steam:before { + content: "\f1b6"; +} +.phpdebugbar-fa-steam-square:before { + content: "\f1b7"; +} +.phpdebugbar-fa-recycle:before { + content: "\f1b8"; +} +.phpdebugbar-fa-automobile:before, +.phpdebugbar-fa-car:before { + content: "\f1b9"; +} +.phpdebugbar-fa-cab:before, +.phpdebugbar-fa-taxi:before { + content: "\f1ba"; +} +.phpdebugbar-fa-tree:before { + content: "\f1bb"; +} +.phpdebugbar-fa-spotify:before { + content: "\f1bc"; +} +.phpdebugbar-fa-deviantart:before { + content: "\f1bd"; +} +.phpdebugbar-fa-soundcloud:before { + content: "\f1be"; +} +.phpdebugbar-fa-database:before { + content: "\f1c0"; +} +.phpdebugbar-fa-file-pdf-o:before { + content: "\f1c1"; +} +.phpdebugbar-fa-file-word-o:before { + content: "\f1c2"; +} +.phpdebugbar-fa-file-excel-o:before { + content: "\f1c3"; +} +.phpdebugbar-fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.phpdebugbar-fa-file-photo-o:before, +.phpdebugbar-fa-file-picture-o:before, +.phpdebugbar-fa-file-image-o:before { + content: "\f1c5"; +} +.phpdebugbar-fa-file-zip-o:before, +.phpdebugbar-fa-file-archive-o:before { + content: "\f1c6"; +} +.phpdebugbar-fa-file-sound-o:before, +.phpdebugbar-fa-file-audio-o:before { + content: "\f1c7"; +} +.phpdebugbar-fa-file-movie-o:before, +.phpdebugbar-fa-file-video-o:before { + content: "\f1c8"; +} +.phpdebugbar-fa-file-code-o:before { + content: "\f1c9"; +} +.phpdebugbar-fa-vine:before { + content: "\f1ca"; +} +.phpdebugbar-fa-codepen:before { + content: "\f1cb"; +} +.phpdebugbar-fa-jsfiddle:before { + content: "\f1cc"; +} +.phpdebugbar-fa-life-bouy:before, +.phpdebugbar-fa-life-buoy:before, +.phpdebugbar-fa-life-saver:before, +.phpdebugbar-fa-support:before, +.phpdebugbar-fa-life-ring:before { + content: "\f1cd"; +} +.phpdebugbar-fa-circle-o-notch:before { + content: "\f1ce"; +} +.phpdebugbar-fa-ra:before, +.phpdebugbar-fa-rebel:before { + content: "\f1d0"; +} +.phpdebugbar-fa-ge:before, +.phpdebugbar-fa-empire:before { + content: "\f1d1"; +} +.phpdebugbar-fa-git-square:before { + content: "\f1d2"; +} +.phpdebugbar-fa-git:before { + content: "\f1d3"; +} +.phpdebugbar-fa-hacker-news:before { + content: "\f1d4"; +} +.phpdebugbar-fa-tencent-weibo:before { + content: "\f1d5"; +} +.phpdebugbar-fa-qq:before { + content: "\f1d6"; +} +.phpdebugbar-fa-wechat:before, +.phpdebugbar-fa-weixin:before { + content: "\f1d7"; +} +.phpdebugbar-fa-send:before, +.phpdebugbar-fa-paper-plane:before { + content: "\f1d8"; +} +.phpdebugbar-fa-send-o:before, +.phpdebugbar-fa-paper-plane-o:before { + content: "\f1d9"; +} +.phpdebugbar-fa-history:before { + content: "\f1da"; +} +.phpdebugbar-fa-circle-thin:before { + content: "\f1db"; +} +.phpdebugbar-fa-header:before { + content: "\f1dc"; +} +.phpdebugbar-fa-paragraph:before { + content: "\f1dd"; +} +.phpdebugbar-fa-sliders:before { + content: "\f1de"; +} +.phpdebugbar-fa-share-alt:before { + content: "\f1e0"; +} +.phpdebugbar-fa-share-alt-square:before { + content: "\f1e1"; +} +.phpdebugbar-fa-bomb:before { + content: "\f1e2"; +} +.phpdebugbar-fa-soccer-ball-o:before, +.phpdebugbar-fa-futbol-o:before { + content: "\f1e3"; +} +.phpdebugbar-fa-tty:before { + content: "\f1e4"; +} +.phpdebugbar-fa-binoculars:before { + content: "\f1e5"; +} +.phpdebugbar-fa-plug:before { + content: "\f1e6"; +} +.phpdebugbar-fa-slideshare:before { + content: "\f1e7"; +} +.phpdebugbar-fa-twitch:before { + content: "\f1e8"; +} +.phpdebugbar-fa-yelp:before { + content: "\f1e9"; +} +.phpdebugbar-fa-newspaper-o:before { + content: "\f1ea"; +} +.phpdebugbar-fa-wifi:before { + content: "\f1eb"; +} +.phpdebugbar-fa-calculator:before { + content: "\f1ec"; +} +.phpdebugbar-fa-paypal:before { + content: "\f1ed"; +} +.phpdebugbar-fa-google-wallet:before { + content: "\f1ee"; +} +.phpdebugbar-fa-cc-visa:before { + content: "\f1f0"; +} +.phpdebugbar-fa-cc-mastercard:before { + content: "\f1f1"; +} +.phpdebugbar-fa-cc-discover:before { + content: "\f1f2"; +} +.phpdebugbar-fa-cc-amex:before { + content: "\f1f3"; +} +.phpdebugbar-fa-cc-paypal:before { + content: "\f1f4"; +} +.phpdebugbar-fa-cc-stripe:before { + content: "\f1f5"; +} +.phpdebugbar-fa-bell-slash:before { + content: "\f1f6"; +} +.phpdebugbar-fa-bell-slash-o:before { + content: "\f1f7"; +} +.phpdebugbar-fa-trash:before { + content: "\f1f8"; +} +.phpdebugbar-fa-copyright:before { + content: "\f1f9"; +} +.phpdebugbar-fa-at:before { + content: "\f1fa"; +} +.phpdebugbar-fa-eyedropper:before { + content: "\f1fb"; +} +.phpdebugbar-fa-paint-brush:before { + content: "\f1fc"; +} +.phpdebugbar-fa-birthday-cake:before { + content: "\f1fd"; +} +.phpdebugbar-fa-area-chart:before { + content: "\f1fe"; +} +.phpdebugbar-fa-pie-chart:before { + content: "\f200"; +} +.phpdebugbar-fa-line-chart:before { + content: "\f201"; +} +.phpdebugbar-fa-lastfm:before { + content: "\f202"; +} +.phpdebugbar-fa-lastfm-square:before { + content: "\f203"; +} +.phpdebugbar-fa-toggle-off:before { + content: "\f204"; +} +.phpdebugbar-fa-toggle-on:before { + content: "\f205"; +} +.phpdebugbar-fa-bicycle:before { + content: "\f206"; +} +.phpdebugbar-fa-bus:before { + content: "\f207"; +} +.phpdebugbar-fa-ioxhost:before { + content: "\f208"; +} +.phpdebugbar-fa-angellist:before { + content: "\f209"; +} +.phpdebugbar-fa-cc:before { + content: "\f20a"; +} +.phpdebugbar-fa-shekel:before, +.phpdebugbar-fa-sheqel:before, +.phpdebugbar-fa-ils:before { + content: "\f20b"; +} +.phpdebugbar-fa-meanpath:before { + content: "\f20c"; +} diff --git a/vendor/barryvdh/laravel-debugbar/src/ServiceProvider.php b/vendor/barryvdh/laravel-debugbar/src/ServiceProvider.php new file mode 100644 index 000000000..11ea596e7 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/ServiceProvider.php @@ -0,0 +1,156 @@ +mergeConfigFrom($configPath, 'debugbar'); + + $this->app->alias( + DataFormatter::class, + DataFormatterInterface::class + ); + + $this->app->singleton(LaravelDebugbar::class, function ($app) { + $debugbar = new LaravelDebugbar($app); + + if ($app->bound(SessionManager::class)) { + $sessionManager = $app->make(SessionManager::class); + $httpDriver = new SymfonyHttpDriver($sessionManager); + $debugbar->setHttpDriver($httpDriver); + } + + return $debugbar; + }); + + $this->app->alias(LaravelDebugbar::class, 'debugbar'); + + $this->app->singleton( + 'command.debugbar.clear', + function ($app) { + return new Console\ClearCommand($app['debugbar']); + } + ); + + $this->app->extend( + 'view.engine.resolver', + function (EngineResolver $resolver, Application $application): EngineResolver { + $laravelDebugbar = $application->make(LaravelDebugbar::class); + + $shouldTrackViewTime = $laravelDebugbar->isEnabled() && + $laravelDebugbar->shouldCollect('time', true) && + $laravelDebugbar->shouldCollect('views', true) && + $application['config']->get('debugbar.options.views.timeline', false); + + if (! $shouldTrackViewTime) { + /* Do not swap the engine to save performance */ + return $resolver; + } + + return new class ($resolver, $laravelDebugbar) extends EngineResolver { + private $laravelDebugbar; + + public function __construct(EngineResolver $resolver, LaravelDebugbar $laravelDebugbar) + { + foreach ($resolver->resolvers as $engine => $resolver) { + $this->register($engine, $resolver); + } + $this->laravelDebugbar = $laravelDebugbar; + } + + public function register($engine, \Closure $resolver) + { + parent::register($engine, function () use ($resolver) { + return new DebugbarViewEngine($resolver(), $this->laravelDebugbar); + }); + } + }; + } + ); + + Collection::macro('debug', function () { + debug($this); + return $this; + }); + } + + /** + * Bootstrap the application events. + * + * @return void + */ + public function boot() + { + $configPath = __DIR__ . '/../config/debugbar.php'; + $this->publishes([$configPath => $this->getConfigPath()], 'config'); + + $this->loadRoutesFrom(realpath(__DIR__ . '/debugbar-routes.php')); + + $this->registerMiddleware(InjectDebugbar::class); + + if ($this->app->runningInConsole()) { + $this->commands(['command.debugbar.clear']); + } + } + + /** + * Get the active router. + * + * @return Router + */ + protected function getRouter() + { + return $this->app['router']; + } + + /** + * Get the config path + * + * @return string + */ + protected function getConfigPath() + { + return config_path('debugbar.php'); + } + + /** + * Publish the config file + * + * @param string $configPath + */ + protected function publishConfig($configPath) + { + $this->publishes([$configPath => config_path('debugbar.php')], 'config'); + } + + /** + * Register the Debugbar Middleware + * + * @param string $middleware + */ + protected function registerMiddleware($middleware) + { + $kernel = $this->app[Kernel::class]; + $kernel->pushMiddleware($middleware); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Storage/FilesystemStorage.php b/vendor/barryvdh/laravel-debugbar/src/Storage/FilesystemStorage.php new file mode 100644 index 000000000..327f2ebdb --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Storage/FilesystemStorage.php @@ -0,0 +1,144 @@ +files = $files; + $this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + } + + /** + * {@inheritDoc} + */ + public function save($id, $data) + { + if (!$this->files->isDirectory($this->dirname)) { + if ($this->files->makeDirectory($this->dirname, 0777, true)) { + $this->files->put($this->dirname . '.gitignore', "*\n!.gitignore\n"); + } else { + throw new \Exception("Cannot create directory '$this->dirname'.."); + } + } + + try { + $this->files->put($this->makeFilename($id), json_encode($data)); + } catch (\Exception $e) { + //TODO; error handling + } + + // Randomly check if we should collect old files + if (rand(1, 100) <= $this->gc_probability) { + $this->garbageCollect(); + } + } + + /** + * Create the filename for the data, based on the id. + * + * @param $id + * @return string + */ + public function makeFilename($id) + { + return $this->dirname . basename($id) . ".json"; + } + + /** + * Delete files older then a certain age (gc_lifetime) + */ + protected function garbageCollect() + { + foreach ( + Finder::create()->files()->name('*.json')->date('< ' . $this->gc_lifetime . ' hour ago')->in( + $this->dirname + ) as $file + ) { + $this->files->delete($file->getRealPath()); + } + } + + /** + * {@inheritDoc} + */ + public function get($id) + { + return json_decode($this->files->get($this->makeFilename($id)), true); + } + + /** + * {@inheritDoc} + */ + public function find(array $filters = [], $max = 20, $offset = 0) + { + // Sort by modified time, newest first + $sort = function (\SplFileInfo $a, \SplFileInfo $b) { + return strcmp($b->getMTime(), $a->getMTime()); + }; + + // Loop through .json files, filter the metadata and stop when max is found. + $i = 0; + $results = []; + foreach (Finder::create()->files()->name('*.json')->in($this->dirname)->sort($sort) as $file) { + if ($i++ < $offset && empty($filters)) { + $results[] = null; + continue; + } + $data = json_decode($file->getContents(), true); + $meta = $data['__meta']; + unset($data); + if ($this->filter($meta, $filters)) { + $results[] = $meta; + } + if (count($results) >= ($max + $offset)) { + break; + } + } + return array_slice($results, $offset, $max); + } + + /** + * Filter the metadata for matches. + * + * @param $meta + * @param $filters + * @return bool + */ + protected function filter($meta, $filters) + { + foreach ($filters as $key => $value) { + if (!isset($meta[$key]) || fnmatch($value, $meta[$key]) === false) { + return false; + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public function clear() + { + foreach (Finder::create()->files()->name('*.json')->in($this->dirname) as $file) { + $this->files->delete($file->getRealPath()); + } + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Storage/SocketStorage.php b/vendor/barryvdh/laravel-debugbar/src/Storage/SocketStorage.php new file mode 100644 index 000000000..23f8b4809 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Storage/SocketStorage.php @@ -0,0 +1,99 @@ +hostname = $hostname; + $this->port = $port; + } + + /** + * @inheritDoc + */ + function save($id, $data) + { + $socketIsFresh = !$this->socket; + + if (!$this->socket = $this->socket ?: $this->createSocket()) { + return false; + } + + $encodedPayload = json_encode([ + 'id' => $id, + 'base_path' => base_path(), + 'app' => config('app.name'), + 'data' => $data, + ]); + + $encodedPayload = strlen($encodedPayload) . '#' . $encodedPayload; + + set_error_handler([self::class, 'nullErrorHandler']); + try { + if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { + return true; + } + if (!$socketIsFresh) { + stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); + fclose($this->socket); + $this->socket = $this->createSocket(); + } + if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { + return true; + } + } finally { + restore_error_handler(); + } + } + + private static function nullErrorHandler($t, $m) + { + // no-op + } + + protected function createSocket() + { + set_error_handler([self::class, 'nullErrorHandler']); + try { + return stream_socket_client("tcp://{$this->hostname}:{$this->port}"); + } finally { + restore_error_handler(); + } + } + + /** + * @inheritDoc + */ + function get($id) + { + // + } + + /** + * @inheritDoc + */ + function find(array $filters = array(), $max = 20, $offset = 0) + { + // + } + + /** + * @inheritDoc + */ + function clear() + { + // + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Support/Clockwork/ClockworkCollector.php b/vendor/barryvdh/laravel-debugbar/src/Support/Clockwork/ClockworkCollector.php new file mode 100644 index 000000000..3923a9fe6 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Support/Clockwork/ClockworkCollector.php @@ -0,0 +1,90 @@ + + * + */ +class ClockworkCollector extends DataCollector implements DataCollectorInterface, Renderable +{ + /** @var \Symfony\Component\HttpFoundation\Request $request */ + protected $request; + /** @var \Symfony\Component\HttpFoundation\Request $response */ + protected $response; + /** @var \Symfony\Component\HttpFoundation\Session\SessionInterface $session */ + protected $session; + + /** + * Create a new SymfonyRequestCollector + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $response + * @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session + */ + public function __construct($request, $response, $session = null) + { + $this->request = $request; + $this->response = $response; + $this->session = $session; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'clockwork'; + } + + /** + * {@inheritDoc} + */ + public function getWidgets() + { + return null; + } + + /** + * {@inheritdoc} + */ + public function collect() + { + $request = $this->request; + $response = $this->response; + + $data = [ + 'getData' => $request->query->all(), + 'postData' => $request->request->all(), + 'headers' => $request->headers->all(), + 'cookies' => $request->cookies->all(), + 'uri' => $request->getRequestUri(), + 'method' => $request->getMethod(), + 'responseStatus' => $response->getStatusCode(), + ]; + + if ($this->session) { + $sessionAttributes = []; + foreach ($this->session->all() as $key => $value) { + $sessionAttributes[$key] = $value; + } + $data['sessionData'] = $sessionAttributes; + } + + if (isset($data['postData']['php-auth-pw'])) { + $data['postData']['php-auth-pw'] = '******'; + } + + if (isset($data['postData']['PHP_AUTH_PW'])) { + $data['postData']['PHP_AUTH_PW'] = '******'; + } + + return $data; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Support/Clockwork/Converter.php b/vendor/barryvdh/laravel-debugbar/src/Support/Clockwork/Converter.php new file mode 100644 index 000000000..dbd4c05ff --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Support/Clockwork/Converter.php @@ -0,0 +1,139 @@ + $meta['id'], + 'method' => $meta['method'], + 'uri' => $meta['uri'], + 'time' => $meta['utime'], + 'headers' => [], + 'cookies' => [], + 'emailsData' => [], + 'getData' => [], + 'log' => [], + 'postData' => [], + 'sessionData' => [], + 'timelineData' => [], + 'viewsData' => [], + 'controller' => null, + 'responseTime' => null, + 'responseStatus' => null, + 'responseDuration' => 0, + ]; + + if (isset($data['clockwork'])) { + $output = array_merge($output, $data['clockwork']); + } + + if (isset($data['time'])) { + $time = $data['time']; + $output['time'] = $time['start']; + $output['responseTime'] = $time['end']; + $output['responseDuration'] = $time['duration'] * 1000; + foreach ($time['measures'] as $measure) { + $output['timelineData'][] = [ + 'data' => [], + 'description' => $measure['label'], + 'duration' => $measure['duration'] * 1000, + 'end' => $measure['end'], + 'start' => $measure['start'], + 'relative_start' => $measure['start'] - $time['start'], + ]; + } + } + + if (isset($data['route'])) { + $route = $data['route']; + + $controller = null; + if (isset($route['controller'])) { + $controller = $route['controller']; + } elseif (isset($route['uses'])) { + $controller = $route['uses']; + } + + $output['controller'] = $controller; + + list($method, $uri) = explode(' ', $route['uri'], 2); + + $output['routes'][] = [ + 'action' => $controller, + 'after' => isset($route['after']) ? $route['after'] : null, + 'before' => isset($route['before']) ? $route['before'] : null, + 'method' => $method, + 'name' => isset($route['as']) ? $route['as'] : null, + 'uri' => $uri, + ]; + } + + if (isset($data['messages'])) { + foreach ($data['messages']['messages'] as $message) { + $output['log'][] = [ + 'message' => $message['message'], + 'time' => $message['time'], + 'level' => $message['label'], + ]; + } + } + + if (isset($data['queries'])) { + $queries = $data['queries']; + foreach ($queries['statements'] as $statement) { + if ($statement['type'] === 'explain') { + continue; + } + $output['databaseQueries'][] = [ + 'query' => $statement['sql'], + 'bindings' => $statement['params'], + 'duration' => $statement['duration'] * 1000, + 'connection' => $statement['connection'] + ]; + } + + $output['databaseDuration'] = $queries['accumulated_duration'] * 1000; + } + + if (isset($data['views'])) { + foreach ($data['views']['templates'] as $view) { + $output['viewsData'][] = [ + 'description' => 'Rendering a view', + 'duration' => 0, + 'end' => 0, + 'start' => 0, + 'data' => [ + 'name' => $view['name'], + 'data' => $view['params'], + ], + ]; + } + } + + if (isset($data['swiftmailer_mails'])) { + foreach ($data['swiftmailer_mails']['mails'] as $mail) { + $output['emailsData'][] = [ + 'data' => [ + 'to' => $mail['to'], + 'subject' => $mail['subject'], + 'headers' => isset($mail['headers']) ? explode("\n", $mail['headers']) : null, + ], + ]; + } + } + + return $output; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/SymfonyHttpDriver.php b/vendor/barryvdh/laravel-debugbar/src/SymfonyHttpDriver.php new file mode 100644 index 000000000..088a5ab9f --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/SymfonyHttpDriver.php @@ -0,0 +1,79 @@ +session = $session; + $this->response = $response; + } + + /** + * {@inheritDoc} + */ + public function setHeaders(array $headers) + { + if (!is_null($this->response)) { + $this->response->headers->add($headers); + } + } + + /** + * {@inheritDoc} + */ + public function isSessionStarted() + { + if (!$this->session->isStarted()) { + $this->session->start(); + } + + return $this->session->isStarted(); + } + + /** + * {@inheritDoc} + */ + public function setSessionValue($name, $value) + { + $this->session->put($name, $value); + } + + /** + * {@inheritDoc} + */ + public function hasSessionValue($name) + { + return $this->session->has($name); + } + + /** + * {@inheritDoc} + */ + public function getSessionValue($name) + { + return $this->session->get($name); + } + + /** + * {@inheritDoc} + */ + public function deleteSessionValue($name) + { + $this->session->remove($name); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Debug.php b/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Debug.php new file mode 100644 index 000000000..42bc2cb32 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Debug.php @@ -0,0 +1,92 @@ +bound('debugbar')) { + $this->debugbar = $app['debugbar']; + } else { + $this->debugbar = null; + } + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'Laravel_Debugbar_Debug'; + } + + /** + * {@inheritDoc} + */ + public function getFunctions() + { + return [ + new Twig_SimpleFunction( + 'debug', + [$this, 'debug'], + ['needs_context' => true, 'needs_environment' => true] + ), + ]; + } + + /** + * Based on Twig_Extension_Debug / twig_var_dump + * (c) 2011 Fabien Potencier + * + * @param Twig_Environment $env + * @param $context + */ + public function debug(Twig_Environment $env, $context) + { + if (!$env->isDebug() || !$this->debugbar) { + return; + } + + $count = func_num_args(); + if (2 === $count) { + $data = []; + foreach ($context as $key => $value) { + if (is_object($value)) { + if (method_exists($value, 'toArray')) { + $data[$key] = $value->toArray(); + } else { + $data[$key] = "Object (" . get_class($value) . ")"; + } + } else { + $data[$key] = $value; + } + } + $this->debugbar->addMessage($data); + } else { + for ($i = 2; $i < $count; $i++) { + $this->debugbar->addMessage(func_get_arg($i)); + } + } + + return; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Dump.php b/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Dump.php new file mode 100644 index 000000000..b42fafa42 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Dump.php @@ -0,0 +1,88 @@ +formatter = $formatter; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'Laravel_Debugbar_Dump'; + } + + /** + * {@inheritDoc} + */ + public function getFunctions() + { + return [ + new Twig_SimpleFunction( + 'dump', + [$this, 'dump'], + ['is_safe' => ['html'], 'needs_context' => true, 'needs_environment' => true] + ), + ]; + } + + /** + * Based on Twig_Extension_Debug / twig_var_dump + * (c) 2011 Fabien Potencier + * + * @param Twig_Environment $env + * @param $context + * + * @return string + */ + public function dump(Twig_Environment $env, $context) + { + $output = ''; + + $count = func_num_args(); + if (2 === $count) { + $data = []; + foreach ($context as $key => $value) { + if (is_object($value)) { + if (method_exists($value, 'toArray')) { + $data[$key] = $value->toArray(); + } else { + $data[$key] = "Object (" . get_class($value) . ")"; + } + } else { + $data[$key] = $value; + } + } + $output .= $this->formatter->formatVar($data); + } else { + for ($i = 2; $i < $count; $i++) { + $output .= $this->formatter->formatVar(func_get_arg($i)); + } + } + + return '
' . $output . '
'; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Stopwatch.php b/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Stopwatch.php new file mode 100644 index 000000000..80a012bdb --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/Stopwatch.php @@ -0,0 +1,58 @@ +bound('debugbar')) { + $this->debugbar = $app['debugbar']; + } else { + $this->debugbar = null; + } + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'stopwatch'; + } + + public function getTokenParsers() + { + return [ + /* + * {% stopwatch foo %} + * Some stuff which will be recorded on the timeline + * {% endstopwatch %} + */ + new StopwatchTokenParser($this->debugbar !== null), + ]; + } + + public function getDebugbar() + { + return $this->debugbar; + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Twig/Node/StopwatchNode.php b/vendor/barryvdh/laravel-debugbar/src/Twig/Node/StopwatchNode.php new file mode 100644 index 000000000..02b94b692 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Twig/Node/StopwatchNode.php @@ -0,0 +1,39 @@ + + */ +class StopwatchNode extends \Twig_Node +{ + public function __construct( + \Twig_NodeInterface $name, + $body, + \Twig_Node_Expression_AssignName $var, + $lineno = 0, + $tag = null + ) { + parent::__construct(['body' => $body, 'name' => $name, 'var' => $var], [], $lineno, $tag); + } + + public function compile(\Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('') + ->subcompile($this->getNode('var')) + ->raw(' = ') + ->subcompile($this->getNode('name')) + ->write(";\n") + ->write("\$this->env->getExtension('stopwatch')->getDebugbar()->startMeasure(") + ->subcompile($this->getNode('var')) + ->raw(");\n") + ->subcompile($this->getNode('body')) + ->write("\$this->env->getExtension('stopwatch')->getDebugbar()->stopMeasure(") + ->subcompile($this->getNode('var')) + ->raw(");\n"); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/Twig/TokenParser/StopwatchTokenParser.php b/vendor/barryvdh/laravel-debugbar/src/Twig/TokenParser/StopwatchTokenParser.php new file mode 100644 index 000000000..cb197a208 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/Twig/TokenParser/StopwatchTokenParser.php @@ -0,0 +1,57 @@ + + */ +class StopwatchTokenParser extends \Twig_TokenParser +{ + protected $debugbarAvailable; + + public function __construct($debugbarAvailable) + { + $this->debugbarAvailable = $debugbarAvailable; + } + + public function parse(\Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + + // {% stopwatch 'bar' %} + $name = $this->parser->getExpressionParser()->parseExpression(); + + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + // {% endstopwatch %} + $body = $this->parser->subparse([$this, 'decideStopwatchEnd'], true); + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + if ($this->debugbarAvailable) { + return new StopwatchNode( + $name, + $body, + new \Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), + $lineno, + $this->getTag() + ); + } + + return $body; + } + + public function getTag() + { + return 'stopwatch'; + } + + public function decideStopwatchEnd(\Twig_Token $token) + { + return $token->test('endstopwatch'); + } +} diff --git a/vendor/barryvdh/laravel-debugbar/src/debugbar-routes.php b/vendor/barryvdh/laravel-debugbar/src/debugbar-routes.php new file mode 100644 index 000000000..c8c87301f --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/debugbar-routes.php @@ -0,0 +1,42 @@ + 'Barryvdh\Debugbar\Controllers', + 'prefix' => app('config')->get('debugbar.route_prefix'), + 'domain' => app('config')->get('debugbar.route_domain'), + 'middleware' => [\Barryvdh\Debugbar\Middleware\DebugbarEnabled::class], +]; + +app('router')->group($routeConfig, function ($router) { + $router->get('open', [ + 'uses' => 'OpenHandlerController@handle', + 'as' => 'debugbar.openhandler', + ]); + + $router->get('clockwork/{id}', [ + 'uses' => 'OpenHandlerController@clockwork', + 'as' => 'debugbar.clockwork', + ]); + + if (class_exists(\Laravel\Telescope\Telescope::class)) { + $router->get('telescope/{id}', [ + 'uses' => 'TelescopeController@show', + 'as' => 'debugbar.telescope', + ]); + } + + $router->get('assets/stylesheets', [ + 'uses' => 'AssetController@css', + 'as' => 'debugbar.assets.css', + ]); + + $router->get('assets/javascript', [ + 'uses' => 'AssetController@js', + 'as' => 'debugbar.assets.js', + ]); + + $router->delete('cache/{key}/{tags?}', [ + 'uses' => 'CacheController@delete', + 'as' => 'debugbar.cache.delete', + ]); +}); diff --git a/vendor/barryvdh/laravel-debugbar/src/helpers.php b/vendor/barryvdh/laravel-debugbar/src/helpers.php new file mode 100644 index 000000000..69e6e3e61 --- /dev/null +++ b/vendor/barryvdh/laravel-debugbar/src/helpers.php @@ -0,0 +1,82 @@ +addMessage($value, 'debug'); + } + } +} + +if (!function_exists('start_measure')) { + /** + * Starts a measure + * + * @param string $name Internal name, used to stop the measure + * @param string $label Public name + */ + function start_measure($name, $label = null) + { + debugbar()->startMeasure($name, $label); + } +} + +if (!function_exists('stop_measure')) { + /** + * Stop a measure + * + * @param string $name Internal name, used to stop the measure + */ + function stop_measure($name) + { + debugbar()->stopMeasure($name); + } +} + +if (!function_exists('add_measure')) { + /** + * Adds a measure + * + * @param string $label + * @param float $start + * @param float $end + */ + function add_measure($label, $start, $end) + { + debugbar()->addMeasure($label, $start, $end); + } +} + +if (!function_exists('measure')) { + /** + * Utility function to measure the execution of a Closure + * + * @param string $label + * @param \Closure $closure + * @return mixed + */ + function measure($label, \Closure $closure) + { + return debugbar()->measure($label, $closure); + } +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 9af49c349..244c68b18 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -49,6 +49,7 @@ return array( 'AddForeignKeysToTicketsTable' => $baseDir . '/database/migrations/2016_02_16_140454_add_foreign_keys_to_tickets_table.php', 'AddForeignKeysToUserAssignOrganizationTable' => $baseDir . '/database/migrations/2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table.php', 'AddForeignKeysToUsersTable' => $baseDir . '/database/migrations/2016_02_16_140454_add_foreign_keys_to_users_table.php', + 'AddUuidToFailedJobsTable' => $baseDir . '/database/migrations/2023_01_07_000000_add_uuid_to_failed_jobs_table.php', 'Adobe_Font_Metrics' => $vendorDir . '/phenx/php-font-lib/classes/Adobe_Font_Metrics.php', 'AlterEmailsTableMakeUsernameColumnNullable' => $baseDir . '/database/migrations/2018_08_13_075015_alter_emails_table_make_username_column_nullable.php', 'AlterTicketSourceTable' => $baseDir . '/database/migrations/2016_08_16_104539_alter_ticket_source_table.php', @@ -158,7 +159,10 @@ return array( 'DOMPDF' => $vendorDir . '/dompdf/dompdf/include/dompdf.cls.php', 'DOMPDF_Exception' => $vendorDir . '/dompdf/dompdf/include/dompdf_exception.cls.php', 'DOMPDF_Image_Exception' => $vendorDir . '/dompdf/dompdf/include/dompdf_image_exception.cls.php', - 'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php', + 'Database\\Seeders\\DatabaseSeeder' => $baseDir . '/database/seeders/DatabaseSeeder.php', + 'Database\\Seeders\\OutboundMailSeeder' => $baseDir . '/database/seeders/OutboundMailSeeder.php', + 'Database\\Seeders\\TicketSourceSeeder' => $baseDir . '/database/seeders/TicketSourceSeeder.php', + 'Database\\Seeders\\UserSeeder' => $baseDir . '/database/seeders/UserSeeder.php', 'Encoding_Map' => $vendorDir . '/phenx/php-font-lib/classes/Encoding_Map.php', 'Fixed_Positioner' => $vendorDir . '/dompdf/dompdf/include/fixed_positioner.cls.php', 'Font' => $vendorDir . '/phenx/php-font-lib/classes/Font.php', @@ -292,7 +296,6 @@ return array( 'Null_Frame_Decorator' => $vendorDir . '/dompdf/dompdf/include/null_frame_decorator.cls.php', 'Null_Frame_Reflower' => $vendorDir . '/dompdf/dompdf/include/null_frame_reflower.cls.php', 'Null_Positioner' => $vendorDir . '/dompdf/dompdf/include/null_positioner.cls.php', - 'OutboundMailSeeder' => $baseDir . '/database/seeds/OutboundMailSeeder.php', 'PDFLib_Adapter' => $vendorDir . '/dompdf/dompdf/include/pdflib_adapter.cls.php', 'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php', @@ -949,9 +952,7 @@ return array( 'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php', 'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php', 'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php', - 'TicketSourceSeeder' => $baseDir . '/database/seeds/TicketSourceSeeder.php', 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', - 'UserSeeder' => $baseDir . '/database/seeds/UserSeeder.php', 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', 'Version1079table' => $baseDir . '/database/migrations/2016_06_28_141613_version1079table.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 95826fdbd..20afb0a0c 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -12,11 +12,11 @@ return array( '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', @@ -91,7 +91,10 @@ return array( 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', '8a9dc1de0ca7e01f3e08231539562f61' => $vendorDir . '/aws/aws-sdk-php/src/functions.php', + '4a1f389d6ce373bda9e57857d3b61c84' => $vendorDir . '/barryvdh/laravel-debugbar/src/helpers.php', 'ed962a97bd972bc82007176b647d4e36' => $vendorDir . '/facade/ignition/src/helpers.php', + '265b4faa2b3a9766332744949e83bf97' => $vendorDir . '/laravel/framework/src/Illuminate/Collections/helpers.php', + 'c7a3c339e7e14b60e06a2d7fcce9476b' => $vendorDir . '/laravel/framework/src/Illuminate/Events/functions.php', 'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php', 'f18cc91337d49233e5754e93f3ed9ec3' => $vendorDir . '/laravelcollective/html/src/helpers.php', diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index beefa81f6..20b03d517 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -8,11 +8,8 @@ $baseDir = dirname($vendorDir); return array( 'thomaswelton\\GravatarLib\\' => array($vendorDir . '/thomaswelton/gravatarlib'), 'PhpSpec' => array($vendorDir . '/phpspec/phpspec/src'), - 'Mremi\\UrlShortener' => array($vendorDir . '/mremi/url-shortener/src'), 'Mockery' => array($vendorDir . '/mockery/mockery/library'), 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), - 'Guzzle\\Tests' => array($vendorDir . '/guzzle/guzzle/tests'), - 'Guzzle' => array($vendorDir . '/guzzle/guzzle/src'), 'ForceUTF8\\' => array($vendorDir . '/neitanod/forceutf8/src'), 'Flow' => array($vendorDir . '/flowjs/flow-php-server/src'), 'Fetch' => array($vendorDir . '/tedivm/fetch/src'), diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index f268c9dd1..29aef123b 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku'), - 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'), + 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'), 'libphonenumber\\' => array($vendorDir . '/giggsey/libphonenumber-for-php/src'), 'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'), 'Yajra\\DataTables\\' => array($vendorDir . '/yajra/laravel-datatables-oracle/src'), @@ -54,7 +54,7 @@ return array( 'Psy\\' => array($vendorDir . '/psy/psysh/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'), 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), @@ -69,6 +69,7 @@ return array( 'Nicolaslopezj\\Searchable\\' => array($vendorDir . '/nicolaslopezj/searchable/src'), 'Namshi\\JOSE\\' => array($vendorDir . '/namshi/jose/src/Namshi/JOSE'), 'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'), + 'Mremi\\UrlShortener\\' => array($vendorDir . '/mremi/url-shortener/src/Mremi/UrlShortener'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), 'Maatwebsite\\Excel\\' => array($vendorDir . '/maatwebsite/excel/src'), @@ -81,18 +82,20 @@ return array( 'Laravel\\Ui\\' => array($vendorDir . '/laravel/ui/src'), 'Laravel\\Tinker\\' => array($vendorDir . '/laravel/tinker/src'), 'Laravel\\Socialite\\' => array($vendorDir . '/laravel/socialite/src'), + 'Laravel\\SerializableClosure\\' => array($vendorDir . '/laravel/serializable-closure/src'), 'Laravel\\Dusk\\' => array($vendorDir . '/laravel/dusk/src'), 'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'), 'Intervention\\Image\\' => array($vendorDir . '/intervention/image/src/Intervention/Image'), + 'Illuminate\\Support\\' => array($vendorDir . '/laravel/framework/src/Illuminate/Macroable', $vendorDir . '/laravel/framework/src/Illuminate/Collections'), 'Illuminate\\Foundation\\Auth\\' => array($vendorDir . '/laravel/ui/auth-backend'), 'Illuminate\\' => array($vendorDir . '/laravel/framework/src/Illuminate'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), + 'GrahamCampbell\\ResultType\\' => array($vendorDir . '/graham-campbell/result-type/src'), 'Gitonomy\\Git\\' => array($vendorDir . '/gitonomy/gitlib/src/Gitonomy/Git'), 'Giggsey\\Locale\\' => array($vendorDir . '/giggsey/locale/src'), 'Fruitcake\\Cors\\' => array($vendorDir . '/fruitcake/laravel-cors/src'), - 'Fideloper\\Proxy\\' => array($vendorDir . '/fideloper/proxy/src'), 'Faker\\' => array($vendorDir . '/fakerphp/faker/src/Faker'), 'Facebook\\WebDriver\\' => array($vendorDir . '/php-webdriver/webdriver/lib'), 'Facade\\Ignition\\' => array($vendorDir . '/facade/ignition/src'), @@ -108,7 +111,10 @@ return array( 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'), 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/src'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), + 'DebugBar\\' => array($vendorDir . '/maximebf/debugbar/src/DebugBar'), 'DaveJamesMiller\\Breadcrumbs\\' => array($vendorDir . '/davejamesmiller/laravel-breadcrumbs/src'), + 'Database\\Seeders\\' => array($baseDir . '/database/seeders'), + 'Database\\Factories\\' => array($baseDir . '/database/factories'), 'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'), 'Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'), 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), @@ -118,6 +124,7 @@ return array( 'Bugsnag\\BugsnagLaravel\\' => array($vendorDir . '/bugsnag/bugsnag-laravel/src'), 'Bugsnag\\' => array($vendorDir . '/bugsnag/bugsnag/src'), 'Brick\\Math\\' => array($vendorDir . '/brick/math/src'), + 'Barryvdh\\Debugbar\\' => array($vendorDir . '/barryvdh/laravel-debugbar/src'), 'Aws\\' => array($vendorDir . '/aws/aws-sdk-php/src'), 'Asm89\\Stack\\' => array($vendorDir . '/asm89/stack-cors/src'), 'App\\' => array($baseDir . '/app'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 813f310a1..7fec06d45 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit9da6744efcb5435630815fb416a6752c +class ComposerAutoloaderInite3a664ccc4def6142d1c80482606ee61 { private static $loader; @@ -24,18 +24,18 @@ class ComposerAutoloaderInit9da6744efcb5435630815fb416a6752c require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit9da6744efcb5435630815fb416a6752c', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInite3a664ccc4def6142d1c80482606ee61', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit9da6744efcb5435630815fb416a6752c', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInite3a664ccc4def6142d1c80482606ee61', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit9da6744efcb5435630815fb416a6752c::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInite3a664ccc4def6142d1c80482606ee61::getInitializer($loader)); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit9da6744efcb5435630815fb416a6752c::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInite3a664ccc4def6142d1c80482606ee61::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire9da6744efcb5435630815fb416a6752c($fileIdentifier, $file); + composerRequiree3a664ccc4def6142d1c80482606ee61($fileIdentifier, $file); } return $loader; @@ -47,7 +47,7 @@ class ComposerAutoloaderInit9da6744efcb5435630815fb416a6752c * @param string $file * @return void */ -function composerRequire9da6744efcb5435630815fb416a6752c($fileIdentifier, $file) +function composerRequiree3a664ccc4def6142d1c80482606ee61($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 3cccd1b00..2fea550c2 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit9da6744efcb5435630815fb416a6752c +class ComposerStaticInite3a664ccc4def6142d1c80482606ee61 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -13,11 +13,11 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', - '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', @@ -92,7 +92,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php', '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', '8a9dc1de0ca7e01f3e08231539562f61' => __DIR__ . '/..' . '/aws/aws-sdk-php/src/functions.php', + '4a1f389d6ce373bda9e57857d3b61c84' => __DIR__ . '/..' . '/barryvdh/laravel-debugbar/src/helpers.php', 'ed962a97bd972bc82007176b647d4e36' => __DIR__ . '/..' . '/facade/ignition/src/helpers.php', + '265b4faa2b3a9766332744949e83bf97' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Collections/helpers.php', + 'c7a3c339e7e14b60e06a2d7fcce9476b' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Events/functions.php', 'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php', 'f18cc91337d49233e5754e93f3ed9ec3' => __DIR__ . '/..' . '/laravelcollective/html/src/helpers.php', @@ -210,6 +213,7 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'M' => array ( 'MyCLabs\\Enum\\' => 13, + 'Mremi\\UrlShortener\\' => 19, 'Monolog\\' => 8, 'Matrix\\' => 7, 'Maatwebsite\\Excel\\' => 18, @@ -225,6 +229,7 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'Laravel\\Ui\\' => 11, 'Laravel\\Tinker\\' => 15, 'Laravel\\Socialite\\' => 18, + 'Laravel\\SerializableClosure\\' => 28, 'Laravel\\Dusk\\' => 13, ), 'J' => @@ -234,6 +239,7 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'I' => array ( 'Intervention\\Image\\' => 19, + 'Illuminate\\Support\\' => 19, 'Illuminate\\Foundation\\Auth\\' => 27, 'Illuminate\\' => 11, ), @@ -242,13 +248,13 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'GuzzleHttp\\Psr7\\' => 16, 'GuzzleHttp\\Promise\\' => 19, 'GuzzleHttp\\' => 11, + 'GrahamCampbell\\ResultType\\' => 26, 'Gitonomy\\Git\\' => 13, 'Giggsey\\Locale\\' => 15, ), 'F' => array ( 'Fruitcake\\Cors\\' => 15, - 'Fideloper\\Proxy\\' => 16, 'Faker\\' => 6, 'Facebook\\WebDriver\\' => 19, 'Facade\\Ignition\\' => 16, @@ -270,7 +276,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'Doctrine\\Common\\Cache\\' => 22, 'Doctrine\\Common\\' => 16, 'DeepCopy\\' => 9, + 'DebugBar\\' => 9, 'DaveJamesMiller\\Breadcrumbs\\' => 28, + 'Database\\Seeders\\' => 17, + 'Database\\Factories\\' => 19, ), 'C' => array ( @@ -286,6 +295,7 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'Bugsnag\\BugsnagLaravel\\' => 23, 'Bugsnag\\' => 8, 'Brick\\Math\\' => 11, + 'Barryvdh\\Debugbar\\' => 18, ), 'A' => array ( @@ -303,8 +313,8 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'phpDocumentor\\Reflection\\' => array ( 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', - 1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', - 2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', + 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', + 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', ), 'libphonenumber\\' => array ( @@ -492,8 +502,8 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c ), 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-factory/src', - 1 => __DIR__ . '/..' . '/psr/http-message/src', + 0 => __DIR__ . '/..' . '/psr/http-message/src', + 1 => __DIR__ . '/..' . '/psr/http-factory/src', ), 'Psr\\Http\\Client\\' => array ( @@ -551,6 +561,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/myclabs/php-enum/src', ), + 'Mremi\\UrlShortener\\' => + array ( + 0 => __DIR__ . '/..' . '/mremi/url-shortener/src/Mremi/UrlShortener', + ), 'Monolog\\' => array ( 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', @@ -599,6 +613,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/laravel/socialite/src', ), + 'Laravel\\SerializableClosure\\' => + array ( + 0 => __DIR__ . '/..' . '/laravel/serializable-closure/src', + ), 'Laravel\\Dusk\\' => array ( 0 => __DIR__ . '/..' . '/laravel/dusk/src', @@ -611,6 +629,11 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image', ), + 'Illuminate\\Support\\' => + array ( + 0 => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Macroable', + 1 => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Collections', + ), 'Illuminate\\Foundation\\Auth\\' => array ( 0 => __DIR__ . '/..' . '/laravel/ui/auth-backend', @@ -631,6 +654,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', ), + 'GrahamCampbell\\ResultType\\' => + array ( + 0 => __DIR__ . '/..' . '/graham-campbell/result-type/src', + ), 'Gitonomy\\Git\\' => array ( 0 => __DIR__ . '/..' . '/gitonomy/gitlib/src/Gitonomy/Git', @@ -643,10 +670,6 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/fruitcake/laravel-cors/src', ), - 'Fideloper\\Proxy\\' => - array ( - 0 => __DIR__ . '/..' . '/fideloper/proxy/src', - ), 'Faker\\' => array ( 0 => __DIR__ . '/..' . '/fakerphp/faker/src/Faker', @@ -707,10 +730,22 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy', ), + 'DebugBar\\' => + array ( + 0 => __DIR__ . '/..' . '/maximebf/debugbar/src/DebugBar', + ), 'DaveJamesMiller\\Breadcrumbs\\' => array ( 0 => __DIR__ . '/..' . '/davejamesmiller/laravel-breadcrumbs/src', ), + 'Database\\Seeders\\' => + array ( + 0 => __DIR__ . '/../..' . '/database/seeders', + ), + 'Database\\Factories\\' => + array ( + 0 => __DIR__ . '/../..' . '/database/factories', + ), 'Cron\\' => array ( 0 => __DIR__ . '/..' . '/dragonmantank/cron-expression/src/Cron', @@ -747,6 +782,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c array ( 0 => __DIR__ . '/..' . '/brick/math/src', ), + 'Barryvdh\\Debugbar\\' => + array ( + 0 => __DIR__ . '/..' . '/barryvdh/laravel-debugbar/src', + ), 'Aws\\' => array ( 0 => __DIR__ . '/..' . '/aws/aws-sdk-php/src', @@ -778,10 +817,6 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c ), 'M' => array ( - 'Mremi\\UrlShortener' => - array ( - 0 => __DIR__ . '/..' . '/mremi/url-shortener/src', - ), 'Mockery' => array ( 0 => __DIR__ . '/..' . '/mockery/mockery/library', @@ -794,17 +829,6 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 0 => __DIR__ . '/..' . '/ezyang/htmlpurifier/library', ), ), - 'G' => - array ( - 'Guzzle\\Tests' => - array ( - 0 => __DIR__ . '/..' . '/guzzle/guzzle/tests', - ), - 'Guzzle' => - array ( - 0 => __DIR__ . '/..' . '/guzzle/guzzle/src', - ), - ), 'F' => array ( 'ForceUTF8\\' => @@ -873,6 +897,7 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'AddForeignKeysToTicketsTable' => __DIR__ . '/../..' . '/database/migrations/2016_02_16_140454_add_foreign_keys_to_tickets_table.php', 'AddForeignKeysToUserAssignOrganizationTable' => __DIR__ . '/../..' . '/database/migrations/2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table.php', 'AddForeignKeysToUsersTable' => __DIR__ . '/../..' . '/database/migrations/2016_02_16_140454_add_foreign_keys_to_users_table.php', + 'AddUuidToFailedJobsTable' => __DIR__ . '/../..' . '/database/migrations/2023_01_07_000000_add_uuid_to_failed_jobs_table.php', 'Adobe_Font_Metrics' => __DIR__ . '/..' . '/phenx/php-font-lib/classes/Adobe_Font_Metrics.php', 'AlterEmailsTableMakeUsernameColumnNullable' => __DIR__ . '/../..' . '/database/migrations/2018_08_13_075015_alter_emails_table_make_username_column_nullable.php', 'AlterTicketSourceTable' => __DIR__ . '/../..' . '/database/migrations/2016_08_16_104539_alter_ticket_source_table.php', @@ -982,7 +1007,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'DOMPDF' => __DIR__ . '/..' . '/dompdf/dompdf/include/dompdf.cls.php', 'DOMPDF_Exception' => __DIR__ . '/..' . '/dompdf/dompdf/include/dompdf_exception.cls.php', 'DOMPDF_Image_Exception' => __DIR__ . '/..' . '/dompdf/dompdf/include/dompdf_image_exception.cls.php', - 'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php', + 'Database\\Seeders\\DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeders/DatabaseSeeder.php', + 'Database\\Seeders\\OutboundMailSeeder' => __DIR__ . '/../..' . '/database/seeders/OutboundMailSeeder.php', + 'Database\\Seeders\\TicketSourceSeeder' => __DIR__ . '/../..' . '/database/seeders/TicketSourceSeeder.php', + 'Database\\Seeders\\UserSeeder' => __DIR__ . '/../..' . '/database/seeders/UserSeeder.php', 'Encoding_Map' => __DIR__ . '/..' . '/phenx/php-font-lib/classes/Encoding_Map.php', 'Fixed_Positioner' => __DIR__ . '/..' . '/dompdf/dompdf/include/fixed_positioner.cls.php', 'Font' => __DIR__ . '/..' . '/phenx/php-font-lib/classes/Font.php', @@ -1116,7 +1144,6 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'Null_Frame_Decorator' => __DIR__ . '/..' . '/dompdf/dompdf/include/null_frame_decorator.cls.php', 'Null_Frame_Reflower' => __DIR__ . '/..' . '/dompdf/dompdf/include/null_frame_reflower.cls.php', 'Null_Positioner' => __DIR__ . '/..' . '/dompdf/dompdf/include/null_positioner.cls.php', - 'OutboundMailSeeder' => __DIR__ . '/../..' . '/database/seeds/OutboundMailSeeder.php', 'PDFLib_Adapter' => __DIR__ . '/..' . '/dompdf/dompdf/include/pdflib_adapter.cls.php', 'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php', @@ -1773,9 +1800,7 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c 'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php', 'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php', 'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php', - 'TicketSourceSeeder' => __DIR__ . '/../..' . '/database/seeds/TicketSourceSeeder.php', 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', - 'UserSeeder' => __DIR__ . '/../..' . '/database/seeds/UserSeeder.php', 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', 'Version1079table' => __DIR__ . '/../..' . '/database/migrations/2016_06_28_141613_version1079table.php', ); @@ -1783,10 +1808,10 @@ class ComposerStaticInit9da6744efcb5435630815fb416a6752c public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit9da6744efcb5435630815fb416a6752c::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit9da6744efcb5435630815fb416a6752c::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit9da6744efcb5435630815fb416a6752c::$prefixesPsr0; - $loader->classMap = ComposerStaticInit9da6744efcb5435630815fb416a6752c::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInite3a664ccc4def6142d1c80482606ee61::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInite3a664ccc4def6142d1c80482606ee61::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInite3a664ccc4def6142d1c80482606ee61::$prefixesPsr0; + $loader->classMap = ComposerStaticInite3a664ccc4def6142d1c80482606ee61::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e2fcf751e..a53d8b7fc 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -209,6 +209,93 @@ }, "install-path": "../aws/aws-sdk-php" }, + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.7.0", + "version_normalized": "3.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "3372ed65e6d2039d663ed19aa699956f9d346271" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/3372ed65e6d2039d663ed19aa699956f9d346271", + "reference": "3372ed65e6d2039d663ed19aa699956f9d346271", + "shasum": "" + }, + "require": { + "illuminate/routing": "^7|^8|^9", + "illuminate/session": "^7|^8|^9", + "illuminate/support": "^7|^8|^9", + "maximebf/debugbar": "^1.17.2", + "php": ">=7.2.5", + "symfony/finder": "^5|^6" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^5|^6|^7", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "time": "2022-07-11T09:26:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" + } + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "install-path": "../barryvdh/laravel-debugbar" + }, { "name": "brick/math", "version": "0.9.3", @@ -1313,32 +1400,34 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.1", - "version_normalized": "2.3.1.0", + "version": "v3.3.2", + "version_normalized": "3.3.2.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/65b2d8ee1f10915efb3b55597da3404f096acba2", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { - "php": "^7.0|^8.0" + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" }, - "time": "2020-10-13T00:52:37+00:00", + "time": "2022-09-10T18:51:20+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -1350,11 +1439,6 @@ "MIT" ], "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -1368,7 +1452,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v2.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -1788,67 +1872,6 @@ }, "install-path": "../fakerphp/faker" }, - { - "name": "fideloper/proxy", - "version": "4.4.2", - "version_normalized": "4.4.2.0", - "source": { - "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", - "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", - "php": ">=5.4.0" - }, - "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.5.8|^9.3.3" - }, - "time": "2022-02-09T13:33:34+00:00", - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Fideloper\\Proxy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" - } - ], - "description": "Set trusted proxies for Laravel", - "keywords": [ - "load balancing", - "proxy", - "trusted proxy" - ], - "support": { - "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.2" - }, - "install-path": "../fideloper/proxy" - }, { "name": "filp/whoops", "version": "2.14.6", @@ -2280,70 +2303,33 @@ "install-path": "../gitonomy/gitlib" }, { - "name": "guzzle/guzzle", - "version": "v3.8.1", - "version_normalized": "3.8.1.0", + "name": "graham-campbell/result-type", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", - "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": ">=2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" }, "require-dev": { - "doctrine/cache": "*", - "monolog/monolog": "1.*", - "phpunit/phpunit": "3.7.*", - "psr/log": "1.0.*", - "symfony/class-loader": "*", - "zendframework/zend-cache": "<2.3", - "zendframework/zend-log": "<2.3" + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, - "time": "2014-01-28T22:29:15+00:00", + "time": "2022-07-30T15:56:11+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.8-dev" - } - }, "installation-source": "dist", "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2352,32 +2338,34 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", + "description": "An Implementation Of The Result Type", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" ], "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/master" + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" }, - "abandoned": "guzzlehttp/guzzle", - "install-path": "../guzzle/guzzle" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "install-path": "../graham-campbell/result-type" }, { "name": "guzzlehttp/guzzle", @@ -2862,44 +2850,45 @@ }, { "name": "laravel/dusk", - "version": "v5.11.0", - "version_normalized": "5.11.0.0", + "version": "v6.25.2", + "version_normalized": "6.25.2.0", "source": { "type": "git", "url": "https://github.com/laravel/dusk.git", - "reference": "e07cc46a1e39767739e8197189780b4c2639806d" + "reference": "25a595ac3dc82089a91af10dd23b0d58fd3f6d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/e07cc46a1e39767739e8197189780b4c2639806d", - "reference": "e07cc46a1e39767739e8197189780b4c2639806d", + "url": "https://api.github.com/repos/laravel/dusk/zipball/25a595ac3dc82089a91af10dd23b0d58fd3f6d0b", + "reference": "25a595ac3dc82089a91af10dd23b0d58fd3f6d0b", "shasum": "" }, "require": { "ext-json": "*", "ext-zip": "*", - "illuminate/console": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", - "nesbot/carbon": "^1.20|^2.0", - "php": ">=7.1.0", - "php-webdriver/webdriver": "^1.8.1", - "symfony/console": "^4.0|^5.0", - "symfony/finder": "^4.0|^5.0", - "symfony/process": "^4.0|^5.0", - "vlucas/phpdotenv": "^2.2|^3.0|^4.0" + "illuminate/console": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "nesbot/carbon": "^2.0", + "php": "^7.2|^8.0", + "php-webdriver/webdriver": "^1.9.0", + "symfony/console": "^4.3|^5.0|^6.0", + "symfony/finder": "^4.3|^5.0|^6.0", + "symfony/process": "^4.3|^5.0|^6.0", + "vlucas/phpdotenv": "^3.0|^4.0|^5.2" }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.5|^8.0" + "orchestra/testbench": "^4.16|^5.17.1|^6.12.1|^7.0", + "phpunit/phpunit": "^7.5.15|^8.4|^9.0" }, "suggest": { "ext-pcntl": "Used to gracefully terminate Dusk when tests are running." }, - "time": "2020-03-24T16:21:49+00:00", + "time": "2022-09-29T09:37:07+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.x-dev" }, "laravel": { "providers": [ @@ -2931,67 +2920,70 @@ ], "support": { "issues": "https://github.com/laravel/dusk/issues", - "source": "https://github.com/laravel/dusk/tree/v5.11.0" + "source": "https://github.com/laravel/dusk/tree/v6.25.2" }, "install-path": "../laravel/dusk" }, { "name": "laravel/framework", - "version": "v7.30.6", - "version_normalized": "7.30.6.0", + "version": "v8.83.27", + "version_normalized": "8.83.27.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ecdafad1dda3c790af186a6d18479ea4757ef9ee" + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ecdafad1dda3c790af186a6d18479ea4757ef9ee", - "reference": "ecdafad1dda3c790af186a6d18479ea4757ef9ee", + "url": "https://api.github.com/repos/laravel/framework/zipball/e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^2.3.1", + "dragonmantank/cron-expression": "^3.0.2", "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^1.3|^2.0.2", "league/flysystem": "^1.1", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.31", + "nesbot/carbon": "^2.53.1", "opis/closure": "^3.6", - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "psr/container": "^1.0", + "psr/log": "^1.0|^2.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7|^4.0", - "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.0", - "symfony/error-handler": "^5.0", - "symfony/finder": "^5.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0", - "symfony/polyfill-php73": "^1.17", - "symfony/process": "^5.0", - "symfony/routing": "^5.0", - "symfony/var-dumper": "^5.0", + "ramsey/uuid": "^4.2.2", + "swiftmailer/swiftmailer": "^6.3", + "symfony/console": "^5.4", + "symfony/error-handler": "^5.4", + "symfony/finder": "^5.4", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/mime": "^5.4", + "symfony/process": "^5.4", + "symfony/routing": "^5.4", + "symfony/var-dumper": "^5.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", - "vlucas/phpdotenv": "^4.0", - "voku/portable-ascii": "^1.4.8" + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^1.6.1" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", + "illuminate/collections": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -3004,6 +2996,7 @@ "illuminate/hashing": "self.version", "illuminate/http": "self.version", "illuminate/log": "self.version", + "illuminate/macroable": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", @@ -3019,22 +3012,24 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.155", - "doctrine/dbal": "^2.6", - "filp/whoops": "^2.8", - "guzzlehttp/guzzle": "^6.3.1|^7.0.1", + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.4", + "filp/whoops": "^2.14.3", + "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "~1.3.3|^1.4.2", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "^5.8", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^6.27", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.4|^9.3.3", - "predis/predis": "^1.1.1", - "symfony/cache": "^5.0" + "phpunit/phpunit": "^8.5.19|^9.5.8", + "predis/predis": "^1.1.9", + "symfony/cache": "^5.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "ext-bcmath": "Required to use the multiple_of validation rule.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", @@ -3042,40 +3037,45 @@ "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "filp/whoops": "Required for friendly error pages in development (^2.8).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "mockery/mockery": "Required to use mocking (~1.3.3|^1.4.2).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.3.3).", - "predis/predis": "Required to use the predis connector (^1.1.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", - "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, - "time": "2021-12-07T14:56:47+00:00", + "time": "2022-12-08T15:28:55+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "installation-source": "dist", "autoload": { "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { - "Illuminate\\": "src/Illuminate/" + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -3101,39 +3101,102 @@ "install-path": "../laravel/framework" }, { - "name": "laravel/socialite", - "version": "v4.4.1", - "version_normalized": "4.4.1.0", + "name": "laravel/serializable-closure", + "version": "v1.2.2", + "version_normalized": "1.2.2.0", "source": { "type": "git", - "url": "https://github.com/laravel/socialite.git", - "reference": "80951df0d93435b773aa00efe1fad6d5015fac75" + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/80951df0d93435b773aa00efe1fad6d5015fac75", - "reference": "80951df0d93435b773aa00efe1fad6d5015fac75", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "time": "2022-09-08T13:45:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "install-path": "../laravel/serializable-closure" + }, + { + "name": "laravel/socialite", + "version": "v5.5.7", + "version_normalized": "5.5.7.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/socialite.git", + "reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/socialite/zipball/ee6201f539ac47c3a55132449f9d20ee928f0ee2", + "reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/guzzle": "^6.0|^7.0", - "illuminate/http": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", - "league/oauth1-client": "^1.0", - "php": "^7.1.3" + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", + "illuminate/http": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "league/oauth1-client": "^1.10.1", + "php": "^7.2|^8.0" }, "require-dev": { - "illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0", "mockery/mockery": "^1.0", - "orchestra/testbench": "^3.7|^3.8|^4.0|^5.0", - "phpunit/phpunit": "^7.0|^8.0" + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", + "phpunit/phpunit": "^8.0|^9.3" }, - "time": "2020-06-03T13:30:03+00:00", + "time": "2022-12-28T12:35:23+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" }, "laravel": { "providers": [ @@ -3245,28 +3308,35 @@ }, { "name": "laravel/ui", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v3.4.6", + "version_normalized": "3.4.6.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "d01a705763c243b07be795e9d1bb47f89260f73d" + "reference": "65ec5c03f7fee2c8ecae785795b829a15be48c2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/d01a705763c243b07be795e9d1bb47f89260f73d", - "reference": "d01a705763c243b07be795e9d1bb47f89260f73d", + "url": "https://api.github.com/repos/laravel/ui/zipball/65ec5c03f7fee2c8ecae785795b829a15be48c2c", + "reference": "65ec5c03f7fee2c8ecae785795b829a15be48c2c", "shasum": "" }, "require": { - "illuminate/console": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0" + "illuminate/console": "^8.42|^9.0", + "illuminate/filesystem": "^8.42|^9.0", + "illuminate/support": "^8.82|^9.0", + "illuminate/validation": "^8.42|^9.0", + "php": "^7.3|^8.0" }, - "time": "2020-11-03T19:45:19+00:00", + "require-dev": { + "orchestra/testbench": "^6.23|^7.0" + }, + "time": "2022-05-20T13:38:08+00:00", "type": "library", "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, "laravel": { "providers": [ "Laravel\\Ui\\UiServiceProvider" @@ -3296,8 +3366,7 @@ "ui" ], "support": { - "issues": "https://github.com/laravel/ui/issues", - "source": "https://github.com/laravel/ui/tree/v2.5.0" + "source": "https://github.com/laravel/ui/tree/v3.4.6" }, "install-path": "../laravel/ui" }, @@ -3643,26 +3712,26 @@ }, { "name": "league/iso3166", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "4.1.0", + "version_normalized": "4.1.0.0", "source": { "type": "git", "url": "https://github.com/thephpleague/iso3166.git", - "reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e" + "reference": "a0dd2a1d956f85811f9c667a1744d822fb2c63d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/iso3166/zipball/9976d382f270ad3f3df8a68719beb7a7179ffa1e", - "reference": "9976d382f270ad3f3df8a68719beb7a7179ffa1e", + "url": "https://api.github.com/repos/thephpleague/iso3166/zipball/a0dd2a1d956f85811f9c667a1744d822fb2c63d8", + "reference": "a0dd2a1d956f85811f9c667a1744d822fb2c63d8", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.5" }, - "time": "2020-12-05T06:50:42+00:00", + "time": "2022-09-07T09:14:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4173,6 +4242,75 @@ }, "install-path": "../markbaker/matrix" }, + { + "name": "maximebf/debugbar", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/ba0af68dd4316834701ecb30a00ce9604ced3ee9", + "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^2.6|^3|^4|^5|^6" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^9.4.2", + "twig/twig": "^1.38|^2.7|^3.0" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "time": "2022-03-31T14:55:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "support": { + "issues": "https://github.com/maximebf/php-debugbar/issues", + "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.1" + }, + "install-path": "../maximebf/debugbar" + }, { "name": "mockery/mockery", "version": "1.5.1", @@ -4355,29 +4493,39 @@ }, { "name": "mremi/url-shortener", - "version": "v1.0.3", - "version_normalized": "1.0.3.0", + "version": "v2.4.0", + "version_normalized": "2.4.0.0", "source": { "type": "git", "url": "https://github.com/mremi/UrlShortener.git", - "reference": "ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773" + "reference": "346dcc25f491f962cd380813631da9f2e939b092" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mremi/UrlShortener/zipball/ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773", - "reference": "ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773", + "url": "https://api.github.com/repos/mremi/UrlShortener/zipball/346dcc25f491f962cd380813631da9f2e939b092", + "reference": "346dcc25f491f962cd380813631da9f2e939b092", "shasum": "" }, "require": { - "guzzle/guzzle": "~3.7", - "php": ">=5.3.3" + "guzzlehttp/guzzle": "^6.0 || ^7.0", + "php": "^5.6 || ^7.0 || ^8.0", + "symfony/console": "^3.1 || ^4.1 || ^5.0 || ^6.0" }, - "time": "2013-10-18T21:34:40+00:00", + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "symfony/phpunit-bridge": "^5.0 || ^6.0" + }, + "time": "2021-09-06T07:20:54+00:00", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, "installation-source": "dist", "autoload": { - "psr-0": { - "Mremi\\UrlShortener": "src" + "psr-4": { + "Mremi\\UrlShortener\\": "src/Mremi/UrlShortener" } }, "notification-url": "https://packagist.org/downloads/", @@ -4390,7 +4538,7 @@ "email": "marseille.remi@gmail.com" } ], - "description": "A PHP5 library using API to shorten/expand URL", + "description": "A PHP5/PHP7/PHP8 library using API to shorten/expand URL", "homepage": "https://github.com/mremi/UrlShortener", "keywords": [ "api", @@ -4399,7 +4547,7 @@ ], "support": { "issues": "https://github.com/mremi/UrlShortener/issues", - "source": "https://github.com/mremi/UrlShortener/tree/master" + "source": "https://github.com/mremi/UrlShortener/tree/v2.4.0" }, "install-path": "../mremi/url-shortener" }, @@ -4929,38 +5077,37 @@ }, { "name": "nunomaduro/collision", - "version": "v4.3.0", - "version_normalized": "4.3.0.0", + "version": "v5.11.0", + "version_normalized": "5.11.0.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "7c125dc2463f3e144ddc7e05e63077109508c94e" + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/7c125dc2463f3e144ddc7e05e63077109508c94e", - "reference": "7c125dc2463f3e144ddc7e05e63077109508c94e", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.4", - "php": "^7.2.5 || ^8.0", + "filp/whoops": "^2.14.3", + "php": "^7.3 || ^8.0", "symfony/console": "^5.0" }, "require-dev": { - "facade/ignition": "^2.0", - "fideloper/proxy": "^4.2", - "friendsofphp/php-cs-fixer": "^2.16", - "fruitcake/laravel-cors": "^1.0", - "laravel/framework": "^7.0", - "laravel/tinker": "^2.0", - "nunomaduro/larastan": "^0.6", - "orchestra/testbench": "^5.0", - "phpstan/phpstan": "^0.12.3", - "phpunit/phpunit": "^8.5.1 || ^9.0" + "brianium/paratest": "^6.1", + "fideloper/proxy": "^4.4.1", + "fruitcake/laravel-cors": "^2.0.3", + "laravel/framework": "8.x-dev", + "nunomaduro/larastan": "^0.6.2", + "nunomaduro/mock-final-classes": "^1.0", + "orchestra/testbench": "^6.0", + "phpstan/phpstan": "^0.12.64", + "phpunit/phpunit": "^9.5.0" }, - "time": "2020-10-29T15:12:23+00:00", + "time": "2022-01-10T16:22:52+00:00", "type": "library", "extra": { "laravel": { @@ -5004,7 +5151,7 @@ }, "funding": [ { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "url": "https://www.paypal.com/paypalme/enunomaduro", "type": "custom" }, { @@ -6378,31 +6525,33 @@ }, { "name": "propaganistas/laravel-phone", - "version": "4.2.7", - "version_normalized": "4.2.7.0", + "version": "4.4.0", + "version_normalized": "4.4.0.0", "source": { "type": "git", "url": "https://github.com/Propaganistas/Laravel-Phone.git", - "reference": "f2765e308977511c7ee42a48d635dca7026fa427" + "reference": "ba5aa49226793faf4bd37b38bd627d49269611d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/f2765e308977511c7ee42a48d635dca7026fa427", - "reference": "f2765e308977511c7ee42a48d635dca7026fa427", + "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/ba5aa49226793faf4bd37b38bd627d49269611d9", + "reference": "ba5aa49226793faf4bd37b38bd627d49269611d9", "shasum": "" }, "require": { "giggsey/libphonenumber-for-php": "^7.0|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0", - "illuminate/validation": "^6.0|^7.0|^8.0", - "league/iso3166": "^2.0|^3.0", - "php": "^7.1|^8.0" + "illuminate/contracts": "^8.9|^9.0", + "illuminate/support": "^8.0|^9.0", + "illuminate/validation": "^8.0|^9.0", + "league/iso3166": "^2.0|^3.0|^4.0", + "php": "^7.3|^8.0" }, "require-dev": { + "nunomaduro/larastan": "^1.0", "orchestra/testbench": "*", - "phpunit/phpunit": "*" + "phpunit/phpunit": "^9.5.10" }, - "time": "2020-12-06T10:57:11+00:00", + "time": "2022-11-10T09:52:44+00:00", "type": "library", "extra": { "laravel": { @@ -6430,17 +6579,16 @@ "email": "Propaganistas@users.noreply.github.com" } ], - "description": "Adds phone number functionality to Laravel and Lumen based on Google's libphonenumber API.", + "description": "Adds phone number functionality to Laravel based on Google's libphonenumber API.", "keywords": [ "laravel", "libphonenumber", - "lumen", "phone", "validation" ], "support": { "issues": "https://github.com/Propaganistas/Laravel-Phone/issues", - "source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.2.7" + "source": "https://github.com/Propaganistas/Laravel-Phone/tree/4.4.0" }, "install-path": "../propaganistas/laravel-phone" }, @@ -11037,35 +11185,38 @@ }, { "name": "torann/geoip", - "version": "1.2.1", - "version_normalized": "1.2.1.0", + "version": "3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/Torann/laravel-geoip.git", - "reference": "15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2" + "reference": "f16d5df66ecb6ba4ffaef52abef519fbc19596d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Torann/laravel-geoip/zipball/15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2", - "reference": "15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2", + "url": "https://api.github.com/repos/Torann/laravel-geoip/zipball/f16d5df66ecb6ba4ffaef52abef519fbc19596d3", + "reference": "f16d5df66ecb6ba4ffaef52abef519fbc19596d3", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "php": "^7.2" + "illuminate/cache": "^8.0", + "illuminate/console": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.2 || ^8.0" }, "require-dev": { "geoip2/geoip2": "~2.1", "mockery/mockery": "^1.3", + "phpstan/phpstan": "^0.12.14", "phpunit/phpunit": "^8.0", - "vlucas/phpdotenv": "^4.0" + "squizlabs/php_codesniffer": "^3.5", + "vlucas/phpdotenv": "^5.0" }, "suggest": { "geoip2/geoip2": "Required to use the MaxMind database or web service with GeoIP (~2.1).", "monolog/monolog": "Allows for storing location not found errors to the log" }, - "time": "2020-03-10T18:35:08+00:00", + "time": "2020-12-21T19:12:11+00:00", "type": "library", "extra": { "branch-alias": { @@ -11111,7 +11262,7 @@ ], "support": { "issues": "https://github.com/Torann/laravel-geoip/issues", - "source": "https://github.com/Torann/laravel-geoip/tree/1.2.1" + "source": "https://github.com/Torann/laravel-geoip/tree/3.0.2" }, "install-path": "../torann/geoip" }, @@ -11286,35 +11437,37 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.3.0", - "version_normalized": "4.3.0.0", + "version": "v5.5.0", + "version_normalized": "5.5.0.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "67a491df68208bef8c37092db11fa3885008efcf" + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67a491df68208bef8c37092db11fa3885008efcf", - "reference": "67a491df68208bef8c37092db11fa3885008efcf", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, - "time": "2022-10-16T00:51:09+00:00", + "time": "2022-10-16T01:01:54+00:00", "type": "library", "extra": { "bamarni-bin": { @@ -11322,7 +11475,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.5-dev" } }, "installation-source": "dist", @@ -11355,7 +11508,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" }, "funding": [ { @@ -11562,29 +11715,29 @@ }, { "name": "yajra/laravel-datatables-oracle", - "version": "v9.10.0", - "version_normalized": "9.10.0.0", + "version": "v9.21.2", + "version_normalized": "9.21.2.0", "source": { "type": "git", "url": "https://github.com/yajra/laravel-datatables.git", - "reference": "b0b9e2c37b5a17ca35bb2c6d3927bf6176393229" + "reference": "a7fd01f06282923e9c63fa27fe6b391e21dc321a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/b0b9e2c37b5a17ca35bb2c6d3927bf6176393229", - "reference": "b0b9e2c37b5a17ca35bb2c6d3927bf6176393229", + "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/a7fd01f06282923e9c63fa27fe6b391e21dc321a", + "reference": "a7fd01f06282923e9c63fa27fe6b391e21dc321a", "shasum": "" }, "require": { - "illuminate/database": "5.8.*|^6|^7", - "illuminate/filesystem": "5.8.*|^6|^7", - "illuminate/http": "5.8.*|^6|^7", - "illuminate/support": "5.8.*|^6|^7", - "illuminate/view": "5.8.*|^6|^7", - "php": "^7.1.3" + "illuminate/database": "5.8.*|^6|^7|^8|^9", + "illuminate/filesystem": "5.8.*|^6|^7|^8|^9", + "illuminate/http": "5.8.*|^6|^7|^8|^9", + "illuminate/support": "5.8.*|^6|^7|^8|^9", + "illuminate/view": "5.8.*|^6|^7|^8|^9", + "php": "^7.1.3|^8" }, "require-dev": { - "orchestra/testbench": "^3.8" + "orchestra/testbench": "^3.8|^4.0|^5.0|^6.0|^7.0" }, "suggest": { "yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.", @@ -11592,7 +11745,7 @@ "yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.", "yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables." }, - "time": "2020-04-23T01:21:11+00:00", + "time": "2022-07-12T04:48:03+00:00", "type": "library", "extra": { "branch-alias": { @@ -11626,7 +11779,7 @@ "email": "aqangeles@gmail.com" } ], - "description": "jQuery DataTables API for Laravel 4|5", + "description": "jQuery DataTables API for Laravel 5|6|7|8|9", "keywords": [ "datatables", "jquery", @@ -11634,7 +11787,7 @@ ], "support": { "issues": "https://github.com/yajra/laravel-datatables/issues", - "source": "https://github.com/yajra/laravel-datatables/tree/v9.10.0" + "source": "https://github.com/yajra/laravel-datatables/tree/v9.21.2" }, "funding": [ { @@ -11651,6 +11804,7 @@ ], "dev": true, "dev-package-names": [ + "barryvdh/laravel-debugbar", "codacy/coverage", "doctrine/instantiator", "facade/flare-client-php", @@ -11660,6 +11814,7 @@ "gitonomy/gitlib", "hamcrest/hamcrest-php", "laravel/dusk", + "maximebf/debugbar", "mockery/mockery", "myclabs/deep-copy", "nunomaduro/collision", @@ -11696,7 +11851,6 @@ "sebastian/version", "symfony/dom-crawler", "symfony/yaml", - "theseer/tokenizer", - "webmozart/assert" + "theseer/tokenizer" ] } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 007c837f4..c8219faf1 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '51056e3aad4cde6c2b824c9965f9ea08610c29ff', + 'reference' => '043364042600557fd5dadbe5882735f1c4b29029', 'name' => 'laravel/laravel', 'dev' => true, ), @@ -37,6 +37,15 @@ 'reference' => 'e851af4d7d2d95b131db344430384ae7cc04758e', 'dev_requirement' => false, ), + 'barryvdh/laravel-debugbar' => array( + 'pretty_version' => 'v3.7.0', + 'version' => '3.7.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../barryvdh/laravel-debugbar', + 'aliases' => array(), + 'reference' => '3372ed65e6d2039d663ed19aa699956f9d346271', + 'dev_requirement' => true, + ), 'brick/math' => array( 'pretty_version' => '0.9.3', 'version' => '0.9.3.0', @@ -185,12 +194,12 @@ 'dev_requirement' => false, ), 'dragonmantank/cron-expression' => array( - 'pretty_version' => 'v2.3.1', - 'version' => '2.3.1.0', + 'pretty_version' => 'v3.3.2', + 'version' => '3.3.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../dragonmantank/cron-expression', 'aliases' => array(), - 'reference' => '65b2d8ee1f10915efb3b55597da3404f096acba2', + 'reference' => '782ca5968ab8b954773518e9e49a6f892a34b2a8', 'dev_requirement' => false, ), 'egulias/email-validator' => array( @@ -253,15 +262,6 @@ 'reference' => '37f751c67a5372d4e26353bd9384bc03744ec77b', 'dev_requirement' => true, ), - 'fideloper/proxy' => array( - 'pretty_version' => '4.4.2', - 'version' => '4.4.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../fideloper/proxy', - 'aliases' => array(), - 'reference' => 'a751f2bc86dd8e6cfef12dc0cbdada82f5a18750', - 'dev_requirement' => false, - ), 'filp/whoops' => array( 'pretty_version' => '2.14.6', 'version' => '2.14.6.0', @@ -316,147 +316,15 @@ 'reference' => '00b57b79f02396aa4c7c163f76fe2bc48faebbb7', 'dev_requirement' => true, ), - 'guzzle/batch' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/cache' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/common' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/guzzle' => array( - 'pretty_version' => 'v3.8.1', - 'version' => '3.8.1.0', + 'graham-campbell/result-type' => array( + 'pretty_version' => 'v1.1.0', + 'version' => '1.1.0.0', 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzle/guzzle', + 'install_path' => __DIR__ . '/../graham-campbell/result-type', 'aliases' => array(), - 'reference' => '4de0618a01b34aa1c8c33a3f13f396dcd3882eba', + 'reference' => 'a878d45c1914464426dc94da61c9e1d36ae262a8', 'dev_requirement' => false, ), - 'guzzle/http' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/inflection' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/iterator' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/log' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/parser' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-async' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-backoff' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-cache' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-cookie' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-curlauth' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-error-response' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-history' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-log' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-md5' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-mock' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/plugin-oauth' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/service' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), - 'guzzle/stream' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v3.8.1', - ), - ), 'guzzlehttp/guzzle' => array( 'pretty_version' => '7.5.0', 'version' => '7.5.0.0', @@ -496,175 +364,187 @@ 'illuminate/auth' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/broadcasting' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/bus' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/cache' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', + ), + ), + 'illuminate/collections' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => 'v8.83.27', ), ), 'illuminate/config' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/console' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/container' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/contracts' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/cookie' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/database' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/encryption' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/events' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/filesystem' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/hashing' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/http' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/log' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', + ), + ), + 'illuminate/macroable' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => 'v8.83.27', ), ), 'illuminate/mail' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/notifications' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/pagination' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/pipeline' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/queue' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/redis' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/routing' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/session' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/support' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/testing' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/translation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/validation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'illuminate/view' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v7.30.6', + 0 => 'v8.83.27', ), ), 'intervention/image' => array( @@ -683,21 +563,21 @@ ), ), 'laravel/dusk' => array( - 'pretty_version' => 'v5.11.0', - 'version' => '5.11.0.0', + 'pretty_version' => 'v6.25.2', + 'version' => '6.25.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/dusk', 'aliases' => array(), - 'reference' => 'e07cc46a1e39767739e8197189780b4c2639806d', + 'reference' => '25a595ac3dc82089a91af10dd23b0d58fd3f6d0b', 'dev_requirement' => true, ), 'laravel/framework' => array( - 'pretty_version' => 'v7.30.6', - 'version' => '7.30.6.0', + 'pretty_version' => 'v8.83.27', + 'version' => '8.83.27.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/framework', 'aliases' => array(), - 'reference' => 'ecdafad1dda3c790af186a6d18479ea4757ef9ee', + 'reference' => 'e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49', 'dev_requirement' => false, ), 'laravel/laravel' => array( @@ -706,16 +586,25 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '51056e3aad4cde6c2b824c9965f9ea08610c29ff', + 'reference' => '043364042600557fd5dadbe5882735f1c4b29029', + 'dev_requirement' => false, + ), + 'laravel/serializable-closure' => array( + 'pretty_version' => 'v1.2.2', + 'version' => '1.2.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../laravel/serializable-closure', + 'aliases' => array(), + 'reference' => '47afb7fae28ed29057fdca37e16a84f90cc62fae', 'dev_requirement' => false, ), 'laravel/socialite' => array( - 'pretty_version' => 'v4.4.1', - 'version' => '4.4.1.0', + 'pretty_version' => 'v5.5.7', + 'version' => '5.5.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/socialite', 'aliases' => array(), - 'reference' => '80951df0d93435b773aa00efe1fad6d5015fac75', + 'reference' => 'ee6201f539ac47c3a55132449f9d20ee928f0ee2', 'dev_requirement' => false, ), 'laravel/tinker' => array( @@ -728,12 +617,12 @@ 'dev_requirement' => false, ), 'laravel/ui' => array( - 'pretty_version' => 'v2.5.0', - 'version' => '2.5.0.0', + 'pretty_version' => 'v3.4.6', + 'version' => '3.4.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/ui', 'aliases' => array(), - 'reference' => 'd01a705763c243b07be795e9d1bb47f89260f73d', + 'reference' => '65ec5c03f7fee2c8ecae785795b829a15be48c2c', 'dev_requirement' => false, ), 'laravelcollective/html' => array( @@ -773,12 +662,12 @@ 'dev_requirement' => false, ), 'league/iso3166' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', + 'pretty_version' => '4.1.0', + 'version' => '4.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../league/iso3166', 'aliases' => array(), - 'reference' => '9976d382f270ad3f3df8a68719beb7a7179ffa1e', + 'reference' => 'a0dd2a1d956f85811f9c667a1744d822fb2c63d8', 'dev_requirement' => false, ), 'league/mime-type-detection' => array( @@ -835,6 +724,15 @@ 'reference' => '469e937dc91aa087e43b21a5266cb7567f482f3e', 'dev_requirement' => false, ), + 'maximebf/debugbar' => array( + 'pretty_version' => 'v1.18.1', + 'version' => '1.18.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../maximebf/debugbar', + 'aliases' => array(), + 'reference' => 'ba0af68dd4316834701ecb30a00ce9604ced3ee9', + 'dev_requirement' => true, + ), 'mockery/mockery' => array( 'pretty_version' => '1.5.1', 'version' => '1.5.1.0', @@ -854,14 +752,20 @@ 'dev_requirement' => false, ), 'mremi/url-shortener' => array( - 'pretty_version' => 'v1.0.3', - 'version' => '1.0.3.0', + 'pretty_version' => 'v2.4.0', + 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../mremi/url-shortener', 'aliases' => array(), - 'reference' => 'ed3b482c2a2f0ff83e07e8a96ade13d9b84eb773', + 'reference' => '346dcc25f491f962cd380813631da9f2e939b092', 'dev_requirement' => false, ), + 'mtdowling/cron-expression' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '^1.0', + ), + ), 'mtdowling/jmespath.php' => array( 'pretty_version' => '2.6.1', 'version' => '2.6.1.0', @@ -937,12 +841,12 @@ 'dev_requirement' => false, ), 'nunomaduro/collision' => array( - 'pretty_version' => 'v4.3.0', - 'version' => '4.3.0.0', + 'pretty_version' => 'v5.11.0', + 'version' => '5.11.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nunomaduro/collision', 'aliases' => array(), - 'reference' => '7c125dc2463f3e144ddc7e05e63077109508c94e', + 'reference' => '8b610eef8582ccdc05d8f2ab23305e2d37049461', 'dev_requirement' => true, ), 'opis/closure' => array( @@ -1126,12 +1030,12 @@ 'dev_requirement' => false, ), 'propaganistas/laravel-phone' => array( - 'pretty_version' => '4.2.7', - 'version' => '4.2.7.0', + 'pretty_version' => '4.4.0', + 'version' => '4.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../propaganistas/laravel-phone', 'aliases' => array(), - 'reference' => 'f2765e308977511c7ee42a48d635dca7026fa427', + 'reference' => 'ba5aa49226793faf4bd37b38bd627d49269611d9', 'dev_requirement' => false, ), 'psr/container' => array( @@ -1221,8 +1125,8 @@ 'psr/log-implementation' => array( 'dev_requirement' => false, 'provided' => array( - 0 => '1.0.0 || 2.0.0 || 3.0.0', - 1 => '1.0|2.0', + 0 => '1.0|2.0', + 1 => '1.0.0 || 2.0.0 || 3.0.0', ), ), 'psr/simple-cache' => array( @@ -1234,6 +1138,12 @@ 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'dev_requirement' => false, ), + 'psr/simple-cache-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), 'psy/psysh' => array( 'pretty_version' => 'v0.11.10', 'version' => '0.11.10.0', @@ -1757,12 +1667,12 @@ 'dev_requirement' => false, ), 'torann/geoip' => array( - 'pretty_version' => '1.2.1', - 'version' => '1.2.1.0', + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../torann/geoip', 'aliases' => array(), - 'reference' => '15c7cb3d2edcfbfd7e8cd6f435defc2352df40d2', + 'reference' => 'f16d5df66ecb6ba4ffaef52abef519fbc19596d3', 'dev_requirement' => false, ), 'tymon/jwt-auth' => array( @@ -1784,12 +1694,12 @@ 'dev_requirement' => false, ), 'vlucas/phpdotenv' => array( - 'pretty_version' => 'v4.3.0', - 'version' => '4.3.0.0', + 'pretty_version' => 'v5.5.0', + 'version' => '5.5.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../vlucas/phpdotenv', 'aliases' => array(), - 'reference' => '67a491df68208bef8c37092db11fa3885008efcf', + 'reference' => '1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7', 'dev_requirement' => false, ), 'voku/portable-ascii' => array( @@ -1817,15 +1727,15 @@ 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', - 'dev_requirement' => true, + 'dev_requirement' => false, ), 'yajra/laravel-datatables-oracle' => array( - 'pretty_version' => 'v9.10.0', - 'version' => '9.10.0.0', + 'pretty_version' => 'v9.21.2', + 'version' => '9.21.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../yajra/laravel-datatables-oracle', 'aliases' => array(), - 'reference' => 'b0b9e2c37b5a17ca35bb2c6d3927bf6176393229', + 'reference' => 'a7fd01f06282923e9c63fa27fe6b391e21dc321a', 'dev_requirement' => false, ), ), diff --git a/vendor/dragonmantank/cron-expression/.editorconfig b/vendor/dragonmantank/cron-expression/.editorconfig deleted file mode 100644 index 1492202b4..000000000 --- a/vendor/dragonmantank/cron-expression/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false - -[*.yml] -indent_style = space -indent_size = 2 diff --git a/vendor/dragonmantank/cron-expression/CHANGELOG.md b/vendor/dragonmantank/cron-expression/CHANGELOG.md index 4e207aadd..7b6df4b1c 100644 --- a/vendor/dragonmantank/cron-expression/CHANGELOG.md +++ b/vendor/dragonmantank/cron-expression/CHANGELOG.md @@ -1,5 +1,149 @@ # Change Log +## [3.3.2] - 2022-09-19 + +### Added +- N/A + +### Changed +- Skip some daylight savings time tests for PHP 8.1 daylight savings time weirdness (#146) + +### Fixed +- Changed string interpolations to work better with PHP 8.2 (#142) + +## [3.3.1] - 2022-01-18 + +### Added +- N/A + +### Changed +- N/A + +### Fixed +- Fixed issue when timezones had no transition, which can occur over very short timespans (#134) + +## [3.3.0] - 2022-01-13 + +### Added +- Added ability to register your own expression aliases (#132) + +### Changed +- Changed how Day of Week and Day of Month resolve when one or the other is `*` or `?` + +### Fixed +- PHPStan should no longer error out + +## [3.2.4] - 2022-01-12 + +### Added +- N/A + +### Changed +- Changed how Day of Week increment/decrement to help with DST changes (#131) + +### Fixed +- N/A + +## [3.2.3] - 2022-01-05 + +### Added +- N/A + +### Changed +- Changed how minutes and hours increment/decrement to help with DST changes (#131) + +### Fixed +- N/A + +## [3.2.2] - 2022-01-05 + +### Added +- N/A + +### Changed +- Marked some methods `@internal` (#124) + +### Fixed +- Fixed issue with small ranges and large steps that caused an error with `range()` (#88) +- Fixed issue where wraparound logic incorrectly considered high bound on range (#89) + +## [3.2.1] - 2022-01-04 + +### Added +- N/A + +### Changed +- Added PHP 8.1 to testing (#125) + +### Fixed +- Allow better mixture of ranges, steps, and lists (#122) +- Fixed return order when multiple dates are requested and inverted (#121) +- Better handling over DST (#115) +- Fixed PHPStan tests (#130) + +## [3.2.0] - 2022-01-04 + +### Added +- Added alias for `@midnight` (#117) + +### Changed +- Improved testing for instance of field in tests (#105) +- Optimization for determining multiple run dates (#75) +- `CronExpression` properties changed from private to protected (#106) + +### Fixed +- N/A + +## [3.1.0] - 2020-11-24 + +### Added +- Added `CronExpression::getParts()` method to get parts of the expression as an array (#83) + +### Changed +- Changed to Interfaces for some type hints (#97, #86) +- Dropped minimum PHP version to 7.2 +- Few syntax changes for phpstan compatibility (#93) + +### Fixed +- N/A + +### Deprecated +- Deprecated `CronExpression::factory` in favor of the constructor (#56) +- Deprecated `CronExpression::YEAR` as a formality, the functionality is already removed (#87) + +## [3.0.1] - 2020-10-12 +### Added +- Added support for PHP 8 (#92) +### Changed +- N/A +### Fixed +- N/A + +## [3.0.0] - 2020-03-25 + +**MAJOR CHANGE** - In previous versions of this library, setting both a "Day of Month" and a "Day of Week" would be interpreted as an `AND` statement, not an `OR` statement. For example: + +`30 0 1 * 1` + +would evaluate to "Run 30 minutes after the 0 hour when the Day Of Month is 1 AND a Monday" instead of "Run 30 minutes after the 0 hour on Day Of Month 1 OR a Monday", where the latter is more inline with most cron systems. This means that if your cron expression has both of these fields set, you may see your expression fire more often starting with v3.0.0. + +### Added +- Additional docblocks for IDE and documentation +- Added phpstan as a development dependency +- Added a `Cron\FieldFactoryInterface` to make migrations easier (#38) +### Changed +- Changed some DI testing during TravisCI runs +- `\Cron\CronExpression::determineTimezone()` now checks for `\DateTimeInterface` instead of just `\DateTime` +- Errors with fields now report a more human-understandable error and are 1-based instead of 0-based +- Better support for `\DateTimeImmutable` across the library by typehinting for `\DateTimeInterface` now +- Literals should now be less case-sensative across the board +- Changed logic for when both a Day of Week and a Day of Month are supplied to now be an OR statement, not an AND +### Fixed +- Fixed infinite loop when determining last day of week from literals +- Fixed bug where single number ranges were allowed (ex: `1/10`) +- Fixed nullable FieldFactory in CronExpression where no factory could be supplied +- Fixed issue where logic for dropping seconds to 0 could lead to a timezone change + ## [2.3.1] - 2020-10-12 ### Added - Added support for PHP 8 (#92) diff --git a/vendor/dragonmantank/cron-expression/README.md b/vendor/dragonmantank/cron-expression/README.md index 8e8021b2a..e853ad455 100644 --- a/vendor/dragonmantank/cron-expression/README.md +++ b/vendor/dragonmantank/cron-expression/README.md @@ -1,7 +1,7 @@ PHP Cron Expression Parser ========================== -[![Latest Stable Version](https://poser.pugx.org/dragonmantank/cron-expression/v/stable.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Total Downloads](https://poser.pugx.org/dragonmantank/cron-expression/downloads.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Build Status](https://secure.travis-ci.org/dragonmantank/cron-expression.png)](http://travis-ci.org/dragonmantank/cron-expression) +[![Latest Stable Version](https://poser.pugx.org/dragonmantank/cron-expression/v/stable.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Total Downloads](https://poser.pugx.org/dragonmantank/cron-expression/downloads.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Build Status](https://secure.travis-ci.org/dragonmantank/cron-expression.png)](http://travis-ci.org/dragonmantank/cron-expression) [![StyleCI](https://github.styleci.io/repos/103715337/shield?branch=master)](https://github.styleci.io/repos/103715337) The PHP cron expression parser can parse a CRON expression, determine if it is due to run, calculate the next run date of the expression, and calculate the previous @@ -32,21 +32,21 @@ Usage require_once '/vendor/autoload.php'; // Works with predefined scheduling definitions -$cron = Cron\CronExpression::factory('@daily'); +$cron = new Cron\CronExpression('@daily'); $cron->isDue(); echo $cron->getNextRunDate()->format('Y-m-d H:i:s'); echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s'); // Works with complex expressions -$cron = Cron\CronExpression::factory('3-59/15 6-12 */15 1 2-5'); +$cron = new Cron\CronExpression('3-59/15 6-12 */15 1 2-5'); echo $cron->getNextRunDate()->format('Y-m-d H:i:s'); // Calculate a run date two iterations into the future -$cron = Cron\CronExpression::factory('@daily'); +$cron = new Cron\CronExpression('@daily'); echo $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s'); // Calculate a run date relative to a specific time -$cron = Cron\CronExpression::factory('@monthly'); +$cron = new Cron\CronExpression('@monthly'); echo $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s'); ``` @@ -65,14 +65,23 @@ A CRON expression is a string representing the schedule for a particular command | +-------------------- hour (0 - 23) +------------------------- min (0 - 59) +This library also supports a few macros: + +* `@yearly`, `@annually` - Run once a year, midnight, Jan. 1 - `0 0 1 1 *` +* `@monthly` - Run once a month, midnight, first of month - `0 0 1 * *` +* `@weekly` - Run once a week, midnight on Sun - `0 0 * * 0` +* `@daily`, `@midnight` - Run once a day, midnight - `0 0 * * *` +* `@hourly` - Run once an hour, first minute - `0 * * * *` + Requirements ============ -- PHP 7.0+ +- PHP 7.2+ - PHPUnit is required to run the unit tests - Composer is required to run the unit tests Projects that Use cron-expression ================================= * Part of the [Laravel Framework](https://github.com/laravel/framework/) -* Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle) \ No newline at end of file +* Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle) +* Framework agnostic, PHP-based job scheduler - [Crunz](https://github.com/lavary/crunz) diff --git a/vendor/dragonmantank/cron-expression/composer.json b/vendor/dragonmantank/cron-expression/composer.json index 6fcf8184c..657a5b47c 100644 --- a/vendor/dragonmantank/cron-expression/composer.json +++ b/vendor/dragonmantank/cron-expression/composer.json @@ -5,11 +5,6 @@ "keywords": ["cron", "schedule"], "license": "MIT", "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -17,10 +12,14 @@ } ], "require": { - "php": "^7.0|^8.0" + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0" + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpstan/extension-installer": "^1.0" }, "autoload": { "psr-4": { @@ -29,12 +28,20 @@ }, "autoload-dev": { "psr-4": { - "Tests\\": "tests/Cron/" + "Cron\\Tests\\": "tests/Cron/" } }, - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "scripts": { + "phpstan": "./vendor/bin/phpstan analyze", + "test": "phpunit" + }, + "config": { + "allow-plugins": { + "ocramius/package-versions": true, + "phpstan/extension-installer": true } } } diff --git a/vendor/dragonmantank/cron-expression/phpstan.neon b/vendor/dragonmantank/cron-expression/phpstan.neon new file mode 100644 index 000000000..bea9cb0da --- /dev/null +++ b/vendor/dragonmantank/cron-expression/phpstan.neon @@ -0,0 +1,15 @@ +parameters: + checkMissingIterableValueType: false + + ignoreErrors: + - '#Call to an undefined method DateTimeInterface::add\(\)#' + - '#Call to an undefined method DateTimeInterface::modify\(\)#' + - '#Call to an undefined method DateTimeInterface::setDate\(\)#' + - '#Call to an undefined method DateTimeInterface::setTime\(\)#' + - '#Call to an undefined method DateTimeInterface::setTimezone\(\)#' + - '#Call to an undefined method DateTimeInterface::sub\(\)#' + + level: max + + paths: + - src/ diff --git a/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php b/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php index 8b1072ab2..df2848df4 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php @@ -1,33 +1,41 @@ isIncrementsOfRanges($value)) { return $this->isInIncrementsOfRanges($dateValue, $value); - } elseif ($this->isRange($value)) { + } + + if ($this->isRange($value)) { return $this->isInRange($dateValue, $value); } - return $value == '*' || $dateValue == $value; + return '*' === $value || $dateValue === (int) $value; } /** - * Check if a value is a range + * Check if a value is a range. * + * @internal * @param string $value Value to test * * @return bool */ - public function isRange($value) + public function isRange(string $value): bool { - return strpos($value, '-') !== false; + return false !== strpos($value, '-'); } /** - * Check if a value is an increments of ranges + * Check if a value is an increments of ranges. * + * @internal * @param string $value Value to test * * @return bool */ - public function isIncrementsOfRanges($value) + public function isIncrementsOfRanges(string $value): bool { - return strpos($value, '/') !== false; + return false !== strpos($value, '/'); } /** - * Test if a value is within a range + * Test if a value is within a range. * - * @param string $dateValue Set date value - * @param string $value Value to test + * @internal + * @param int $dateValue Set date value + * @param string $value Value to test * * @return bool */ - public function isInRange($dateValue, $value) + public function isInRange(int $dateValue, $value): bool { - $parts = array_map(function($value) { + $parts = array_map( + function ($value) { $value = trim($value); - $value = $this->convertLiterals($value); - return $value; + + return $this->convertLiterals($value); }, explode('-', $value, 2) ); - return $dateValue >= $parts[0] && $dateValue <= $parts[1]; } /** - * Test if a value is within an increments of ranges (offset[-to]/step size) + * Test if a value is within an increments of ranges (offset[-to]/step size). * - * @param string $dateValue Set date value - * @param string $value Value to test + * @internal + * @param int $dateValue Set date value + * @param string $value Value to test * * @return bool */ - public function isInIncrementsOfRanges($dateValue, $value) + public function isInIncrementsOfRanges(int $dateValue, string $value): bool { $chunks = array_map('trim', explode('/', $value, 2)); $range = $chunks[0]; - $step = isset($chunks[1]) ? $chunks[1] : 0; + $step = $chunks[1] ?? 0; // No step or 0 steps aren't cool - if (is_null($step) || '0' === $step || 0 === $step) { + /** @phpstan-ignore-next-line */ + if (null === $step || '0' === $step || 0 === $step) { return false; } // Expand the * to a full range - if ('*' == $range) { + if ('*' === $range) { $range = $this->rangeStart . '-' . $this->rangeEnd; } // Generate the requested small range $rangeChunks = explode('-', $range, 2); - $rangeStart = $rangeChunks[0]; - $rangeEnd = isset($rangeChunks[1]) ? $rangeChunks[1] : $rangeStart; + $rangeStart = (int) $rangeChunks[0]; + $rangeEnd = $rangeChunks[1] ?? $rangeStart; + $rangeEnd = (int) $rangeEnd; if ($rangeStart < $this->rangeStart || $rangeStart > $this->rangeEnd || $rangeStart > $rangeEnd) { throw new \OutOfRangeException('Invalid range start requested'); @@ -141,82 +158,93 @@ abstract class AbstractField implements FieldInterface throw new \OutOfRangeException('Invalid range end requested'); } - // Steps larger than the range need to wrap around and be handled slightly differently than smaller steps - if ($step >= $this->rangeEnd) { - $thisRange = [$this->fullRange[$step % count($this->fullRange)]]; + // Steps larger than the range need to wrap around and be handled + // slightly differently than smaller steps + + // UPDATE - This is actually false. The C implementation will allow a + // larger step as valid syntax, it never wraps around. It will stop + // once it hits the end. Unfortunately this means in future versions + // we will not wrap around. However, because the logic exists today + // per the above documentation, fixing the bug from #89 + if ($step > $this->rangeEnd) { + $thisRange = [$this->fullRange[$step % \count($this->fullRange)]]; } else { - $thisRange = range($rangeStart, $rangeEnd, $step); + if ($step > ($rangeEnd - $rangeStart)) { + $thisRange[$rangeStart] = (int) $rangeStart; + } else { + $thisRange = range($rangeStart, $rangeEnd, (int) $step); + } } - return in_array($dateValue, $thisRange); + return \in_array($dateValue, $thisRange, true); } /** - * Returns a range of values for the given cron expression + * Returns a range of values for the given cron expression. * * @param string $expression The expression to evaluate - * @param int $max Maximum offset for range + * @param int $max Maximum offset for range * * @return array */ - public function getRangeForExpression($expression, $max) + public function getRangeForExpression(string $expression, int $max): array { - $values = array(); + $values = []; $expression = $this->convertLiterals($expression); - if (strpos($expression, ',') !== false) { + if (false !== strpos($expression, ',')) { $ranges = explode(',', $expression); $values = []; foreach ($ranges as $range) { $expanded = $this->getRangeForExpression($range, $this->rangeEnd); $values = array_merge($values, $expanded); } + return $values; } if ($this->isRange($expression) || $this->isIncrementsOfRanges($expression)) { if (!$this->isIncrementsOfRanges($expression)) { - list ($offset, $to) = explode('-', $expression); + [$offset, $to] = explode('-', $expression); $offset = $this->convertLiterals($offset); $to = $this->convertLiterals($to); $stepSize = 1; - } - else { + } else { $range = array_map('trim', explode('/', $expression, 2)); - $stepSize = isset($range[1]) ? $range[1] : 0; + $stepSize = $range[1] ?? 0; $range = $range[0]; $range = explode('-', $range, 2); $offset = $range[0]; - $to = isset($range[1]) ? $range[1] : $max; + $to = $range[1] ?? $max; } - $offset = $offset == '*' ? $this->rangeStart : $offset; + $offset = '*' === $offset ? $this->rangeStart : $offset; if ($stepSize >= $this->rangeEnd) { - $values = [$this->fullRange[$stepSize % count($this->fullRange)]]; + $values = [$this->fullRange[$stepSize % \count($this->fullRange)]]; } else { for ($i = $offset; $i <= $to; $i += $stepSize) { - $values[] = (int)$i; + $values[] = (int) $i; } } sort($values); - } - else { - $values = array($expression); + } else { + $values = [$expression]; } return $values; } /** - * Convert literal + * Convert literal. * * @param string $value + * * @return string */ - protected function convertLiterals($value) + protected function convertLiterals(string $value): string { - if (count($this->literals)) { - $key = array_search($value, $this->literals); - if ($key !== false) { + if (\count($this->literals)) { + $key = array_search(strtoupper($value), $this->literals, true); + if (false !== $key) { return (string) $key; } } @@ -225,12 +253,13 @@ abstract class AbstractField implements FieldInterface } /** - * Checks to see if a value is valid for the field + * Checks to see if a value is valid for the field. * * @param string $value + * * @return bool */ - public function validate($value) + public function validate(string $value): bool { $value = $this->convertLiterals($value); @@ -239,22 +268,29 @@ abstract class AbstractField implements FieldInterface return true; } - if (strpos($value, '/') !== false) { - list($range, $step) = explode('/', $value); - return $this->validate($range) && filter_var($step, FILTER_VALIDATE_INT); - } - // Validate each chunk of a list individually - if (strpos($value, ',') !== false) { + if (false !== strpos($value, ',')) { foreach (explode(',', $value) as $listItem) { if (!$this->validate($listItem)) { return false; } } + return true; } - if (strpos($value, '-') !== false) { + if (false !== strpos($value, '/')) { + [$range, $step] = explode('/', $value); + + // Don't allow numeric ranges + if (is_numeric($range)) { + return false; + } + + return $this->validate($range) && filter_var($step, FILTER_VALIDATE_INT); + } + + if (false !== strpos($value, '-')) { if (substr_count($value, '-') > 1) { return false; } @@ -263,7 +299,7 @@ abstract class AbstractField implements FieldInterface $chunks[0] = $this->convertLiterals($chunks[0]); $chunks[1] = $this->convertLiterals($chunks[1]); - if ('*' == $chunks[0] || '*' == $chunks[1]) { + if ('*' === $chunks[0] || '*' === $chunks[1]) { return false; } @@ -274,13 +310,37 @@ abstract class AbstractField implements FieldInterface return false; } - if (is_float($value) || strpos($value, '.') !== false) { + if (false !== strpos($value, '.')) { return false; } // We should have a numeric by now, so coerce this into an integer $value = (int) $value; - return in_array($value, $this->fullRange, true); + return \in_array($value, $this->fullRange, true); + } + + protected function timezoneSafeModify(DateTimeInterface $dt, string $modification): DateTimeInterface + { + $timezone = $dt->getTimezone(); + $dt = $dt->setTimezone(new \DateTimeZone("UTC")); + $dt = $dt->modify($modification); + $dt = $dt->setTimezone($timezone); + return $dt; + } + + protected function setTimeHour(DateTimeInterface $date, bool $invert, int $originalTimestamp): DateTimeInterface + { + $date = $date->setTime((int)$date->format('H'), ($invert ? 59 : 0)); + + // setTime caused the offset to change, moving time in the wrong direction + $actualTimestamp = $date->format('U'); + if ((! $invert) && ($actualTimestamp <= $originalTimestamp)) { + $date = $this->timezoneSafeModify($date, "+1 hour"); + } elseif ($invert && ($actualTimestamp >= $originalTimestamp)) { + $date = $this->timezoneSafeModify($date, "-1 hour"); + } + + return $date; } } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php b/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php index 594b43582..d5337cc57 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php @@ -1,5 +1,7 @@ '0 0 1 1 *', + '@annually' => '0 0 1 1 *', + '@monthly' => '0 0 1 * *', + '@weekly' => '0 0 * * 0', + '@daily' => '0 0 * * *', + '@midnight' => '0 0 * * *', + '@hourly' => '0 * * * *', + ]; /** * @var array CRON expression parts */ - private $cronParts; + protected $cronParts; /** - * @var FieldFactory CRON field factory + * @var FieldFactoryInterface CRON field factory */ - private $fieldFactory; + protected $fieldFactory; /** * @var int Max iteration count when searching for next run date */ - private $maxIterationCount = 1000; + protected $maxIterationCount = 1000; /** * @var array Order in which to test of cron parts */ - private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE); + protected static $order = [ + self::YEAR, + self::MONTH, + self::DAY, + self::WEEKDAY, + self::HOUR, + self::MINUTE, + ]; /** - * Factory method to create a new CronExpression. - * - * @param string $expression The CRON expression to create. There are - * several special predefined values which can be used to substitute the - * CRON expression: - * - * `@yearly`, `@annually` - Run once a year, midnight, Jan. 1 - 0 0 1 1 * - * `@monthly` - Run once a month, midnight, first of month - 0 0 1 * * - * `@weekly` - Run once a week, midnight on Sun - 0 0 * * 0 - * `@daily` - Run once a day, midnight - 0 0 * * * - * `@hourly` - Run once an hour, first minute - 0 * * * * - * @param FieldFactory|null $fieldFactory Field factory to use - * - * @return CronExpression + * @var array */ - public static function factory($expression, FieldFactory $fieldFactory = null) - { - $mappings = array( - '@yearly' => '0 0 1 1 *', - '@annually' => '0 0 1 1 *', - '@monthly' => '0 0 1 * *', - '@weekly' => '0 0 * * 0', - '@daily' => '0 0 * * *', - '@hourly' => '0 * * * *' - ); + private static $registeredAliases = self::MAPPINGS; - if (isset($mappings[$expression])) { - $expression = $mappings[$expression]; + /** + * Registered a user defined CRON Expression Alias. + * + * @throws LogicException If the expression or the alias name are invalid + * or if the alias is already registered. + */ + public static function registerAlias(string $alias, string $expression): void + { + try { + new self($expression); + } catch (InvalidArgumentException $exception) { + throw new LogicException("The expression `$expression` is invalid", 0, $exception); } - return new static($expression, $fieldFactory ?: new FieldFactory()); + $shortcut = strtolower($alias); + if (1 !== preg_match('/^@\w+$/', $shortcut)) { + throw new LogicException("The alias `$alias` is invalid. It must start with an `@` character and contain alphanumeric (letters, numbers, regardless of case) plus underscore (_)."); + } + + if (isset(self::$registeredAliases[$shortcut])) { + throw new LogicException("The alias `$alias` is already registered."); + } + + self::$registeredAliases[$shortcut] = $expression; + } + + /** + * Unregistered a user defined CRON Expression Alias. + * + * @throws LogicException If the user tries to unregister a built-in alias + */ + public static function unregisterAlias(string $alias): bool + { + $shortcut = strtolower($alias); + if (isset(self::MAPPINGS[$shortcut])) { + throw new LogicException("The alias `$alias` is a built-in alias; it can not be unregistered."); + } + + if (!isset(self::$registeredAliases[$shortcut])) { + return false; + } + + unset(self::$registeredAliases[$shortcut]); + + return true; + } + + /** + * Tells whether a CRON Expression alias is registered. + */ + public static function supportsAlias(string $alias): bool + { + return isset(self::$registeredAliases[strtolower($alias)]); + } + + /** + * Returns all registered aliases as an associated array where the aliases are the key + * and their associated expressions are the values. + * + * @return array + */ + public static function getAliases(): array + { + return self::$registeredAliases; + } + + /** + * @deprecated since version 3.0.2, use __construct instead. + */ + public static function factory(string $expression, FieldFactoryInterface $fieldFactory = null): CronExpression + { + /** @phpstan-ignore-next-line */ + return new static($expression, $fieldFactory); } /** * Validate a CronExpression. * - * @param string $expression The CRON expression to validate. + * @param string $expression the CRON expression to validate * * @return bool True if a valid CRON expression was passed. False if not. - * @see \Cron\CronExpression::factory */ - public static function isValidExpression($expression) + public static function isValidExpression(string $expression): bool { try { - self::factory($expression); + new CronExpression($expression); } catch (InvalidArgumentException $e) { return false; } @@ -105,29 +173,36 @@ class CronExpression } /** - * Parse a CRON expression + * Parse a CRON expression. * - * @param string $expression CRON expression (e.g. '8 * * * *') - * @param FieldFactory|null $fieldFactory Factory to create cron fields + * @param string $expression CRON expression (e.g. '8 * * * *') + * @param null|FieldFactoryInterface $fieldFactory Factory to create cron fields */ - public function __construct($expression, FieldFactory $fieldFactory = null) + public function __construct(string $expression, FieldFactoryInterface $fieldFactory = null) { - $this->fieldFactory = $fieldFactory; + $shortcut = strtolower($expression); + $expression = self::$registeredAliases[$shortcut] ?? $expression; + + $this->fieldFactory = $fieldFactory ?: new FieldFactory(); $this->setExpression($expression); } /** - * Set or change the CRON expression + * Set or change the CRON expression. * * @param string $value CRON expression (e.g. 8 * * * *) * - * @return CronExpression * @throws \InvalidArgumentException if not a valid CRON expression + * + * @return CronExpression */ - public function setExpression($value) + public function setExpression(string $value): CronExpression { - $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); - if (count($this->cronParts) < 5) { + $split = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); + Assert::isArray($split); + + $this->cronParts = $split; + if (\count($this->cronParts) < 5) { throw new InvalidArgumentException( $value . ' is not a valid CRON expression' ); @@ -141,15 +216,16 @@ class CronExpression } /** - * Set part of the CRON expression + * Set part of the CRON expression. * - * @param int $position The position of the CRON expression to set - * @param string $value The value to set + * @param int $position The position of the CRON expression to set + * @param string $value The value to set + * + * @throws \InvalidArgumentException if the value is not valid for the part * * @return CronExpression - * @throws \InvalidArgumentException if the value is not valid for the part */ - public function setPart($position, $value) + public function setPart(int $position, string $value): CronExpression { if (!$this->fieldFactory->getField($position)->validate($value)) { throw new InvalidArgumentException( @@ -163,13 +239,13 @@ class CronExpression } /** - * Set max iteration count for searching next run dates + * Set max iteration count for searching next run dates. * * @param int $maxIterationCount Max iteration count when searching for next run date * * @return CronExpression */ - public function setMaxIterationCount($maxIterationCount) + public function setMaxIterationCount(int $maxIterationCount): CronExpression { $this->maxIterationCount = $maxIterationCount; @@ -191,16 +267,18 @@ class CronExpression * it matches the cron expression. * @param null|string $timeZone TimeZone to use instead of the system default * - * @return \DateTime * @throws \RuntimeException on too many iterations + * @throws \Exception + * + * @return \DateTime */ - public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false, $timeZone = null) + public function getNextRunDate($currentTime = 'now', int $nth = 0, bool $allowCurrentDate = false, $timeZone = null): DateTime { return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate, $timeZone); } /** - * Get a previous run date relative to the current date or a specific date + * Get a previous run date relative to the current date or a specific date. * * @param string|\DateTimeInterface $currentTime Relative calculation date * @param int $nth Number of matches to skip before returning @@ -208,69 +286,104 @@ class CronExpression * current date if it matches the cron expression * @param null|string $timeZone TimeZone to use instead of the system default * - * @return \DateTime * @throws \RuntimeException on too many iterations + * @throws \Exception + * + * @return \DateTime + * * @see \Cron\CronExpression::getNextRunDate */ - public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false, $timeZone = null) + public function getPreviousRunDate($currentTime = 'now', int $nth = 0, bool $allowCurrentDate = false, $timeZone = null): DateTime { return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate, $timeZone); } /** - * Get multiple run dates starting at the current date or a specific date + * Get multiple run dates starting at the current date or a specific date. * - * @param int $total Set the total number of dates to calculate - * @param string|\DateTimeInterface $currentTime Relative calculation date - * @param bool $invert Set to TRUE to retrieve previous dates - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * @param null|string $timeZone TimeZone to use instead of the system default + * @param int $total Set the total number of dates to calculate + * @param string|\DateTimeInterface|null $currentTime Relative calculation date + * @param bool $invert Set to TRUE to retrieve previous dates + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * @param null|string $timeZone TimeZone to use instead of the system default * * @return \DateTime[] Returns an array of run dates */ - public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false, $timeZone = null) + public function getMultipleRunDates(int $total, $currentTime = 'now', bool $invert = false, bool $allowCurrentDate = false, $timeZone = null): array { - $matches = array(); - for ($i = 0; $i < max(0, $total); $i++) { + $timeZone = $this->determineTimeZone($currentTime, $timeZone); + + if ('now' === $currentTime) { + $currentTime = new DateTime(); + } elseif ($currentTime instanceof DateTime) { + $currentTime = clone $currentTime; + } elseif ($currentTime instanceof DateTimeImmutable) { + $currentTime = DateTime::createFromFormat('U', $currentTime->format('U')); + } elseif (\is_string($currentTime)) { + $currentTime = new DateTime($currentTime); + } + + Assert::isInstanceOf($currentTime, DateTime::class); + $currentTime->setTimezone(new DateTimeZone($timeZone)); + + $matches = []; + for ($i = 0; $i < $total; ++$i) { try { - $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate, $timeZone); + $result = $this->getRunDate($currentTime, 0, $invert, $allowCurrentDate, $timeZone); } catch (RuntimeException $e) { break; } + + $allowCurrentDate = false; + $currentTime = clone $result; + $matches[] = $result; } return $matches; } /** - * Get all or part of the CRON expression + * Get all or part of the CRON expression. * - * @param string $part Specify the part to retrieve or NULL to get the full - * cron schedule string. + * @param int|string|null $part specify the part to retrieve or NULL to get the full + * cron schedule string * - * @return string|null Returns the CRON expression, a part of the + * @return null|string Returns the CRON expression, a part of the * CRON expression, or NULL if the part was specified but not found */ - public function getExpression($part = null) + public function getExpression($part = null): ?string { if (null === $part) { return implode(' ', $this->cronParts); - } elseif (array_key_exists($part, $this->cronParts)) { + } + + if (array_key_exists($part, $this->cronParts)) { return $this->cronParts[$part]; } return null; } + /** + * Gets the parts of the cron expression as an array. + * + * @return string[] + * The array of parts that make up this expression. + */ + public function getParts() + { + return $this->cronParts; + } + /** * Helper method to output the full expression. * * @return string Full CRON expression */ - public function __toString() + public function __toString(): string { - return $this->getExpression(); + return (string) $this->getExpression(); } /** @@ -283,23 +396,25 @@ class CronExpression * * @return bool Returns TRUE if the cron is due to run or FALSE if not */ - public function isDue($currentTime = 'now', $timeZone = null) + public function isDue($currentTime = 'now', $timeZone = null): bool { $timeZone = $this->determineTimeZone($currentTime, $timeZone); if ('now' === $currentTime) { $currentTime = new DateTime(); } elseif ($currentTime instanceof DateTime) { - // + $currentTime = clone $currentTime; } elseif ($currentTime instanceof DateTimeImmutable) { $currentTime = DateTime::createFromFormat('U', $currentTime->format('U')); - } else { + } elseif (\is_string($currentTime)) { $currentTime = new DateTime($currentTime); } - $currentTime->setTimeZone(new DateTimeZone($timeZone)); + + Assert::isInstanceOf($currentTime, DateTime::class); + $currentTime->setTimezone(new DateTimeZone($timeZone)); // drop the seconds to 0 - $currentTime = DateTime::createFromFormat('Y-m-d H:i', $currentTime->format('Y-m-d H:i')); + $currentTime->setTime((int) $currentTime->format('H'), (int) $currentTime->format('i'), 0); try { return $this->getNextRunDate($currentTime, 0, true)->getTimestamp() === $currentTime->getTimestamp(); @@ -309,19 +424,21 @@ class CronExpression } /** - * Get the next or previous run date of the expression relative to a date + * Get the next or previous run date of the expression relative to a date. * - * @param string|\DateTimeInterface $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning - * @param bool $invert Set to TRUE to go backwards in time - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * @param string|null $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface|null $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning + * @param bool $invert Set to TRUE to go backwards in time + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * @param string|null $timeZone TimeZone to use instead of the system default + * + * @throws \RuntimeException on too many iterations + * @throws Exception * * @return \DateTime - * @throws \RuntimeException on too many iterations */ - protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false, $timeZone = null) + protected function getRunDate($currentTime = null, int $nth = 0, bool $invert = false, bool $allowCurrentDate = false, $timeZone = null): DateTime { $timeZone = $this->determineTimeZone($currentTime, $timeZone); @@ -329,18 +446,26 @@ class CronExpression $currentDate = clone $currentTime; } elseif ($currentTime instanceof DateTimeImmutable) { $currentDate = DateTime::createFromFormat('U', $currentTime->format('U')); + } elseif (\is_string($currentTime)) { + $currentDate = new DateTime($currentTime); } else { - $currentDate = new DateTime($currentTime ?: 'now'); + $currentDate = new DateTime('now'); } - $currentDate->setTimeZone(new DateTimeZone($timeZone)); - $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0); + Assert::isInstanceOf($currentDate, DateTime::class); + $currentDate->setTimezone(new DateTimeZone($timeZone)); + // Workaround for setTime causing an offset change: https://bugs.php.net/bug.php?id=81074 + $currentDate = DateTime::createFromFormat("!Y-m-d H:iO", $currentDate->format("Y-m-d H:iP"), $currentDate->getTimezone()); + if ($currentDate === false) { + throw new \RuntimeException('Unable to create date from format'); + } + $currentDate->setTimezone(new DateTimeZone($timeZone)); + $nextRun = clone $currentDate; - $nth = (int) $nth; // We don't have to satisfy * or null fields - $parts = array(); - $fields = array(); + $parts = []; + $fields = []; foreach (self::$order as $position) { $part = $this->getExpression($position); if (null === $part || '*' === $part) { @@ -350,20 +475,49 @@ class CronExpression $fields[$position] = $this->fieldFactory->getField($position); } - // Set a hard limit to bail on an impossible date - for ($i = 0; $i < $this->maxIterationCount; $i++) { + if (isset($parts[self::DAY]) && isset($parts[self::WEEKDAY])) { + $domExpression = sprintf('%s %s %s %s *', $this->getExpression(0), $this->getExpression(1), $this->getExpression(2), $this->getExpression(3)); + $dowExpression = sprintf('%s %s * %s %s', $this->getExpression(0), $this->getExpression(1), $this->getExpression(3), $this->getExpression(4)); + $domExpression = new self($domExpression); + $dowExpression = new self($dowExpression); + + $domRunDates = $domExpression->getMultipleRunDates($nth + 1, $currentTime, $invert, $allowCurrentDate, $timeZone); + $dowRunDates = $dowExpression->getMultipleRunDates($nth + 1, $currentTime, $invert, $allowCurrentDate, $timeZone); + + if ($parts[self::DAY] === '?' || $parts[self::DAY] === '*') { + $domRunDates = []; + } + + if ($parts[self::WEEKDAY] === '?' || $parts[self::WEEKDAY] === '*') { + $dowRunDates = []; + } + + $combined = array_merge($domRunDates, $dowRunDates); + usort($combined, function ($a, $b) { + return $a->format('Y-m-d H:i:s') <=> $b->format('Y-m-d H:i:s'); + }); + if ($invert) { + $combined = array_reverse($combined); + } + + return $combined[$nth]; + } + + // Set a hard limit to bail on an impossible date + for ($i = 0; $i < $this->maxIterationCount; ++$i) { foreach ($parts as $position => $part) { $satisfied = false; // Get the field object used to validate this part $field = $fields[$position]; // Check if this is singular or a list - if (strpos($part, ',') === false) { - $satisfied = $field->isSatisfiedBy($nextRun, $part); + if (false === strpos($part, ',')) { + $satisfied = $field->isSatisfiedBy($nextRun, $part, $invert); } else { foreach (array_map('trim', explode(',', $part)) as $listPart) { - if ($field->isSatisfiedBy($nextRun, $listPart)) { + if ($field->isSatisfiedBy($nextRun, $listPart, $invert)) { $satisfied = true; + break; } } @@ -372,13 +526,14 @@ class CronExpression // If the field is not satisfied, then start over if (!$satisfied) { $field->increment($nextRun, $invert, $part); + continue 2; } } // Skip this match if needed if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { - $this->fieldFactory->getField(0)->increment($nextRun, $invert, isset($parts[0]) ? $parts[0] : null); + $this->fieldFactory->getField(self::MINUTE)->increment($nextRun, $invert, $parts[self::MINUTE] ?? null); continue; } @@ -393,19 +548,19 @@ class CronExpression /** * Workout what timeZone should be used. * - * @param string|\DateTimeInterface $currentTime Relative calculation date - * @param string|null $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface|null $currentTime Relative calculation date + * @param string|null $timeZone TimeZone to use instead of the system default * * @return string */ - protected function determineTimeZone($currentTime, $timeZone) + protected function determineTimeZone($currentTime, ?string $timeZone): string { - if (! is_null($timeZone)) { + if (null !== $timeZone) { return $timeZone; } - if ($currentTime instanceOf DateTimeInterface) { - return $currentTime->getTimeZone()->getName(); + if ($currentTime instanceof DateTimeInterface) { + return $currentTime->getTimezone()->getName(); } return date_default_timezone_get(); diff --git a/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php b/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php index d4552e06b..39ff59783 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php @@ -1,12 +1,14 @@ format('N'); if ($currentWeekday < 6) { @@ -55,81 +62,93 @@ class DayOfMonthField extends AbstractField } $lastDayOfMonth = $target->format('t'); - - foreach (array(-1, 1, -2, 2) as $i) { + foreach ([-1, 1, -2, 2] as $i) { $adjusted = $targetDay + $i; if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) { $target->setDate($currentYear, $currentMonth, $adjusted); - if ($target->format('N') < 6 && $target->format('m') == $currentMonth) { + + if ((int) $target->format('N') < 6 && (int) $target->format('m') === $currentMonth) { return $target; } } } + + return null; } /** - * @inheritDoc + * {@inheritdoc} */ - public function isSatisfiedBy(DateTimeInterface $date, $value) + public function isSatisfiedBy(DateTimeInterface $date, $value, bool $invert): bool { // ? states that the field value is to be skipped - if ($value == '?') { + if ('?' === $value) { return true; } $fieldValue = $date->format('d'); // Check to see if this is the last day of the month - if ($value == 'L') { - return $fieldValue == $date->format('t'); + if ('L' === $value) { + return $fieldValue === $date->format('t'); } // Check to see if this is the nearest weekday to a particular value - if (strpos($value, 'W')) { + if ($wPosition = strpos($value, 'W')) { // Parse the target day - $targetDay = substr($value, 0, strpos($value, 'W')); + $targetDay = (int) substr($value, 0, $wPosition); // Find out if the current day is the nearest day of the week - return $date->format('j') == self::getNearestWeekday( - $date->format('Y'), - $date->format('m'), + $nearest = self::getNearestWeekday( + (int) $date->format('Y'), + (int) $date->format('m'), $targetDay - )->format('j'); + ); + if ($nearest) { + return $date->format('j') === $nearest->format('j'); + } + + throw new \RuntimeException('Unable to return nearest weekday'); } - return $this->isSatisfied($date->format('d'), $value); + return $this->isSatisfied((int) $date->format('d'), $value); } /** * @inheritDoc * - * @param \DateTime|\DateTimeImmutable &$date + * @param \DateTime|\DateTimeImmutable $date */ - public function increment(DateTimeInterface &$date, $invert = false) + public function increment(DateTimeInterface &$date, $invert = false, $parts = null): FieldInterface { - if ($invert) { - $date = $date->modify('previous day')->setTime(23, 59); + if (! $invert) { + $date = $date->add(new \DateInterval('P1D')); + $date = $date->setTime(0, 0); } else { - $date = $date->modify('next day')->setTime(0, 0); + $date = $date->sub(new \DateInterval('P1D')); + $date = $date->setTime(23, 59); } return $this; } /** - * @inheritDoc + * {@inheritdoc} */ - public function validate($value) + public function validate(string $value): bool { $basicChecks = parent::validate($value); // Validate that a list don't have W or L - if (strpos($value, ',') !== false && (strpos($value, 'W') !== false || strpos($value, 'L') !== false)) { + if (false !== strpos($value, ',') && (false !== strpos($value, 'W') || false !== strpos($value, 'L'))) { return false; } if (!$basicChecks) { + if ('?' === $value) { + return true; + } - if ($value === 'L') { + if ('L' === $value) { return true; } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php b/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php index d4ba3156e..b9bbf48b6 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php @@ -1,13 +1,14 @@ 'MON', 2 => 'TUE', 3 => 'WED', 4 => 'THU', 5 => 'FRI', 6 => 'SAT', 7 => 'SUN']; @@ -52,42 +53,33 @@ class DayOfWeekField extends AbstractField /** * @inheritDoc - * - * @param \DateTime|\DateTimeImmutable $date */ - public function isSatisfiedBy(DateTimeInterface $date, $value) + public function isSatisfiedBy(DateTimeInterface $date, $value, bool $invert): bool { - if ($value == '?') { + if ('?' === $value) { return true; } // Convert text day of the week values to integers $value = $this->convertLiterals($value); - $currentYear = $date->format('Y'); - $currentMonth = $date->format('m'); - $lastDayOfMonth = $date->format('t'); + $currentYear = (int) $date->format('Y'); + $currentMonth = (int) $date->format('m'); + $lastDayOfMonth = (int) $date->format('t'); // Find out if this is the last specific weekday of the month - if (strpos($value, 'L')) { - $weekday = (int) $this->convertLiterals(substr($value, 0, strpos($value, 'L'))); + if ($lPosition = strpos($value, 'L')) { + $weekday = $this->convertLiterals(substr($value, 0, $lPosition)); $weekday %= 7; - $tdate = clone $date; - $tdate = $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); - while ($tdate->format('w') != $weekday) { - $tdateClone = new DateTime(); - $tdate = $tdateClone - ->setTimezone($tdate->getTimezone()) - ->setDate($currentYear, $currentMonth, --$lastDayOfMonth); - } - - return $date->format('j') == $lastDayOfMonth; + $daysInMonth = (int) $date->format('t'); + $remainingDaysInMonth = $daysInMonth - (int) $date->format('d'); + return (($weekday === (int) $date->format('w')) && ($remainingDaysInMonth < 7)); } // Handle # hash tokens if (strpos($value, '#')) { - list($weekday, $nth) = explode('#', $value); + [$weekday, $nth] = explode('#', $value); if (!is_numeric($nth)) { throw new InvalidArgumentException("Hashed weekdays must be numeric, {$nth} given"); @@ -96,23 +88,23 @@ class DayOfWeekField extends AbstractField } // 0 and 7 are both Sunday, however 7 matches date('N') format ISO-8601 - if ($weekday === '0') { + if ('0' === $weekday) { $weekday = 7; } - $weekday = $this->convertLiterals($weekday); + $weekday = (int) $this->convertLiterals((string) $weekday); // Validate the hash fields if ($weekday < 0 || $weekday > 7) { throw new InvalidArgumentException("Weekday must be a value between 0 and 7. {$weekday} given"); } - if (!in_array($nth, $this->nthRange)) { + if (!\in_array($nth, $this->nthRange, true)) { throw new InvalidArgumentException("There are never more than 5 or less than 1 of a given weekday in a month, {$nth} given"); } // The current weekday must match the targeted weekday to proceed - if ($date->format('N') != $weekday) { + if ((int) $date->format('N') !== $weekday) { return false; } @@ -121,7 +113,7 @@ class DayOfWeekField extends AbstractField $dayCount = 0; $currentDay = 1; while ($currentDay < $lastDayOfMonth + 1) { - if ($tdate->format('N') == $weekday) { + if ((int) $tdate->format('N') === $weekday) { if (++$dayCount >= $nth) { break; } @@ -129,57 +121,63 @@ class DayOfWeekField extends AbstractField $tdate = $tdate->setDate($currentYear, $currentMonth, ++$currentDay); } - return $date->format('j') == $currentDay; + return (int) $date->format('j') === $currentDay; } // Handle day of the week values - if (strpos($value, '-')) { + if (false !== strpos($value, '-')) { $parts = explode('-', $value); - if ($parts[0] == '7') { - $parts[0] = '0'; - } elseif ($parts[1] == '0') { - $parts[1] = '7'; + if ('7' === $parts[0]) { + $parts[0] = 0; + } elseif ('0' === $parts[1]) { + $parts[1] = 7; } $value = implode('-', $parts); } // Test to see which Sunday to use -- 0 == 7 == Sunday - $format = in_array(7, str_split($value)) ? 'N' : 'w'; - $fieldValue = $date->format($format); + $format = \in_array(7, array_map(function ($value) { + return (int) $value; + }, str_split($value)), true) ? 'N' : 'w'; + $fieldValue = (int) $date->format($format); return $this->isSatisfied($fieldValue, $value); } /** * @inheritDoc - * - * @param \DateTime|\DateTimeImmutable &$date */ - public function increment(DateTimeInterface &$date, $invert = false) + public function increment(DateTimeInterface &$date, $invert = false, $parts = null): FieldInterface { - if ($invert) { - $date = $date->modify('-1 day')->setTime(23, 59, 0); + if (! $invert) { + $date = $date->add(new \DateInterval('P1D')); + $date = $date->setTime(0, 0); } else { - $date = $date->modify('+1 day')->setTime(0, 0, 0); + $date = $date->sub(new \DateInterval('P1D')); + $date = $date->setTime(23, 59); } return $this; } /** - * @inheritDoc + * {@inheritdoc} */ - public function validate($value) + public function validate(string $value): bool { $basicChecks = parent::validate($value); if (!$basicChecks) { + if ('?' === $value) { + return true; + } + // Handle the # value - if (strpos($value, '#') !== false) { + if (false !== strpos($value, '#')) { $chunks = explode('#', $value); $chunks[0] = $this->convertLiterals($chunks[0]); - if (parent::validate($chunks[0]) && is_numeric($chunks[1]) && in_array($chunks[1], $this->nthRange)) { + if (parent::validate($chunks[0]) && is_numeric($chunks[1]) && \in_array((int) $chunks[1], $this->nthRange, true)) { return true; } } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php b/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php index 545e4b837..839b2757d 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php @@ -1,54 +1,52 @@ fields[$position])) { - switch ($position) { - case 0: - $this->fields[$position] = new MinutesField(); - break; - case 1: - $this->fields[$position] = new HoursField(); - break; - case 2: - $this->fields[$position] = new DayOfMonthField(); - break; - case 3: - $this->fields[$position] = new MonthField(); - break; - case 4: - $this->fields[$position] = new DayOfWeekField(); - break; - default: - throw new InvalidArgumentException( - ($position + 1) . ' is not a valid position' - ); - } + return $this->fields[$position] ?? $this->fields[$position] = $this->instantiateField($position); + } + + private function instantiateField(int $position): FieldInterface + { + switch ($position) { + case CronExpression::MINUTE: + return new MinutesField(); + case CronExpression::HOUR: + return new HoursField(); + case CronExpression::DAY: + return new DayOfMonthField(); + case CronExpression::MONTH: + return new MonthField(); + case CronExpression::WEEKDAY: + return new DayOfWeekField(); } - return $this->fields[$position]; + throw new InvalidArgumentException( + ($position + 1) . ' is not a valid position' + ); } } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/FieldFactoryInterface.php b/vendor/dragonmantank/cron-expression/src/Cron/FieldFactoryInterface.php new file mode 100644 index 000000000..8bd3c6581 --- /dev/null +++ b/vendor/dragonmantank/cron-expression/src/Cron/FieldFactoryInterface.php @@ -0,0 +1,8 @@ +format('H'); + $retval = $this->isSatisfied($checkValue, $value); + if ($retval) { + return $retval; } - return $this->isSatisfied($date->format('H'), $value); + // Are we on the edge of a transition + $lastTransition = $this->getPastTransition($date); + if (($lastTransition !== null) && ($lastTransition["ts"] > ((int) $date->format('U') - 3600))) { + $dtLastOffset = clone $date; + $this->timezoneSafeModify($dtLastOffset, "-1 hour"); + $lastOffset = $dtLastOffset->getOffset(); + + $dtNextOffset = clone $date; + $this->timezoneSafeModify($dtNextOffset, "+1 hour"); + $nextOffset = $dtNextOffset->getOffset(); + + $offsetChange = $nextOffset - $lastOffset; + if ($offsetChange >= 3600) { + $checkValue -= 1; + return $this->isSatisfied($checkValue, $value); + } + if ((! $invert) && ($offsetChange <= -3600)) { + $checkValue += 1; + return $this->isSatisfied($checkValue, $value); + } + } + + return $retval; + } + + public function getPastTransition(DateTimeInterface $date): ?array + { + $currentTimestamp = (int) $date->format('U'); + if ( + ($this->transitions === null) + || ($this->transitionsStart < ($currentTimestamp + 86400)) + || ($this->transitionsEnd > ($currentTimestamp - 86400)) + ) { + // We start a day before current time so we can differentiate between the first transition entry + // and a change that happens now + $dtLimitStart = clone $date; + $dtLimitStart = $dtLimitStart->modify("-12 months"); + $dtLimitEnd = clone $date; + $dtLimitEnd = $dtLimitEnd->modify('+12 months'); + + $this->transitions = $date->getTimezone()->getTransitions( + $dtLimitStart->getTimestamp(), + $dtLimitEnd->getTimestamp() + ); + if (empty($this->transitions)) { + return null; + } + $this->transitionsStart = $dtLimitStart->getTimestamp(); + $this->transitionsEnd = $dtLimitEnd->getTimestamp(); + } + + $nextTransition = null; + foreach ($this->transitions as $transition) { + if ($transition["ts"] > $currentTimestamp) { + continue; + } + + if (($nextTransition !== null) && ($transition["ts"] < $nextTransition["ts"])) { + continue; + } + + $nextTransition = $transition; + } + + return ($nextTransition ?? null); } /** - * {@inheritDoc} + * {@inheritdoc} * - * @param \DateTime|\DateTimeImmutable &$date * @param string|null $parts */ - public function increment(DateTimeInterface &$date, $invert = false, $parts = null) + public function increment(DateTimeInterface &$date, $invert = false, $parts = null): FieldInterface { + $originalTimestamp = (int) $date->format('U'); + // Change timezone to UTC temporarily. This will // allow us to go back or forwards and hour even // if DST will be changed between the hours. - if (is_null($parts) || $parts == '*') { - $timezone = $date->getTimezone(); - $date = $date->setTimezone(new DateTimeZone('UTC')); - $date = $date->modify(($invert ? '-' : '+') . '1 hour'); - $date = $date->setTimezone($timezone); + if (null === $parts || '*' === $parts) { + if ($invert) { + $date = $date->sub(new \DateInterval('PT1H')); + } else { + $date = $date->add(new \DateInterval('PT1H')); + } - $date = $date->setTime($date->format('H'), $invert ? 59 : 0); + $date = $this->setTimeHour($date, $invert, $originalTimestamp); return $this; } - $parts = strpos($parts, ',') !== false ? explode(',', $parts) : array($parts); - $hours = array(); + $parts = false !== strpos($parts, ',') ? explode(',', $parts) : [$parts]; + $hours = []; foreach ($parts as $part) { $hours = array_merge($hours, $this->getRangeForExpression($part, 23)); } - $current_hour = $date->format('H'); - $position = $invert ? count($hours) - 1 : 0; - if (count($hours) > 1) { - for ($i = 0; $i < count($hours) - 1; $i++) { + $current_hour = (int) $date->format('H'); + $position = $invert ? \count($hours) - 1 : 0; + $countHours = \count($hours); + if ($countHours > 1) { + for ($i = 0; $i < $countHours - 1; ++$i) { if ((!$invert && $current_hour >= $hours[$i] && $current_hour < $hours[$i + 1]) || ($invert && $current_hour > $hours[$i] && $current_hour <= $hours[$i + 1])) { $position = $invert ? $i : $i + 1; + break; } } } - $hour = $hours[$position]; - if ((!$invert && $date->format('H') >= $hour) || ($invert && $date->format('H') <= $hour)) { - $date = $date->modify(($invert ? '-' : '+') . '1 day'); - $date = $date->setTime($invert ? 23 : 0, $invert ? 59 : 0); + $target = (int) $hours[$position]; + $originalHour = (int)$date->format('H'); + + $originalDay = (int)$date->format('d'); + $previousOffset = $date->getOffset(); + + if (! $invert) { + if ($originalHour >= $target) { + $distance = 24 - $originalHour; + $date = $this->timezoneSafeModify($date, "+{$distance} hours"); + + $actualDay = (int)$date->format('d'); + $actualHour = (int)$date->format('H'); + if (($actualDay !== ($originalDay + 1)) && ($actualHour !== 0)) { + $offsetChange = ($previousOffset - $date->getOffset()); + $date = $this->timezoneSafeModify($date, "+{$offsetChange} seconds"); + } + + $originalHour = (int)$date->format('H'); + } + + $distance = $target - $originalHour; + $date = $this->timezoneSafeModify($date, "+{$distance} hours"); + } else { + if ($originalHour <= $target) { + $distance = ($originalHour + 1); + $date = $this->timezoneSafeModify($date, "-" . $distance . " hours"); + + $actualDay = (int)$date->format('d'); + $actualHour = (int)$date->format('H'); + if (($actualDay !== ($originalDay - 1)) && ($actualHour !== 23)) { + $offsetChange = ($previousOffset - $date->getOffset()); + $date = $this->timezoneSafeModify($date, "+{$offsetChange} seconds"); + } + + $originalHour = (int)$date->format('H'); + } + + $distance = $originalHour - $target; + $date = $this->timezoneSafeModify($date, "-{$distance} hours"); } - else { - $date = $date->setTime($hour, $invert ? 59 : 0); + + $date = $this->setTimeHour($date, $invert, $originalTimestamp); + + $actualHour = (int)$date->format('H'); + if ($invert && ($actualHour === ($target - 1) || (($actualHour === 23) && ($target === 0)))) { + $date = $this->timezoneSafeModify($date, "+1 hour"); } return $this; diff --git a/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php b/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php index fecc9b6da..eda91098e 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php @@ -1,73 +1,94 @@ isSatisfied($date->format('i'), $value); + return $this->isSatisfied((int)$date->format('i'), $value); } /** + * {@inheritdoc} * {@inheritDoc} * - * @param \DateTime|\DateTimeImmutable &$date * @param string|null $parts */ - public function increment(DateTimeInterface &$date, $invert = false, $parts = null) + public function increment(DateTimeInterface &$date, $invert = false, $parts = null): FieldInterface { if (is_null($parts)) { - $date = $date->modify(($invert ? '-' : '+') . '1 minute'); + $date = $this->timezoneSafeModify($date, ($invert ? "-" : "+") ."1 minute"); return $this; } - $parts = strpos($parts, ',') !== false ? explode(',', $parts) : array($parts); - $minutes = array(); + $current_minute = (int) $date->format('i'); + + $parts = false !== strpos($parts, ',') ? explode(',', $parts) : [$parts]; + $minutes = []; foreach ($parts as $part) { $minutes = array_merge($minutes, $this->getRangeForExpression($part, 59)); } - $current_minute = $date->format('i'); - $position = $invert ? count($minutes) - 1 : 0; - if (count($minutes) > 1) { - for ($i = 0; $i < count($minutes) - 1; $i++) { + $position = $invert ? \count($minutes) - 1 : 0; + if (\count($minutes) > 1) { + for ($i = 0; $i < \count($minutes) - 1; ++$i) { if ((!$invert && $current_minute >= $minutes[$i] && $current_minute < $minutes[$i + 1]) || ($invert && $current_minute > $minutes[$i] && $current_minute <= $minutes[$i + 1])) { $position = $invert ? $i : $i + 1; + break; } } } - if ((!$invert && $current_minute >= $minutes[$position]) || ($invert && $current_minute <= $minutes[$position])) { - $date = $date->modify(($invert ? '-' : '+') . '1 hour'); - $date = $date->setTime($date->format('H'), $invert ? 59 : 0); - } - else { - $date = $date->setTime($date->format('H'), $minutes[$position]); + $target = (int) $minutes[$position]; + $originalMinute = (int) $date->format("i"); + + if (! $invert) { + if ($originalMinute >= $target) { + $distance = 60 - $originalMinute; + $date = $this->timezoneSafeModify($date, "+{$distance} minutes"); + + $originalMinute = (int) $date->format("i"); + } + + $distance = $target - $originalMinute; + $date = $this->timezoneSafeModify($date, "+{$distance} minutes"); + } else { + if ($originalMinute <= $target) { + $distance = ($originalMinute + 1); + $date = $this->timezoneSafeModify($date, "-{$distance} minutes"); + + $originalMinute = (int) $date->format("i"); + } + + $distance = $originalMinute - $target; + $date = $this->timezoneSafeModify($date, "-{$distance} minutes"); } return $this; diff --git a/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php b/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php index afc9caff2..5a15fbb8b 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php @@ -1,59 +1,61 @@ 'JAN', 2 => 'FEB', 3 => 'MAR', 4 => 'APR', 5 => 'MAY', 6 => 'JUN', 7 => 'JUL', - 8 => 'AUG', 9 => 'SEP', 10 => 'OCT', 11 => 'NOV', 12 => 'DEC']; + 8 => 'AUG', 9 => 'SEP', 10 => 'OCT', 11 => 'NOV', 12 => 'DEC', ]; /** - * @inheritDoc + * {@inheritdoc} */ - public function isSatisfiedBy(DateTimeInterface $date, $value) + public function isSatisfiedBy(DateTimeInterface $date, $value, bool $invert): bool { - if ($value == '?') { + if ($value === '?') { return true; } $value = $this->convertLiterals($value); - return $this->isSatisfied($date->format('m'), $value); + return $this->isSatisfied((int) $date->format('m'), $value); } /** * @inheritDoc * - * @param \DateTime|\DateTimeImmutable &$date + * @param \DateTime|\DateTimeImmutable $date */ - public function increment(DateTimeInterface &$date, $invert = false) + public function increment(DateTimeInterface &$date, $invert = false, $parts = null): FieldInterface { - if ($invert) { - $date = $date->modify('last day of previous month')->setTime(23, 59); + if (! $invert) { + $date = $date->modify('first day of next month'); + $date = $date->setTime(0, 0); } else { - $date = $date->modify('first day of next month')->setTime(0, 0); + $date = $date->modify('last day of previous month'); + $date = $date->setTime(23, 59); } return $this; } - - } diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/AbstractFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/AbstractFieldTest.php deleted file mode 100644 index 38114392e..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/AbstractFieldTest.php +++ /dev/null @@ -1,139 +0,0 @@ - - */ -class AbstractFieldTest extends TestCase -{ - /** - * @covers \Cron\AbstractField::isRange - */ - public function testTestsIfRange() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->isRange('1-2')); - $this->assertFalse($f->isRange('2')); - } - - /** - * @covers \Cron\AbstractField::isIncrementsOfRanges - */ - public function testTestsIfIncrementsOfRanges() - { - $f = new DayOfWeekField(); - $this->assertFalse($f->isIncrementsOfRanges('1-2')); - $this->assertTrue($f->isIncrementsOfRanges('1/2')); - $this->assertTrue($f->isIncrementsOfRanges('*/2')); - $this->assertTrue($f->isIncrementsOfRanges('3-12/2')); - } - - /** - * @covers \Cron\AbstractField::isInRange - */ - public function testTestsIfInRange() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->isInRange('1', '1-2')); - $this->assertTrue($f->isInRange('2', '1-2')); - $this->assertTrue($f->isInRange('5', '4-12')); - $this->assertFalse($f->isInRange('3', '4-12')); - $this->assertFalse($f->isInRange('13', '4-12')); - } - - /** - * @covers \Cron\AbstractField::isInIncrementsOfRanges - */ - public function testTestsIfInIncrementsOfRangesOnZeroStartRange() - { - $f = new MinutesField(); - $this->assertTrue($f->isInIncrementsOfRanges('3', '3-59/2')); - $this->assertTrue($f->isInIncrementsOfRanges('13', '3-59/2')); - $this->assertTrue($f->isInIncrementsOfRanges('15', '3-59/2')); - $this->assertTrue($f->isInIncrementsOfRanges('14', '*/2')); - $this->assertFalse($f->isInIncrementsOfRanges('2', '3-59/13')); - $this->assertFalse($f->isInIncrementsOfRanges('14', '*/13')); - $this->assertFalse($f->isInIncrementsOfRanges('14', '3-59/2')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '2-59')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '2')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '*')); - $this->assertFalse($f->isInIncrementsOfRanges('0', '*/0')); - $this->assertFalse($f->isInIncrementsOfRanges('1', '*/0')); - - $this->assertTrue($f->isInIncrementsOfRanges('4', '4/1')); - $this->assertFalse($f->isInIncrementsOfRanges('14', '4/1')); - $this->assertFalse($f->isInIncrementsOfRanges('34', '4/1')); - } - - /** - * @covers \Cron\AbstractField::isInIncrementsOfRanges - */ - public function testTestsIfInIncrementsOfRangesOnOneStartRange() - { - $f = new MonthField(); - $this->assertTrue($f->isInIncrementsOfRanges('3', '3-12/2')); - $this->assertFalse($f->isInIncrementsOfRanges('13', '3-12/2')); - $this->assertFalse($f->isInIncrementsOfRanges('15', '3-12/2')); - $this->assertTrue($f->isInIncrementsOfRanges('3', '*/2')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '*/3')); - $this->assertTrue($f->isInIncrementsOfRanges('7', '*/3')); - $this->assertFalse($f->isInIncrementsOfRanges('14', '3-12/2')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '2-12')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '2')); - $this->assertFalse($f->isInIncrementsOfRanges('3', '*')); - $this->assertFalse($f->isInIncrementsOfRanges('0', '*/0')); - $this->assertFalse($f->isInIncrementsOfRanges('1', '*/0')); - - $this->assertTrue($f->isInIncrementsOfRanges('4', '4/1')); - $this->assertFalse($f->isInIncrementsOfRanges('14', '4/1')); - $this->assertFalse($f->isInIncrementsOfRanges('34', '4/1')); - } - - /** - * @covers \Cron\AbstractField::isSatisfied - */ - public function testTestsIfSatisfied() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->isSatisfied('12', '3-13')); - $this->assertFalse($f->isSatisfied('15', '3-7/2')); - $this->assertTrue($f->isSatisfied('12', '*')); - $this->assertTrue($f->isSatisfied('12', '12')); - $this->assertFalse($f->isSatisfied('12', '3-11')); - $this->assertFalse($f->isSatisfied('12', '3-7/2')); - $this->assertFalse($f->isSatisfied('12', '11')); - } - - /** - * Allows ranges and lists to coexist in the same expression - * - * @see https://github.com/dragonmantank/cron-expression/issues/5 - */ - public function testAllowRangesAndLists() - { - $expression = '5-7,11-13'; - $f = new HoursField(); - $this->assertTrue($f->validate($expression)); - } - - /** - * Makes sure that various types of ranges expand out properly - * - * @see https://github.com/dragonmantank/cron-expression/issues/5 - */ - public function testGetRangeForExpressionExpandsCorrectly() - { - $f = new HoursField(); - $this->assertSame([5, 6, 7, 11, 12, 13], $f->getRangeForExpression('5-7,11-13', 23)); - $this->assertSame(['5', '6', '7', '11', '12', '13'], $f->getRangeForExpression('5,6,7,11,12,13', 23)); - $this->assertSame([0, 6, 12, 18], $f->getRangeForExpression('*/6', 23)); - $this->assertSame([5, 11], $f->getRangeForExpression('5-13/6', 23)); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php deleted file mode 100644 index 8810d43da..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php +++ /dev/null @@ -1,589 +0,0 @@ - - */ -class CronExpressionTest extends TestCase -{ - /** - * @covers \Cron\CronExpression::factory - */ - public function testFactoryRecognizesTemplates() - { - $this->assertSame('0 0 1 1 *', CronExpression::factory('@annually')->getExpression()); - $this->assertSame('0 0 1 1 *', CronExpression::factory('@yearly')->getExpression()); - $this->assertSame('0 0 * * 0', CronExpression::factory('@weekly')->getExpression()); - } - - /** - * @covers \Cron\CronExpression::__construct - * @covers \Cron\CronExpression::getExpression - * @covers \Cron\CronExpression::__toString - */ - public function testParsesCronSchedule() - { - // '2010-09-10 12:00:00' - $cron = CronExpression::factory('1 2-4 * 4,5,6 */3'); - $this->assertSame('1', $cron->getExpression(CronExpression::MINUTE)); - $this->assertSame('2-4', $cron->getExpression(CronExpression::HOUR)); - $this->assertSame('*', $cron->getExpression(CronExpression::DAY)); - $this->assertSame('4,5,6', $cron->getExpression(CronExpression::MONTH)); - $this->assertSame('*/3', $cron->getExpression(CronExpression::WEEKDAY)); - $this->assertSame('1 2-4 * 4,5,6 */3', $cron->getExpression()); - $this->assertSame('1 2-4 * 4,5,6 */3', (string) $cron); - $this->assertNull($cron->getExpression('foo')); - } - - /** - * @covers \Cron\CronExpression::__construct - * @covers \Cron\CronExpression::getExpression - * @covers \Cron\CronExpression::__toString - */ - public function testParsesCronScheduleThrowsAnException() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Invalid CRON field value A at position 0'); - - CronExpression::factory('A 1 2 3 4'); - } - - /** - * @covers \Cron\CronExpression::__construct - * @covers \Cron\CronExpression::getExpression - * @dataProvider scheduleWithDifferentSeparatorsProvider - */ - public function testParsesCronScheduleWithAnySpaceCharsAsSeparators($schedule, array $expected) - { - $cron = CronExpression::factory($schedule); - $this->assertSame($expected[0], $cron->getExpression(CronExpression::MINUTE)); - $this->assertSame($expected[1], $cron->getExpression(CronExpression::HOUR)); - $this->assertSame($expected[2], $cron->getExpression(CronExpression::DAY)); - $this->assertSame($expected[3], $cron->getExpression(CronExpression::MONTH)); - $this->assertSame($expected[4], $cron->getExpression(CronExpression::WEEKDAY)); - } - - /** - * Data provider for testParsesCronScheduleWithAnySpaceCharsAsSeparators - * - * @return array - */ - public static function scheduleWithDifferentSeparatorsProvider() - { - return array( - array("*\t*\t*\t*\t*\t", array('*', '*', '*', '*', '*', '*')), - array("* * * * * ", array('*', '*', '*', '*', '*', '*')), - array("* \t * \t * \t * \t * \t", array('*', '*', '*', '*', '*', '*')), - array("*\t \t*\t \t*\t \t*\t \t*\t \t", array('*', '*', '*', '*', '*', '*')), - ); - } - - /** - * @covers \Cron\CronExpression::__construct - * @covers \Cron\CronExpression::setExpression - * @covers \Cron\CronExpression::setPart - */ - public function testInvalidCronsWillFail() - { - $this->expectException(\InvalidArgumentException::class); - - // Only four values - $cron = CronExpression::factory('* * * 1'); - } - - /** - * @covers \Cron\CronExpression::setPart - */ - public function testInvalidPartsWillFail() - { - $this->expectException(\InvalidArgumentException::class); - - // Only four values - $cron = CronExpression::factory('* * * * *'); - $cron->setPart(1, 'abc'); - } - - /** - * Data provider for cron schedule - * - * @return array - */ - public function scheduleProvider() - { - return array( - array('*/2 */2 * * *', '2015-08-10 21:47:27', '2015-08-10 22:00:00', false), - array('* * * * *', '2015-08-10 21:50:37', '2015-08-10 21:50:00', true), - array('* 20,21,22 * * *', '2015-08-10 21:50:00', '2015-08-10 21:50:00', true), - // Handles CSV values - array('* 20,22 * * *', '2015-08-10 21:50:00', '2015-08-10 22:00:00', false), - // CSV values can be complex - array('7-9 * */9 * *', '2015-08-10 22:02:33', '2015-08-10 22:07:00', false), - // 15th minute, of the second hour, every 15 days, in January, every Friday - array('1 * * * 7', '2015-08-10 21:47:27', '2015-08-16 00:01:00', false), - // Test with exact times - array('47 21 * * *', strtotime('2015-08-10 21:47:30'), '2015-08-10 21:47:00', true), - // Test Day of the week (issue #1) - // According cron implementation, 0|7 = sunday, 1 => monday, etc - array('* * * * 0', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), - array('* * * * 7', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), - array('* * * * 1', strtotime('2011-06-15 23:09:00'), '2011-06-20 00:00:00', false), - // Should return the sunday date as 7 equals 0 - array('0 0 * * MON,SUN', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), - array('0 0 * * 1,7', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), - array('0 0 * * 0-4', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), - array('0 0 * * 7-4', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), - array('0 0 * * 4-7', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), - array('0 0 * * 7-3', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), - array('0 0 * * 3-7', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), - array('0 0 * * 3-7', strtotime('2011-06-18 23:09:00'), '2011-06-19 00:00:00', false), - // Test lists of values and ranges (Abhoryo) - array('0 0 * * 2-7', strtotime('2011-06-20 23:09:00'), '2011-06-21 00:00:00', false), - array('0 0 * * 2-7', strtotime('2011-06-18 23:09:00'), '2011-06-19 00:00:00', false), - array('0 0 * * 4-7', strtotime('2011-07-19 00:00:00'), '2011-07-21 00:00:00', false), - // Test increments of ranges - array('0-12/4 * * * *', strtotime('2011-06-20 12:04:00'), '2011-06-20 12:04:00', true), - array('4-59/2 * * * *', strtotime('2011-06-20 12:04:00'), '2011-06-20 12:04:00', true), - array('4-59/2 * * * *', strtotime('2011-06-20 12:06:00'), '2011-06-20 12:06:00', true), - array('4-59/3 * * * *', strtotime('2011-06-20 12:06:00'), '2011-06-20 12:07:00', false), - // Test Day of the Week and the Day of the Month (issue #1) - array('0 0 1 1 0', strtotime('2011-06-15 23:09:00'), '2012-01-01 00:00:00', false), - array('0 0 1 JAN 0', strtotime('2011-06-15 23:09:00'), '2012-01-01 00:00:00', false), - array('0 0 1 * 0', strtotime('2011-06-15 23:09:00'), '2012-01-01 00:00:00', false), - // Test the W day of the week modifier for day of the month field - array('0 0 2W * *', strtotime('2011-07-01 00:00:00'), '2011-07-01 00:00:00', true), - array('0 0 1W * *', strtotime('2011-05-01 00:00:00'), '2011-05-02 00:00:00', false), - array('0 0 1W * *', strtotime('2011-07-01 00:00:00'), '2011-07-01 00:00:00', true), - array('0 0 3W * *', strtotime('2011-07-01 00:00:00'), '2011-07-04 00:00:00', false), - array('0 0 16W * *', strtotime('2011-07-01 00:00:00'), '2011-07-15 00:00:00', false), - array('0 0 28W * *', strtotime('2011-07-01 00:00:00'), '2011-07-28 00:00:00', false), - array('0 0 30W * *', strtotime('2011-07-01 00:00:00'), '2011-07-29 00:00:00', false), - array('0 0 31W * *', strtotime('2011-07-01 00:00:00'), '2011-07-29 00:00:00', false), - // Test the last weekday of a month - array('* * * * 5L', strtotime('2011-07-01 00:00:00'), '2011-07-29 00:00:00', false), - array('* * * * 6L', strtotime('2011-07-01 00:00:00'), '2011-07-30 00:00:00', false), - array('* * * * 7L', strtotime('2011-07-01 00:00:00'), '2011-07-31 00:00:00', false), - array('* * * * 1L', strtotime('2011-07-24 00:00:00'), '2011-07-25 00:00:00', false), - array('* * * 1 5L', strtotime('2011-12-25 00:00:00'), '2012-01-27 00:00:00', false), - // Test the hash symbol for the nth weekday of a given month - array('* * * * 5#2', strtotime('2011-07-01 00:00:00'), '2011-07-08 00:00:00', false), - array('* * * * 5#1', strtotime('2011-07-01 00:00:00'), '2011-07-01 00:00:00', true), - array('* * * * 3#4', strtotime('2011-07-01 00:00:00'), '2011-07-27 00:00:00', false), - - // Issue #7, documented example failed - ['3-59/15 6-12 */15 1 2-5', strtotime('2017-01-08 00:00:00'), '2017-01-31 06:03:00', false], - - // https://github.com/laravel/framework/commit/07d160ac3cc9764d5b429734ffce4fa311385403 - ['* * * * MON-FRI', strtotime('2017-01-08 00:00:00'), strtotime('2017-01-09 00:00:00'), false], - ['* * * * TUE', strtotime('2017-01-08 00:00:00'), strtotime('2017-01-10 00:00:00'), false], - ); - } - - /** - * @covers \Cron\CronExpression::isDue - * @covers \Cron\CronExpression::getNextRunDate - * @covers \Cron\DayOfMonthField - * @covers \Cron\DayOfWeekField - * @covers \Cron\MinutesField - * @covers \Cron\HoursField - * @covers \Cron\MonthField - * @covers \Cron\CronExpression::getRunDate - * @dataProvider scheduleProvider - */ - public function testDeterminesIfCronIsDue($schedule, $relativeTime, $nextRun, $isDue) - { - $relativeTimeString = is_int($relativeTime) ? date('Y-m-d H:i:s', $relativeTime) : $relativeTime; - - // Test next run date - $cron = CronExpression::factory($schedule); - if (is_string($relativeTime)) { - $relativeTime = new DateTime($relativeTime); - } elseif (is_int($relativeTime)) { - $relativeTime = date('Y-m-d H:i:s', $relativeTime); - } - - if (is_string($nextRun)) { - $nextRunDate = new DateTime($nextRun); - } elseif (is_int($nextRun)) { - $nextRunDate = new DateTime(); - $nextRunDate->setTimestamp($nextRun); - } - $this->assertSame($isDue, $cron->isDue($relativeTime)); - $next = $cron->getNextRunDate($relativeTime, 0, true); - - $this->assertEquals($nextRunDate, $next); - } - - /** - * @covers \Cron\CronExpression::isDue - */ - public function testIsDueHandlesDifferentDates() - { - $cron = CronExpression::factory('* * * * *'); - $this->assertTrue($cron->isDue()); - $this->assertTrue($cron->isDue('now')); - $this->assertTrue($cron->isDue(new DateTime('now'))); - $this->assertTrue($cron->isDue(date('Y-m-d H:i'))); - $this->assertTrue($cron->isDue(new DateTimeImmutable('now'))); - } - - /** - * @covers \Cron\CronExpression::isDue - */ - public function testIsDueHandlesDifferentDefaultTimezones() - { - $originalTimezone = date_default_timezone_get(); - $cron = CronExpression::factory('0 15 * * 3'); //Wednesday at 15:00 - $date = '2014-01-01 15:00'; //Wednesday - - date_default_timezone_set('UTC'); - $this->assertTrue($cron->isDue(new DateTime($date), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date), 'Europe/Amsterdam')); - $this->assertFalse($cron->isDue(new DateTime($date), 'Asia/Tokyo')); - - date_default_timezone_set('Europe/Amsterdam'); - $this->assertFalse($cron->isDue(new DateTime($date), 'UTC')); - $this->assertTrue($cron->isDue(new DateTime($date), 'Europe/Amsterdam')); - $this->assertFalse($cron->isDue(new DateTime($date), 'Asia/Tokyo')); - - date_default_timezone_set('Asia/Tokyo'); - $this->assertFalse($cron->isDue(new DateTime($date), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date), 'Europe/Amsterdam')); - $this->assertTrue($cron->isDue(new DateTime($date), 'Asia/Tokyo')); - - date_default_timezone_set($originalTimezone); - } - - /** - * @covers \Cron\CronExpression::isDue - */ - public function testIsDueHandlesDifferentSuppliedTimezones() - { - $cron = CronExpression::factory('0 15 * * 3'); //Wednesday at 15:00 - $date = '2014-01-01 15:00'; //Wednesday - - $this->assertTrue($cron->isDue(new DateTime($date, new DateTimeZone('UTC')), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date, new DateTimeZone('UTC')), 'Europe/Amsterdam')); - $this->assertFalse($cron->isDue(new DateTime($date, new DateTimeZone('UTC')), 'Asia/Tokyo')); - - $this->assertFalse($cron->isDue(new DateTime($date, new DateTimeZone('Europe/Amsterdam')), 'UTC')); - $this->assertTrue($cron->isDue(new DateTime($date, new DateTimeZone('Europe/Amsterdam')), 'Europe/Amsterdam')); - $this->assertFalse($cron->isDue(new DateTime($date, new DateTimeZone('Europe/Amsterdam')), 'Asia/Tokyo')); - - $this->assertFalse($cron->isDue(new DateTime($date, new DateTimeZone('Asia/Tokyo')), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date, new DateTimeZone('Asia/Tokyo')), 'Europe/Amsterdam')); - $this->assertTrue($cron->isDue(new DateTime($date, new DateTimeZone('Asia/Tokyo')), 'Asia/Tokyo')); - } - - /** - * @covers Cron\CronExpression::isDue - */ - public function testIsDueHandlesDifferentTimezonesAsArgument() - { - $cron = CronExpression::factory('0 15 * * 3'); //Wednesday at 15:00 - $date = '2014-01-01 15:00'; //Wednesday - $utc = new \DateTimeZone('UTC'); - $amsterdam = new \DateTimeZone('Europe/Amsterdam'); - $tokyo = new \DateTimeZone('Asia/Tokyo'); - $this->assertTrue($cron->isDue(new DateTime($date, $utc), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date, $amsterdam), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date, $tokyo), 'UTC')); - $this->assertFalse($cron->isDue(new DateTime($date, $utc), 'Europe/Amsterdam')); - $this->assertTrue($cron->isDue(new DateTime($date, $amsterdam), 'Europe/Amsterdam')); - $this->assertFalse($cron->isDue(new DateTime($date, $tokyo), 'Europe/Amsterdam')); - $this->assertFalse($cron->isDue(new DateTime($date, $utc), 'Asia/Tokyo')); - $this->assertFalse($cron->isDue(new DateTime($date, $amsterdam), 'Asia/Tokyo')); - $this->assertTrue($cron->isDue(new DateTime($date, $tokyo), 'Asia/Tokyo')); - } - - /** - * @covers Cron\CronExpression::isDue - */ - public function testRecognisesTimezonesAsPartOfDateTime() - { - $cron = CronExpression::factory("0 7 * * *"); - $tzCron = "America/New_York"; - $tzServer = new \DateTimeZone("Europe/London"); - - $dtCurrent = \DateTime::createFromFormat("!Y-m-d H:i:s", "2017-10-17 10:00:00", $tzServer); - $dtPrev = $cron->getPreviousRunDate($dtCurrent, 0, true, $tzCron); - $this->assertEquals('1508151600 : 2017-10-16T07:00:00-04:00 : America/New_York', $dtPrev->format("U \: c \: e")); - - $dtCurrent = \DateTimeImmutable::createFromFormat("!Y-m-d H:i:s", "2017-10-17 10:00:00", $tzServer); - $dtPrev = $cron->getPreviousRunDate($dtCurrent, 0, true, $tzCron); - $this->assertEquals('1508151600 : 2017-10-16T07:00:00-04:00 : America/New_York', $dtPrev->format("U \: c \: e")); - - $dtCurrent = \DateTimeImmutable::createFromFormat("!Y-m-d H:i:s", "2017-10-17 10:00:00", $tzServer); - $dtPrev = $cron->getPreviousRunDate($dtCurrent->format("c"), 0, true, $tzCron); - $this->assertEquals('1508151600 : 2017-10-16T07:00:00-04:00 : America/New_York', $dtPrev->format("U \: c \: e")); - - $dtCurrent = \DateTimeImmutable::createFromFormat("!Y-m-d H:i:s", "2017-10-17 10:00:00", $tzServer); - $dtPrev = $cron->getPreviousRunDate($dtCurrent->format("\@U"), 0, true, $tzCron); - $this->assertEquals('1508151600 : 2017-10-16T07:00:00-04:00 : America/New_York', $dtPrev->format("U \: c \: e")); - - } - - - /** - * @covers \Cron\CronExpression::getPreviousRunDate - */ - public function testCanGetPreviousRunDates() - { - $cron = CronExpression::factory('* * * * *'); - $next = $cron->getNextRunDate('now'); - $two = $cron->getNextRunDate('now', 1); - $this->assertEquals($next, $cron->getPreviousRunDate($two)); - - $cron = CronExpression::factory('* */2 * * *'); - $next = $cron->getNextRunDate('now'); - $two = $cron->getNextRunDate('now', 1); - $this->assertEquals($next, $cron->getPreviousRunDate($two)); - - $cron = CronExpression::factory('* * * */2 *'); - $next = $cron->getNextRunDate('now'); - $two = $cron->getNextRunDate('now', 1); - $this->assertEquals($next, $cron->getPreviousRunDate($two)); - } - - /** - * @covers \Cron\CronExpression::getMultipleRunDates - */ - public function testProvidesMultipleRunDates() - { - $cron = CronExpression::factory('*/2 * * * *'); - $this->assertEquals(array( - new DateTime('2008-11-09 00:00:00'), - new DateTime('2008-11-09 00:02:00'), - new DateTime('2008-11-09 00:04:00'), - new DateTime('2008-11-09 00:06:00') - ), $cron->getMultipleRunDates(4, '2008-11-09 00:00:00', false, true)); - } - - /** - * @covers \Cron\CronExpression::getMultipleRunDates - * @covers \Cron\CronExpression::setMaxIterationCount - */ - public function testProvidesMultipleRunDatesForTheFarFuture() { - // Fails with the default 1000 iteration limit - $cron = CronExpression::factory('0 0 12 1 *'); - $cron->setMaxIterationCount(2000); - $this->assertEquals(array( - new DateTime('2016-01-12 00:00:00'), - new DateTime('2017-01-12 00:00:00'), - new DateTime('2018-01-12 00:00:00'), - new DateTime('2019-01-12 00:00:00'), - new DateTime('2020-01-12 00:00:00'), - new DateTime('2021-01-12 00:00:00'), - new DateTime('2022-01-12 00:00:00'), - new DateTime('2023-01-12 00:00:00'), - new DateTime('2024-01-12 00:00:00'), - ), $cron->getMultipleRunDates(9, '2015-04-28 00:00:00', false, true)); - } - - /** - * @covers \Cron\CronExpression - */ - public function testCanIterateOverNextRuns() - { - $cron = CronExpression::factory('@weekly'); - $nextRun = $cron->getNextRunDate("2008-11-09 08:00:00"); - $this->assertEquals($nextRun, new DateTime("2008-11-16 00:00:00")); - - // true is cast to 1 - $nextRun = $cron->getNextRunDate("2008-11-09 00:00:00", true, true); - $this->assertEquals($nextRun, new DateTime("2008-11-16 00:00:00")); - - // You can iterate over them - $nextRun = $cron->getNextRunDate($cron->getNextRunDate("2008-11-09 00:00:00", 1, true), 1, true); - $this->assertEquals($nextRun, new DateTime("2008-11-23 00:00:00")); - - // You can skip more than one - $nextRun = $cron->getNextRunDate("2008-11-09 00:00:00", 2, true); - $this->assertEquals($nextRun, new DateTime("2008-11-23 00:00:00")); - $nextRun = $cron->getNextRunDate("2008-11-09 00:00:00", 3, true); - $this->assertEquals($nextRun, new DateTime("2008-11-30 00:00:00")); - } - - /** - * @covers \Cron\CronExpression::getRunDate - */ - public function testGetRunDateHandlesDifferentDates() - { - $cron = CronExpression::factory('@weekly'); - $date = new DateTime("2019-03-10 00:00:00"); - $this->assertEquals($date, $cron->getNextRunDate("2019-03-03 08:00:00")); - $this->assertEquals($date, $cron->getNextRunDate(new DateTime("2019-03-03 08:00:00"))); - $this->assertEquals($date, $cron->getNextRunDate(new DateTimeImmutable("2019-03-03 08:00:00"))); - } - - /** - * @covers \Cron\CronExpression::getRunDate - */ - public function testSkipsCurrentDateByDefault() - { - $cron = CronExpression::factory('* * * * *'); - $current = new DateTime('now'); - $next = $cron->getNextRunDate($current); - $nextPrev = $cron->getPreviousRunDate($next); - $this->assertSame($current->format('Y-m-d H:i:00'), $nextPrev->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\CronExpression::getRunDate - * @ticket 7 - */ - public function testStripsForSeconds() - { - $cron = CronExpression::factory('* * * * *'); - $current = new DateTime('2011-09-27 10:10:54'); - $this->assertSame('2011-09-27 10:11:00', $cron->getNextRunDate($current)->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\CronExpression::getRunDate - */ - public function testFixesPhpBugInDateIntervalMonth() - { - $cron = CronExpression::factory('0 0 27 JAN *'); - $this->assertSame('2011-01-27 00:00:00', $cron->getPreviousRunDate('2011-08-22 00:00:00')->format('Y-m-d H:i:s')); - } - - public function testIssue29() - { - $cron = CronExpression::factory('@weekly'); - $this->assertSame( - '2013-03-10 00:00:00', - $cron->getPreviousRunDate('2013-03-17 00:00:00')->format('Y-m-d H:i:s') - ); - } - - /** - * @see https://github.com/mtdowling/cron-expression/issues/20 - */ - public function testIssue20() { - $e = CronExpression::factory('* * * * MON#1'); - $this->assertTrue($e->isDue(new DateTime('2014-04-07 00:00:00'))); - $this->assertFalse($e->isDue(new DateTime('2014-04-14 00:00:00'))); - $this->assertFalse($e->isDue(new DateTime('2014-04-21 00:00:00'))); - - $e = CronExpression::factory('* * * * SAT#2'); - $this->assertFalse($e->isDue(new DateTime('2014-04-05 00:00:00'))); - $this->assertTrue($e->isDue(new DateTime('2014-04-12 00:00:00'))); - $this->assertFalse($e->isDue(new DateTime('2014-04-19 00:00:00'))); - - $e = CronExpression::factory('* * * * SUN#3'); - $this->assertFalse($e->isDue(new DateTime('2014-04-13 00:00:00'))); - $this->assertTrue($e->isDue(new DateTime('2014-04-20 00:00:00'))); - $this->assertFalse($e->isDue(new DateTime('2014-04-27 00:00:00'))); - } - - /** - * @covers \Cron\CronExpression::getRunDate - */ - public function testKeepOriginalTime() - { - $now = new \DateTime; - $strNow = $now->format(DateTime::ISO8601); - $cron = CronExpression::factory('0 0 * * *'); - $cron->getPreviousRunDate($now); - $this->assertSame($strNow, $now->format(DateTime::ISO8601)); - } - - /** - * @covers \Cron\CronExpression::__construct - * @covers \Cron\CronExpression::factory - * @covers \Cron\CronExpression::isValidExpression - * @covers \Cron\CronExpression::setExpression - * @covers \Cron\CronExpression::setPart - */ - public function testValidationWorks() - { - // Invalid. Only four values - $this->assertFalse(CronExpression::isValidExpression('* * * 1')); - // Valid - $this->assertTrue(CronExpression::isValidExpression('* * * * 1')); - - // Issue #156, 13 is an invalid month - $this->assertFalse(CronExpression::isValidExpression("* * * 13 * ")); - - // Issue #155, 90 is an invalid second - $this->assertFalse(CronExpression::isValidExpression('90 * * * *')); - - // Issue #154, 24 is an invalid hour - $this->assertFalse(CronExpression::isValidExpression("0 24 1 12 0")); - - // Issue #125, this is just all sorts of wrong - $this->assertFalse(CronExpression::isValidExpression('990 14 * * mon-fri0345345')); - - // see https://github.com/dragonmantank/cron-expression/issues/5 - $this->assertTrue(CronExpression::isValidExpression('2,17,35,47 5-7,11-13 * * *')); - } - - /** - * Makes sure that 00 is considered a valid value for 0-based fields - * cronie allows numbers with a leading 0, so adding support for this as well - * - * @see https://github.com/dragonmantank/cron-expression/issues/12 - */ - public function testDoubleZeroIsValid() - { - $this->assertTrue(CronExpression::isValidExpression('00 * * * *')); - $this->assertTrue(CronExpression::isValidExpression('01 * * * *')); - $this->assertTrue(CronExpression::isValidExpression('* 00 * * *')); - $this->assertTrue(CronExpression::isValidExpression('* 01 * * *')); - - $e = CronExpression::factory('00 * * * *'); - $this->assertTrue($e->isDue(new DateTime('2014-04-07 00:00:00'))); - $e = CronExpression::factory('01 * * * *'); - $this->assertTrue($e->isDue(new DateTime('2014-04-07 00:01:00'))); - - $e = CronExpression::factory('* 00 * * *'); - $this->assertTrue($e->isDue(new DateTime('2014-04-07 00:00:00'))); - $e = CronExpression::factory('* 01 * * *'); - $this->assertTrue($e->isDue(new DateTime('2014-04-07 01:00:00'))); - } - - - /** - * Ranges with large steps should "wrap around" to the appropriate value - * cronie allows for steps that are larger than the range of a field, with it wrapping around like a ring buffer. We - * should do the same. - * - * @see https://github.com/dragonmantank/cron-expression/issues/6 - */ - public function testRangesWrapAroundWithLargeSteps() - { - $f = new MonthField(); - $this->assertTrue($f->validate('*/123')); - $this->assertSame([4], $f->getRangeForExpression('*/123', 12)); - - $e = CronExpression::factory('* * * */123 *'); - $this->assertTrue($e->isDue(new DateTime('2014-04-07 00:00:00'))); - - $nextRunDate = $e->getNextRunDate(new DateTime('2014-04-07 00:00:00')); - $this->assertSame('2014-04-07 00:01:00', $nextRunDate->format('Y-m-d H:i:s')); - - $nextRunDate = $e->getNextRunDate(new DateTime('2014-05-07 00:00:00')); - $this->assertSame('2015-04-01 00:00:00', $nextRunDate->format('Y-m-d H:i:s')); - } - - /** - * When there is an issue with a field, we should report the human readable position - * - * @see https://github.com/dragonmantank/cron-expression/issues/29 - */ - public function testFieldPositionIsHumanAdjusted() - { - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage("6 is not a valid position"); - $e = CronExpression::factory('0 * * * * ? *'); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php deleted file mode 100644 index 2191b6bff..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -class DayOfMonthFieldTest extends TestCase -{ - /** - * @covers \Cron\DayOfMonthField::validate - */ - public function testValidatesField() - { - $f = new DayOfMonthField(); - $this->assertTrue($f->validate('1')); - $this->assertTrue($f->validate('*')); - $this->assertTrue($f->validate('L')); - $this->assertTrue($f->validate('5W')); - $this->assertTrue($f->validate('01')); - $this->assertFalse($f->validate('5W,L')); - $this->assertFalse($f->validate('1.')); - } - - /** - * @covers \Cron\DayOfMonthField::isSatisfiedBy - */ - public function testChecksIfSatisfied() - { - $f = new DayOfMonthField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); - $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); - } - - /** - * @covers \Cron\DayOfMonthField::increment - */ - public function testIncrementsDate() - { - $d = new DateTime('2011-03-15 11:15:00'); - $f = new DayOfMonthField(); - $f->increment($d); - $this->assertSame('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); - - $d = new DateTime('2011-03-15 11:15:00'); - $f->increment($d, true); - $this->assertSame('2011-03-14 23:59:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\DayOfMonthField::increment - */ - public function testIncrementsDateTimeImmutable() - { - $d = new DateTimeImmutable('2011-03-15 11:15:00'); - $f = new DayOfMonthField(); - $f->increment($d); - $this->assertSame('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); - } - - /** - * Day of the month cannot accept a 0 value, it must be between 1 and 31 - * See Github issue #120 - * - * @since 2017-01-22 - */ - public function testDoesNotAccept0Date() - { - $f = new DayOfMonthField(); - $this->assertFalse($f->validate(0)); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php deleted file mode 100644 index 74e63c28c..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php +++ /dev/null @@ -1,156 +0,0 @@ - - */ -class DayOfWeekFieldTest extends TestCase -{ - /** - * @covers \Cron\DayOfWeekField::validate - */ - public function testValidatesField() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->validate('1')); - $this->assertTrue($f->validate('01')); - $this->assertTrue($f->validate('00')); - $this->assertTrue($f->validate('*')); - $this->assertFalse($f->validate('*/3,1,1-12')); - $this->assertTrue($f->validate('SUN-2')); - $this->assertFalse($f->validate('1.')); - } - - /** - * @covers \Cron\DayOfWeekField::isSatisfiedBy - */ - public function testChecksIfSatisfied() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); - $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); - } - - /** - * @covers \Cron\DayOfWeekField::increment - */ - public function testIncrementsDate() - { - $d = new DateTime('2011-03-15 11:15:00'); - $f = new DayOfWeekField(); - $f->increment($d); - $this->assertSame('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); - - $d = new DateTime('2011-03-15 11:15:00'); - $f->increment($d, true); - $this->assertSame('2011-03-14 23:59:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\DayOfWeekField::increment - */ - public function testIncrementsDateTimeImmutable() - { - $d = new DateTimeImmutable('2011-03-15 11:15:00'); - $f = new DayOfWeekField(); - $f->increment($d); - $this->assertSame('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\DayOfWeekField::isSatisfiedBy - */ - public function testValidatesHashValueWeekday() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Weekday must be a value between 0 and 7. 12 given'); - - $f = new DayOfWeekField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '12#1')); - } - - /** - * @covers \Cron\DayOfWeekField::isSatisfiedBy - */ - public function testValidatesHashValueNth() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('There are never more than 5 or less than 1 of a given weekday in a month'); - - $f = new DayOfWeekField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '3#6')); - } - - /** - * @covers \Cron\DayOfWeekField::validate - */ - public function testValidateWeekendHash() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->validate('MON#1')); - $this->assertTrue($f->validate('TUE#2')); - $this->assertTrue($f->validate('WED#3')); - $this->assertTrue($f->validate('THU#4')); - $this->assertTrue($f->validate('FRI#5')); - $this->assertTrue($f->validate('SAT#1')); - $this->assertTrue($f->validate('SUN#3')); - $this->assertTrue($f->validate('MON#1,MON#3')); - } - - /** - * @covers \Cron\DayOfWeekField::isSatisfiedBy - */ - public function testHandlesZeroAndSevenDayOfTheWeekValues() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2011-09-04 00:00:00'), '0-2')); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2011-09-04 00:00:00'), '6-0')); - - $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), 'SUN')); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), 'SUN#3')); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), '0#3')); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), '7#3')); - } - - /** - * @covers \Cron\DayOfWeekField::isSatisfiedBy - */ - public function testHandlesLastWeekdayOfTheMonth() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2018-12-28 00:00:00'), 'FRIL')); - $this->assertTrue($f->isSatisfiedBy(new DateTime('2018-12-28 00:00:00'), '5L')); - $this->assertFalse($f->isSatisfiedBy(new DateTime('2018-12-21 00:00:00'), 'FRIL')); - $this->assertFalse($f->isSatisfiedBy(new DateTime('2018-12-21 00:00:00'), '5L')); - } - - /** - * @see https://github.com/mtdowling/cron-expression/issues/47 - */ - public function testIssue47() { - $f = new DayOfWeekField(); - $this->assertFalse($f->validate('mon,')); - $this->assertFalse($f->validate('mon-')); - $this->assertFalse($f->validate('*/2,')); - $this->assertFalse($f->validate('-mon')); - $this->assertFalse($f->validate(',1')); - $this->assertFalse($f->validate('*-')); - $this->assertFalse($f->validate(',-')); - } - - /** - * @see https://github.com/laravel/framework/commit/07d160ac3cc9764d5b429734ffce4fa311385403 - */ - public function testLiteralsExpandProperly() - { - $f = new DayOfWeekField(); - $this->assertTrue($f->validate('MON-FRI')); - $this->assertSame([1,2,3,4,5], $f->getRangeForExpression('MON-FRI', 7)); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/FieldFactoryTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/FieldFactoryTest.php deleted file mode 100644 index e25d07075..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/FieldFactoryTest.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -class FieldFactoryTest extends TestCase -{ - /** - * @covers \Cron\FieldFactory::getField - */ - public function testRetrievesFieldInstances() - { - $mappings = array( - 0 => 'Cron\MinutesField', - 1 => 'Cron\HoursField', - 2 => 'Cron\DayOfMonthField', - 3 => 'Cron\MonthField', - 4 => 'Cron\DayOfWeekField', - ); - - $f = new FieldFactory(); - - foreach ($mappings as $position => $class) { - $this->assertSame($class, get_class($f->getField($position))); - } - } - - /** - * @covers \Cron\FieldFactory::getField - */ - public function testValidatesFieldPosition() - { - $this->expectException(\InvalidArgumentException::class); - - $f = new FieldFactory(); - $f->getField(-1); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php deleted file mode 100644 index 1849f28be..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php +++ /dev/null @@ -1,99 +0,0 @@ - - */ -class HoursFieldTest extends TestCase -{ - /** - * @covers \Cron\HoursField::validate - */ - public function testValidatesField() - { - $f = new HoursField(); - $this->assertTrue($f->validate('1')); - $this->assertTrue($f->validate('00')); - $this->assertTrue($f->validate('01')); - $this->assertTrue($f->validate('*')); - $this->assertFalse($f->validate('*/3,1,1-12')); - } - - /** - * @covers \Cron\HoursField::isSatisfiedBy - */ - public function testChecksIfSatisfied() - { - $f = new HoursField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); - $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); - } - - /** - * @covers \Cron\HoursField::increment - */ - public function testIncrementsDate() - { - $d = new DateTime('2011-03-15 11:15:00'); - $f = new HoursField(); - $f->increment($d); - $this->assertSame('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); - - $d->setTime(11, 15, 0); - $f->increment($d, true); - $this->assertSame('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\HoursField::increment - */ - public function testIncrementsDateTimeImmutable() - { - $d = new DateTimeImmutable('2011-03-15 11:15:00'); - $f = new HoursField(); - $f->increment($d); - $this->assertSame('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\HoursField::increment - */ - public function testIncrementsDateWithThirtyMinuteOffsetTimezone() - { - $tz = date_default_timezone_get(); - date_default_timezone_set('America/St_Johns'); - $d = new DateTime('2011-03-15 11:15:00'); - $f = new HoursField(); - $f->increment($d); - $this->assertSame('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); - - $d->setTime(11, 15, 0); - $f->increment($d, true); - $this->assertSame('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); - date_default_timezone_set($tz); - } - - /** - * @covers \Cron\HoursField::increment - */ - public function testIncrementDateWithFifteenMinuteOffsetTimezone() - { - $tz = date_default_timezone_get(); - date_default_timezone_set('Asia/Kathmandu'); - $d = new DateTime('2011-03-15 11:15:00'); - $f = new HoursField(); - $f->increment($d); - $this->assertSame('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); - - $d->setTime(11, 15, 0); - $f->increment($d, true); - $this->assertSame('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); - date_default_timezone_set($tz); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php deleted file mode 100644 index 41a536d68..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class MinutesFieldTest extends TestCase -{ - /** - * @covers \Cron\MinutesField::validate - */ - public function testValidatesField() - { - $f = new MinutesField(); - $this->assertTrue($f->validate('1')); - $this->assertTrue($f->validate('*')); - $this->assertFalse($f->validate('*/3,1,1-12')); - } - - /** - * @covers \Cron\MinutesField::isSatisfiedBy - */ - public function testChecksIfSatisfied() - { - $f = new MinutesField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); - $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); - } - - /** - * @covers \Cron\MinutesField::increment - */ - public function testIncrementsDate() - { - $d = new DateTime('2011-03-15 11:15:00'); - $f = new MinutesField(); - $f->increment($d); - $this->assertSame('2011-03-15 11:16:00', $d->format('Y-m-d H:i:s')); - $f->increment($d, true); - $this->assertSame('2011-03-15 11:15:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\MinutesField::increment - */ - public function testIncrementsDateTimeImmutable() - { - $d = new DateTimeImmutable('2011-03-15 11:15:00'); - $f = new MinutesField(); - $f->increment($d); - $this->assertSame('2011-03-15 11:16:00', $d->format('Y-m-d H:i:s')); - } - - /** - * Various bad syntaxes that are reported to work, but shouldn't. - * - * @author Chris Tankersley - * @since 2017-08-18 - */ - public function testBadSyntaxesShouldNotValidate() - { - $f = new MinutesField(); - $this->assertFalse($f->validate('*-1')); - $this->assertFalse($f->validate('1-2-3')); - $this->assertFalse($f->validate('-1')); - } -} diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php deleted file mode 100644 index f329f4c16..000000000 --- a/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php +++ /dev/null @@ -1,103 +0,0 @@ - - */ -class MonthFieldTest extends TestCase -{ - /** - * @covers \Cron\MonthField::validate - */ - public function testValidatesField() - { - $f = new MonthField(); - $this->assertTrue($f->validate('12')); - $this->assertTrue($f->validate('*')); - $this->assertFalse($f->validate('*/10,2,1-12')); - $this->assertFalse($f->validate('1.fix-regexp')); - } - - /** - * @covers \Cron\MonthField::isSatisfiedBy - */ - public function testChecksIfSatisfied() - { - $f = new MonthField(); - $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); - $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); - } - - /** - * @covers \Cron\MonthField::increment - */ - public function testIncrementsDate() - { - $d = new DateTime('2011-03-15 11:15:00'); - $f = new MonthField(); - $f->increment($d); - $this->assertSame('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); - - $d = new DateTime('2011-03-15 11:15:00'); - $f->increment($d, true); - $this->assertSame('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\MonthField::increment - */ - public function testIncrementsDateTimeImmutable() - { - $d = new DateTimeImmutable('2011-03-15 11:15:00'); - $f = new MonthField(); - $f->increment($d); - $this->assertSame('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\MonthField::increment - */ - public function testIncrementsDateWithThirtyMinuteTimezone() - { - $tz = date_default_timezone_get(); - date_default_timezone_set('America/St_Johns'); - $d = new DateTime('2011-03-31 11:59:59'); - $f = new MonthField(); - $f->increment($d); - $this->assertSame('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); - - $d = new DateTime('2011-03-15 11:15:00'); - $f->increment($d, true); - $this->assertSame('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); - date_default_timezone_set($tz); - } - - - /** - * @covers \Cron\MonthField::increment - */ - public function testIncrementsYearAsNeeded() - { - $f = new MonthField(); - $d = new DateTime('2011-12-15 00:00:00'); - $f->increment($d); - $this->assertSame('2012-01-01 00:00:00', $d->format('Y-m-d H:i:s')); - } - - /** - * @covers \Cron\MonthField::increment - */ - public function testDecrementsYearAsNeeded() - { - $f = new MonthField(); - $d = new DateTime('2011-01-15 00:00:00'); - $f->increment($d, true); - $this->assertSame('2010-12-31 23:59:00', $d->format('Y-m-d H:i:s')); - } -} diff --git a/vendor/fideloper/proxy/.github/ISSUE_TEMPLATE/laravel-9-updates.md b/vendor/fideloper/proxy/.github/ISSUE_TEMPLATE/laravel-9-updates.md deleted file mode 100644 index d0b276f66..000000000 --- a/vendor/fideloper/proxy/.github/ISSUE_TEMPLATE/laravel-9-updates.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Laravel 9 Updates -about: Inform about Laravel 9 changes -title: '' -labels: '' -assignees: '' - ---- - - diff --git a/vendor/fideloper/proxy/.github/workflows/tests.yml b/vendor/fideloper/proxy/.github/workflows/tests.yml deleted file mode 100644 index 35cea9616..000000000 --- a/vendor/fideloper/proxy/.github/workflows/tests.yml +++ /dev/null @@ -1,51 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Tests - -# Controls when the action will run. -on: - push: - pull_request: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - run_tests: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [7.2, 7.3, 7.4, 8.0, 8.1] - - name: PHP ${{ matrix.php }} - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - tools: composer:v2 - coverage: none - - - name: Install dependencies - uses: nick-invision/retry@v1 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit --verbose diff --git a/vendor/fideloper/proxy/composer.json b/vendor/fideloper/proxy/composer.json deleted file mode 100755 index d7ce15a4c..000000000 --- a/vendor/fideloper/proxy/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "fideloper/proxy", - "description": "Set trusted proxies for Laravel", - "keywords": ["proxy", "trusted proxy", "load balancing"], - "license": "MIT", - "authors": [ - { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" - } - ], - "require": { - "php": ">=5.4.0", - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0" - }, - "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.5.8|^9.3.3" - }, - "autoload": { - "psr-4": { - "Fideloper\\Proxy\\": "src/" - } - }, - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, - "minimum-stability": "dev", - "prefer-stable": true -} diff --git a/vendor/fideloper/proxy/config/trustedproxy.php b/vendor/fideloper/proxy/config/trustedproxy.php deleted file mode 100644 index c3a47d82a..000000000 --- a/vendor/fideloper/proxy/config/trustedproxy.php +++ /dev/null @@ -1,46 +0,0 @@ - null, // [,], '*', ',' - - /* - * To trust one or more specific proxies that connect - * directly to your server, use an array or a string separated by comma of IP addresses: - */ - // 'proxies' => ['192.168.1.1'], - // 'proxies' => '192.168.1.1, 192.168.1.2', - - /* - * Or, to trust all proxies that connect - * directly to your server, use a "*" - */ - // 'proxies' => '*', - - /* - * Which headers to use to detect proxy related data (For, Host, Proto, Port) - * - * Options include: - * - * - All headers (see below) - Trust all x-forwarded-* headers - * - Illuminate\Http\Request::HEADER_FORWARDED - Use the FORWARDED header to establish trust - * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB - If you are using AWS Elastic Load Balancer - * - * @link https://symfony.com/doc/current/deployment/proxies.html - */ - 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | Illuminate\Http\Request::HEADER_X_FORWARDED_HOST | Illuminate\Http\Request::HEADER_X_FORWARDED_PORT | Illuminate\Http\Request::HEADER_X_FORWARDED_PROTO | Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB, - -]; diff --git a/vendor/fideloper/proxy/src/TrustedProxyServiceProvider.php b/vendor/fideloper/proxy/src/TrustedProxyServiceProvider.php deleted file mode 100644 index 26f2631af..000000000 --- a/vendor/fideloper/proxy/src/TrustedProxyServiceProvider.php +++ /dev/null @@ -1,41 +0,0 @@ -app instanceof LaravelApplication && $this->app->runningInConsole()) { - $this->publishes([$source => config_path('trustedproxy.php')]); - } elseif ($this->app instanceof LumenApplication) { - $this->app->configure('trustedproxy'); - } - - - if ($this->app instanceof LaravelApplication && ! $this->app->configurationIsCached()) { - $this->mergeConfigFrom($source, 'trustedproxy'); - } - } - - /** - * Register the service provider. - * - * @return void - */ - public function register() - { - // - } -} diff --git a/vendor/graham-campbell/result-type/LICENSE b/vendor/graham-campbell/result-type/LICENSE new file mode 100644 index 000000000..9a8accb98 --- /dev/null +++ b/vendor/graham-campbell/result-type/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020-2022 Graham Campbell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/graham-campbell/result-type/composer.json b/vendor/graham-campbell/result-type/composer.json new file mode 100644 index 000000000..f85e1d132 --- /dev/null +++ b/vendor/graham-campbell/result-type/composer.json @@ -0,0 +1,33 @@ +{ + "name": "graham-campbell/result-type", + "description": "An Implementation Of The Result Type", + "keywords": ["result", "result-type", "Result", "Result Type", "Result-Type", "Graham Campbell", "GrahamCampbell"], + "license": "MIT", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.28 || ^9.5.21" + }, + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GrahamCampbell\\Tests\\ResultType\\": "tests/" + } + }, + "config": { + "preferred-install": "dist" + } +} diff --git a/vendor/vlucas/phpdotenv/src/Result/Error.php b/vendor/graham-campbell/result-type/src/Error.php similarity index 57% rename from vendor/vlucas/phpdotenv/src/Result/Error.php rename to vendor/graham-campbell/result-type/src/Error.php index 4a401641b..add9b2d71 100644 --- a/vendor/vlucas/phpdotenv/src/Result/Error.php +++ b/vendor/graham-campbell/result-type/src/Error.php @@ -1,6 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace GrahamCampbell\ResultType; use PhpOption\None; use PhpOption\Some; @@ -8,9 +19,9 @@ use PhpOption\Some; /** * @template T * @template E - * @extends \Dotenv\Result\Result + * @extends \GrahamCampbell\ResultType\Result */ -class Error extends Result +final class Error extends Result { /** * @var E @@ -36,7 +47,7 @@ class Error extends Result * * @param F $value * - * @return \Dotenv\Result\Result + * @return \GrahamCampbell\ResultType\Result */ public static function create($value) { @@ -60,11 +71,26 @@ class Error extends Result * * @param callable(T):S $f * - * @return \Dotenv\Result\Result + * @return \GrahamCampbell\ResultType\Result */ - public function mapSuccess(callable $f) + public function map(callable $f) { - /** @var \Dotenv\Result\Result */ + return self::create($this->value); + } + + /** + * Flat map over the success value. + * + * @template S + * @template F + * + * @param callable(T):\GrahamCampbell\ResultType\Result $f + * + * @return \GrahamCampbell\ResultType\Result + */ + public function flatMap(callable $f) + { + /** @var \GrahamCampbell\ResultType\Result */ return self::create($this->value); } @@ -85,7 +111,7 @@ class Error extends Result * * @param callable(E):F $f * - * @return \Dotenv\Result\Result + * @return \GrahamCampbell\ResultType\Result */ public function mapError(callable $f) { diff --git a/vendor/graham-campbell/result-type/src/Result.php b/vendor/graham-campbell/result-type/src/Result.php new file mode 100644 index 000000000..8c67bcdd1 --- /dev/null +++ b/vendor/graham-campbell/result-type/src/Result.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace GrahamCampbell\ResultType; + +/** + * @template T + * @template E + */ +abstract class Result +{ + /** + * Get the success option value. + * + * @return \PhpOption\Option + */ + abstract public function success(); + + /** + * Map over the success value. + * + * @template S + * + * @param callable(T):S $f + * + * @return \GrahamCampbell\ResultType\Result + */ + abstract public function map(callable $f); + + /** + * Flat map over the success value. + * + * @template S + * @template F + * + * @param callable(T):\GrahamCampbell\ResultType\Result $f + * + * @return \GrahamCampbell\ResultType\Result + */ + abstract public function flatMap(callable $f); + + /** + * Get the error option value. + * + * @return \PhpOption\Option + */ + abstract public function error(); + + /** + * Map over the error value. + * + * @template F + * + * @param callable(E):F $f + * + * @return \GrahamCampbell\ResultType\Result + */ + abstract public function mapError(callable $f); +} diff --git a/vendor/vlucas/phpdotenv/src/Result/Success.php b/vendor/graham-campbell/result-type/src/Success.php similarity index 59% rename from vendor/vlucas/phpdotenv/src/Result/Success.php rename to vendor/graham-campbell/result-type/src/Success.php index c6c6ef1eb..b68ad57e7 100644 --- a/vendor/vlucas/phpdotenv/src/Result/Success.php +++ b/vendor/graham-campbell/result-type/src/Success.php @@ -1,6 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace GrahamCampbell\ResultType; use PhpOption\None; use PhpOption\Some; @@ -8,9 +19,9 @@ use PhpOption\Some; /** * @template T * @template E - * @extends \Dotenv\Result\Result + * @extends \GrahamCampbell\ResultType\Result */ -class Success extends Result +final class Success extends Result { /** * @var T @@ -36,7 +47,7 @@ class Success extends Result * * @param S $value * - * @return \Dotenv\Result\Result + * @return \GrahamCampbell\ResultType\Result */ public static function create($value) { @@ -60,13 +71,28 @@ class Success extends Result * * @param callable(T):S $f * - * @return \Dotenv\Result\Result + * @return \GrahamCampbell\ResultType\Result */ - public function mapSuccess(callable $f) + public function map(callable $f) { return self::create($f($this->value)); } + /** + * Flat map over the success value. + * + * @template S + * @template F + * + * @param callable(T):\GrahamCampbell\ResultType\Result $f + * + * @return \GrahamCampbell\ResultType\Result + */ + public function flatMap(callable $f) + { + return $f($this->value); + } + /** * Get the error option value. * @@ -84,11 +110,10 @@ class Success extends Result * * @param callable(E):F $f * - * @return \Dotenv\Result\Result + * @return \GrahamCampbell\ResultType\Result */ public function mapError(callable $f) { - /** @var \Dotenv\Result\Result */ return self::create($this->value); } } diff --git a/vendor/guzzle/guzzle/.gitignore b/vendor/guzzle/guzzle/.gitignore deleted file mode 100644 index 893035d5b..000000000 --- a/vendor/guzzle/guzzle/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# Ingore common cruft -.DS_STORE -coverage -.idea - -# Ignore binary files -guzzle.phar -guzzle-min.phar - -# Ignore potentially sensitive phpunit file -phpunit.xml - -# Ignore composer generated files -composer.phar -composer.lock -composer-test.lock -vendor/ - -# Ignore build files -build/ -phing/build.properties - -# Ignore subsplit working directory -.subsplit - -docs/_build -docs/*.pyc diff --git a/vendor/guzzle/guzzle/.travis.yml b/vendor/guzzle/guzzle/.travis.yml deleted file mode 100644 index be1574611..000000000 --- a/vendor/guzzle/guzzle/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - -before_script: - - curl --version - - pear config-set php_ini ~/.phpenv/versions/`php -r 'echo phpversion();'`/etc/php.ini - - echo 'Installing pecl_http' - - wget --quiet http://pecl.php.net/get/pecl_http-1.7.6.tgz - - tar -xzf pecl_http-1.7.6.tgz - - sh -c "cd pecl_http-1.7.6 && phpize && ./configure && make && sudo make install" > /dev/null - - echo "extension=http.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` - - pecl install uri_template-beta - - phpenv rehash - - composer install --dev - - echo 'Ensuring the correct version of node is running' - - ~/.nvm/nvm.sh install v0.6.14 - -script: vendor/bin/phpunit diff --git a/vendor/guzzle/guzzle/CHANGELOG.md b/vendor/guzzle/guzzle/CHANGELOG.md deleted file mode 100644 index 5be7e5dc8..000000000 --- a/vendor/guzzle/guzzle/CHANGELOG.md +++ /dev/null @@ -1,762 +0,0 @@ -CHANGELOG -========= - -3.8.1 (2013-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 - `Guzzle\Http\ClientInterface::setSslVerification()` -* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL -* Bug: The body of a request can now be set to `"0"` -* Sending PHP stream requests no longer forces `HTTP/1.0` -* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of - each sub-exception -* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than - clobbering everything). -* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) -* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. - For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. -* 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) ------------------- - -* Added the ability to define a POST name for a file -* JSON response parsing now properly walks additionalProperties -* cURL error code 18 is now retried automatically in the BackoffPlugin -* Fixed a cURL error when URLs contain fragments -* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were - CurlExceptions -* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) -* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` -* Fixed a bug that was encountered when parsing empty header parameters -* UriTemplate now has a `setRegex()` method to match the docs -* The `debug` request parameter now checks if it is truthy rather than if it exists -* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin -* Added the ability to combine URLs using strict RFC 3986 compliance -* Command objects can now return the validation errors encountered by the command -* Various fixes to cache revalidation (#437 and 29797e5) -* Various fixes to the AsyncPlugin -* Cleaned up build scripts - -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 - (see https://github.com/aws/aws-sdk-php/issues/147) -* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots -* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) -* Updated the bundled cacert.pem (#419) -* OauthPlugin now supports adding authentication to headers or query string (#425) - -3.7.3 (2013-09-08) ------------------- - -* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and - `CommandTransferException`. -* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description -* Schemas are only injected into response models when explicitly configured. -* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of - an EntityBody. -* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. -* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. -* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() -* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin -* Bug fix: Visiting XML attributes first before visting XML children when serializing requests -* 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) ------------------- - -* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander - See https://github.com/guzzle/guzzle/issues/371 -* Bug fix: Cookie domains are now matched correctly according to RFC 6265 - See https://github.com/guzzle/guzzle/issues/377 -* Bug fix: GET parameters are now used when calculating an OAuth signature -* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted -* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched -* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. - See https://github.com/guzzle/guzzle/issues/379 -* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See - https://github.com/guzzle/guzzle/pull/380 -* cURL multi cleanup and optimizations - -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 -* Bug fix: Moving stream factory before send event to before building the stream. See #353 -* Bug fix: Cookies no longer match on IP addresses per RFC 6265 -* Bug fix: Correctly parsing header parameters that are in `<>` and quotes -* Added `cert` and `ssl_key` as request options -* `Host` header can now diverge from the host part of a URL if the header is set manually -* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter -* OAuth parameters are only added via the plugin if they aren't already set -* Exceptions are now thrown when a URL cannot be parsed -* 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) ------------------- - -* 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 - request. You can pass a 'request.options' configuration setting to a client to apply default request options to - every request created by a client (e.g. default query string variables, headers, curl options, etc). -* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. - See `Guzzle\Http\StaticClient::mount`. -* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests - created by a command (e.g. custom headers, query string variables, timeout settings, etc). -* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the - headers of a response -* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key - (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) -* ServiceBuilders now support storing and retrieving arbitrary data -* CachePlugin can now purge all resources for a given URI -* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource -* CachePlugin now uses the Vary header to determine if a resource is a cache hit -* `Guzzle\Http\Message\Response` now implements `\Serializable` -* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters -* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable -* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` -* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size -* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message -* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older - Symfony users can still use the old version of Monolog. -* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. - Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. -* Several performance improvements to `Guzzle\Common\Collection` -* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -* Added `Guzzle\Stream\StreamInterface::isRepeatable` -* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. -* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. -* Removed `Guzzle\Http\ClientInterface::expandTemplate()` -* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` -* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` -* Removed `Guzzle\Http\Message\RequestInterface::canCache` -* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` -* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` -* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. -* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting - `Guzzle\Common\Version::$emitWarnings` to true. -* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use - `$request->getResponseBody()->isRepeatable()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. - These will work through Guzzle 4.0 -* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. -* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. -* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. -* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -* Marked `Guzzle\Common\Collection::inject()` as deprecated. -* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` -* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -* Always setting X-cache headers on cached responses -* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -* Added `CacheStorageInterface::purge($url)` -* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -3.6.0 (2013-05-29) ------------------- - -* ServiceDescription now implements ToArrayInterface -* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters -* Guzzle can now correctly parse incomplete URLs -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a ``Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. -* `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) ------------------- - -* 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 - itself from the EventDispatcher) -* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values -* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too -* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a - non-existent key -* Bug: All __call() method arguments are now required (helps with mocking frameworks) -* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference - to help with refcount based garbage collection of resources created by sending a request -* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. -* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it'sdeprecated). Use the - HistoryPlugin for a history. -* Added a `responseBody` alias for the `response_body` location -* Refactored internals to no longer rely on Response::getRequest() -* HistoryPlugin can now be cast to a string -* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests - and responses that are sent over the wire -* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects - -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) ------------------- - -* 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 -* Bug fix: AsyncPlugin no longer forces HEAD requests -* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter -* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails -* Setting a response on a request will write to the custom request body from the response body if one is specified -* LogPlugin now writes to php://output when STDERR is undefined -* Added the ability to set multiple POST files for the same key in a single call -* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default -* Added the ability to queue CurlExceptions to the MockPlugin -* 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) ------------------- - -* 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. -* Exceptions are now properly grouped when sending requests in parallel -* Redirects are now properly aggregated when a multi transaction fails -* Redirects now set the response on the original object even in the event of a failure -* Bug fix: Model names are now properly set even when using $refs -* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax -* Added support for oauth_callback in OAuth signatures -* 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) ------------------- - -* 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 -* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 -* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. -* Bug fix: Added `number` type to service descriptions. -* Bug fix: empty parameters are removed from an OAuth signature -* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header -* Bug fix: Fixed "array to string" error when validating a union of types in a service description -* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream -* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. -* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. -* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. -* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if - the Content-Type can be determined based on the entity body or the path of the request. -* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. -* Added support for a PSR-3 LogAdapter. -* Added a `command.after_prepare` event -* Added `oauth_callback` parameter to the OauthPlugin -* Added the ability to create a custom stream class when using a stream factory -* Added a CachingEntityBody decorator -* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. -* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. -* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies -* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This - means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use - 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) ------------------- - -* Added the ability to create PHP streaming responses from HTTP requests -* Bug fix: Running any filters when parsing response headers with service descriptions -* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing -* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across - response location visitors. -* Bug fix: Removed the possibility of creating configuration files with circular dependencies -* 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) ------------------- - -* A large number of performance optimizations have been made -* Bug fix: Added 'wb' as a valid write mode for streams -* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned -* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` -* BC: Removed `Guzzle\Http\Utils` class -* BC: Setting a service description on a client will no longer modify the client's command factories. -* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using - the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' -* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to - lowercase -* Operation parameter objects are now lazy loaded internally -* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses -* Added support for instantiating responseType=class responseClass classes. Classes must implement - `Guzzle\Service\Command\ResponseClassInterface` -* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These - additional properties also support locations and can be used to parse JSON responses where the outermost part of the - JSON is an array -* Added support for nested renaming of JSON models (rename sentAs to name) -* CachePlugin - * 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) ------------------- - -* 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 -* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. -* BadResponseException no longer includes the full request and response message -* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface -* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface -* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription -* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list -* xmlEncoding can now be customized for the XML declaration of a XML service description operation -* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value - aggregation and no longer uses callbacks -* The URL encoding implementation of Guzzle\Http\QueryString can now be customized -* Bug fix: Filters were not always invoked for array service description parameters -* Bug fix: Redirects now use a target response body rather than a temporary response body -* 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) ------------------- - -* 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. -* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent -* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) -* 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) ------------------- - -* 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) ------------------- - -* BC: CurlException now extends from RequestException rather than BadResponseException -* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() -* Added getData to ServiceDescriptionInterface -* Added context array to RequestInterface::setState() -* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http -* Bug: Adding required content-type when JSON request visitor adds JSON to a command -* Bug: Fixing the serialization of a service description with custom data -* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing - an array of successful and failed responses -* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection -* Added Guzzle\Http\IoEmittingEntityBody -* Moved command filtration from validators to location visitors -* Added `extends` attributes to service description parameters -* Added getModels to ServiceDescriptionInterface - -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) ------------------- - -* CurlMulti performance improvements -* Adding setErrorResponses() to Operation -* composer.json tweaks - -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" -* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert -* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs -* Added support for XML attributes in service description responses -* 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) ------------------- - -* 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" -* Bug: Using the system cacert bundle when using the Phar -* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures -* Enhanced cookie jar de-duplication -* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added -* 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) ------------------- - -* Implementing redirects in PHP rather than cURL -* Added PECL URI template extension and using as default parser if available -* Bug: Fixed Content-Length parsing of Response factory -* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. -* Adding ToArrayInterface throughout library -* Fixing OauthPlugin to create unique nonce values per request - -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) ------------------- - -* 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) ------------------- - -* Rewrote service description format to be based on Swagger - * Now based on JSON schema - * Added nested input structures and nested response models - * Support for JSON and XML input and output models - * Renamed `commands` to `operations` - * Removed dot class notation - * Removed custom types -* Broke the project into smaller top-level namespaces to be more component friendly -* Removed support for XML configs and descriptions. Use arrays or JSON files. -* Removed the Validation component and Inspector -* Moved all cookie code to Guzzle\Plugin\Cookie -* Magic methods on a Guzzle\Service\Client now return the command un-executed. -* Calling getResult() or getResponse() on a command will lazily execute the command if needed. -* Now shipping with cURL's CA certs and using it by default -* Added previousResponse() method to response objects -* No longer sending Accept and Accept-Encoding headers on every request -* Only sending an Expect header by default when a payload is greater than 1MB -* Added/moved client options: - * curl.blacklist to curl.option.blacklist - * Added ssl.certificate_authority -* Added a Guzzle\Iterator component -* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin -* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) -* Added a more robust caching plugin -* Added setBody to response objects -* Updating LogPlugin to use a more flexible MessageFormatter -* Added a completely revamped build process -* Cleaning up Collection class and removing default values from the get method -* Fixed ZF2 cache adapters - -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) ------------------- - -* Bug: Fixed config file aliases for JSON includes -* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests -* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload -* Bug: Hardening request and response parsing to account for missing parts -* Bug: Fixed PEAR packaging -* Bug: Fixed Request::getInfo -* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail -* Adding the ability for the namespace Iterator factory to look in multiple directories -* Added more getters/setters/removers from service descriptions -* Added the ability to remove POST fields from OAuth signatures -* OAuth plugin now supports 2-legged OAuth - -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 -* Added a `json` parameter location -* Now allowing dot notation for classes in the CacheAdapterFactory -* Using the union of two arrays rather than an array_merge when extending service builder services and service params -* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references - in service builder config files. -* Services defined in two different config files that include one another will by default replace the previously - defined service, but you can now create services that extend themselves and merge their settings over the previous -* 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) ------------------- - -* Bug: Suppressed empty arrays from URI templates -* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching -* Added support for HTTP responses that do not contain a reason phrase in the start-line -* 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) ------------------- - -* 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. -* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream -* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream -* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) -* Added additional response status codes -* Removed SSL information from the default User-Agent header -* DELETE requests can now send an entity body -* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries -* 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) ------------------- - -* 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 -* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new -* Added multiple inheritance to service description commands -* Added an ApiCommandInterface and added ``getParamNames()`` and ``hasParam()`` -* 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) ------------------- - -* 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()`` -* Bug: ``+`` is now treated as an encoded space when parsing query strings -* QueryString and Collection performance improvements -* Allowing dot notation for class paths in filters attribute of a service descriptions - -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) ------------------- - -* 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) - * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() - * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) - * Changed the aggregation functions of QueryString to be static methods - * Can now use fromString() with querystrings that have a leading ? -* cURL configuration values can be specified in service descriptions using ``curl.`` prefixed parameters -* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body -* 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) ------------------- - -* 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() -* CachePlugin now allows for a custom request parameter function to check if a request can be cached -* Bug fix: CachePlugin now only caches GET and HEAD requests by default -* Bug fix: Using header glue when transferring headers over the wire -* Allowing deeply nested arrays for composite variables in URI templates -* Batch divisors can now return iterators or arrays - -2.7.1 (2012-06-26) ------------------- - -* Minor patch to update version number in UA string -* Updating build process - -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 -* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method -* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. -* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) -* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace -* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin -* Added the ability to set POST fields and files in a service description -* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method -* Adding a command.before_prepare event to clients -* Added BatchClosureTransfer and BatchClosureDivisor -* BatchTransferException now includes references to the batch divisor and transfer strategies -* Fixed some tests so that they pass more reliably -* Added Guzzle\Common\Log\ArrayLogAdapter - -2.6.6 (2012-06-10) ------------------- - -* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin -* BC: Removing Guzzle\Service\Command\CommandSet -* Adding generic batching system (replaces the batch queue plugin and command set) -* Updating ZF cache and log adapters and now using ZF's composer repository -* Bug: Setting the name of each ApiParam when creating through an ApiCommand -* 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) ------------------- - -* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() -* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from -* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data -* BC: Renaming methods in the CookieJarInterface -* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations -* Making the default glue for HTTP headers ';' instead of ',' -* Adding a removeValue to Guzzle\Http\Message\Header -* 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) ------------------- - -* 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 -* Bug: Fixing magic method command calls on clients -* Bug: Email constraint only validates strings -* Bug: Aggregate POST fields when POST files are present in curl handle -* Bug: Fixing default User-Agent header -* Bug: Only appending or prepending parameters in commands if they are specified -* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes -* Allowing the use of dot notation for class namespaces when using instance_of constraint -* Added any_match validation constraint -* Added an AsyncPlugin -* Passing request object to the calculateWait method of the ExponentialBackoffPlugin -* 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) ------------------- - -* [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. -* You can now use an array of data when creating PUT request bodies in the request factory. -* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. -* [Http] Adding support for Content-Type in multipart POST uploads per upload -* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) -* Adding more POST data operations for easier manipulation of POST data. -* You can now set empty POST fields. -* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. -* 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) ------------------- - -* [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) ------------------- - -* [BC] Removing 'path' support in service descriptions. Use 'uri'. -* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. -* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. -* [BC] Removing Guzzle\Common\XmlElement. -* All commands, both dynamic and concrete, have ApiCommand objects. -* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. -* 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) ------------------- - -* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder -* [BC] Executing a Command returns the result of the command rather than the command -* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. -* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. -* [BC] Moving ResourceIterator* to Guzzle\Service\Resource -* [BC] Completely refactored ResourceIterators to iterate over a cloned command object -* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate -* [BC] Guzzle\Guzzle is now deprecated -* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject -* Adding Guzzle\Version class to give version information about Guzzle -* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() -* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data -* ServiceDescription and ServiceBuilder are now cacheable using similar configs -* Changing the format of XML and JSON service builder configs. Backwards compatible. -* Cleaned up Cookie parsing -* Trimming the default Guzzle User-Agent header -* Adding a setOnComplete() method to Commands that is called when a command completes -* Keeping track of requests that were mocked in the MockPlugin -* Fixed a caching bug in the CacheAdapterFactory -* Inspector objects can be injected into a Command object -* Refactoring a lot of code and tests to be case insensitive when dealing with headers -* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL -* Adding the ability to set global option overrides to service builder configs -* 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) ------------------- - -* Major performance improvements -* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. -* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. -* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" -* Added the ability to passed parameters to all requests created by a client -* Added callback functionality to the ExponentialBackoffPlugin -* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. -* Rewinding request stream bodies when retrying requests -* Exception is thrown when JSON response body cannot be decoded -* Added configurable magic method calls to clients and commands. This is off by default. -* Fixed a defect that added a hash to every parsed URL part -* Fixed duplicate none generation for OauthPlugin. -* Emitting an event each time a client is generated by a ServiceBuilder -* Using an ApiParams object instead of a Collection for parameters of an ApiCommand -* cache.* request parameters should be renamed to params.cache.* -* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc). See CurlHandle. -* Added the ability to disable type validation of service descriptions -* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/vendor/guzzle/guzzle/README.md b/vendor/guzzle/guzzle/README.md deleted file mode 100644 index 108ba5286..000000000 --- a/vendor/guzzle/guzzle/README.md +++ /dev/null @@ -1,212 +0,0 @@ -Guzzle, PHP HTTP client and webservice framework -================================================ - -[![Latest Stable Version](https://poser.pugx.org/guzzle/guzzle/version.png)](https://packagist.org/packages/guzzle/guzzle) [![Composer Downloads](https://poser.pugx.org/guzzle/guzzle/d/total.png)](https://packagist.org/packages/guzzle/guzzle) [![Build Status](https://secure.travis-ci.org/guzzle/guzzle.png?branch=master)](http://travis-ci.org/guzzle/guzzle) - -Guzzle is a PHP HTTP client and framework for building RESTful web service clients. - -- Extremely powerful API provides all the power of cURL with a simple interface. -- Truly take advantage of HTTP/1.1 with persistent connections, connection pooling, and parallel requests. -- Service description DSL allows you build awesome web service clients faster. -- Symfony2 event-based plugin system allows you to completely modify the behavior of a request. - -Get answers with: [Documentation](http://docs.guzzlephp.org/), [Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle), IRC ([#guzzlephp](irc://irc.freenode.net/#guzzlephp) @ irc.freenode.net) - -```php -// Really simple using a static facade -Guzzle\Http\StaticClient::mount(); -$response = Guzzle::get('http://guzzlephp.org'); - -// More control using a client class -$client = new \Guzzle\Http\Client('http://guzzlephp.org'); -$request = $client->get('/'); -$response = $request->send(); -``` - -### Installing via Composer - -The recommended way to install Guzzle is through [Composer](http://getcomposer.org). - -```bash -# Install Composer -curl -sS https://getcomposer.org/installer | php - -# Add Guzzle as a dependency -php composer.phar require guzzle/guzzle:~3.7 -``` - -After installing, you need to require Composer's autoloader: - -```php -require 'vendor/autoload.php'; -``` - -### Installing via phar - -As of the 3.7.4 release, each release of Guzzle includes a "guzzle.phar" file that includes all of the files needed to -run Guzzle and all of Guzzle's dependencies. Simply download the phar and include it in your project. - -You can find a list of each release and the available downloads at https://github.com/guzzle/guzzle/releases. - -Features --------- - -- Supports GET, HEAD, POST, DELETE, PUT, PATCH, OPTIONS, and any other custom HTTP method -- Allows full access to request and response headers -- Persistent connections are implicitly managed by Guzzle, resulting in huge performance benefits -- [Send requests in parallel](http://guzzlephp.org/tour/http.html#send-http-requests-in-parallel) -- Cookie sessions can be maintained between requests using the - [CookiePlugin](http://guzzlephp.org/tour/http.html#cookie-session-plugin) -- Allows custom [entity bodies](http://guzzlephp.org/tour/http.html#entity-bodies), including sending data from a PHP - stream and downloading data to a PHP stream -- Responses can be cached and served from cache using the - [caching forward proxy plugin](http://guzzlephp.org/tour/http.html#php-based-caching-forward-proxy) -- Failed requests can be retried using - [truncated exponential backoff](http://guzzlephp.org/tour/http.html#truncated-exponential-backoff) with custom retry - policies -- Entity bodies can be validated automatically using Content-MD5 headers and the - [MD5 hash validator plugin](http://guzzlephp.org/tour/http.html#md5-hash-validator-plugin) -- All data sent over the wire can be logged using the - [LogPlugin](http://guzzlephp.org/tour/http.html#over-the-wire-logging) -- Subject/Observer signal slot system for unobtrusively - [modifying request behavior](http://guzzlephp.org/guide/http/creating_plugins.html) -- Supports all of the features of libcurl including authentication, compression, redirects, SSL, proxies, etc -- Web service client framework for building future-proof interfaces to web services -- Includes a [service description DSL](http://guzzlephp.org/guide/service/service_descriptions.html) for quickly - building webservice clients -- Full support for [URI templates](http://tools.ietf.org/html/rfc6570) -- Advanced batching functionality to efficiently send requests or commands in parallel with customizable batch sizes - and transfer strategies - -HTTP basics ------------ - -```php - '***' -]); - -// Issue a path using a relative URL to the client's base URL -// Sends to http://www.example.com/api/v1/key/***/users -$request = $client->get('users'); -$response = $request->send(); - -// Relative URL that overwrites the path of the base URL -$request = $client->get('/test/123.php?a=b'); - -// Issue a head request on the base URL -$response = $client->head()->send(); -// Delete user 123 -$response = $client->delete('users/123')->send(); - -// Send a PUT request with custom headers -$response = $client->put('upload/text', [ - 'X-Header' => 'My Header' -], 'body of the request')->send(); - -// Send a PUT request using the contents of a PHP stream as the body -// Send using an absolute URL (overrides the base URL) -$response = $client->put('http://www.example.com/upload', [ - 'X-Header' => 'My Header' -], fopen('http://www.test.com/', 'r')); - -// Create a POST request with a file upload (notice the @ symbol): -$request = $client->post('http://localhost:8983/solr/update', null, [ - 'custom_field' => 'my value', - 'file' => '@/path/to/documents.xml' -]); - -// Create a POST request and add the POST files manually -$request = $client->post('http://localhost:8983/solr/update') - ->addPostFiles(['file' => '/path/to/documents.xml']); - -// Responses are objects -echo $response->getStatusCode() . ' ' . $response->getReasonPhrase() . "\n"; - -// Requests and responses can be cast to a string to show the raw HTTP message -echo $request . "\n\n" . $response; - -// Create a request based on an HTTP message -$request = RequestFactory::fromMessage( - "PUT / HTTP/1.1\r\n" . - "Host: test.com:8081\r\n" . - "Content-Type: text/plain" . - "Transfer-Encoding: chunked\r\n" . - "\r\n" . - "this is the body" -); -``` - -Using the static client facade ------------------------------- - -You can use Guzzle through a static client to make it even easier to send simple HTTP requests. - -```php - ['X-Foo' => 'Bar'], - 'body' => ['Foo' => 'Bar'], - 'query' => ['Test' => 123], - 'timeout' => 10, - 'debug' => true, - 'save_to' => '/path/to/file.html' -]); -``` - -### Available request options: - -* headers: Associative array of headers -* query: Associative array of query string values to add to the request -* body: Body of a request, including an EntityBody, string, or array when sending POST requests. Setting a body for a - GET request will set where the response body is downloaded. -* auth: Array of HTTP authentication parameters to use with the request. The array must contain the - username in index [0], the password in index [1], and can optionally contain the authentication type in index [2]. - The authentication types are: "Basic", "Digest". The default auth type is "Basic". -* cookies: Associative array of cookies -* allow_redirects: Set to false to disable redirects -* save_to: String, fopen resource, or EntityBody object used to store the body of the response -* events: Associative array mapping event names to a closure or array of (priority, closure) -* plugins: Array of plugins to add to the request -* exceptions: Set to false to disable throwing exceptions on an HTTP level error (e.g. 404, 500, etc) -* timeout: Float describing the timeout of the request in seconds -* connect_timeout: Float describing the number of seconds to wait while trying to connect. Use 0 to wait - indefinitely. -* verify: Set to true to enable SSL cert validation (the default), false to disable, or supply the path to a CA - bundle to enable verification using a custom certificate. -* proxy: Specify an HTTP proxy (e.g. "http://username:password@192.168.16.1:10") -* debug: Set to true to display all data sent over the wire - -These options can also be used when creating requests using a standard client: - -```php -$client = new Guzzle\Http\Client(); -// Create a request with a timeout of 10 seconds -$request = $client->get('http://guzzlephp.org', [], ['timeout' => 10]); -$response = $request->send(); -``` - -Unit testing ------------- - -Guzzle uses PHPUnit for unit testing. In order to run the unit tests, you'll first need -to install the dependencies of the project using Composer: `php composer.phar install --dev`. -You can then run the tests using `vendor/bin/phpunit`. - -If you are running the tests with xdebug enabled, you may encounter the following issue: 'Fatal error: Maximum function nesting level of '100' reached, aborting!'. This can be resolved by adding 'xdebug.max_nesting_level = 200' to your php.ini file. - -The PECL extensions, uri_template and pecl_http will be required to ensure all the tests can run. diff --git a/vendor/guzzle/guzzle/UPGRADING.md b/vendor/guzzle/guzzle/UPGRADING.md deleted file mode 100644 index f58bf1171..000000000 --- a/vendor/guzzle/guzzle/UPGRADING.md +++ /dev/null @@ -1,537 +0,0 @@ -Guzzle Upgrade Guide -==================== - -3.6 to 3.7 ----------- - -### Deprecations - -- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: - -```php -\Guzzle\Common\Version::$emitWarnings = true; -``` - -The following APIs and options have been marked as deprecated: - -- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -- Marked `Guzzle\Common\Collection::inject()` as deprecated. -- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use - `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or - `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` - -3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational -request methods. When paired with a client's configuration settings, these options allow you to specify default settings -for various aspects of a request. Because these options make other previous configuration options redundant, several -configuration options and methods of a client and AbstractCommand have been deprecated. - -- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. -- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. -- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` -- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 - - $command = $client->getCommand('foo', array( - 'command.headers' => array('Test' => '123'), - 'command.response_body' => '/path/to/file' - )); - - // Should be changed to: - - $command = $client->getCommand('foo', array( - 'command.request_options' => array( - 'headers' => array('Test' => '123'), - 'save_as' => '/path/to/file' - ) - )); - -### Interface changes - -Additions and changes (you will need to update any implementations or subclasses you may have created): - -- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -- Added `Guzzle\Stream\StreamInterface::isRepeatable` -- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. - -The following methods were removed from interfaces. All of these methods are still available in the concrete classes -that implement them, but you should update your code to use alternative methods: - -- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or - `$client->setDefaultOption('headers/{header_name}', 'value')`. or - `$client->setDefaultOption('headers', array('header_name' => 'value'))`. -- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. -- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. -- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. -- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. -- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. - -### Cache plugin breaking changes - -- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -- Always setting X-cache headers on cached responses -- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -- Added `CacheStorageInterface::purge($url)` -- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -3.5 to 3.6 ----------- - -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). - For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). - Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Moved getLinks() from Response to just be used on a Link header object. - -If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the -HeaderInterface (e.g. toArray(), getAll(), etc). - -### Interface changes - -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() - -### Removed deprecated functions - -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). - -### Deprecations - -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. - -### Other changes - -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a ``Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess - -3.3 to 3.4 ----------- - -Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. - -3.2 to 3.3 ----------- - -### Response::getEtag() quote stripping removed - -`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header - -### Removed `Guzzle\Http\Utils` - -The `Guzzle\Http\Utils` class was removed. This class was only used for testing. - -### Stream wrapper and type - -`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to lowercase. - -### curl.emit_io became emit_io - -Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the -'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' - -3.1 to 3.2 ----------- - -### CurlMulti is no longer reused globally - -Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added -to a single client can pollute requests dispatched from other clients. - -If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the -ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is -created. - -```php -$multi = new Guzzle\Http\Curl\CurlMulti(); -$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); -$builder->addListener('service_builder.create_client', function ($event) use ($multi) { - $event['client']->setCurlMulti($multi); -} -}); -``` - -### No default path - -URLs no longer have a default path value of '/' if no path was specified. - -Before: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com/ -``` - -After: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com -``` - -### Less verbose BadResponseException - -The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and -response information. You can, however, get access to the request and response object by calling `getRequest()` or -`getResponse()` on the exception object. - -### Query parameter aggregation - -Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a -setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is -responsible for handling the aggregation of multi-valued query string variables into a flattened hash. - -2.8 to 3.x ----------- - -### Guzzle\Service\Inspector - -Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` - -**Before** - -```php -use Guzzle\Service\Inspector; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Inspector::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -**After** - -```php -use Guzzle\Common\Collection; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Collection::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -### Convert XML Service Descriptions to JSON - -**Before** - -```xml - - - - - - Get a list of groups - - - Uses a search query to get a list of groups - - - - Create a group - - - - - Delete a group by ID - - - - - - - Update a group - - - - - - -``` - -**After** - -```json -{ - "name": "Zendesk REST API v2", - "apiVersion": "2012-12-31", - "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", - "operations": { - "list_groups": { - "httpMethod":"GET", - "uri": "groups.json", - "summary": "Get a list of groups" - }, - "search_groups":{ - "httpMethod":"GET", - "uri": "search.json?query=\"{query} type:group\"", - "summary": "Uses a search query to get a list of groups", - "parameters":{ - "query":{ - "location": "uri", - "description":"Zendesk Search Query", - "type": "string", - "required": true - } - } - }, - "create_group": { - "httpMethod":"POST", - "uri": "groups.json", - "summary": "Create a group", - "parameters":{ - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - }, - "delete_group": { - "httpMethod":"DELETE", - "uri": "groups/{id}.json", - "summary": "Delete a group", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to delete by ID", - "type": "integer", - "required": true - } - } - }, - "get_group": { - "httpMethod":"GET", - "uri": "groups/{id}.json", - "summary": "Get a ticket", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to get by ID", - "type": "integer", - "required": true - } - } - }, - "update_group": { - "httpMethod":"PUT", - "uri": "groups/{id}.json", - "summary": "Update a group", - "parameters":{ - "id": { - "location": "uri", - "description":"Group to update by ID", - "type": "integer", - "required": true - }, - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - } -} -``` - -### Guzzle\Service\Description\ServiceDescription - -Commands are now called Operations - -**Before** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getCommands(); // @returns ApiCommandInterface[] -$sd->hasCommand($name); -$sd->getCommand($name); // @returns ApiCommandInterface|null -$sd->addCommand($command); // @param ApiCommandInterface $command -``` - -**After** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getOperations(); // @returns OperationInterface[] -$sd->hasOperation($name); -$sd->getOperation($name); // @returns OperationInterface|null -$sd->addOperation($operation); // @param OperationInterface $operation -``` - -### Guzzle\Common\Inflection\Inflector - -Namespace is now `Guzzle\Inflection\Inflector` - -### Guzzle\Http\Plugin - -Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. - -### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log - -Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. - -**Before** - -```php -use Guzzle\Common\Log\ClosureLogAdapter; -use Guzzle\Http\Plugin\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $verbosity is an integer indicating desired message verbosity level -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); -``` - -**After** - -```php -use Guzzle\Log\ClosureLogAdapter; -use Guzzle\Log\MessageFormatter; -use Guzzle\Plugin\Log\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $format is a string indicating desired message format -- @see MessageFormatter -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); -``` - -### Guzzle\Http\Plugin\CurlAuthPlugin - -Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. - -### Guzzle\Http\Plugin\ExponentialBackoffPlugin - -Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. - -**Before** - -```php -use Guzzle\Http\Plugin\ExponentialBackoffPlugin; - -$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( - ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) - )); - -$client->addSubscriber($backoffPlugin); -``` - -**After** - -```php -use Guzzle\Plugin\Backoff\BackoffPlugin; -use Guzzle\Plugin\Backoff\HttpBackoffStrategy; - -// Use convenient factory method instead -- see implementation for ideas of what -// you can do with chaining backoff strategies -$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( - HttpBackoffStrategy::getDefaultFailureCodes(), array(429) - )); -$client->addSubscriber($backoffPlugin); -``` - -### Known Issues - -#### [BUG] Accept-Encoding header behavior changed unintentionally. - -(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) - -In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to -properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. -See issue #217 for a workaround, or use a version containing the fix. diff --git a/vendor/guzzle/guzzle/build.xml b/vendor/guzzle/guzzle/build.xml deleted file mode 100644 index 2aa62ba9a..000000000 --- a/vendor/guzzle/guzzle/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/guzzle/guzzle/composer.json b/vendor/guzzle/guzzle/composer.json deleted file mode 100644 index 315309031..000000000 --- a/vendor/guzzle/guzzle/composer.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "guzzle/guzzle", - "type": "library", - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"], - "homepage": "http://guzzlephp.org/", - "license": "MIT", - - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - - "require": { - "php": ">=5.3.3", - "ext-curl": "*", - "symfony/event-dispatcher": ">=2.1" - }, - - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - - "require-dev": { - "doctrine/cache": "*", - "symfony/class-loader": "*", - "monolog/monolog": "1.*", - "psr/log": "1.0.*", - "zendframework/zend-cache": "<2.3", - "zendframework/zend-log": "<2.3", - "phpunit/phpunit": "3.7.*" - }, - - "extra": { - "branch-alias": { - "dev-master": "3.8-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/docs/Makefile b/vendor/guzzle/guzzle/docs/Makefile deleted file mode 100644 index d92e03f95..000000000 --- a/vendor/guzzle/guzzle/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Guzzle.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Guzzle.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/Guzzle" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Guzzle" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json b/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json deleted file mode 100644 index 140595090..000000000 --- a/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "additionalProperties": true, - "name": { - "type": "string", - "description": "Name of the web service" - }, - "apiVersion": { - "type": ["string", "number"], - "description": "Version identifier that the service description is compatible with" - }, - "baseUrl": { - "type": "string", - "description": "Base URL of the web service. Any relative URI specified in an operation will be merged with the baseUrl using the process defined in RFC 2396" - }, - "basePath": { - "type": "string", - "description": "Alias of baseUrl" - }, - "_description": { - "type": "string", - "description": "Short summary of the web service. This is actually called 'description' but this JSON schema wont validate using just description." - }, - "operations": { - "description": "Operations of the web service", - "type": "object", - "properties": { - "extends": { - "type": "string", - "description": "Extend from another operation by name. The parent operation must be defined before the child." - }, - "httpMethod": { - "type": "string", - "description": "HTTP method used with the operation (e.g. GET, POST, PUT, DELETE, PATCH, etc)" - }, - "uri": { - "type": "string", - "description": "URI of the operation. The uri attribute can contain URI templates. The variables of the URI template are parameters of the operation with a location value of uri" - }, - "summary": { - "type": "string", - "description": "Short summary of what the operation does" - }, - "class": { - "type": "string", - "description": "Custom class to instantiate instead of the default Guzzle\\Service\\Command\\OperationCommand" - }, - "responseClass": { - "type": "string", - "description": "This is what is returned from the method. Can be a primitive, class name, or model name." - }, - "responseNotes": { - "type": "string", - "description": "A description of the response returned by the operation" - }, - "responseType": { - "type": "string", - "description": "The type of response that the operation creates. 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.", - "enum": [ "primitive", "class", "model", "documentation" ] - }, - "deprecated": { - "type": "boolean", - "description": "Whether or not the operation is deprecated" - }, - "errorResponses": { - "description": "Errors that could occur while executing the operation", - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "number", - "description": "HTTP response status code of the error" - }, - "phrase": { - "type": "string", - "description": "Response reason phrase or description of the error" - }, - "class": { - "type": "string", - "description": "A custom exception class that would be thrown if the error is encountered" - } - } - } - }, - "data": { - "type": "object", - "additionalProperties": "true" - }, - "parameters": { - "$ref": "parameters", - "description": "Parameters of the operation. Parameters are used to define how input data is serialized into a HTTP request." - }, - "additionalParameters": { - "$ref": "parameters", - "description": "Validation and serialization rules for any parameter supplied to the operation that was not explicitly defined." - } - } - }, - "models": { - "description": "Schema models that can be referenced throughout the service description. Models can be used to define how an HTTP response is parsed into a Guzzle\\Service\\Resource\\Model object.", - "type": "object", - "properties": { - "$ref": "parameters", - "description": "Parameters of the model. When a model is referenced in a responseClass attribute of an operation, parameters define how a HTTP response message is parsed into a Guzzle\\Service\\Resource\\Model." - } - }, - "includes": { - "description": "Service description files to include and extend from (can be a .json, .js, or .php file)", - "type": "array", - "items": { - "type": "string", - "pattern": ".+\\.(js|json|php)$" - } - }, - "definitions": { - "parameters": { - "extends": "http://json-schema.org/schema", - "id": "parameters", - "name": { - "type": "string", - "description": "Unique name of the parameter" - }, - "type": { - "type": ["string", "array"], - "description": "Type of variable (string, number, integer, boolean, object, array, numeric, null, any). Types are using for validation and determining the structure of a parameter. You can use a union type by providing an array of simple types. If one of the union types matches the provided value, then the value is valid." - }, - "instanceOf": { - "type": "string", - "description": "When the type is an object, you can specify the class that the object must implement" - }, - "required": { - "type": "boolean", - "description": "Whether or not the parameter is required" - }, - "default": { - "description": "Default value to use if no value is supplied" - }, - "static": { - "type": "bool", - "description": "Set to true to specify that the parameter value cannot be changed from the default setting" - }, - "description": { - "type": "string", - "description": "Documentation of the parameter" - }, - "location": { - "type": "string", - "description": "The location of a request used to apply a parameter. Custom locations can be registered with a command, but the defaults are uri, query, statusCode, reasonPhrase, header, body, json, xml, postField, postFile, responseBody" - }, - "sentAs": { - "type": "string", - "description": "Specifies how the data being modeled is sent over the wire. For example, you may wish to include certain headers in a response model that have a normalized casing of FooBar, but the actual header is x-foo-bar. In this case, sentAs would be set to x-foo-bar." - }, - "filters": { - "type": "array", - "description": "Array of static method names to to run a parameter value through. Each value in the array must be a string containing the full class path to a static method or an array of complex filter information. You can specify static methods of classes using the full namespace class name followed by ‘::’ (e.g. FooBar::baz()). Some filters require arguments in order to properly filter a value. For complex filters, use a hash containing a ‘method’ key pointing to a static method, and an ‘args’ key containing an array of positional arguments to pass to the method. Arguments can contain keywords that are replaced when filtering a value: '@value‘ is replaced with the value being validated, '@api‘ is replaced with the Parameter object.", - "items": { - "type": ["string", { - "object": { - "properties": { - "method": { - "type": "string", - "description": "PHP function to call", - "required": true - }, - "args": { - "type": "array" - } - } - } - }] - } - } - } - } -} diff --git a/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png b/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png deleted file mode 100644 index f1017f7e6..000000000 Binary files a/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png and /dev/null differ diff --git a/vendor/guzzle/guzzle/docs/_static/homepage.css b/vendor/guzzle/guzzle/docs/_static/homepage.css deleted file mode 100644 index 70c46d8d5..000000000 --- a/vendor/guzzle/guzzle/docs/_static/homepage.css +++ /dev/null @@ -1,122 +0,0 @@ -/* Hero unit on homepage */ - -.hero-unit h1 { - font-size: 49px; - margin-bottom: 12px; -} - -.hero-unit { - padding: 40px; -} - -.hero-unit p { - font-size: 17px; -} - -.masthead img { - float: left; - margin-right: 17px; -} - -.hero-unit ul li { - margin-left: 220px; -} - -.hero-unit .buttons { - text-align: center; -} - -.jumbotron { - position: relative; - padding: 40px 0; - color: #fff; - text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); - background: #00312F; - background: -moz-linear-gradient(45deg, #002F31 0%, #335A6D 100%); - background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#00312D), color-stop(100%,#33566D)); - background: -webkit-linear-gradient(45deg, #020031 0%,#334F6D 100%); - background: -o-linear-gradient(45deg, #002D31 0%,#334D6D 100%); - background: -ms-linear-gradient(45deg, #002F31 0%,#33516D 100%); - background: linear-gradient(45deg, #020031 0%,#33516D 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 ); - -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, .2), inset 0 -3px 7px rgba(0, 0, 0, .2); - -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); - box-shadow: inset 0 3px 7px rgba(0, 0, 0, .2), inset 0 -3px 7px rgba(0, 0, 0, .2); -} - -.jumbotron h1 { - font-size: 80px; - font-weight: bold; - letter-spacing: -1px; - line-height: 1; -} - -.jumbotron p { - font-size: 24px; - font-weight: 300; - line-height: 1.25; - margin-bottom: 30px; -} - -.masthead { - padding: 40px 0 30px; - margin-bottom: 0; - color: #fff; - margin-top: -19px; -} - -.masthead h1 { - display: none; -} - -.masthead p { - font-size: 40px; - font-weight: 200; - line-height: 1.25; - margin: 12px 0 0 0; -} - -.masthead .btn { - padding: 19px 24px; - font-size: 24px; - font-weight: 200; - border: 0; -} - -/* Social bar on homepage */ - -.social { - padding: 2px 0; - text-align: center; - background-color: #f5f5f5; - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; - margin: 0 0 20px 0; -} - -.social ul { - margin-top: 0; -} - -.social-buttons { - margin-left: 0; - margin-bottom: 0; - padding-left: 0; - list-style: none; -} - -.social-buttons li { - display: inline-block; - padding: 5px 8px; - line-height: 1; - *display: inline; - *zoom: 1; -} - -.center-announcement { - padding: 10px; - background-color: rgb(238, 243, 255); - border-radius: 8px; - text-align: center; - margin: 24px 0; -} diff --git a/vendor/guzzle/guzzle/docs/_static/logo.png b/vendor/guzzle/guzzle/docs/_static/logo.png deleted file mode 100644 index ecc40ac76..000000000 Binary files a/vendor/guzzle/guzzle/docs/_static/logo.png and /dev/null differ diff --git a/vendor/guzzle/guzzle/docs/_static/prettify.css b/vendor/guzzle/guzzle/docs/_static/prettify.css deleted file mode 100644 index 4d410b12e..000000000 --- a/vendor/guzzle/guzzle/docs/_static/prettify.css +++ /dev/null @@ -1,41 +0,0 @@ -.com { - color: #93A1A1; -} -.lit { - color: #195F91; -} -.pun, .opn, .clo { - color: #93A1A1; -} -.fun { - color: #DC322F; -} -.str, .atv { - color: #DD1144; -} -.kwd, .linenums .tag { - color: #1E347B; -} -.typ, .atn, .dec, .var { - color: teal; -} -.pln { - color: #48484C; -} -.prettyprint { - background-color: #F7F7F9; - border: 1px solid #E1E1E8; - padding: 8px; -} -.prettyprint.linenums { - box-shadow: 40px 0 0 #FBFBFC inset, 41px 0 0 #ECECF0 inset; -} -ol.linenums { - margin: 0 0 0 33px; -} -ol.linenums li { - color: #BEBEC5; - line-height: 18px; - padding-left: 12px; - text-shadow: 0 1px 0 #FFFFFF; -} diff --git a/vendor/guzzle/guzzle/docs/_static/prettify.js b/vendor/guzzle/guzzle/docs/_static/prettify.js deleted file mode 100644 index eef5ad7e6..000000000 --- a/vendor/guzzle/guzzle/docs/_static/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - - - -
- - - -
- -

Introducing Guzzle

- -

Guzzle takes the pain out of sending HTTP requests and the redundancy out of creating web service clients. It's - a framework that includes the tools needed to create a robust web service client, including: - Service descriptions for defining the inputs and outputs of an API, resource iterators for traversing - paginated resources, batching for sending a large number of requests as efficiently as possible.

- -
    -
  • All the power of cURL with a simple interface.
  • -
  • Persistent connections and parallel requests.
  • -
  • Streams request and response bodies
  • -
  • Service descriptions for quickly building clients.
  • -
  • Powered by the Symfony2 EventDispatcher.
  • -
  • Use all of the code or only specific components.
  • -
  • Plugins for caching, logging, OAuth, mocks, and more -
  • Includes a custom node.js webserver to test your clients.
  • -
- -
- Guzzle is now part of Drupal 8 core and powers the official AWS SDK for PHP -
- -

Quick Twitter example

- -
<?php
-require_once 'vendor/autoload.php';
-use Guzzle\Http\Client;
-
-// Create a client and provide a base URL
-$client = new Client('https://api.github.com');
-// Create a request with basic Auth
-$request = $client->get('/user')->setAuth('user', 'pass');
-// Send the request and get the response
-$response = $request->send();
-echo $response->getBody();
-// >>> {"type":"User", ...
-echo $response->getHeader('Content-Length');
-// >>> 792
-
-// Create a client to work with the Twitter API
-$client = new Client('https://api.twitter.com/{version}', array(
-    'version' => '1.1'
-));
-
-// Sign all requests with the OauthPlugin
-$client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(array(
-    'consumer_key'  => '***',
-    'consumer_secret' => '***',
-    'token'       => '***',
-    'token_secret'  => '***'
-)));
-
-echo $client->get('statuses/user_timeline.json')->send()->getBody();
-// >>> {"public_gists":6,"type":"User" ...
-
-// Create a tweet using POST
-$request = $client->post('statuses/update.json', null, array(
-    'status' => 'Tweeted with Guzzle, http://guzzlephp.org'
-));
-
-// Send the request and parse the JSON response into an array
-$data = $request->send()->json();
-echo $data['text'];
-// >>> Tweeted with Guzzle, http://t.co/kngJMfRk
-
-
- - diff --git a/vendor/guzzle/guzzle/docs/_templates/leftbar.html b/vendor/guzzle/guzzle/docs/_templates/leftbar.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/guzzle/guzzle/docs/_templates/nav_links.html b/vendor/guzzle/guzzle/docs/_templates/nav_links.html deleted file mode 100644 index d4f2165bb..000000000 --- a/vendor/guzzle/guzzle/docs/_templates/nav_links.html +++ /dev/null @@ -1,5 +0,0 @@ -
  • Docs
  • -
  • API
  • -
  • GitHub
  • -
  • Forum
  • -
  • IRC
  • diff --git a/vendor/guzzle/guzzle/docs/batching/batching.rst b/vendor/guzzle/guzzle/docs/batching/batching.rst deleted file mode 100644 index 57f04d80f..000000000 --- a/vendor/guzzle/guzzle/docs/batching/batching.rst +++ /dev/null @@ -1,183 +0,0 @@ -======== -Batching -======== - -Guzzle provides a fairly generic and very customizable batching framework that allows developers to efficiently -transfer requests in parallel. - -Sending requests and commands in parallel ------------------------------------------ - -You can send HTTP requests in parallel by passing an array of ``Guzzle\Http\Message\RequestInterface`` objects to -``Guzzle\Http\Client::send()``: - -.. code-block:: php - - $responses = $client->send(array( - $client->get('http://www.example.com/foo'), - $client->get('http://www.example.com/baz') - $client->get('http://www.example.com/bar') - )); - -You can send commands in parallel by passing an array of ``Guzzle\Service\Command\CommandInterface`` objects -``Guzzle\Service\Client::execute()``: - -.. code-block:: php - - $commands = $client->execute(array( - $client->getCommand('foo'), - $client->getCommand('baz'), - $client->getCommand('bar') - )); - -These approaches work well for most use-cases. When you need more control over the requests that are sent in -parallel or you need to send a large number of requests, you need to use the functionality provided in the -``Guzzle\Batch`` namespace. - -Batching overview ------------------ - -The batch object, ``Guzzle\Batch\Batch``, is a queue. You add requests to the queue until you are ready to transfer -all of the requests. In order to efficiently transfer the items in the queue, the batch object delegates the -responsibility of dividing the queue into manageable parts to a divisor (``Guzzle\Batch\BatchDivisorInterface``). -The batch object then iterates over each array of items created by the divisor and sends them to the batch object's -``Guzzle\Batch\BatchTransferInterface``. - -.. code-block:: php - - use Guzzle\Batch\Batch; - use Guzzle\Http\BatchRequestTransfer; - - // BatchRequestTransfer acts as both the divisor and transfer strategy - $transferStrategy = new BatchRequestTransfer(10); - $divisorStrategy = $transferStrategy; - - $batch = new Batch($transferStrategy, $divisorStrategy); - - // Add some requests to the batch queue - $batch->add($request1) - ->add($request2) - ->add($request3); - - // Flush the queue and retrieve the flushed items - $arrayOfTransferredRequests = $batch->flush(); - -.. note:: - - You might find that your transfer strategy will need to act as both the divisor and transfer strategy. - -Using the BatchBuilder ----------------------- - -The ``Guzzle\Batch\BatchBuilder`` makes it easier to create batch objects. The batch builder also provides an easier -way to add additional behaviors to your batch object. - -Transferring requests -~~~~~~~~~~~~~~~~~~~~~ - -The ``Guzzle\Http\BatchRequestTransfer`` class efficiently transfers HTTP requests in parallel by grouping batches of -requests by the curl_multi handle that is used to transfer the requests. - -.. code-block:: php - - use Guzzle\Batch\BatchBuilder; - - $batch = BatchBuilder::factory() - ->transferRequests(10) - ->build(); - -Transferring commands -~~~~~~~~~~~~~~~~~~~~~ - -The ``Guzzle\Service\Command\BatchCommandTransfer`` class efficiently transfers service commands by grouping commands -by the client that is used to transfer them. You can add commands to a batch object that are transferred by different -clients, and the batch will handle the rest. - -.. code-block:: php - - use Guzzle\Batch\BatchBuilder; - - $batch = BatchBuilder::factory() - ->transferCommands(10) - ->build(); - - $batch->add($client->getCommand('foo')) - ->add($client->getCommand('baz')) - ->add($client->getCommand('bar')); - - $commands = $batch->flush(); - -Batch behaviors ---------------- - -You can add various behaviors to your batch that allow for more customizable transfers. - -Automatically flushing a queue -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the ``Guzzle\Batch\FlushingBatch`` decorator when you want to pump a large number of items into a batch queue and -have the queue automatically flush when the size of the queue reaches a certain threshold. - -.. code-block:: php - - use Guzzle\Batch\BatchBuilder; - - $batch = BatchBuilder::factory() - ->transferRequests(10) - ->autoFlushAt(10) - ->build(); - -Batch builder method: ``autoFlushAt($threshold)`` - -Notifying on flush -~~~~~~~~~~~~~~~~~~ - -Use the ``Guzzle\Batch\NotifyingBatch`` decorator if you want a function to be notified each time the batch queue is -flushed. This is useful when paired with the flushing batch decorator. Pass a callable to the ``notify()`` method of -a batch builder to use this decorator with the builder. - -.. code-block:: php - - use Guzzle\Batch\BatchBuilder; - - $batch = BatchBuilder::factory() - ->transferRequests(10) - ->autoFlushAt(10) - ->notify(function (array $transferredItems) { - echo 'Transferred ' . count($transferredItems) . "items\n"; - }) - ->build(); - -Batch builder method:: ``notify(callable $callback)`` - -Keeping a history -~~~~~~~~~~~~~~~~~ - -Use the ``Guzzle\Batch\HistoryBatch`` decorator if you want to maintain a history of all the items transferred with -the batch queue. - -.. code-block:: php - - use Guzzle\Batch\BatchBuilder; - - $batch = BatchBuilder::factory() - ->transferRequests(10) - ->keepHistory() - ->build(); - -After transferring items, you can use the ``getHistory()`` of a batch to retrieve an array of transferred items. Be -sure to periodically clear the history using ``clearHistory()``. - -Batch builder method: ``keepHistory()`` - -Exception buffering -~~~~~~~~~~~~~~~~~~~ - -Use the ``Guzzle\Batch\ExceptionBufferingBatch`` decorator to buffer exceptions during a transfer so that you can -transfer as many items as possible then deal with the errored batches after the transfer completes. After transfer, -use the ``getExceptions()`` method of a batch to retrieve an array of -``Guzzle\Batch\Exception\BatchTransferException`` objects. You can use these exceptions to attempt to retry the -failed batches. Be sure to clear the buffered exceptions when you are done with them by using the -``clearExceptions()`` method. - -Batch builder method: ``bufferExceptions()`` diff --git a/vendor/guzzle/guzzle/docs/conf.py b/vendor/guzzle/guzzle/docs/conf.py deleted file mode 100644 index 895886d24..000000000 --- a/vendor/guzzle/guzzle/docs/conf.py +++ /dev/null @@ -1,95 +0,0 @@ -import sys, os -from sphinx.highlighting import lexers -from pygments.lexers.web import PhpLexer - -lexers['php'] = PhpLexer(startinline=True, linenos=1) -lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) -primary_domain = 'php' - -# -- General configuration ----------------------------------------------------- - -extensions = [] -templates_path = ['_templates'] -source_suffix = '.rst' -master_doc = 'index' - -project = u'Guzzle' -copyright = u'2012, Michael Dowling' -version = '3.0.0' -release = '3.0.0' - -exclude_patterns = ['_build'] - -# -- Options for HTML output --------------------------------------------------- - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = "Guzzle documentation" -html_short_title = "Guzzle" - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - '**': ['localtoc.html', 'leftbar.html', 'searchbox.html'] -} - -# Output file base name for HTML help builder. -htmlhelp_basename = 'Guzzledoc' - -# -- Guzzle Sphinx theme setup ------------------------------------------------ - -sys.path.insert(0, '/Users/dowling/projects/guzzle_sphinx_theme') - -import guzzle_sphinx_theme -pygments_style = 'guzzle_sphinx_theme.GuzzleStyle' -html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator' -html_theme_path = guzzle_sphinx_theme.html_theme_path() -html_theme = 'guzzle_sphinx_theme' - -# Guzzle theme options (see theme.conf for more information) -html_theme_options = { - "index_template": "index.html", - "project_nav_name": "Guzzle", - "github_user": "guzzle", - "github_repo": "guzzle", - "disqus_comments_shortname": "guzzle", - "google_analytics_account": "UA-22752917-1" -} - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = {} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'Guzzle.tex', u'Guzzle Documentation', - u'Michael Dowling', 'manual'), -] - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'guzzle', u'Guzzle Documentation', - [u'Michael Dowling'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'Guzzle', u'Guzzle Documentation', - u'Michael Dowling', 'Guzzle', 'One line description of project.', - 'Miscellaneous'), -] diff --git a/vendor/guzzle/guzzle/docs/docs.rst b/vendor/guzzle/guzzle/docs/docs.rst deleted file mode 100644 index cf87908bd..000000000 --- a/vendor/guzzle/guzzle/docs/docs.rst +++ /dev/null @@ -1,73 +0,0 @@ -.. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services - -==================== -Guzzle Documentation -==================== - -Getting started ---------------- - -.. toctree:: - :maxdepth: 1 - - getting-started/overview - getting-started/installation - getting-started/faq - -The HTTP client ---------------- - -.. toctree:: - :maxdepth: 2 - - http-client/client - http-client/request - http-client/response - http-client/entity-bodies - http-client/http-redirects - http-client/uri-templates - -Plugins -------- - -.. toctree:: - :maxdepth: 1 - - plugins/plugins-overview - plugins/creating-plugins - plugins/async-plugin - plugins/backoff-plugin - plugins/cache-plugin - plugins/cookie-plugin - plugins/curl-auth-plugin - plugins/history-plugin - plugins/log-plugin - plugins/md5-validator-plugin - plugins/mock-plugin - plugins/oauth-plugin - -The web service client ----------------------- - -.. toctree:: - :maxdepth: 1 - - webservice-client/webservice-client - webservice-client/using-the-service-builder - webservice-client/guzzle-service-descriptions - batching/batching - iterators/resource-iterators - iterators/guzzle-iterators - -Testing -------- - -.. toctree:: - :maxdepth: 2 - - testing/unit-testing - -API Docs --------- - -`Read the API docs `_ diff --git a/vendor/guzzle/guzzle/docs/getting-started/faq.rst b/vendor/guzzle/guzzle/docs/getting-started/faq.rst deleted file mode 100644 index a0a3fdbb6..000000000 --- a/vendor/guzzle/guzzle/docs/getting-started/faq.rst +++ /dev/null @@ -1,29 +0,0 @@ -=== -FAQ -=== - -What should I do if I get this error: Fatal error: Maximum function nesting level of '100' reached, aborting! -------------------------------------------------------------------------------------------------------------- - -You could run into this error if you have the XDebug extension installed and you execute a lot of requests in -callbacks. This error message comes specifically from the XDebug extension. PHP itself does not have a function -nesting limit. Change this setting in your php.ini to increase the limit:: - - xdebug.max_nesting_level = 1000 - -[`source `_] - -How can I speed up my client? ------------------------------ - -There are several things you can do to speed up your client: - -1. Utilize a C based HTTP message parser (e.g. ``Guzzle\Parser\Message\PeclHttpMessageParser``) -2. Disable operation validation by setting the ``command.disable_validation`` option to true on a command - -Why am I getting a 417 error response? --------------------------------------- - -This can occur for a number of reasons, but if you are sending PUT, POST, or PATCH requests with an -``Expect: 100-Continue`` header, a server that does not support this header will return a 417 response. You can work -around this by calling ``$request->removeHeader('Expect');`` after setting the entity body of a request. diff --git a/vendor/guzzle/guzzle/docs/getting-started/installation.rst b/vendor/guzzle/guzzle/docs/getting-started/installation.rst deleted file mode 100644 index 7d522919b..000000000 --- a/vendor/guzzle/guzzle/docs/getting-started/installation.rst +++ /dev/null @@ -1,154 +0,0 @@ -============ -Installation -============ - -Requirements ------------- - -#. PHP 5.3.3+ compiled with the cURL extension -#. A recent version of cURL 7.16.2+ compiled with OpenSSL and zlib - -Installing Guzzle ------------------ - -Composer -~~~~~~~~ - -The recommended way to install Guzzle is with `Composer `_. Composer is a dependency -management tool for PHP that allows you to declare the dependencies your project needs and installs them into your -project. - -.. code-block:: bash - - # Install Composer - curl -sS https://getcomposer.org/installer | php - - # Add Guzzle as a dependency - php composer.phar require guzzle/guzzle:~3.7 - -After installing, you need to require Composer's autoloader: - -.. code-block:: php - - require 'vendor/autoload.php'; - -You can find out more on how to install Composer, configure autoloading, and other best-practices for defining -dependencies at `getcomposer.org `_. - -Using only specific parts of Guzzle -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -While you can always just rely on ``guzzle/guzzle``, Guzzle provides several smaller parts of Guzzle as individual -packages available through Composer. - -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| Package name | Description | -+===============================================================================================+==========================================+ -| `guzzle/common `_ | Provides ``Guzzle\Common`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/http `_ | Provides ``Guzzle\Http`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/parser `_ | Provides ``Guzzle\Parser`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/batch `_ | Provides ``Guzzle\Batch`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/cache `_ | Provides ``Guzzle\Cache`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/inflection `_ | Provides ``Guzzle\Inflection`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/iterator `_ | Provides ``Guzzle\Iterator`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/log `_ | Provides ``Guzzle\Log`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin `_ | Provides ``Guzzle\Plugin`` (all plugins) | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-async `_ | Provides ``Guzzle\Plugin\Async`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-backoff `_ | Provides ``Guzzle\Plugin\BackoffPlugin`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-cache `_ | Provides ``Guzzle\Plugin\Cache`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-cookie `_ | Provides ``Guzzle\Plugin\Cookie`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-error-response `_ | Provides ``Guzzle\Plugin\ErrorResponse`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-history `_ | Provides ``Guzzle\Plugin\History`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-log `_ | Provides ``Guzzle\Plugin\Log`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-md5 `_ | Provides ``Guzzle\Plugin\Md5`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-mock `_ | Provides ``Guzzle\Plugin\Mock`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/plugin-oauth `_ | Provides ``Guzzle\Plugin\Oauth`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/service `_ | Provides ``Guzzle\Service`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ -| `guzzle/stream `_ | Provides ``Guzzle\Stream`` | -+-----------------------------------------------------------------------------------------------+------------------------------------------+ - -Bleeding edge -^^^^^^^^^^^^^ - -During your development, you can keep up with the latest changes on the master branch by setting the version -requirement for Guzzle to ``dev-master``. - -.. code-block:: js - - { - "require": { - "guzzle/guzzle": "dev-master" - } - } - -PEAR -~~~~ - -Guzzle can be installed through PEAR: - -.. code-block:: bash - - pear channel-discover guzzlephp.org/pear - pear install guzzle/guzzle - -You can install a specific version of Guzzle by providing a version number suffix: - -.. code-block:: bash - - pear install guzzle/guzzle-3.7.0 - -Contributing to Guzzle ----------------------- - -In order to contribute, you'll need to checkout the source from GitHub and install Guzzle's dependencies using -Composer: - -.. code-block:: bash - - git clone https://github.com/guzzle/guzzle.git - cd guzzle && curl -s http://getcomposer.org/installer | php && ./composer.phar install --dev - -Guzzle is unit tested with PHPUnit. You will need to create your own phpunit.xml file in order to run the unit tests -(or just copy phpunit.xml.dist to phpunit.xml). Run the tests using the vendored PHPUnit binary: - -.. code-block:: bash - - vendor/bin/phpunit - -You'll need to install node.js v0.5.0 or newer in order to test the cURL implementation. - -Framework integrations ----------------------- - -Using Guzzle with Symfony -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Bundles are available on GitHub: - -- `DdeboerGuzzleBundle `_ for Guzzle 2 -- `MisdGuzzleBundle `_ for Guzzle 3 - -Using Guzzle with Silex -~~~~~~~~~~~~~~~~~~~~~~~ - -A `Guzzle Silex service provider `_ is available on GitHub. diff --git a/vendor/guzzle/guzzle/docs/getting-started/overview.rst b/vendor/guzzle/guzzle/docs/getting-started/overview.rst deleted file mode 100644 index 505b40978..000000000 --- a/vendor/guzzle/guzzle/docs/getting-started/overview.rst +++ /dev/null @@ -1,85 +0,0 @@ -================= -Welcome to Guzzle -================= - -What is Guzzle? -~~~~~~~~~~~~~~~ - -Guzzle is a PHP HTTP client and framework for building web service clients. Guzzle takes the pain out of sending HTTP -requests and the redundancy out of creating web service clients. - -Features at a glance --------------------- - -- All the power of cURL with a simple interface. -- Persistent connections and parallel requests. -- Streams request and response bodies -- Service descriptions for quickly building clients. -- Powered by the Symfony2 EventDispatcher. -- Use all of the code or only specific components. -- Plugins for caching, logging, OAuth, mocks, and more -- Includes a custom node.js webserver to test your clients. -- Service descriptions for defining the inputs and outputs of an API -- Resource iterators for traversing paginated resources -- Batching for sending a large number of requests as efficiently as possible - -.. code-block:: php - - // Really simple using a static facade - Guzzle\Http\StaticClient::mount(); - $response = Guzzle::get('http://guzzlephp.org'); - - // More control using a client class - $client = new \Guzzle\Http\Client('http://guzzlephp.org'); - $request = $client->get('/'); - $response = $request->send(); - -License -------- - -Licensed using the `MIT license `_. - - Copyright (c) 2013 Michael Dowling - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -Contributing ------------- - -Guidelines -~~~~~~~~~~ - -This is still a work in progress, but there are only a few rules: - -1. Guzzle follows PSR-0, PSR-1, and PSR-2 -2. All pull requests must include unit tests to ensure the change works as expected and to prevent future regressions - -Reporting a security vulnerability -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -We want to ensure that Guzzle is a secure HTTP client library for everyone. If you've discovered a security -vulnerability in Guzzle, we appreciate your help in disclosing it to us in a -`responsible manner `_. - -Publicly disclosing a vulnerability can put the entire community at risk. If you've discovered a security concern, -please email us at security@guzzlephp.org. We'll work with you to make sure that we understand the scope of the issue, -and that we fully address your concern. We consider correspondence sent to security@guzzlephp.org our highest priority, -and work to address any issues that arise as quickly as possible. - -After a security vulnerability has been corrected, a security hotfix release will be deployed as soon as possible. diff --git a/vendor/guzzle/guzzle/docs/http-client/client.rst b/vendor/guzzle/guzzle/docs/http-client/client.rst deleted file mode 100644 index d344a96e0..000000000 --- a/vendor/guzzle/guzzle/docs/http-client/client.rst +++ /dev/null @@ -1,569 +0,0 @@ -====================== -The Guzzle HTTP client -====================== - -Guzzle gives PHP developers complete control over HTTP requests while utilizing HTTP/1.1 best practices. Guzzle's HTTP -functionality is a robust framework built on top of the `PHP libcurl bindings `_. - -The three main parts of the Guzzle HTTP client are: - -+--------------+-------------------------------------------------------------------------------------------------------+ -| Clients | ``Guzzle\Http\Client`` (creates and sends requests, associates a response with a request) | -+--------------+-------------------------------------------------------------------------------------------------------+ -| Requests | ``Guzzle\Http\Message\Request`` (requests with no body), | -| | ``Guzzle\Http\Message\EntityEnclosingRequest`` (requests with a body) | -+--------------+-------------------------------------------------------------------------------------------------------+ -| Responses | ``Guzzle\Http\Message\Response`` | -+--------------+-------------------------------------------------------------------------------------------------------+ - -Creating a Client ------------------ - -Clients create requests, send requests, and set responses on a request object. When instantiating a client object, -you can pass an optional "base URL" and optional array of configuration options. A base URL is a -:doc:`URI template ` that contains the URL of a remote server. When creating requests with a relative -URL, the base URL of a client will be merged into the request's URL. - -.. code-block:: php - - use Guzzle\Http\Client; - - // Create a client and provide a base URL - $client = new Client('https://api.github.com'); - - $request = $client->get('/user'); - $request->setAuth('user', 'pass'); - echo $request->getUrl(); - // >>> https://api.github.com/user - - // You must send a request in order for the transfer to occur - $response = $request->send(); - - echo $response->getBody(); - // >>> {"type":"User", ... - - echo $response->getHeader('Content-Length'); - // >>> 792 - - $data = $response->json(); - echo $data['type']; - // >>> User - -Base URLs -~~~~~~~~~ - -Notice that the URL provided to the client's ``get()`` method is relative. Relative URLs will always merge into the -base URL of the client. There are a few rules that control how the URLs are merged. - -.. tip:: - - Guzzle follows `RFC 3986 `_ when merging base URLs and - relative URLs. - -In the above example, we passed ``/user`` to the ``get()`` method of the client. This is a relative URL, so it will -merge into the base URL of the client-- resulting in the derived URL of ``https://api.github.com/users``. - -``/user`` is a relative URL but uses an absolute path because it contains the leading slash. Absolute paths will -overwrite any existing path of the base URL. If an absolute path is provided (e.g. ``/path/to/something``), then the -path specified in the base URL of the client will be replaced with the absolute path, and the query string provided -by the relative URL will replace the query string of the base URL. - -Omitting the leading slash and using relative paths will add to the path of the base URL of the client. So using a -client base URL of ``https://api.twitter.com/v1.1`` and creating a GET request with ``statuses/user_timeline.json`` -will result in a URL of ``https://api.twitter.com/v1.1/statuses/user_timeline.json``. If a relative path and a query -string are provided, then the relative path will be appended to the base URL path, and the query string provided will -be merged into the query string of the base URL. - -If an absolute URL is provided (e.g. ``http://httpbin.org/ip``), then the request will completely use the absolute URL -as-is without merging in any of the URL parts specified in the base URL. - -Configuration options -~~~~~~~~~~~~~~~~~~~~~ - -The second argument of the client's constructor is an array of configuration data. This can include URI template data -or special options that alter the client's behavior: - -+-------------------------------+-------------------------------------------------------------------------------------+ -| ``request.options`` | Associative array of :ref:`Request options ` to apply to every | -| | request created by the client. | -+-------------------------------+-------------------------------------------------------------------------------------+ -| ``redirect.disable`` | Disable HTTP redirects for every request created by the client. | -+-------------------------------+-------------------------------------------------------------------------------------+ -| ``curl.options`` | Associative array of cURL options to apply to every request created by the client. | -| | if either the key or value of an entry in the array is a string, Guzzle will | -| | attempt to find a matching defined cURL constant automatically (e.g. | -| | "CURLOPT_PROXY" will be converted to the constant ``CURLOPT_PROXY``). | -+-------------------------------+-------------------------------------------------------------------------------------+ -| ``ssl.certificate_authority`` | Set to true to use the Guzzle bundled SSL certificate bundle (this is used by | -| | default, 'system' to use the bundle on your system, a string pointing to a file to | -| | use a specific certificate file, a string pointing to a directory to use multiple | -| | certificates, or ``false`` to disable SSL validation (not recommended). | -| | | -| | When using Guzzle inside of a phar file, the bundled SSL certificate will be | -| | extracted to your system's temp folder, and each time a client is created an MD5 | -| | check will be performed to ensure the integrity of the certificate. | -+-------------------------------+-------------------------------------------------------------------------------------+ -| ``command.params`` | When using a ``Guzzle\Service\Client`` object, this is an associative array of | -| | default options to set on each command created by the client. | -+-------------------------------+-------------------------------------------------------------------------------------+ - -Here's an example showing how to set various configuration options, including default headers to send with each request, -default query string parameters to add to each request, a default auth scheme for each request, and a proxy to use for -each request. Values can be injected into the client's base URL using variables from the configuration array. - -.. code-block:: php - - use Guzzle\Http\Client; - - $client = new Client('https://api.twitter.com/{version}', array( - 'version' => 'v1.1', - 'request.options' => array( - 'headers' => array('Foo' => 'Bar'), - 'query' => array('testing' => '123'), - 'auth' => array('username', 'password', 'Basic|Digest|NTLM|Any'), - 'proxy' => 'tcp://localhost:80' - ) - )); - -Setting a custom User-Agent -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The default Guzzle User-Agent header is ``Guzzle/ curl/ PHP/``. You can -customize the User-Agent header of a client by calling the ``setUserAgent()`` method of a Client object. - -.. code-block:: php - - // Completely override the default User-Agent - $client->setUserAgent('Test/123'); - - // Prepend a string to the default User-Agent - $client->setUserAgent('Test/123', true); - -Creating requests with a client -------------------------------- - -A Client object exposes several methods used to create Request objects: - -* Create a custom HTTP request: ``$client->createRequest($method, $uri, array $headers, $body, $options)`` -* Create a GET request: ``$client->get($uri, array $headers, $options)`` -* Create a HEAD request: ``$client->head($uri, array $headers, $options)`` -* Create a DELETE request: ``$client->delete($uri, array $headers, $body, $options)`` -* Create a POST request: ``$client->post($uri, array $headers, $postBody, $options)`` -* Create a PUT request: ``$client->put($uri, array $headers, $body, $options)`` -* Create a PATCH request: ``$client->patch($uri, array $headers, $body, $options)`` - -.. code-block:: php - - use Guzzle\Http\Client; - - $client = new Client('http://baseurl.com/api/v1'); - - // Create a GET request using Relative to base URL - // URL of the request: http://baseurl.com/api/v1/path?query=123&value=abc) - $request = $client->get('path?query=123&value=abc'); - $response = $request->send(); - - // Create HEAD request using a relative URL with an absolute path - // URL of the request: http://baseurl.com/path?query=123&value=abc - $request = $client->head('/path?query=123&value=abc'); - $response = $request->send(); - - // Create a DELETE request using an absolute URL - $request = $client->delete('http://www.example.com/path?query=123&value=abc'); - $response = $request->send(); - - // Create a PUT request using the contents of a PHP stream as the body - // Specify custom HTTP headers - $request = $client->put('http://www.example.com/upload', array( - 'X-Header' => 'My Header' - ), fopen('http://www.test.com/', 'r')); - $response = $request->send(); - - // Create a POST request and add the POST files manually - $request = $client->post('http://localhost:8983/solr/update') - ->addPostFiles(array('file' => '/path/to/documents.xml')); - $response = $request->send(); - - // Check if a resource supports the DELETE method - $supportsDelete = $client->options('/path')->send()->isMethodAllowed('DELETE'); - $response = $request->send(); - -Client objects create Request objects using a request factory (``Guzzle\Http\Message\RequestFactoryInterface``). -You can inject a custom request factory into the Client using ``$client->setRequestFactory()``, but you can typically -rely on a Client's default request factory. - -Static clients --------------- - -You can use Guzzle's static client facade to more easily send simple HTTP requests. - -.. code-block:: php - - // Mount the client so that you can access it at \Guzzle - Guzzle\Http\StaticClient::mount(); - $response = Guzzle::get('http://guzzlephp.org'); - -Each request method of the static client (e.g. ``get()``, ``post()`, ``put()``, etc) accepts an associative array of request -options to apply to the request. - -.. code-block:: php - - $response = Guzzle::post('http://test.com', array( - 'headers' => array('X-Foo' => 'Bar'), - 'body' => array('Test' => '123'), - 'timeout' => 10 - )); - -.. _request-options: - -Request options ---------------- - -Request options can be specified when creating a request or in the ``request.options`` parameter of a client. These -options can control various aspects of a request including: headers to send, query string data, where the response -should be downloaded, proxies, auth, etc. - -headers -~~~~~~~ - -Associative array of headers to apply to the request. When specified in the ``$options`` argument of a client creational -method (e.g. ``get()``, ``post()``, etc), the headers in the ``$options`` array will overwrite headers specified in the -``$headers`` array. - -.. code-block:: php - - $request = $client->get($url, array(), array( - 'headers' => array('X-Foo' => 'Bar') - )); - -Headers can be specified on a client to add default headers to every request sent by a client. - -.. code-block:: php - - $client = new Guzzle\Http\Client(); - - // Set a single header using path syntax - $client->setDefaultOption('headers/X-Foo', 'Bar'); - - // Set all headers - $client->setDefaultOption('headers', array('X-Foo' => 'Bar')); - -.. note:: - - In addition to setting request options when creating requests or using the ``setDefaultOption()`` method, any - default client request option can be set using a client's config object: - - .. code-block:: php - - $client->getConfig()->setPath('request.options/headers/X-Foo', 'Bar'); - -query -~~~~~ - -Associative array of query string parameters to the request. When specified in the ``$options`` argument of a client -creational method, the query string parameters in the ``$options`` array will overwrite query string parameters -specified in the `$url`. - -.. code-block:: php - - $request = $client->get($url, array(), array( - 'query' => array('abc' => '123') - )); - -Query string parameters can be specified on a client to add default query string parameters to every request sent by a -client. - -.. code-block:: php - - $client = new Guzzle\Http\Client(); - - // Set a single query string parameter using path syntax - $client->setDefaultOption('query/abc', '123'); - - // Set an array of default query string parameters - $client->setDefaultOption('query', array('abc' => '123')); - -body -~~~~ - -Sets the body of a request. The value supplied to the body option can be a ``Guzzle\Http\EntityBodyInterface``, string, -fopen resource, or array when sending POST requests. When a ``body`` request option is supplied, the option value will -overwrite the ``$body`` argument of a client creational method. - -auth -~~~~ - -Specifies and array of HTTP authorization parameters parameters to use with the request. The array must contain the -username in index [0], the password in index [1], and can optionally contain the authentication type in index [2]. -The available authentication types are: "Basic" (default), "Digest", "NTLM", or "Any". - -.. code-block:: php - - $request = $client->get($url, array(), array( - 'auth' => array('username', 'password', 'Digest') - )); - - // You can add auth headers to every request of a client - $client->setDefaultOption('auth', array('username', 'password', 'Digest')); - -cookies -~~~~~~~ - -Specifies an associative array of cookies to add to the request. - -allow_redirects -~~~~~~~~~~~~~~~ - -Specifies whether or not the request should follow redirects. Requests will follow redirects by default. Set -``allow_redirects`` to ``false`` to disable redirects. - -save_to -~~~~~~~ - -The ``save_to`` option specifies where the body of a response is downloaded. You can pass the path to a file, an fopen -resource, or a ``Guzzle\Http\EntityBodyInterface`` object. - -See :ref:`Changing where a response is downloaded ` for more information on setting the -`save_to` option. - -events -~~~~~~ - -The `events` option makes it easy to attach listeners to the various events emitted by a request object. The `events` -options must be an associative array mapping an event name to a Closure or array the contains a Closure and the -priority of the event. - -.. code-block:: php - - $request = $client->get($url, array(), array( - 'events' => array( - 'request.before_send' => function (\Guzzle\Common\Event $e) { - echo 'About to send ' . $e['request']; - } - ) - )); - - // Using the static client: - Guzzle::get($url, array( - 'events' => array( - 'request.before_send' => function (\Guzzle\Common\Event $e) { - echo 'About to send ' . $e['request']; - } - ) - )); - -plugins -~~~~~~~ - -The `plugins` options makes it easy to attach an array of plugins to a request. - -.. code-block:: php - - // Using the static client: - Guzzle::get($url, array( - 'plugins' => array( - new Guzzle\Plugin\Cache\CachePlugin(), - new Guzzle\Plugin\Cookie\CookiePlugin() - ) - )); - -exceptions -~~~~~~~~~~ - -The `exceptions` option can be used to disable throwing exceptions for unsuccessful HTTP response codes -(e.g. 404, 500, etc). Set `exceptions` to false to not throw exceptions. - -params -~~~~~~ - -The `params` options can be used to specify an associative array of data parameters to add to a request. Note that -these are not query string parameters. - -timeout / connect_timeout -~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can specify the maximum number of seconds to allow for an entire transfer to take place before timing out using -the `timeout` request option. You can specify the maximum number of seconds to wait while trying to connect using the -`connect_timeout` request option. Set either of these options to 0 to wait indefinitely. - -.. code-block:: php - - $request = $client->get('http://www.example.com', array(), array( - 'timeout' => 20, - 'connect_timeout' => 1.5 - )); - -verify -~~~~~~ - -Set to true to enable SSL certificate validation (the default), false to disable SSL certificate validation, or supply -the path to a CA bundle to enable verification using a custom certificate. - -cert -~~~~ - -The `cert` option lets you specify a PEM formatted SSL client certificate to use with servers that require one. If the -certificate requires a password, provide an array with the password as the second item. - -This would typically be used in conjuction with the `ssl_key` option. - -.. code-block:: php - - $request = $client->get('https://www.example.com', array(), array( - 'cert' => '/etc/pki/client_certificate.pem' - ) - - $request = $client->get('https://www.example.com', array(), array( - 'cert' => array('/etc/pki/client_certificate.pem', 's3cr3tp455w0rd') - ) - -ssl_key -~~~~~~~ - -The `ssl_key` option lets you specify a file containing your PEM formatted private key, optionally protected by a password. -Note: your password is sensitive, keep the PHP script containing it safe. - -This would typically be used in conjuction with the `cert` option. - -.. code-block:: php - - $request = $client->get('https://www.example.com', array(), array( - 'ssl_key' => '/etc/pki/private_key.pem' - ) - - $request = $client->get('https://www.example.com', array(), array( - 'ssl_key' => array('/etc/pki/private_key.pem', 's3cr3tp455w0rd') - ) - -proxy -~~~~~ - -The `proxy` option is used to specify an HTTP proxy (e.g. `http://username:password@192.168.16.1:10`). - -debug -~~~~~ - -The `debug` option is used to show verbose cURL output for a transfer. - -stream -~~~~~~ - -When using a static client, you can set the `stream` option to true to return a `Guzzle\Stream\Stream` object that can -be used to pull data from a stream as needed (rather than have cURL download the entire contents of a response to a -stream all at once). - -.. code-block:: php - - $stream = Guzzle::get('http://guzzlephp.org', array('stream' => true)); - while (!$stream->feof()) { - echo $stream->readLine(); - } - -Sending requests ----------------- - -Requests can be sent by calling the ``send()`` method of a Request object, but you can also send requests using the -``send()`` method of a Client. - -.. code-block:: php - - $request = $client->get('http://www.amazon.com'); - $response = $client->send($request); - -Sending requests in parallel -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Client's ``send()`` method accept a single ``Guzzle\Http\Message\RequestInterface`` object or an array of -RequestInterface objects. When an array is specified, the requests will be sent in parallel. - -Sending many HTTP requests serially (one at a time) can cause an unnecessary delay in a script's execution. Each -request must complete before a subsequent request can be sent. By sending requests in parallel, a pool of HTTP -requests can complete at the speed of the slowest request in the pool, significantly reducing the amount of time -needed to execute multiple HTTP requests. Guzzle provides a wrapper for the curl_multi functions in PHP. - -Here's an example of sending three requests in parallel using a client object: - -.. code-block:: php - - use Guzzle\Common\Exception\MultiTransferException; - - try { - $responses = $client->send(array( - $client->get('http://www.google.com/'), - $client->head('http://www.google.com/'), - $client->get('https://www.github.com/') - )); - } catch (MultiTransferException $e) { - - echo "The following exceptions were encountered:\n"; - foreach ($e as $exception) { - echo $exception->getMessage() . "\n"; - } - - echo "The following requests failed:\n"; - foreach ($e->getFailedRequests() as $request) { - echo $request . "\n\n"; - } - - echo "The following requests succeeded:\n"; - foreach ($e->getSuccessfulRequests() as $request) { - echo $request . "\n\n"; - } - } - -If the requests succeed, an array of ``Guzzle\Http\Message\Response`` objects are returned. A single request failure -will not cause the entire pool of requests to fail. Any exceptions thrown while transferring a pool of requests will -be aggregated into a ``Guzzle\Common\Exception\MultiTransferException`` exception. - -Plugins and events ------------------- - -Guzzle provides easy to use request plugins that add behavior to requests based on signal slot event notifications -powered by the -`Symfony2 Event Dispatcher component `_. Any -event listener or subscriber attached to a Client object will automatically be attached to each request created by the -client. - -Using the same cookie session for each request -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Attach a ``Guzzle\Plugin\Cookie\CookiePlugin`` to a client which will in turn add support for cookies to every request -created by a client, and each request will use the same cookie session: - -.. code-block:: php - - use Guzzle\Plugin\Cookie\CookiePlugin; - use Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar; - - // Create a new cookie plugin - $cookiePlugin = new CookiePlugin(new ArrayCookieJar()); - - // Add the cookie plugin to the client - $client->addSubscriber($cookiePlugin); - -.. _client-events: - -Events emitted from a client -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A ``Guzzle\Http\Client`` object emits the following events: - -+------------------------------+--------------------------------------------+------------------------------------------+ -| Event name | Description | Event data | -+==============================+============================================+==========================================+ -| client.create_request | Called when a client creates a request | * client: The client | -| | | * request: The created request | -+------------------------------+--------------------------------------------+------------------------------------------+ - -.. code-block:: php - - use Guzzle\Common\Event; - use Guzzle\Http\Client; - - $client = new Client(); - - // Add a listener that will echo out requests as they are created - $client->getEventDispatcher()->addListener('client.create_request', function (Event $e) { - echo 'Client object: ' . spl_object_hash($e['client']) . "\n"; - echo "Request object: {$e['request']}\n"; - }); diff --git a/vendor/guzzle/guzzle/docs/http-client/entity-bodies.rst b/vendor/guzzle/guzzle/docs/http-client/entity-bodies.rst deleted file mode 100644 index 823b0c022..000000000 --- a/vendor/guzzle/guzzle/docs/http-client/entity-bodies.rst +++ /dev/null @@ -1,151 +0,0 @@ -=========================== -Request and response bodies -=========================== - -`Entity body `_ is the term used for the body of an HTTP -message. The entity body of requests and responses is inherently a -`PHP stream `_ in Guzzle. The body of the request can be either a string or -a PHP stream which are converted into a ``Guzzle\Http\EntityBody`` object using its factory method. When using a -string, the entity body is stored in a `temp PHP stream `_. The use of -temp PHP streams helps to protect your application from running out of memory when sending or receiving large entity -bodies in your messages. When more than 2MB of data is stored in a temp stream, it automatically stores the data on -disk rather than in memory. - -EntityBody objects provide a great deal of functionality: compression, decompression, calculate the Content-MD5, -calculate the Content-Length (when the resource is repeatable), guessing the Content-Type, and more. Guzzle doesn't -need to load an entire entity body into a string when sending or retrieving data; entity bodies are streamed when -being uploaded and downloaded. - -Here's an example of gzip compressing a text file then sending the file to a URL: - -.. code-block:: php - - use Guzzle\Http\EntityBody; - - $body = EntityBody::factory(fopen('/path/to/file.txt', 'r+')); - echo $body->read(1024); - $body->seek(0, SEEK_END); - $body->write('foo'); - echo $body->ftell(); - $body->rewind(); - - // Send a request using the body - $response = $client->put('http://localhost:8080/uploads', null, $body)->send(); - -The body of the request can be specified in the ``Client::put()`` or ``Client::post()`` method, or, you can specify -the body of the request by calling the ``setBody()`` method of any -``Guzzle\Http\Message\EntityEnclosingRequestInterface`` object. - -Compression ------------ - -You can compress the contents of an EntityBody object using the ``compress()`` method. The compress method accepts a -filter that must match to one of the supported -`PHP stream filters `_ on your system (e.g. `zlib.deflate`, -``bzip2.compress``, etc). Compressing an entity body will stream the entire entity body through a stream compression -filter into a temporary PHP stream. You can uncompress an entity body using the ``uncompress()`` method and passing -the PHP stream filter to use when decompressing the stream (e.g. ``zlib.inflate``). - -.. code-block:: php - - use Guzzle\Http\EntityBody; - - $body = EntityBody::factory(fopen('/tmp/test.txt', 'r+')); - echo $body->getSize(); - // >>> 1048576 - - // Compress using the default zlib.deflate filter - $body->compress(); - echo $body->getSize(); - // >>> 314572 - - // Decompress the stream - $body->uncompress(); - echo $body->getSize(); - // >>> 1048576 - -Decorators ----------- - -Guzzle provides several EntityBody decorators that can be used to add functionality to an EntityBody at runtime. - -IoEmittingEntityBody -~~~~~~~~~~~~~~~~~~~~ - -This decorator will emit events when data is read from a stream or written to a stream. Add an event subscriber to the -entity body's ``body.read`` or ``body.write`` methods to receive notifications when data data is transferred. - -.. code-block:: php - - use Guzzle\Common\Event; - use Guzzle\Http\EntityBody; - use Guzzle\Http\IoEmittingEntityBody; - - $original = EntityBody::factory(fopen('/tmp/test.txt', 'r+')); - $body = new IoEmittingEntityBody($original); - - // Listen for read events - $body->getEventDispatcher()->addListener('body.read', function (Event $e) { - // Grab data from the event - $entityBody = $e['body']; - // Amount of data retrieved from the body - $lengthOfData = $e['length']; - // The actual data that was read - $data = $e['read']; - }); - - // Listen for write events - $body->getEventDispatcher()->addListener('body.write', function (Event $e) { - // Grab data from the event - $entityBody = $e['body']; - // The data that was written - $data = $e['write']; - // The actual amount of data that was written - $data = $e['read']; - }); - -ReadLimitEntityBody -~~~~~~~~~~~~~~~~~~~ - -The ReadLimitEntityBody decorator can be used to transfer a subset or slice of an existing EntityBody object. This can -be useful for breaking a large file into smaller pieces to be sent in chunks (e.g. Amazon S3's multipart upload API). - -.. code-block:: php - - use Guzzle\Http\EntityBody; - use Guzzle\Http\ReadLimitEntityBody; - - $original = EntityBody::factory(fopen('/tmp/test.txt', 'r+')); - echo $original->getSize(); - // >>> 1048576 - - // Limit the size of the body to 1024 bytes and start reading from byte 2048 - $body = new ReadLimitEntityBody($original, 1024, 2048); - echo $body->getSize(); - // >>> 1024 - echo $body->ftell(); - // >>> 0 - -CachingEntityBody -~~~~~~~~~~~~~~~~~ - -The CachingEntityBody decorator is used to allow seeking over previously read bytes on non-seekable read streams. This -can be useful when transferring a non-seekable entity body fails due to needing to rewind the stream (for example, -resulting from a redirect). Data that is read from the remote stream will be buffered in a PHP temp stream so that -previously read bytes are cached first in memory, then on disk. - -.. code-block:: php - - use Guzzle\Http\EntityBody; - use Guzzle\Http\CachingEntityBody; - - $original = EntityBody::factory(fopen('http://www.google.com', 'r')); - $body = new CachingEntityBody($original); - - $body->read(1024); - echo $body->ftell(); - // >>> 1024 - - $body->seek(0); - echo $body->ftell(); - // >>> 0 diff --git a/vendor/guzzle/guzzle/docs/http-client/http-redirects.rst b/vendor/guzzle/guzzle/docs/http-client/http-redirects.rst deleted file mode 100644 index 32ba26891..000000000 --- a/vendor/guzzle/guzzle/docs/http-client/http-redirects.rst +++ /dev/null @@ -1,99 +0,0 @@ -============== -HTTP redirects -============== - -By default, Guzzle will automatically follow redirects using the non-RFC compliant implementation used by most web -browsers. This means that redirects for POST requests are followed by a GET request. You can force RFC compliance by -enabling the strict mode on a request's parameter object: - -.. code-block:: php - - // Set per request - $request = $client->post(); - $request->getParams()->set('redirect.strict', true); - - // You can set globally on a client so all requests use strict redirects - $client->getConfig()->set('request.params', array( - 'redirect.strict' => true - )); - -By default, Guzzle will redirect up to 5 times before throwing a ``Guzzle\Http\Exception\TooManyRedirectsException``. -You can raise or lower this value using the ``redirect.max`` parameter of a request object: - -.. code-block:: php - - $request->getParams()->set('redirect.max', 2); - -Redirect history ----------------- - -You can get the number of redirects of a request using the resulting response object's ``getRedirectCount()`` method. -Similar to cURL's ``effective_url`` property, Guzzle provides the effective URL, or the last redirect URL that returned -the request, in a response's ``getEffectiveUrl()`` method. - -When testing or debugging, it is often useful to see a history of redirects for a particular request. This can be -achieved using the HistoryPlugin. - -.. code-block:: php - - $request = $client->get('/'); - $history = new Guzzle\Plugin\History\HistoryPlugin(); - $request->addSubscriber($history); - $response = $request->send(); - - // Get the last redirect URL or the URL of the request that received - // this response - echo $response->getEffectiveUrl(); - - // Get the number of redirects - echo $response->getRedirectCount(); - - // Iterate over each sent request and response - foreach ($history->getAll() as $transaction) { - // Request object - echo $transaction['request']->getUrl() . "\n"; - // Response object - echo $transaction['response']->getEffectiveUrl() . "\n"; - } - - // Or, simply cast the HistoryPlugin to a string to view each request and response - echo $history; - -Disabling redirects -------------------- - -You can disable redirects on a client by passing a configuration option in the client's constructor: - -.. code-block:: php - - $client = new Client(null, array('redirect.disable' => true)); - -You can also disable redirects per request: - -.. code-block:: php - - $request = $client->get($url, array(), array('allow_redirects' => false)); - -Redirects and non-repeatable streams ------------------------------------- - -If you are redirected when sending data from a non-repeatable stream and some of the data has been read off of the -stream, then you will get a ``Guzzle\Http\Exception\CouldNotRewindStreamException``. You can get around this error by -adding a custom rewind method to the entity body object being sent in the request. - -.. code-block:: php - - $request = $client->post( - 'http://httpbin.com/redirect/2', - null, - fopen('http://httpbin.com/get', 'r') - ); - - // Add a custom function that can be used to rewind the stream - // (reopen in this example) - $request->getBody()->setRewindFunction(function ($body) { - $body->setStream(fopen('http://httpbin.com/get', 'r')); - return true; - ); - - $response = $client->send(); diff --git a/vendor/guzzle/guzzle/docs/http-client/request.rst b/vendor/guzzle/guzzle/docs/http-client/request.rst deleted file mode 100644 index a0593c915..000000000 --- a/vendor/guzzle/guzzle/docs/http-client/request.rst +++ /dev/null @@ -1,667 +0,0 @@ -===================== -Using Request objects -===================== - -HTTP request messages ---------------------- - -Request objects are all about building an HTTP message. Each part of an HTTP request message can be set individually -using methods on the request object or set in bulk using the ``setUrl()`` method. Here's the format of an HTTP request -with each part of the request referencing the method used to change it:: - - PUT(a) /path(b)?query=123(c) HTTP/1.1(d) - X-Header(e): header - Content-Length(e): 4 - - data(f) - -+-------------------------+---------------------------------------------------------------------------------+ -| a. **Method** | The request method can only be set when instantiating a request | -+-------------------------+---------------------------------------------------------------------------------+ -| b. **Path** | ``$request->setPath('/path');`` | -+-------------------------+---------------------------------------------------------------------------------+ -| c. **Query** | ``$request->getQuery()->set('query', '123');`` | -+-------------------------+---------------------------------------------------------------------------------+ -| d. **Protocol version** | ``$request->setProtocolVersion('1.1');`` | -+-------------------------+---------------------------------------------------------------------------------+ -| e. **Header** | ``$request->setHeader('X-Header', 'header');`` | -+-------------------------+---------------------------------------------------------------------------------+ -| f. **Entity Body** | ``$request->setBody('data'); // Only available with PUT, POST, PATCH, DELETE`` | -+-------------------------+---------------------------------------------------------------------------------+ - -Creating requests with a client -------------------------------- - -Client objects are responsible for creating HTTP request objects. - -GET requests -~~~~~~~~~~~~ - -`GET requests `_ are the most common form of HTTP -requests. When you visit a website in your browser, the HTML of the website is downloaded using a GET request. GET -requests are idempotent requests that are typically used to download content (an entity) identified by a request URL. - -.. code-block:: php - - use Guzzle\Http\Client; - - $client = new Client(); - - // Create a request that has a query string and an X-Foo header - $request = $client->get('http://www.amazon.com?a=1', array('X-Foo' => 'Bar')); - - // Send the request and get the response - $response = $request->send(); - -You can change where the body of a response is downloaded on any request using the -``$request->setResponseBody(string|EntityBodyInterface|resource)`` method of a request. You can also set the ``save_to`` -option of a request: - -.. code-block:: php - - // Send the response body to a file - $request = $client->get('http://test.com', array(), array('save_to' => '/path/to/file')); - - // Send the response body to an fopen resource - $request = $client->get('http://test.com', array(), array('save_to' => fopen('/path/to/file', 'w'))); - -HEAD requests -~~~~~~~~~~~~~ - -`HEAD requests `_ work exactly like GET requests except -that they do not actually download the response body (entity) of the response message. HEAD requests are useful for -retrieving meta information about an entity identified by a Request-URI. - -.. code-block:: php - - $client = new Guzzle\Http\Client(); - $request = $client->head('http://www.amazon.com'); - $response = $request->send(); - echo $response->getContentLength(); - // >>> Will output the Content-Length header value - -DELETE requests -~~~~~~~~~~~~~~~ - -A `DELETE method `_ requests that the origin server -delete the resource identified by the Request-URI. - -.. code-block:: php - - $client = new Guzzle\Http\Client(); - $request = $client->delete('http://example.com'); - $response = $request->send(); - -POST requests -~~~~~~~~~~~~~ - -While `POST requests `_ can be used for a number of -reasons, POST requests are often used when submitting HTML form data to a website. POST requests can include an entity -body in the HTTP request. - -POST requests in Guzzle are sent with an ``application/x-www-form-urlencoded`` Content-Type header if POST fields are -present but no files are being sent in the POST. If files are specified in the POST request, then the Content-Type -header will become ``multipart/form-data``. - -The ``post()`` method of a client object accepts four arguments: the URL, optional headers, post fields, and an array of -request options. To send files in the POST request, prepend the ``@`` symbol to the array value (just like you would if -you were using the PHP ``curl_setopt`` function). - -Here's how to create a multipart/form-data POST request containing files and fields: - -.. code-block:: php - - $request = $client->post('http://httpbin.org/post', array(), array( - 'custom_field' => 'my custom value', - 'file_field' => '@/path/to/file.xml' - )); - - $response = $request->send(); - -.. note:: - - Remember to **always** sanitize user input when sending POST requests: - - .. code-block:: php - - // Prevent users from accessing sensitive files by sanitizing input - $_POST = array('firstname' => '@/etc/passwd'); - $request = $client->post('http://www.example.com', array(), array ( - 'firstname' => str_replace('@', '', $_POST['firstname']) - )); - -You can alternatively build up the contents of a POST request. - -.. code-block:: php - - $request = $client->post('http://httpbin.org/post') - ->setPostField('custom_field', 'my custom value') - ->addPostFile('file', '/path/to/file.xml'); - - $response = $request->send(); - -Raw POST data -^^^^^^^^^^^^^ - -POST requests can also contain raw POST data that is not related to HTML forms. - -.. code-block:: php - - $request = $client->post('http://httpbin.org/post', array(), 'this is the body'); - $response = $request->send(); - -You can set the body of POST request using the ``setBody()`` method of the -``Guzzle\Http\Message\EntityEnclosingRequest`` object. This method accepts a string, a resource returned from -``fopen``, or a ``Guzzle\Http\EntityBodyInterface`` object. - -.. code-block:: php - - $request = $client->post('http://httpbin.org/post'); - // Set the body of the POST to stream the contents of /path/to/large_body.txt - $request->setBody(fopen('/path/to/large_body.txt', 'r')); - $response = $request->send(); - -PUT requests -~~~~~~~~~~~~ - -The `PUT method `_ requests that the enclosed entity be -stored under the supplied Request-URI. PUT requests are similar to POST requests in that they both can send an entity -body in the request message. - -The body of a PUT request (any any ``Guzzle\Http\Message\EntityEnclosingRequestInterface`` object) is always stored as -a ``Guzzle\Http\Message\EntityBodyInterface`` object. This allows a great deal of flexibility when sending data to a -remote server. For example, you can stream the contents of a stream returned by fopen, stream the contents of a -callback function, or simply send a string of data. - -.. code-block:: php - - $request = $client->put('http://httpbin.org/put', array(), 'this is the body'); - $response = $request->send(); - -Just like with POST, PATH, and DELETE requests, you can set the body of a PUT request using the ``setBody()`` method. - -.. code-block:: php - - $request = $client->put('http://httpbin.org/put'); - $request->setBody(fopen('/path/to/large_body.txt', 'r')); - $response = $request->send(); - -PATCH requests -~~~~~~~~~~~~~~ - -`PATCH requests `_ are used to modify a resource. - -.. code-block:: php - - $request = $client->patch('http://httpbin.org', array(), 'this is the body'); - $response = $request->send(); - -OPTIONS requests -~~~~~~~~~~~~~~~~ - -The `OPTIONS method `_ represents a request for -information about the communication options available on the request/response chain identified by the Request-URI. - -.. code-block:: php - - $request = $client->options('http://httpbin.org'); - $response = $request->send(); - - // Check if the PUT method is supported by this resource - var_export($response->isMethodAllows('PUT')); - -Custom requests -~~~~~~~~~~~~~~~ - -You can create custom HTTP requests that use non-standard HTTP methods using the ``createRequest()`` method of a -client object. - -.. code-block:: php - - $request = $client->createRequest('COPY', 'http://example.com/foo', array( - 'Destination' => 'http://example.com/bar', - 'Overwrite' => 'T' - )); - $response = $request->send(); - -Query string parameters ------------------------ - -Query string parameters of a request are owned by a request's ``Guzzle\Http\Query`` object that is accessible by -calling ``$request->getQuery()``. The Query class extends from ``Guzzle\Common\Collection`` and allows you to set one -or more query string parameters as key value pairs. You can set a parameter on a Query object using the -``set($key, $value)`` method or access the query string object like an associative array. Any previously specified -value for a key will be overwritten when using ``set()``. Use ``add($key, $value)`` to add a value to query string -object, and in the event of a collision with an existing value at a specific key, the value will be converted to an -array that contains all of the previously set values. - -.. code-block:: php - - $request = new Guzzle\Http\Message\Request('GET', 'http://www.example.com?foo=bar&abc=123'); - - $query = $request->getQuery(); - echo "{$query}\n"; - // >>> foo=bar&abc=123 - - $query->remove('abc'); - echo "{$query}\n"; - // >>> foo=bar - - $query->set('foo', 'baz'); - echo "{$query}\n"; - // >>> foo=baz - - $query->add('foo', 'bar'); - echo "{$query}\n"; - // >>> foo%5B0%5D=baz&foo%5B1%5D=bar - -Whoah! What happened there? When ``foo=bar`` was added to the existing ``foo=baz`` query string parameter, the -aggregator associated with the Query object was used to help convert multi-value query string parameters into a string. -Let's disable URL-encoding to better see what's happening. - -.. code-block:: php - - $query->useUrlEncoding(false); - echo "{$query}\n"; - // >>> foo[0]=baz&foo[1]=bar - -.. note:: - - URL encoding can be disabled by passing false, enabled by passing true, set to use RFC 1738 by passing - ``Query::FORM_URLENCODED`` (internally uses PHP's ``urlencode`` function), or set to RFC 3986 by passing - ``Query::RFC_3986`` (this is the default and internally uses PHP's ``rawurlencode`` function). - -As you can see, the multiple values were converted into query string parameters following the default PHP convention of -adding numerically indexed square bracket suffixes to each key (``foo[0]=baz&foo[1]=bar``). The strategy used to convert -multi-value parameters into a string can be customized using the ``setAggregator()`` method of the Query class. Guzzle -ships with the following query string aggregators by default: - -1. ``Guzzle\Http\QueryAggregator\PhpAggregator``: Aggregates using PHP style brackets (e.g. ``foo[0]=baz&foo[1]=bar``) -2. ``Guzzle\Http\QueryAggregator\DuplicateAggregator``: Performs no aggregation and allows for key value pairs to be - repeated in a URL (e.g. ``foo=baz&foo=bar``) -3. ``Guzzle\Http\QueryAggregator\CommaAggregator``: Aggregates using commas (e.g. ``foo=baz,bar``) - -.. _http-message-headers: - -HTTP Message Headers --------------------- - -HTTP message headers are case insensitive, multiple occurrences of any header can be present in an HTTP message -(whether it's valid or not), and some servers require specific casing of particular headers. Because of this, request -and response headers are stored in ``Guzzle\Http\Message\Header`` objects. The Header object can be cast as a string, -counted, or iterated to retrieve each value from the header. Casting a Header object to a string will return all of -the header values concatenated together using a glue string (typically ", "). - -A request (and response) object have several methods that allow you to retrieve and modify headers. - -* ``getHeaders()``: Get all of the headers of a message as a ``Guzzle\Http\Message\Header\HeaderCollection`` object. -* ``getHeader($header)``: Get a specific header from a message. If the header exists, you'll get a - ``Guzzle\Http\Message\Header`` object. If the header does not exist, this methods returns ``null``. -* ``hasHeader($header)``: Returns true or false based on if the message has a particular header. -* ``setHeader($header, $value)``: Set a header value and overwrite any previously set value for this header. -* ``addHeader($header, $value)``: Add a header with a particular name. If a previous value was already set by the same, - then the header will contain multiple values. -* ``removeHeader($header)``: Remove a header by name from the message. - -.. code-block:: php - - $request = new Request('GET', 'http://httpbin.com/cookies'); - // addHeader will set and append to any existing header values - $request->addHeader('Foo', 'bar'); - $request->addHeader('foo', 'baz'); - // setHeader overwrites any existing values - $request->setHeader('Test', '123'); - - // Request headers can be cast as a string - echo $request->getHeader('Foo'); - // >>> bar, baz - echo $request->getHeader('Test'); - // >>> 123 - - // You can count the number of headers of a particular case insensitive name - echo count($request->getHeader('foO')); - // >>> 2 - - // You can iterate over Header objects - foreach ($request->getHeader('foo') as $header) { - echo $header . "\n"; - } - - // You can get all of the request headers as a Guzzle\Http\Message\Header\HeaderCollection object - $headers = $request->getHeaders(); - - // Missing headers return NULL - var_export($request->getHeader('Missing')); - // >>> null - - // You can see all of the different variations of a header by calling raw() on the Header - var_export($request->getHeader('foo')->raw()); - -Setting the body of a request ------------------------------ - -Requests that can send a body (e.g. PUT, POST, DELETE, PATCH) are instances of -``Guzzle\Http\Message\EntityEnclosingRequestInterface``. Entity enclosing requests contain several methods that allow -you to specify the body to send with a request. - -Use the ``setBody()`` method of a request to set the body that will be sent with a request. This method accepts a -string, a resource returned by ``fopen()``, an array, or an instance of ``Guzzle\Http\EntityBodyInterface``. The body -will then be streamed from the underlying ``EntityBodyInterface`` object owned by the request. When setting the body -of the request, you can optionally specify a Content-Type header and whether or not to force the request to use -chunked Transfer-Encoding. - -.. code-block:: php - - $request = $client->put('/user.json'); - $request->setBody('{"foo":"baz"}', 'application/json'); - -Content-Type header -~~~~~~~~~~~~~~~~~~~ - -Guzzle will automatically add a Content-Type header to a request if the Content-Type can be guessed based on the file -extension of the payload being sent or the file extension present in the path of a request. - -.. code-block:: php - - $request = $client->put('/user.json', array(), '{"foo":"bar"}'); - // The Content-Type was guessed based on the path of the request - echo $request->getHeader('Content-Type'); - // >>> application/json - - $request = $client->put('/user.json'); - $request->setBody(fopen('/tmp/user_data.json', 'r')); - // The Content-Type was guessed based on the path of the entity body - echo $request->getHeader('Content-Type'); - // >>> application/json - -Transfer-Encoding: chunked header -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When sending HTTP requests that contain a payload, you must let the remote server know how to determine when the entire -message has been sent. This usually is done by supplying a ``Content-Length`` header that tells the origin server the -size of the body that is to be sent. In some cases, the size of the payload being sent in a request cannot be known -before initiating the transfer. In these cases (when using HTTP/1.1), you can use the ``Transfer-Encoding: chunked`` -header. - -If the Content-Length cannot be determined (i.e. using a PHP ``http://`` stream), then Guzzle will automatically add -the ``Transfer-Encoding: chunked`` header to the request. - -.. code-block:: php - - $request = $client->put('/user.json'); - $request->setBody(fopen('http://httpbin.org/get', 'r')); - - // The Content-Length could not be determined - echo $request->getHeader('Transfer-Encoding'); - // >>> chunked - -See :doc:`/http-client/entity-bodies` for more information on entity bodies. - -Expect: 100-Continue header -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``Expect: 100-Continue`` header is used to help a client prevent sending a large payload to a server that will -reject the request. This allows clients to fail fast rather than waste bandwidth sending an erroneous payload. Guzzle -will automatically add the ``Expect: 100-Continue`` header to a request when the size of the payload exceeds 1MB or if -the body of the request is not seekable (this helps to prevent errors when a non-seekable body request is redirected). - -.. note:: - - If you find that your larger requests are taking too long to complete, you should first check if the - ``Expect: 100-Continue`` header is being sent with the request. Some servers do not respond well to this header, - which causes cURL to sleep for `1 second `_. - -POST fields and files -~~~~~~~~~~~~~~~~~~~~~ - -Any entity enclosing request can send POST style fields and files. This includes POST, PUT, PATCH, and DELETE requests. -Any request that has set POST fields or files will use cURL's POST message functionality. - -.. code-block:: php - - $request = $client->post('/post'); - // Set an overwrite any previously specified value - $request->setPostField('foo', 'bar'); - // Append a value to any existing values - $request->getPostFields()->add('foo', 'baz'); - // Remove a POST field by name - $request->removePostField('fizz'); - - // Add a file to upload (forces multipart/form-data) - $request->addPostFile('my_file', '/path/to/file', 'plain/text'); - // Remove a POST file by POST key name - $request->removePostFile('my_other_file'); - -.. tip:: - - Adding a large number of POST fields to a POST request is faster if you use the ``addPostFields()`` method so that - you can add and process multiple fields with a single call. Adding multiple POST files is also faster using - ``addPostFiles()``. - -Working with cookies --------------------- - -Cookies can be modified and retrieved from a request using the following methods: - -.. code-block:: php - - $request->addCookie($name, $value); - $request->removeCookie($name); - $value = $request->getCookie($name); - $valueArray = $request->getCookies(); - -Use the :doc:`cookie plugin ` if you need to reuse cookies between requests. - -.. _request-set-response-body: - -Changing where a response is downloaded ----------------------------------------- - -When a request is sent, the body of the response will be stored in a PHP temp stream by default. You can change the -location in which the response will be downloaded using ``$request->setResponseBody($body)`` or the ``save_to`` request -option. This can be useful for downloading the contents of a URL to a specific file. - -Here's an example of using request options: - -.. code-block:: php - - $request = $this->client->get('http://example.com/large.mov', array(), array( - 'save_to' => '/tmp/large_file.mov' - )); - $request->send(); - var_export(file_exists('/tmp/large_file.mov')); - // >>> true - -Here's an example of using ``setResponseBody()``: - -.. code-block:: php - - $body = fopen('/tmp/large_file.mov', 'w'); - $request = $this->client->get('http://example.com/large.mov'); - $request->setResponseBody($body); - - // You can more easily specify the name of a file to save the contents - // of the response to by passing a string to ``setResponseBody()``. - - $request = $this->client->get('http://example.com/large.mov'); - $request->setResponseBody('/tmp/large_file.mov'); - -Custom cURL options -------------------- - -Most of the functionality implemented in the libcurl bindings has been simplified and abstracted by Guzzle. Developers -who need access to `cURL specific functionality `_ can still add cURL handle -specific behavior to Guzzle HTTP requests by modifying the cURL options collection of a request: - -.. code-block:: php - - $request->getCurlOptions()->set(CURLOPT_LOW_SPEED_LIMIT, 200); - -Other special options that can be set in the ``curl.options`` array include: - -+-------------------------+---------------------------------------------------------------------------------+ -| debug | Adds verbose cURL output to a temp stream owned by the cURL handle object | -+-------------------------+---------------------------------------------------------------------------------+ -| progress | Instructs cURL to emit events when IO events occur. This allows you to be | -| | notified when bytes are transferred over the wire by subscribing to a request's | -| | ``curl.callback.read``, ``curl.callback.write``, and ``curl.callback.progress`` | -| | events. | -+-------------------------+---------------------------------------------------------------------------------+ - -Request options ---------------- - -Requests options can be specified when creating a request or in the ``request.options`` parameter of a client. These -options can control various aspects of a request including: headers to send, query string data, where the response -should be downloaded, proxies, auth, etc. - -.. code-block:: php - - $request = $client->get($url, $headers, array('proxy' => 'http://proxy.com')); - -See :ref:`Request options ` for more information. - -Working with errors -------------------- - -HTTP errors -~~~~~~~~~~~ - -Requests that receive a 4xx or 5xx response will throw a ``Guzzle\Http\Exception\BadResponseException``. More -specifically, 4xx errors throw a ``Guzzle\Http\Exception\ClientErrorResponseException``, and 5xx errors throw a -``Guzzle\Http\Exception\ServerErrorResponseException``. You can catch the specific exceptions or just catch the -BadResponseException to deal with either type of error. Here's an example of catching a generic BadResponseException: - -.. code-block:: php - - try { - $response = $client->get('/not_found.xml')->send(); - } catch (Guzzle\Http\Exception\BadResponseException $e) { - echo 'Uh oh! ' . $e->getMessage(); - echo 'HTTP request URL: ' . $e->getRequest()->getUrl() . "\n"; - echo 'HTTP request: ' . $e->getRequest() . "\n"; - echo 'HTTP response status: ' . $e->getResponse()->getStatusCode() . "\n"; - echo 'HTTP response: ' . $e->getResponse() . "\n"; - } - -Throwing an exception when a 4xx or 5xx response is encountered is the default behavior of Guzzle requests. This -behavior can be overridden by adding an event listener with a higher priority than -255 that stops event propagation. -You can subscribe to ``request.error`` to receive notifications any time an unsuccessful response is received. - -You can change the response that will be associated with the request by calling ``setResponse()`` on the -``$event['request']`` object passed into your listener, or by changing the ``$event['response']`` value of the -``Guzzle\Common\Event`` object that is passed to your listener. Transparently changing the response associated with a -request by modifying the event allows you to retry failed requests without complicating the code that uses the client. -This might be useful for sending requests to a web service that has expiring auth tokens. When a response shows that -your token has expired, you can get a new token, retry the request with the new token, and return the successful -response to the user. - -Here's an example of retrying a request using updated authorization credentials when a 401 response is received, -overriding the response of the original request with the new response, and still allowing the default exception -behavior to be called when other non-200 response status codes are encountered: - -.. code-block:: php - - // Add custom error handling to any request created by this client - $client->getEventDispatcher()->addListener('request.error', function(Event $event) { - - if ($event['response']->getStatusCode() == 401) { - - $newRequest = $event['request']->clone(); - $newRequest->setHeader('X-Auth-Header', MyApplication::getNewAuthToken()); - $newResponse = $newRequest->send(); - - // Set the response object of the request without firing more events - $event['response'] = $newResponse; - - // You can also change the response and fire the normal chain of - // events by calling $event['request']->setResponse($newResponse); - - // Stop other events from firing when you override 401 responses - $event->stopPropagation(); - } - - }); - -cURL errors -~~~~~~~~~~~ - -Connection problems and cURL specific errors can also occur when transferring requests using Guzzle. When Guzzle -encounters cURL specific errors while transferring a single request, a ``Guzzle\Http\Exception\CurlException`` is -thrown with an informative error message and access to the cURL error message. - -A ``Guzzle\Common\Exception\MultiTransferException`` exception is thrown when a cURL specific error occurs while -transferring multiple requests in parallel. You can then iterate over all of the exceptions encountered during the -transfer. - -Plugins and events ------------------- - -Guzzle request objects expose various events that allow you to hook in custom logic. A request object owns a -``Symfony\Component\EventDispatcher\EventDispatcher`` object that can be accessed by calling -``$request->getEventDispatcher()``. You can use the event dispatcher to add listeners (a simple callback function) or -event subscribers (classes that listen to specific events of a dispatcher). You can add event subscribers to a request -directly by just calling ``$request->addSubscriber($mySubscriber);``. - -.. _request-events: - -Events emitted from a request -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A ``Guzzle\Http\Message\Request`` and ``Guzzle\Http\Message\EntityEnclosingRequest`` object emit the following events: - -+------------------------------+--------------------------------------------+------------------------------------------+ -| Event name | Description | Event data | -+==============================+============================================+==========================================+ -| request.before_send | About to send request | * request: Request to be sent | -+------------------------------+--------------------------------------------+------------------------------------------+ -| request.sent | Sent the request | * request: Request that was sent | -| | | * response: Received response | -+------------------------------+--------------------------------------------+------------------------------------------+ -| request.complete | Completed a full HTTP transaction | * request: Request that was sent | -| | | * response: Received response | -+------------------------------+--------------------------------------------+------------------------------------------+ -| request.success | Completed a successful request | * request: Request that was sent | -| | | * response: Received response | -+------------------------------+--------------------------------------------+------------------------------------------+ -| request.error | Completed an unsuccessful request | * request: Request that was sent | -| | | * response: Received response | -+------------------------------+--------------------------------------------+------------------------------------------+ -| request.exception | An unsuccessful response was | * request: Request | -| | received. | * response: Received response | -| | | * exception: BadResponseException | -+------------------------------+--------------------------------------------+------------------------------------------+ -| request.receive.status_line | Received the start of a response | * line: Full response start line | -| | | * status_code: Status code | -| | | * reason_phrase: Reason phrase | -| | | * previous_response: (e.g. redirect) | -+------------------------------+--------------------------------------------+------------------------------------------+ -| curl.callback.progress | cURL progress event (only dispatched when | * handle: CurlHandle | -| | ``emit_io`` is set on a request's curl | * download_size: Total download size | -| | options) | * downloaded: Bytes downloaded | -| | | * upload_size: Total upload bytes | -| | | * uploaded: Bytes uploaded | -+------------------------------+--------------------------------------------+------------------------------------------+ -| curl.callback.write | cURL event called when data is written to | * request: Request | -| | an outgoing stream | * write: Data being written | -+------------------------------+--------------------------------------------+------------------------------------------+ -| curl.callback.read | cURL event called when data is written to | * request: Request | -| | an incoming stream | * read: Data being read | -+------------------------------+--------------------------------------------+------------------------------------------+ - -Creating a request event listener -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here's an example that listens to the ``request.complete`` event of a request and prints the request and response. - -.. code-block:: php - - use Guzzle\Common\Event; - - $request = $client->get('http://www.google.com'); - - // Echo out the response that was received - $request->getEventDispatcher()->addListener('request.complete', function (Event $e) { - echo $e['request'] . "\n\n"; - echo $e['response']; - }); diff --git a/vendor/guzzle/guzzle/docs/http-client/response.rst b/vendor/guzzle/guzzle/docs/http-client/response.rst deleted file mode 100644 index ba487316f..000000000 --- a/vendor/guzzle/guzzle/docs/http-client/response.rst +++ /dev/null @@ -1,141 +0,0 @@ -====================== -Using Response objects -====================== - -Sending a request will return a ``Guzzle\Http\Message\Response`` object. You can view the raw HTTP response message by -casting the Response object to a string. Casting the response to a string will return the entity body of the response -as a string too, so this might be an expensive operation if the entity body is stored in a file or network stream. If -you only want to see the response headers, you can call ``getRawHeaders()``. - -Response status line --------------------- - -The different parts of a response's `status line `_ -(the first line of the response HTTP message) are easily retrievable. - -.. code-block:: php - - $response = $client->get('http://www.amazon.com')->send(); - - echo $response->getStatusCode(); // >>> 200 - echo $response->getReasonPhrase(); // >>> OK - echo $response->getProtocol(); // >>> HTTP - echo $response->getProtocolVersion(); // >>> 1.1 - -You can determine the type of the response using several helper methods: - -.. code-block:: php - - $response->isSuccessful(); // true - $response->isInformational(); - $response->isRedirect(); - $response->isClientError(); - $response->isServerError(); - -Response headers ----------------- - -The Response object contains helper methods for retrieving common response headers. These helper methods normalize the -variations of HTTP response headers. - -.. code-block:: php - - $response->getCacheControl(); - $response->getContentType(); - $response->getContentLength(); - $response->getContentEncoding(); - $response->getContentMd5(); - $response->getEtag(); - // etc... There are methods for every known response header - -You can interact with the Response headers using the same exact methods used to interact with Request headers. See -:ref:`http-message-headers` for more information. - -.. code-block:: php - - echo $response->getHeader('Content-Type'); - echo $response->getHeader('Content-Length'); - echo $response->getHeaders()['Content-Type']; // PHP 5.4 - -Response body -------------- - -The entity body object of a response can be retrieved by calling ``$response->getBody()``. The response EntityBody can -be cast to a string, or you can pass ``true`` to this method to retrieve the body as a string. - -.. code-block:: php - - $request = $client->get('http://www.amazon.com'); - $response = $request->send(); - echo $response->getBody(); - -See :doc:`/http-client/entity-bodies` for more information on entity bodies. - -JSON Responses -~~~~~~~~~~~~~~ - -You can easily parse and use a JSON response as an array using the ``json()`` method of a response. This method will -always return an array if the response is valid JSON or if the response body is empty. You will get an exception if you -call this method and the response is not valid JSON. - -.. code-block:: php - - $data = $response->json(); - echo gettype($data); - // >>> array - -XML Responses -~~~~~~~~~~~~~ - -You can easily parse and use a XML response as SimpleXMLElement object using the ``xml()`` method of a response. This -method will always return a SimpleXMLElement object if the response is valid XML or if the response body is empty. You -will get an exception if you call this method and the response is not valid XML. - -.. code-block:: php - - $xml = $response->xml(); - echo $xml->foo; - // >>> Bar! - -Streaming responses -------------------- - -Some web services provide streaming APIs that allow a client to keep a HTTP request open for an extended period of -time while polling and reading. Guzzle provides a simple way to convert HTTP request messages into -``Guzzle\Stream\Stream`` objects so that you can send the initial headers of a request, read the response headers, and -pull in the response body manually as needed. - -Here's an example using the Twitter Streaming API to track the keyword "bieber": - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Stream\PhpStreamRequestFactory; - - $client = new Client('https://stream.twitter.com/1'); - - $request = $client->post('statuses/filter.json', null, array( - 'track' => 'bieber' - )); - - $request->setAuth('myusername', 'mypassword'); - - $factory = new PhpStreamRequestFactory(); - $stream = $factory->fromRequest($request); - - // Read until the stream is closed - while (!$stream->feof()) { - // Read a line from the stream - $line = $stream->readLine(); - // JSON decode the line of data - $data = json_decode($line, true); - } - -You can use the ``stream`` request option when using a static client to more easily create a streaming response. - -.. code-block:: php - - $stream = Guzzle::get('http://guzzlephp.org', array('stream' => true)); - while (!$stream->feof()) { - echo $stream->readLine(); - } diff --git a/vendor/guzzle/guzzle/docs/http-client/uri-templates.rst b/vendor/guzzle/guzzle/docs/http-client/uri-templates.rst deleted file mode 100644 index c18ac3e8d..000000000 --- a/vendor/guzzle/guzzle/docs/http-client/uri-templates.rst +++ /dev/null @@ -1,52 +0,0 @@ -============= -URI templates -============= - -The ``$uri`` passed to one of the client's request creational methods or the base URL of a client can utilize URI -templates. Guzzle supports the entire `URI templates RFC `_. URI templates add a -special syntax to URIs that replace template place holders with user defined variables. - -Every request created by a Guzzle HTTP client passes through a URI template so that URI template expressions are -automatically expanded: - -.. code-block:: php - - $client = new Guzzle\Http\Client('https://example.com/', array('a' => 'hi')); - $request = $client->get('/{a}'); - -Because of URI template expansion, the URL of the above request will become ``https://example.com/hi``. Notice that -the template was expanded using configuration variables of the client. You can pass in custom URI template variables -by passing the URI of your request as an array where the first index of the array is the URI template and the second -index of the array are template variables that are merged into the client's configuration variables. - -.. code-block:: php - - $request = $client->get(array('/test{?a,b}', array('b' => 'there'))); - -The URL for this request will become ``https://test.com?a=hi&b=there``. URI templates aren't limited to just simple -variable replacements; URI templates can provide an enormous amount of flexibility when creating request URIs. - -.. code-block:: php - - $request = $client->get(array('http://example.com{+path}{/segments*}{?query,data*}', array( - 'path' => '/foo/bar', - 'segments' => array('one', 'two'), - 'query' => 'test', - 'data' => array( - 'more' => 'value' - ) - ))); - -The resulting URL would become ``http://example.com/foo/bar/one/two?query=test&more=value``. - -By default, URI template expressions are enclosed in an opening and closing brace (e.g. ``{var}``). If you are working -with a web service that actually uses braces (e.g. Solr), then you can specify a custom regular expression to use to -match URI template expressions. - -.. code-block:: php - - $client->getUriTemplate()->setRegex('/\<\$(.+)\>/'); - $client->get('/<$a>'); - -You can learn about all of the different features of URI templates by reading the -`URI templates RFC `_. diff --git a/vendor/guzzle/guzzle/docs/index.rst b/vendor/guzzle/guzzle/docs/index.rst deleted file mode 100644 index f76f3bbe6..000000000 --- a/vendor/guzzle/guzzle/docs/index.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services -.. toctree:: - :hidden: - - docs.rst diff --git a/vendor/guzzle/guzzle/docs/iterators/guzzle-iterators.rst b/vendor/guzzle/guzzle/docs/iterators/guzzle-iterators.rst deleted file mode 100644 index 1c56ec0c5..000000000 --- a/vendor/guzzle/guzzle/docs/iterators/guzzle-iterators.rst +++ /dev/null @@ -1,97 +0,0 @@ -================ -Guzzle iterators -================ - -Guzzle provides several SPL iterators that can be used with other SPL iterators, including Guzzle resource iterators. -Guzzle's ``guzzle/iterator`` component can also be used independently of the rest of Guzzle through Packagist and -Composer: https://packagist.org/packages/guzzle/iterator - -ChunkedIterator ---------------- - -Pulls out multiple values from an inner iterator and yields and array of values for each outer iteration -- essentially -pulling out chunks of values from the inner iterator. - -.. code-block:: php - - use Guzzle\Iterator\ChunkedIterator; - - $inner = new ArrayIterator(range(0, 8)); - $chunkedIterator = new ChunkedIterator($inner, 10); - - foreach ($chunkedIterator as $chunk) { - echo implode(', ', $chunk) . "\n"; - } - - // >>> 0, 1 - // >>> 2, 3 - // >>> 4, 5 - // >>> 6, 7 - // >>> 8 - -FilterIterator --------------- - -This iterator is used to filter values out of the inner iterator. This iterator can be used when PHP 5.4's -CallbackFilterIterator is not available. - -.. code-block:: php - - use Guzzle\Iterator\FilterIterator; - - $inner = new ArrayIterator(range(1, 10)); - $filterIterator = new FilterIterator($inner, function ($value) { - return $value % 2; - }); - - foreach ($filterIterator as $value) { - echo $value . "\n"; - } - - // >>> 2 - // >>> 4 - // >>> 6 - // >>> 8 - // >>> 10 - -MapIterator ------------ - -This iterator modifies the values of the inner iterator before yielding. - -.. code-block:: php - - use Guzzle\Iterator\MapIterator; - - $innner = new ArrayIterator(range(0, 3)); - - $mapIterator = new MapIterator($inner, function ($value) { - return $value * 10; - }); - - foreach ($mapIterator as $value) { - echo $value . "\n"; - } - - // >>> 0 - // >>> 10 - // >>> 20 - // >>> 30 - -MethodProxyIterator -------------------- - -This decorator is useful when you need to expose a specific method from an inner iterator that might be wrapper -by one or more iterator decorators. This decorator proxies missing method calls to each inner iterator until one -of the inner iterators can fulfill the call. - -.. code-block:: php - - use Guzzle\Iterator\MethodProxyIterator; - - $inner = new \ArrayIterator(); - $proxy = new MethodProxyIterator($inner); - - // Proxy method calls to the ArrayIterator - $proxy->append('a'); - $proxy->append('b'); diff --git a/vendor/guzzle/guzzle/docs/iterators/resource-iterators.rst b/vendor/guzzle/guzzle/docs/iterators/resource-iterators.rst deleted file mode 100644 index ce0bee59f..000000000 --- a/vendor/guzzle/guzzle/docs/iterators/resource-iterators.rst +++ /dev/null @@ -1,149 +0,0 @@ -================== -Resource iterators -================== - -Web services often implement pagination in their responses which requires the end-user to issue a series of consecutive -requests in order to fetch all of the data they asked for. Users of your web service client should not be responsible -for implementing the logic involved in iterating through pages of results. Guzzle provides a simple resource iterator -foundation to make it easier on web service client developers to offer a useful abstraction layer. - -Getting an iterator from a client ---------------------------------- - - ResourceIteratorInterface Guzzle\Service\Client::getIterator($command [, array $commandOptions, array $iteratorOptions ]) - -The ``getIterator`` method of a ``Guzzle\Service\ClientInterface`` object provides a convenient interface for -instantiating a resource iterator for a specific command. This method implicitly uses a -``Guzzle\Service\Resource\ResourceIteratorFactoryInterface`` object to create resource iterators. Pass an -instantiated command object or the name of a command in the first argument. When passing the name of a command, the -command factory of the client will create the command by name using the ``$commandOptions`` array. The third argument -may be used to pass an array of options to the constructor of the instantiated ``ResourceIteratorInterface`` object. - -.. code-block:: php - - $iterator = $client->getIterator('get_users'); - - foreach ($iterator as $user) { - echo $user['name'] . ' age ' . $user['age'] . PHP_EOL; - } - -The above code sample might execute a single request or a thousand requests. As a consumer of a web service, I don't -care. I just want to iterate over all of the users. - -Iterator options -~~~~~~~~~~~~~~~~ - -The two universal options that iterators should support are ``limit`` and ``page_size``. Using the ``limit`` option -tells the resource iterator to attempt to limit the total number of iterated resources to a specific amount. Keep in -mind that this is not always possible due to limitations that may be inherent to a web service. The ``page_size`` -option is used to tell a resource iterator how many resources to request per page of results. Much like the ``limit`` -option, you can not rely on getting back exactly the number of resources your specify in the ``page_size`` option. - -.. note:: - - The ``limit`` and ``page_size`` options can also be specified on an iterator using the ``setLimit($limit)`` and - ``setPageSize($pageSize)`` methods. - -Resolving iterator class names -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The default resource iterator factory of a client object expects that your iterators are stored under the ``Model`` -folder of your client and that an iterator is names after the CamelCase name of a command followed by the word -"Iterator". For example, if you wanted to create an iterator for the ``get_users`` command, then your iterator class -would be ``Model\GetUsersIterator`` and would be stored in ``Model/GetUsersIterator.php``. - -Creating an iterator --------------------- - -While not required, resource iterators in Guzzle typically iterate using a ``Guzzle\Service\Command\CommandInterface`` -object. ``Guzzle\Service\Resource\ResourceIterator``, the default iterator implementation that you should extend, -accepts a command object and array of iterator options in its constructor. The command object passed to the resource -iterator is expected to be ready to execute and not previously executed. The resource iterator keeps a reference of -this command and clones the original command each time a subsequent request needs to be made to fetch more data. - -Implement the sendRequest method -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The most important thing (and usually the only thing) you need to do when creating a resource iterator is to implement -the ``sendRequest()`` method of the resource iterator. The ``sendRequest()`` method is called when you begin -iterating or if there are no resources left to iterate and it you expect to retrieve more resources by making a -subsequent request. The ``$this->command`` property of the resource iterator is updated with a cloned copy of the -original command object passed into the constructor of the iterator. Use this command object to issue your subsequent -requests. - -The ``sendRequest()`` method must return an array of the resources you retrieved from making the subsequent call. -Returning an empty array will stop the iteration. If you suspect that your web service client will occasionally return -an empty result set but still requires further iteration, then you must implement a sort of loop in your -``sendRequest()`` method that will continue to issue subsequent requests until your reach the end of the paginated -result set or until additional resources are retrieved from the web service. - -Update the nextToken property -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Beyond fetching more results, the ``sendRequest()`` method is responsible for updating the ``$this->nextToken`` -property of the iterator. Setting this property to anything other than null tells the iterator that issuing a -subsequent request using the nextToken value will probably return more results. You must continually update this -value in your ``sendRequest()`` method as each response is received from the web service. - -Example iterator ----------------- - -Let's say you want to implement a resource iterator for the ``get_users`` command of your web service. The -``get_users`` command receives a response that contains a list of users, and if there are more pages of results to -retrieve, returns a value called ``next_user``. This return value is known as the **next token** and should be used to -issue subsequent requests. - -Assume the response to a ``get_users`` command returns JSON data that looks like this: - -.. code-block:: javascript - - { - "users": [ - { "name": "Craig Johnson", "age": 10 }, - { "name": "Tom Barker", "age": 20 }, - { "name": "Bob Mitchell", "age": 74 } - ], - "next_user": "Michael Dowling" - } - -Assume that because there is a ``next_user`` value, there will be more users if a subsequent request is issued. If the -``next_user`` value is missing or null, then we know there are no more results to fetch. Let's implement a resource -iterator for this command. - -.. code-block:: php - - namespace MyService\Model; - - use Guzzle\Service\Resource\ResourceIterator; - - /** - * Iterate over a get_users command - */ - class GetUsersIterator extends ResourceIterator - { - protected function sendRequest() - { - // If a next token is set, then add it to the command - if ($this->nextToken) { - $this->command->set('next_user', $this->nextToken); - } - - // Execute the command and parse the result - $result = $this->command->execute(); - - // Parse the next token - $this->nextToken = isset($result['next_user']) ? $result['next_user'] : false; - - return $result['users']; - } - } - -As you can see, it's pretty simple to implement an iterator. There are a few things that you should notice from this -example: - -1. You do not need to create a new command in the ``sendRequest()`` method. A new command object is cloned from the - original command passed into the constructor of the iterator before the ``sendRequest()`` method is called. - Remember that the resource iterator expects a command that has not been executed. -2. When the ``sendRequest()`` method is first called, you will not have a ``$this->nextToken`` value, so always check - before setting it on a command. Notice that the next token is being updated each time a request is sent. -3. After fetching more resources from the service, always return an array of resources. diff --git a/vendor/guzzle/guzzle/docs/plugins/async-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/async-plugin.rst deleted file mode 100644 index 9bd8f4251..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/async-plugin.rst +++ /dev/null @@ -1,18 +0,0 @@ -============ -Async plugin -============ - -The AsyncPlugin allows you to send requests that do not wait on a response. This is handled through cURL by utilizing -the progress event. When a request has sent all of its data to the remote server, Guzzle adds a 1ms timeout on the -request and instructs cURL to not download the body of the response. The async plugin then catches the exception and -adds a mock response to the request, along with an X-Guzzle-Async header to let you know that the response was not -fully downloaded. - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\Async\AsyncPlugin; - - $client = new Client('http://www.example.com'); - $client->addSubscriber(new AsyncPlugin()); - $response = $client->get()->send(); diff --git a/vendor/guzzle/guzzle/docs/plugins/backoff-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/backoff-plugin.rst deleted file mode 100644 index 5a7694141..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/backoff-plugin.rst +++ /dev/null @@ -1,22 +0,0 @@ -==================== -Backoff retry plugin -==================== - -The ``Guzzle\Plugin\Backoff\BackoffPlugin`` automatically retries failed HTTP requests using custom backoff strategies: - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\Backoff\BackoffPlugin; - - $client = new Client('http://www.test.com/'); - // Use a static factory method to get a backoff plugin using the exponential backoff strategy - $backoffPlugin = BackoffPlugin::getExponentialBackoff(); - - // Add the backoff plugin to the client object - $client->addSubscriber($backoffPlugin); - -The BackoffPlugin's constructor accepts a ``Guzzle\Plugin\Backoff\BackoffStrategyInterface`` object that is used to -determine when a retry should be issued and how long to delay between retries. The above code example shows how to -attach a BackoffPlugin to a client that is pre-configured to retry failed 500 and 503 responses using truncated -exponential backoff (emulating the behavior of Guzzle 2's ExponentialBackoffPlugin). diff --git a/vendor/guzzle/guzzle/docs/plugins/cache-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/cache-plugin.rst deleted file mode 100644 index d2fd5df26..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/cache-plugin.rst +++ /dev/null @@ -1,169 +0,0 @@ -================= -HTTP Cache plugin -================= - -Guzzle can leverage HTTP's caching specifications using the ``Guzzle\Plugin\Cache\CachePlugin``. The CachePlugin -provides a private transparent proxy cache that caches HTTP responses. The caching logic, based on -`RFC 2616 `_, uses HTTP headers to control caching behavior, -cache lifetime, and supports Vary, ETag, and Last-Modified based revalidation: - -.. code-block:: php - - use Guzzle\Http\Client; - use Doctrine\Common\Cache\FilesystemCache; - use Guzzle\Cache\DoctrineCacheAdapter; - use Guzzle\Plugin\Cache\CachePlugin; - use Guzzle\Plugin\Cache\DefaultCacheStorage; - - $client = new Client('http://www.test.com/'); - - $cachePlugin = new CachePlugin(array( - 'storage' => new DefaultCacheStorage( - new DoctrineCacheAdapter( - new FilesystemCache('/path/to/cache/files') - ) - ) - )); - - // Add the cache plugin to the client object - $client->addSubscriber($cachePlugin); - $client->get('http://www.wikipedia.org/')->send(); - - // The next request will revalidate against the origin server to see if it - // has been modified. If a 304 response is received the response will be - // served from cache - $client->get('http://www.wikipedia.org/')->send(); - -The cache plugin intercepts GET and HEAD requests before they are actually transferred to the origin server. The cache -plugin then generates a hash key based on the request method and URL, and checks to see if a response exists in the cache. If -a response exists in the cache, the cache adapter then checks to make sure that the caching rules associated with the response -satisfy the request, and ensures that response still fresh. If the response is acceptable for the request any required -revalidation, then the cached response is served instead of contacting the origin server. - -Vary ----- - -Cache keys are derived from a request method and a request URL. Multiple responses can map to the same cache key and -stored in Guzzle's underlying cache storage object. You should use the ``Vary`` HTTP header to tell the cache storage -object that the cache response must have been cached for a request that matches the headers specified in the Vary header -of the request. This allows you to have specific cache entries for the same request URL but variations in a request's -headers determine which cache entry is served. Please see the http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44 -for more information. - -Cache options -------------- - -There are several options you can add to requests or clients to modify the behavior of the cache plugin. - -Override cache TTL -~~~~~~~~~~~~~~~~~~ - -You can override the number of seconds a cacheable response is stored in the cache by setting the -``cache.override_ttl`` parameter on the params object of a request: - -.. code-block:: php - - // If the response to the request is cacheable, then the response will be cached for 100 seconds - $request->getParams()->set('cache.override_ttl', 100); - -If a response doesn't specify any freshness policy, it will be kept in cache for 3600 seconds by default. - -Custom caching decision -~~~~~~~~~~~~~~~~~~~~~~~ - -If the service you are interacting with does not return caching headers or returns responses that are normally -something that would not be cached, you can set a custom ``can_cache`` object on the constructor of the CachePlugin -and provide a ``Guzzle\Plugin\Cache\CanCacheInterface`` object. You can use the -``Guzzle\Plugin\Cache\CallbackCanCacheStrategy`` to easily make a caching decision based on an HTTP request and -response. - -Revalidation options -~~~~~~~~~~~~~~~~~~~~ - -You can change the revalidation behavior of a request using the ``cache.revalidate`` parameter. Setting this -parameter to ``never`` will ensure that a revalidation request is never sent, and the response is always served from -the origin server. Setting this parameter to ``skip`` will never revalidate and uses the response stored in the cache. - -Normalizing requests for caching -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the ``cache.key_filter`` parameter if you wish to strip certain query string parameters from your -request before creating a unique hash for the request. This parameter can be useful if your requests have query -string values that cause each request URL to be unique (thus preventing a cache hit). The ``cache.key_filter`` -format is simply a comma separated list of query string values to remove from the URL when creating a cache key. -For example, here we are saying that the ``a`` and ``q`` query string variables should be ignored when generating a -cache key for the request: - -.. code-block:: php - - $request->getParams()->set('cache.key_filter', 'a, q'); - -Other options -~~~~~~~~~~~~~ - -There are many other options available to the CachePlugin that can meet almost any caching requirement, including -custom revalidation implementations, custom cache key generators, custom caching decision strategies, and custom -cache storage objects. Take a look the constructor of ``Guzzle\Plugin\Cache\CachePlugin`` for more information. - -Setting Client-wide cache settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can specify cache settings for every request created by a client by adding cache settings to the configuration -options of a client. - -.. code-block:: php - - $client = new Guzzle\Http\Client('http://www.test.com', array( - 'request.params' => array( - 'cache.override_ttl' => 3600, - 'params.cache.revalidate' => 'never' - ) - )); - - echo $client->get('/')->getParams()->get('cache.override_ttl'); - // >>> 3600 - - echo $client->get('/')->getParams()->get('cache.revalidate'); - // >>> never - -Cache revalidation ------------------- - -If the cache plugin determines that a response to a GET request needs revalidation, a conditional GET is transferred -to the origin server. If the origin server returns a 304 response, then a response containing the merged headers of -the cached response with the new response and the entity body of the cached response is returned. Custom revalidation -strategies can be injected into a CachePlugin if needed. - -Cache adapters --------------- - -Guzzle doesn't try to reinvent the wheel when it comes to caching or logging. Plenty of other frameworks have -excellent solutions in place that you are probably already using in your applications. Guzzle uses adapters for -caching and logging. The cache plugin requires a cache adapter so that is can store responses in a cache. Guzzle -currently supports cache adapters for `Doctrine 2.0 `_ and the -`Zend Framework `_. - -Doctrine cache adapter -~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: php - - use Doctrine\Common\Cache\ArrayCache; - use Guzzle\Cache\DoctrineCacheAdapter; - use Guzzle\Plugin\Cache\CachePlugin; - - $backend = new ArrayCache(); - $adapter = new DoctrineCacheAdapter($backend); - $cache = new CachePlugin($adapter); - -Zend Framework cache adapter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: php - - use Guzzle\Cache\ZendCacheAdapter; - use Zend\Cache\Backend\TestBackend; - - $backend = new TestBackend(); - $adapter = new ZendCacheAdapter($backend); - $cache = new CachePlugin($adapter); diff --git a/vendor/guzzle/guzzle/docs/plugins/cookie-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/cookie-plugin.rst deleted file mode 100644 index a6cc7d924..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/cookie-plugin.rst +++ /dev/null @@ -1,33 +0,0 @@ -============= -Cookie plugin -============= - -Some web services require a Cookie in order to maintain a session. The ``Guzzle\Plugin\Cookie\CookiePlugin`` will add -cookies to requests and parse cookies from responses using a CookieJar object: - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\Cookie\CookiePlugin; - use Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar; - - $cookiePlugin = new CookiePlugin(new ArrayCookieJar()); - - // Add the cookie plugin to a client - $client = new Client('http://www.test.com/'); - $client->addSubscriber($cookiePlugin); - - // Send the request with no cookies and parse the returned cookies - $client->get('http://www.yahoo.com/')->send(); - - // Send the request again, noticing that cookies are being sent - $request = $client->get('http://www.yahoo.com/'); - $request->send(); - - echo $request; - -You can disable cookies per-request by setting the ``cookies.disable`` value to true on a request's params object. - -.. code-block:: php - - $request->getParams()->set('cookies.disable', true); diff --git a/vendor/guzzle/guzzle/docs/plugins/creating-plugins.rst b/vendor/guzzle/guzzle/docs/plugins/creating-plugins.rst deleted file mode 100644 index 0870155b5..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/creating-plugins.rst +++ /dev/null @@ -1,93 +0,0 @@ -================ -Creating plugins -================ - -.. highlight:: php - -Guzzle is extremely extensible because of the behavioral modifications that can be added to requests, clients, and -commands using an event system. Before and after the majority of actions are taken in the library, an event is emitted -with the name of the event and context surrounding the event. Observers can subscribe to a subject and modify the -subject based on the events received. Guzzle's event system utilizes the Symfony2 EventDispatcher and is the backbone -of its plugin architecture. - -Overview --------- - -Plugins must implement the ``Symfony\Component\EventDispatcher\EventSubscriberInterface`` interface. The -``EventSubscriberInterface`` requires that your class implements a static method, ``getSubscribedEvents()``, that -returns an associative array mapping events to methods on the object. See the -`Symfony2 documentation `_ for more information. - -Plugins can be attached to any subject, or object in Guzzle that implements that -``Guzzle\Common\HasDispatcherInterface``. - -Subscribing to a subject -~~~~~~~~~~~~~~~~~~~~~~~~ - -You can subscribe an instantiated observer to an event by calling ``addSubscriber`` on a subject. - -.. code-block:: php - - $testPlugin = new TestPlugin(); - $client->addSubscriber($testPlugin); - -You can also subscribe to only specific events using a closure:: - - $client->getEventDispatcher()->addListener('request.create', function(Event $event) { - echo $event->getName(); - echo $event['request']; - }); - -``Guzzle\Common\Event`` objects are passed to notified functions. The Event object has a ``getName()`` method which -return the name of the emitted event and may contain contextual information that can be accessed like an array. - -Knowing what events to listen to -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Any class that implements the ``Guzzle\Common\HasDispatcherInterface`` must implement a static method, -``getAllEvents()``, that returns an array of the events that are emitted from the object. You can browse the source -to see each event, or you can call the static method directly in your code to get a list of available events. - -Event hooks ------------ - -* :ref:`client-events` -* :ref:`service-client-events` -* :ref:`request-events` -* ``Guzzle\Http\Curl\CurlMulti``: -* :ref:`service-builder-events` - -Examples of the event system ----------------------------- - -Simple Echo plugin -~~~~~~~~~~~~~~~~~~ - -This simple plugin prints a string containing the request that is about to be sent by listening to the -``request.before_send`` event:: - - use Symfony\Component\EventDispatcher\EventSubscriberInterface; - - class EchoPlugin implements EventSubscriberInterface - { - public static function getSubscribedEvents() - { - return array('request.before_send' => 'onBeforeSend'); - } - - public function onBeforeSend(Guzzle\Common\Event $event) - { - echo 'About to send a request: ' . $event['request'] . "\n"; - } - } - - $client = new Guzzle\Service\Client('http://www.test.com/'); - - // Create the plugin and add it as an event subscriber - $plugin = new EchoPlugin(); - $client->addSubscriber($plugin); - - // Send a request and notice that the request is printed to the screen - $client->get('/')->send(); - -Running the above code will print a string containing the HTTP request that is about to be sent. diff --git a/vendor/guzzle/guzzle/docs/plugins/curl-auth-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/curl-auth-plugin.rst deleted file mode 100644 index 66d4a01e3..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/curl-auth-plugin.rst +++ /dev/null @@ -1,32 +0,0 @@ -========================== -cURL authentication plugin -========================== - -.. warning:: - - The CurlAuthPlugin is deprecated. You should use the `auth` parameter of a client to add authorization headers to - every request created by a client. - - .. code-block:: php - - $client->setDefaultOption('auth', array('username', 'password', 'Basic|Digest|NTLM|Any')); - -If your web service client requires basic authorization, then you can use the CurlAuthPlugin to easily add an -Authorization header to each request sent by the client. - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\CurlAuth\CurlAuthPlugin; - - $client = new Client('http://www.test.com/'); - - // Add the auth plugin to the client object - $authPlugin = new CurlAuthPlugin('username', 'password'); - $client->addSubscriber($authPlugin); - - $response = $client->get('projects/1/people')->send(); - $xml = new SimpleXMLElement($response->getBody(true)); - foreach ($xml->person as $person) { - echo $person->email . "\n"; - } diff --git a/vendor/guzzle/guzzle/docs/plugins/history-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/history-plugin.rst deleted file mode 100644 index b96befe79..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/history-plugin.rst +++ /dev/null @@ -1,24 +0,0 @@ -============== -History plugin -============== - -The history plugin tracks all of the requests and responses sent through a request or client. This plugin can be -useful for crawling or unit testing. By default, the history plugin stores up to 10 requests and responses. - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\History\HistoryPlugin; - - $client = new Client('http://www.test.com/'); - - // Add the history plugin to the client object - $history = new HistoryPlugin(); - $history->setLimit(5); - $client->addSubscriber($history); - - $client->get('http://www.yahoo.com/')->send(); - - echo $history->getLastRequest(); - echo $history->getLastResponse(); - echo count($history); diff --git a/vendor/guzzle/guzzle/docs/plugins/log-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/log-plugin.rst deleted file mode 100644 index 3e2b22944..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/log-plugin.rst +++ /dev/null @@ -1,69 +0,0 @@ -========== -Log plugin -========== - -Use the ``Guzzle\Plugin\Log\LogPlugin`` to view all data sent over the wire, including entity bodies and redirects. - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Log\Zf1LogAdapter; - use Guzzle\Plugin\Log\LogPlugin; - use Guzzle\Log\MessageFormatter; - - $client = new Client('http://www.test.com/'); - - $adapter = new Zf1LogAdapter( - new \Zend_Log(new \Zend_Log_Writer_Stream('php://output')) - ); - $logPlugin = new LogPlugin($adapter, MessageFormatter::DEBUG_FORMAT); - - // Attach the plugin to the client, which will in turn be attached to all - // requests generated by the client - $client->addSubscriber($logPlugin); - - $response = $client->get('http://google.com')->send(); - -The code sample above wraps a ``Zend_Log`` object using a ``Guzzle\Log\Zf1LogAdapter``. After attaching the plugin to -the client, all data sent over the wire will be logged to stdout. - -The first argument of the LogPlugin's constructor accepts a ``Guzzle\Log\LogAdapterInterface`` object. This object is -an adapter that allows you to use the logging capabilities of your favorite log implementation. The second argument of -the constructor accepts a ``Guzzle\Log\MessageFormatter`` or a log messaged format string. The format string uses -variable substitution and allows you to define the log data that is important to your application. The different -variables that can be injected are as follows: - -================== ==================================================================================== -Variable Substitution -================== ==================================================================================== -{request} Full HTTP request message -{response} Full HTTP response message -{ts} Timestamp -{host} Host of the request -{method} Method of the request -{url} URL of the request -{host} Host of the request -{protocol} Request protocol -{version} Protocol version -{resource} Resource of the request (path + query + fragment) -{port} Port of the request -{hostname} Hostname of the machine that sent the request -{code} Status code of the response (if available) -{phrase} Reason phrase of the response (if available) -{curl_error} Curl error message (if available) -{curl_code} Curl error code (if available) -{curl_stderr} Curl standard error (if available) -{connect_time} Time in seconds it took to establish the connection (if available) -{total_time} Total transaction time in seconds for last transfer (if available) -{req_header_*} Replace `*` with the lowercased name of a request header to add to the message -{res_header_*} Replace `*` with the lowercased name of a response header to add to the message -{req_body} Request body -{res_body} Response body -================== ==================================================================================== - -The LogPlugin has a helper method that can be used when debugging that will output the full HTTP request and -response of a transaction: - -.. code-block:: php - - $client->addSubscriber(LogPlugin::getDebugPlugin()); diff --git a/vendor/guzzle/guzzle/docs/plugins/md5-validator-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/md5-validator-plugin.rst deleted file mode 100644 index 1b1cfa8a8..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/md5-validator-plugin.rst +++ /dev/null @@ -1,29 +0,0 @@ -==================== -MD5 validator plugin -==================== - -Entity bodies can sometimes be modified over the wire due to a faulty TCP transport or misbehaving proxy. If an HTTP -response contains a Content-MD5 header, then a MD5 hash of the entity body of a response can be compared against the -Content-MD5 header of the response to determine if the response was delivered intact. The -``Guzzle\Plugin\Md5\Md5ValidatorPlugin`` will throw an ``UnexpectedValueException`` if the calculated MD5 hash does -not match the Content-MD5 header value: - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\Md5\Md5ValidatorPlugin; - - $client = new Client('http://www.test.com/'); - - $md5Plugin = new Md5ValidatorPlugin(); - - // Add the md5 plugin to the client object - $client->addSubscriber($md5Plugin); - - $request = $client->get('http://www.yahoo.com/'); - $request->send(); - -Calculating the MD5 hash of a large entity body or an entity body that was transferred using a Content-Encoding is an -expensive operation. When working in high performance applications, you might consider skipping the MD5 hash -validation for entity bodies bigger than a certain size or Content-Encoded entity bodies -(see ``Guzzle\Plugin\Md5\Md5ValidatorPlugin`` for more information). diff --git a/vendor/guzzle/guzzle/docs/plugins/mock-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/mock-plugin.rst deleted file mode 100644 index 4900cb565..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/mock-plugin.rst +++ /dev/null @@ -1,27 +0,0 @@ -=========== -Mock plugin -=========== - -The mock plugin is useful for testing Guzzle clients. The mock plugin allows you to queue an array of responses that -will satisfy requests sent from a client by consuming the request queue in FIFO order. - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\Mock\MockPlugin; - use Guzzle\Http\Message\Response; - - $client = new Client('http://www.test.com/'); - - $mock = new MockPlugin(); - $mock->addResponse(new Response(200)) - ->addResponse(new Response(404)); - - // Add the mock plugin to the client object - $client->addSubscriber($mock); - - // The following request will receive a 200 response from the plugin - $client->get('http://www.example.com/')->send(); - - // The following request will receive a 404 response from the plugin - $client->get('http://www.test.com/')->send(); diff --git a/vendor/guzzle/guzzle/docs/plugins/oauth-plugin.rst b/vendor/guzzle/guzzle/docs/plugins/oauth-plugin.rst deleted file mode 100644 index e67eabaa1..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/oauth-plugin.rst +++ /dev/null @@ -1,30 +0,0 @@ -============ -OAuth plugin -============ - -Guzzle ships with an OAuth 1.0 plugin that can sign requests using a consumer key, consumer secret, OAuth token, -and OAuth secret. Here's an example showing how to send an authenticated request to the Twitter REST API: - -.. code-block:: php - - use Guzzle\Http\Client; - use Guzzle\Plugin\Oauth\OauthPlugin; - - $client = new Client('http://api.twitter.com/1'); - $oauth = new OauthPlugin(array( - 'consumer_key' => 'my_key', - 'consumer_secret' => 'my_secret', - 'token' => 'my_token', - 'token_secret' => 'my_token_secret' - )); - $client->addSubscriber($oauth); - - $response = $client->get('statuses/public_timeline.json')->send(); - -If you need to use a custom signing method, you can pass a ``signature_method`` configuration option in the -constructor of the OAuth plugin. The ``signature_method`` option must be a callable variable that accepts a string to -sign and signing key and returns a signed string. - -.. note:: - - You can omit the ``token`` and ``token_secret`` options to use two-legged OAuth. diff --git a/vendor/guzzle/guzzle/docs/plugins/plugins-list.rst.inc b/vendor/guzzle/guzzle/docs/plugins/plugins-list.rst.inc deleted file mode 100644 index 8d6d09b46..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/plugins-list.rst.inc +++ /dev/null @@ -1,9 +0,0 @@ -* :doc:`/plugins/async-plugin` -* :doc:`/plugins/backoff-plugin` -* :doc:`/plugins/cache-plugin` -* :doc:`/plugins/cookie-plugin` -* :doc:`/plugins/history-plugin` -* :doc:`/plugins/log-plugin` -* :doc:`/plugins/md5-validator-plugin` -* :doc:`/plugins/mock-plugin` -* :doc:`/plugins/oauth-plugin` diff --git a/vendor/guzzle/guzzle/docs/plugins/plugins-overview.rst b/vendor/guzzle/guzzle/docs/plugins/plugins-overview.rst deleted file mode 100644 index 19ae57ece..000000000 --- a/vendor/guzzle/guzzle/docs/plugins/plugins-overview.rst +++ /dev/null @@ -1,59 +0,0 @@ -====================== -Plugin system overview -====================== - -The workflow of sending a request and parsing a response is driven by Guzzle's event system, which is powered by the -`Symfony2 Event Dispatcher component `_. - -Any object in Guzzle that emits events will implement the ``Guzzle\Common\HasEventDispatcher`` interface. You can add -event subscribers directly to these objects using the ``addSubscriber()`` method, or you can grab the -``Symfony\Component\EventDispatcher\EventDispatcher`` object owned by the object using ``getEventDispatcher()`` and -add a listener or event subscriber. - -Adding event subscribers to clients ------------------------------------ - -Any event subscriber or event listener attached to the EventDispatcher of a ``Guzzle\Http\Client`` or -``Guzzle\Service\Client`` object will automatically be attached to all request objects created by the client. This -allows you to attach, for example, a HistoryPlugin to a client object, and from that point on, every request sent -through that client will utilize the HistoryPlugin. - -.. code-block:: php - - use Guzzle\Plugin\History\HistoryPlugin; - use Guzzle\Service\Client; - - $client = new Client(); - - // Create a history plugin and attach it to the client - $history = new HistoryPlugin(); - $client->addSubscriber($history); - - // Create and send a request. This request will also utilize the HistoryPlugin - $client->get('http://httpbin.org')->send(); - - // Echo out the last sent request by the client - echo $history->getLastRequest(); - -.. tip:: - - :doc:`Create event subscribers `, or *plugins*, to implement reusable logic that can be - shared across clients. Event subscribers are also easier to test than anonymous functions. - -Pre-Built plugins ------------------ - -Guzzle provides easy to use request plugins that add behavior to requests based on signal slot event notifications -powered by the Symfony2 Event Dispatcher component. - -* :doc:`async-plugin` -* :doc:`backoff-plugin` -* :doc:`cache-plugin` -* :doc:`cookie-plugin` -* :doc:`curl-auth-plugin` -* :doc:`history-plugin` -* :doc:`log-plugin` -* :doc:`md5-validator-plugin` -* :doc:`mock-plugin` -* :doc:`oauth-plugin` - diff --git a/vendor/guzzle/guzzle/docs/requirements.txt b/vendor/guzzle/guzzle/docs/requirements.txt deleted file mode 100644 index f62e31837..000000000 --- a/vendor/guzzle/guzzle/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Sphinx>=1.2b1 -guzzle_sphinx_theme>=0.5.0 diff --git a/vendor/guzzle/guzzle/docs/testing/unit-testing.rst b/vendor/guzzle/guzzle/docs/testing/unit-testing.rst deleted file mode 100644 index f4297af30..000000000 --- a/vendor/guzzle/guzzle/docs/testing/unit-testing.rst +++ /dev/null @@ -1,201 +0,0 @@ -=========================== -Unit Testing Guzzle clients -=========================== - -Guzzle provides several tools that will enable you to easily unit test your web service clients. - -* PHPUnit integration -* Mock responses -* node.js web server for integration testing - -PHPUnit integration -------------------- - -Guzzle is unit tested using `PHPUnit `_. Your web service client's unit tests should extend -``Guzzle\Tests\GuzzleTestCase`` so that you can take advantage of some of the built in helpers. - -In order to unit test your client, a developer would need to copy phpunit.xml.dist to phpunit.xml and make any needed -modifications. As a best practice and security measure for you and your contributors, it is recommended to add an -ignore statement to your SCM so that phpunit.xml is ignored. - -Bootstrapping -~~~~~~~~~~~~~ - -Your web service client should have a tests/ folder that contains a bootstrap.php file. The bootstrap.php file -responsible for autoloading and configuring a ``Guzzle\Service\Builder\ServiceBuilder`` that is used throughout your -unit tests for loading a configured client. You can add custom parameters to your phpunit.xml file that expects users -to provide the path to their configuration data. - -.. code-block:: php - - Guzzle\Tests\GuzzleTestCase::setServiceBuilder(Aws\Common\Aws::factory($_SERVER['CONFIG'])); - - Guzzle\Tests\GuzzleTestCase::setServiceBuilder(Guzzle\Service\Builder\ServiceBuilder::factory(array( - 'test.unfuddle' => array( - 'class' => 'Guzzle.Unfuddle.UnfuddleClient', - 'params' => array( - 'username' => 'test_user', - 'password' => '****', - 'subdomain' => 'test' - ) - ) - ))); - -The above code registers a service builder that can be used throughout your unit tests. You would then be able to -retrieve an instantiated and configured Unfuddle client by calling ``$this->getServiceBuilder()->get('test.unfuddle)``. -The above code assumes that ``$_SERVER['CONFIG']`` contains the path to a file that stores service description -configuration. - -Unit testing remote APIs ------------------------- - -Mock responses -~~~~~~~~~~~~~~ - -One of the benefits of unit testing is the ability to quickly determine if there are errors in your code. If your -unit tests run slowly, then they become tedious and will likely be run less frequently. Guzzle's philosophy on unit -testing web service clients is that no network access should be required to run the unit tests. This means that -responses are served from mock responses or local servers. By adhering to this principle, tests will run much faster -and will not require an external resource to be available. The problem with this approach is that your mock responses -must first be gathered and then subsequently updated each time the remote API changes. - -Integration testing over the internet -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can perform integration testing with a web service over the internet by making calls directly to the service. If -the web service you are requesting uses a complex signing algorithm or some other specific implementation, then you -may want to include at least one actual network test that can be run specifically through the command line using -`PHPUnit group annotations `_. - -@group internet annotation -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When creating tests that require an internet connection, it is recommended that you add ``@group internet`` annotations -to your unit tests to specify which tests require network connectivity. - -You can then `run PHPUnit tests `_ that exclude the @internet -group by running ``phpunit --exclude-group internet``. - -API credentials -^^^^^^^^^^^^^^^ - -If API credentials are required to run your integration tests, you must add ```` parameters to your -phpunit.xml.dist file and extract these parameters in your bootstrap.php file. - -.. code-block:: xml - - - - - - - - - - - - - ./Tests - - - - -You can then extract the ``server`` variables in your bootstrap.php file by grabbing them from the ``$_SERVER`` -superglobal: ``$apiUser = $_SERVER['API_USER'];`` - -Further reading -^^^^^^^^^^^^^^^ - -A good discussion on the topic of testing remote APIs can be found in Sebastian Bergmann's -`Real-World Solutions for Developing High-Quality PHP Frameworks and Applications `_. - -Queueing Mock responses ------------------------ - -Mock responses can be used to test if requests are being generated correctly and responses and handled correctly by -your client. Mock responses can be queued up for a client using the ``$this->setMockResponse($client, $path)`` method -of your test class. Pass the client you are adding mock responses to and a single path or array of paths to mock -response files relative to the ``/tests/mock/ folder``. This will queue one or more mock responses for your client by -creating a simple observer on the client. Mock response files must contain a full HTTP response message: - -.. code-block:: none - - HTTP/1.1 200 OK - Date: Wed, 25 Nov 2009 12:00:00 GMT - Connection: close - Server: AmazonS3 - Content-Type: application/xml - - - EU - -After queuing mock responses for a client, you can get an array of the requests that were sent by the client that -were issued a mock response by calling ``$this->getMockedRequests()``. - -You can also use the ``Guzzle\Plugin\Mock\MockPlugin`` object directly with your clients. - -.. code-block:: php - - $plugin = new Guzzle\Plugin\Mock\MockPlugin(); - $plugin->addResponse(new Guzzle\Http\Message\Response(200)); - $client = new Guzzle\Http\Client(); - $client->addSubscriber($plugin); - - // The following request will get the mock response from the plugin in FIFO order - $request = $client->get('http://www.test.com/'); - $request->send(); - - // The MockPlugin maintains a list of requests that were mocked - $this->assertContainsOnly($request, $plugin->getReceivedRequests()); - -node.js web server for integration testing ------------------------------------------- - -Using mock responses is usually enough when testing a web service client. If your client needs to add custom cURL -options to requests, then you should use the node.js test web server to ensure that your HTTP request message is -being created correctly. - -Guzzle is based around PHP's libcurl bindings. cURL sometimes modifies an HTTP request message based on -``CURLOPT_*`` options. Headers that are added to your request by cURL will not be accounted for if you inject mock -responses into your tests. Additionally, some request entity bodies cannot be loaded by the client before transmitting -it to the sever (for example, when using a client as a sort of proxy and streaming content from a remote server). You -might also need to inspect the entity body of a ``multipart/form-data`` POST request. - -.. note:: - - You can skip all of the tests that require the node.js test web server by excluding the ``server`` group: - ``phpunit --exclude-group server`` - -Using the test server -~~~~~~~~~~~~~~~~~~~~~ - -The node.js test server receives requests and returns queued responses. The test server exposes a simple API that is -used to enqueue responses and inspect the requests that it has received. - -Retrieve the server object by calling ``$this->getServer()``. If the node.js server is not running, it will be -started as a forked process and an object that interfaces with the server will be returned. (note: stopping the -server is handled internally by Guzzle.) - -You can queue an HTTP response or an array of responses by calling ``$this->getServer()->enqueue()``: - -.. code-block:: php - - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - -The above code queues a single 200 response with an empty body. Responses are queued using a FIFO order; this -response will be returned by the server when it receives the first request and then removed from the queue. If a -request is received by a server with no queued responses, an exception will be thrown in your unit test. - -You can inspect the requests that the server has retrieved by calling ``$this->getServer()->getReceivedRequests()``. -This method accepts an optional ``$hydrate`` parameter that specifies if you are retrieving an array of string HTTP -requests or an array of ``Guzzle\Http\RequestInterface`` subclassed objects. "Hydrating" the requests will allow -greater flexibility in your unit tests so that you can easily assert the state of the various parts of a request. - -You will need to modify the base_url of your web service client in order to use it against the test server. - -.. code-block:: php - - $client = $this->getServiceBuilder()->get('my_client'); - $client->setBaseUrl($this->getServer()->getUrl()); - -After running the above code, all calls made from the ``$client`` object will be sent to the test web server. diff --git a/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst b/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst deleted file mode 100644 index b1901fc7d..000000000 --- a/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst +++ /dev/null @@ -1,619 +0,0 @@ -=========================== -Guzzle service descriptions -=========================== - -Guzzle allows you to serialize HTTP requests and parse HTTP responses using a DSL called a service descriptions. -Service descriptions define web service APIs by documenting each operation, the operation's parameters, validation -options for each parameter, an operation's response, how the response is parsed, and any errors that can be raised for -an operation. Writing a service description for a web service allows you to more quickly consume a web service than -writing concrete commands for each web service operation. - -Guzzle service descriptions can be representing using a PHP array or JSON document. Guzzle's service descriptions are -heavily inspired by `Swagger `_. - -Service description schema -========================== - -A Guzzle Service description must match the following JSON schema document. This document can also serve as a guide when -implementing a Guzzle service description. - -Download the schema here: :download:`Guzzle JSON schema document ` - -.. class:: overflow-height-500px - - .. literalinclude:: ../_downloads/guzzle-schema-1.0.json - :language: json - -Top-level attributes --------------------- - -Service descriptions are comprised of the following top-level attributes: - -.. code-block:: json - - { - "name": "string", - "apiVersion": "string|number", - "baseUrl": "string", - "description": "string", - "operations": {}, - "models": {}, - "includes": ["string.php", "string.json"] - } - -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| Property Name | Value | Description | -+=========================================+=========================+=======================================================================================================================+ -| name | string | Name of the web service | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| apiVersion | string|number | Version identifier that the service description is compatible with | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| baseUrl or basePath | string | Base URL of the web service. Any relative URI specified in an operation will be merged with the baseUrl using the | -| | | process defined in RFC 2396. Some clients require custom logic to determine the baseUrl. In those cases, it is best | -| | | to not include a baseUrl in the service description, but rather allow the factory method of the client to configure | -| | | the client’s baseUrl. | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| description | string | Short summary of the web service | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| operations | object containing | Operations of the service. The key is the name of the operation and value is the attributes of the operation. | -| | :ref:`operation-schema` | | -| | | | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| models | object containing | Schema models that can be referenced throughout the service description. Models can be used to define how an HTTP | -| | :ref:`model-schema` | response is parsed into a ``Guzzle\Service\Resource\Model`` object when an operation uses a ``model`` ``responseType``| -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| includes | array of .js, | Service description files to include and extend from (can be a .json, .js, or .php file) | -| | .json, or .php | | -| | files. | | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| (any additional properties) | mixed | Any additional properties specified as top-level attributes are allowed and will be treated as arbitrary data | -+-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - -.. _operation-schema: - -Operations ----------- - -Operations are the actions that can be taken on a service. Each operation is given a unique name and has a distinct -endpoint and HTTP method. If an API has a ``DELETE /users/:id`` operation, a satisfactory operation name might be -``DeleteUser`` with a parameter of ``id`` that is inserted into the URI. - -.. class:: overflow-height-250px - - .. code-block:: json - - { - "operations": { - "operationName": { - "extends": "string", - "httpMethod": "GET|POST|PUT|DELETE|PATCH|string", - "uri": "string", - "summary": "string", - "class": "string", - "responseClass": "string", - "responseNotes": "string", - "type": "string", - "description": "string", - "responseType": "primitive|class|(model by name)|documentation|(string)", - "deprecated": false, - "errorResponses": [ - { - "code": 500, - "phrase": "Unexpected Error", - "class": "string" - } - ], - "data": { - "foo": "bar", - "baz": "bam" - }, - "parameters": {} - } - } - } - -.. csv-table:: - :header: "Property Name", "Value", "Description" - :widths: 20, 15, 65 - - "extends", "string", "Extend from another operation by name. The parent operation must be defined before the child." - "httpMethod", "string", "HTTP method used with the operation (e.g. GET, POST, PUT, DELETE, PATCH, etc)" - "uri", "string", "URI of the operation. The uri attribute can contain URI templates. The variables of the URI template are parameters of the operation with a location value of uri" - "summary", "string", "Short summary of what the operation does" - "class", "string", "Custom class to instantiate instead of the default Guzzle\\Service\\Command\\OperationCommand. Using this attribute allows you to define an operation using a service description, but allows more customized logic to be implemented in user-land code." - "responseClass", "string", "Defined what is returned from the method. Can be a primitive, class name, or model name. You can specify the name of a class to return a more customized result from the operation (for example, a domain model object). When using the name of a PHP class, the class must implement ``Guzzle\Service\Command\ResponseClassInterface``." - "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)" - "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." - -additionalParameters -~~~~~~~~~~~~~~~~~~~~ - -When a webservice offers a large number of parameters that all are set in the same location (for example the query -string or a JSON document), defining each parameter individually can require a lot of time and repetition. Furthermore, -some web services allow for completely arbitrary parameters to be supplied for an operation. The -``additionalParameters`` attribute can be used to solve both of these issues. - -As an example, we can define a Twitter API operation quite easily using ``additionalParameters``. The -GetMentions operation accepts a large number of query string parameters. Defining each of these parameters -is ideal because it provide much more introspection for the client and opens the possibility to use the description with -other tools (e.g. a documentation generator). However, you can very quickly provide a "catch-all" serialization rule -that will place any custom parameters supplied to an operation the generated request's query string parameters. - -.. class:: overflow-height-250px - - .. code-block:: json - - { - "name": "Twitter", - "apiVersion": "1.1", - "baseUrl": "https://api.twitter.com/1.1", - "operations": { - "GetMentions": { - "httpMethod": "GET", - "uri": "statuses/mentions_timeline.json", - "responseClass": "GetMentionsOutput", - "additionalParameters": { - "location": "query" - } - } - }, - "models": { - "GetMentionsOutput": { - "type": "object", - "additionalProperties": { - "location": "json" - } - } - } - } - -responseClass -~~~~~~~~~~~~~ - -The ``responseClass`` attribute is used to define the return value of an operation (what is returned by calling the -``getResult()`` method of a command object). The value set in the responseClass attribute can be one of "primitive" -(meaning the result with be primitive type like a string), a class name meaning the result will be an instance of a -specific user-land class, or a model name meaning the result will be a ``Guzzle\Service\Resource\Model`` object that -uses a :ref:`model schema ` to define how the HTTP response is parsed. - -.. note:: - - Using a class name with a ``responseClass`` will only work if it is supported by the ``class`` that is instantiated - for the operation. Keep this in mind when specifying a custom ``class`` attribute that points to a custom - ``Guzzle\Service\Command\CommandInterface`` class. The default ``class``, - ``Guzzle\Service\Command\OperationCommand``, does support setting custom ``class`` attributes. - -You can specify the name of a class to return a more customized result from the operation (for example, a domain model -object). When using the name of a PHP class, the class must implement ``Guzzle\Service\Command\ResponseClassInterface``. -Here's a very simple example of implementing a custom responseClass object. - -.. code-block:: json - - { - "operations": { - "test": { - "responseClass": "MyApplication\\User" - } - } - } - -.. code-block:: php - - namespace MyApplication; - - use Guzzle\Service\Command\ResponseClassInterface; - use Guzzle\Service\Command\OperationCommand; - - class User implements ResponseClassInterface - { - protected $name; - - public static function fromCommand(OperationCommand $command) - { - $response = $command->getResponse(); - $xml = $command->xml(); - - return new self((string) $xml->name); - } - - public function __construct($name) - { - $this->name = $name; - } - } - -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 -error is encountered). - -ErrorResponsePlugin -^^^^^^^^^^^^^^^^^^^ - -Error responses are by default only used for documentation. If you don't need very complex exception logic for your web -service errors, then you can use the ``Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin`` to automatically throw defined -exceptions when one of the ``errorResponse`` rules are matched. The error response plugin will listen for the -``request.complete`` event of a request created by a command object. Every response (including a successful response) is -checked against the list of error responses for an exact match using the following order of checks: - -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? -4. Throw the exception stored in the ``class`` attribute of the errorResponse. - -The ``class`` attribute must point to a class that implements -``Guzzle\Plugin\ErrorResponse\ErrorResponseExceptionInterface``. This interface requires that an error response class -implements ``public static function fromCommand(CommandInterface $command, Response $response)``. This method must -return an object that extends from ``\Exception``. After an exception is returned, it is thrown by the plugin. - -.. _parameter-schema: - -Parameter schema ----------------- - -Parameters in both operations and models are represented using the -`JSON schema `_ syntax. - -.. csv-table:: - :header: "Property Name", "Value", "Description" - :widths: 20, 15, 65 - - "name", "string", "Unique name of the parameter" - "type", "string|array", "Type of variable (string, number, integer, boolean, object, array, numeric, null, any). Types are using for validation and determining the structure of a parameter. You can use a union type by providing an array of simple types. If one of the union types matches the provided value, then the value is valid." - "instanceOf", "string", "When the type is an object, you can specify the class that the object must implement" - "required", "boolean", "Whether or not the parameter is required" - "default", "mixed", "Default value to use if no value is supplied" - "static", "boolean", "Set to true to specify that the parameter value cannot be changed from the default setting" - "description", "string", "Documentation of the parameter" - "location", "string", "The location of a request used to apply a parameter. Custom locations can be registered with a command, but the defaults are uri, query, statusCode, reasonPhrase, header, body, json, xml, postField, postFile, responseBody" - "sentAs", "string", "Specifies how the data being modeled is sent over the wire. For example, you may wish to include certain headers in a response model that have a normalized casing of FooBar, but the actual header is x-foo-bar. In this case, sentAs would be set to x-foo-bar." - "filters", "array", "Array of functions to to run a parameter value through." - -filters -~~~~~~~ - -Each value in the array must be a string containing the full class path to a static method or an array of complex -filter information. You can specify static methods of classes using the full namespace class name followed by -"::" (e.g. ``FooBar::baz()``). Some filters require arguments in order to properly filter a value. For complex filters, -use an object containing a ``method`` attribute pointing to a function, and an ``args`` attribute containing an -array of positional arguments to pass to the function. Arguments can contain keywords that are replaced when filtering -a value: ``@value`` is replaced with the value being filtered, and ``@api`` is replaced with the actual Parameter -object. - -.. code-block:: json - - { - "filters": [ - "strtolower", - { - "method": "MyClass::convertString", - "args": [ "test", "@value", "@api" ] - } - ] - } - -The above example will filter a parameter using ``strtolower``. It will then call the ``convertString`` static method -of ``MyClass``, passing in "test", the actual value of the parameter, and a ``Guzzle\Service\Description\Parameter`` -object. - -Operation parameter location attributes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The location field of top-level parameters control how a parameter is serialized when generating a request. - -uri location -^^^^^^^^^^^^ - -Parameters are injected into the ``uri`` attribute of the operation using -`URI-template expansion `_. - -.. code-block:: json - - { - "operations": { - "uriTest": { - "uri": "/test/{testValue}", - "parameters": { - "testValue": { - "location": "uri" - } - } - } - } - } - -query location -^^^^^^^^^^^^^^ - -Parameters are injected into the query string of a request. Query values can be nested, which would result in a PHP -style nested query string. The name of a parameter is the default name of the query string parameter added to the -request. You can override this behavior by specifying the ``sentAs`` attribute on the parameter. - -.. code-block:: json - - { - "operations": { - "queryTest": { - "parameters": { - "testValue": { - "location": "query", - "sentAs": "test_value" - } - } - } - } - } - -header location -^^^^^^^^^^^^^^^ - -Parameters are injected as headers on an HTTP request. The name of the parameter is used as the name of the header by -default. You can change the name of the header created by the parameter using the ``sentAs`` attribute. - -Headers that are of type ``object`` will be added as multiple headers to a request using the key of the input array as -the header key. Setting a ``sentAs`` attribute along with a type ``object`` will use the value of ``sentAs`` as a -prefix for each header key. - -body location -^^^^^^^^^^^^^ - -Parameters are injected as the body of a request. The input of these parameters may be anything that can be cast to a -string or a ``Guzzle\Http\EntityBodyInterface`` object. - -postField location -^^^^^^^^^^^^^^^^^^ - -Parameters are inserted as POST fields in a request. Nested values may be supplied and will be represented using -PHP style nested query strings. The POST field name is the same as the parameter name by default. You can use the -``sentAs`` parameter to override the POST field name. - -postFile location -^^^^^^^^^^^^^^^^^ - -Parameters are added as POST files. A postFile value may be a string pointing to a local filename or a -``Guzzle\Http\Message\PostFileInterface`` object. The name of the POST file will be the name of the parameter by -default. You can use a custom POST file name by using the ``sentAs`` attribute. - -Supports "string" and "array" types. - -json location -^^^^^^^^^^^^^ - -Parameters are added to the body of a request as top level keys of a JSON document. Nested values may be specified, -with any number of nested ``Guzzle\Common\ToArrayInterface`` objects. When JSON parameters are specified, the -``Content-Type`` of the request will change to ``application/json`` if a ``Content-Type`` has not already been specified -on the request. - -xml location -^^^^^^^^^^^^ - -Parameters are added to the body of a request as top level nodes of an XML document. Nested values may be specified, -with any number of nested ``Guzzle\Common\ToArrayInterface`` objects. When XML parameters are specified, the -``Content-Type`` of the request will change to ``application/xml`` if a ``Content-Type`` has not already been specified -on the request. - -responseBody location -^^^^^^^^^^^^^^^^^^^^^ - -Specifies the EntityBody of a response. This can be used to download the response body to a file or a custom Guzzle -EntityBody object. - -No location -^^^^^^^^^^^ - -If a parameter has no location attribute, then the parameter is simply used as a data value. - -Other locations -^^^^^^^^^^^^^^^ - -Custom locations can be registered as new locations or override default locations if needed. - -.. _model-schema: - -Model Schema ------------- - -Models are used in service descriptions to provide generic JSON schema definitions that can be extended from or used in -``$ref`` attributes. Models can also be referenced in a ``responseClass`` attribute to provide valuable output to an -operation. Models are JSON schema documents and use the exact syntax and attributes used in parameters. - -Response Models -~~~~~~~~~~~~~~~ - -Response models describe how a response is parsed into a ``Guzzle\Service\Resource\Model`` object. Response models are -always modeled as JSON schema objects. When an HTTP response is parsed using a response model, the rules specified on -each property of a response model will translate 1:1 as keys in a PHP associative array. When a ``sentAs`` attribute is -found in response model parameters, the value retrieved from the HTTP response is retrieved using the ``sentAs`` -parameter but stored in the response model using the name of the parameter. - -The location field of top-level parameters in a response model tell response parsers how data is retrieved from a -response. - -statusCode location -^^^^^^^^^^^^^^^^^^^ - -Retrieves the status code of the response. - -reasonPhrase location -^^^^^^^^^^^^^^^^^^^^^ - -Retrieves the reason phrase of the response. - -header location -^^^^^^^^^^^^^^^ - -Retrieves a header from the HTTP response. - -body location -^^^^^^^^^^^^^ - -Retrieves the body of an HTTP response. - -json location -^^^^^^^^^^^^^ - -Retrieves a top-level parameter from a JSON document contained in an HTTP response. - -You can use ``additionalProperties`` if the JSON document is wrapped in an outer array. This allows you to parse the -contents of each item in the array using the parsing rules defined in the ``additionalProperties`` schema. - -xml location -^^^^^^^^^^^^ - -Retrieves a top-level node value from an XML document contained in an HTTP response. - -Other locations -^^^^^^^^^^^^^^^ - -Custom locations can be registered as new locations or override default locations if needed. - -Example service description ---------------------------- - -Let's say you're interacting with a web service called 'Foo' that allows for the following routes and methods:: - - GET/POST /users - GET/DELETE /users/:id - -The following JSON service description implements this simple web service: - -.. class:: overflow-height-500px - - .. code-block:: json - - { - "name": "Foo", - "apiVersion": "2012-10-14", - "baseUrl": "http://api.foo.com", - "description": "Foo is an API that allows you to Baz Bar", - "operations": { - "GetUsers": { - "httpMethod": "GET", - "uri": "/users", - "summary": "Gets a list of users", - "responseClass": "GetUsersOutput" - }, - "CreateUser": { - "httpMethod": "POST", - "uri": "/users", - "summary": "Creates a new user", - "responseClass": "CreateUserOutput", - "parameters": { - "name": { - "location": "json", - "type": "string" - }, - "age": { - "location": "json", - "type": "integer" - } - } - }, - "GetUser": { - "httpMethod": "GET", - "uri": "/users/{id}", - "summary": "Retrieves a single user", - "responseClass": "GetUserOutput", - "parameters": { - "id": { - "location": "uri", - "description": "User to retrieve by ID", - "required": true - } - } - }, - "DeleteUser": { - "httpMethod": "DELETE", - "uri": "/users/{id}", - "summary": "Deletes a user", - "responseClass": "DeleteUserOutput", - "parameters": { - "id": { - "location": "uri", - "description": "User to delete by ID", - "required": true - } - } - } - }, - "models": { - "GetUsersOutput": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "location": "json", - "type": "string" - }, - "age": { - "location": "json", - "type": "integer" - } - } - } - }, - "CreateUserOutput": { - "type": "object", - "properties": { - "id": { - "location": "json", - "type": "string" - }, - "location": { - "location": "header", - "sentAs": "Location", - "type": "string" - } - } - }, - "GetUserOutput": { - "type": "object", - "properties": { - "name": { - "location": "json", - "type": "string" - }, - "age": { - "location": "json", - "type": "integer" - } - } - }, - "DeleteUserOutput": { - "type": "object", - "properties": { - "status": { - "location": "statusCode", - "type": "integer" - } - } - } - } - } - -If you attach this service description to a client, you would completely configure the client to interact with the -Foo web service and provide valuable response models for each operation. - -.. code-block:: php - - use Guzzle\Service\Description\ServiceDescription; - - $description = ServiceDescription::factory('/path/to/client.json'); - $client->setDescription($description); - - $command = $client->getCommand('DeleteUser', array('id' => 123)); - $responseModel = $client->execute($command); - echo $responseModel['status']; - -.. note:: - - You can add the service description to your client's factory method or constructor. diff --git a/vendor/guzzle/guzzle/docs/webservice-client/using-the-service-builder.rst b/vendor/guzzle/guzzle/docs/webservice-client/using-the-service-builder.rst deleted file mode 100644 index b7113d68b..000000000 --- a/vendor/guzzle/guzzle/docs/webservice-client/using-the-service-builder.rst +++ /dev/null @@ -1,316 +0,0 @@ -======================= -Using a service builder -======================= - -The best way to instantiate Guzzle web service clients is to let Guzzle handle building the clients for you using a -ServiceBuilder. A ServiceBuilder is responsible for creating concrete client objects based on configuration settings -and helps to manage credentials for different environments. - -You don't have to use a service builder, but they help to decouple your application from concrete classes and help to -share configuration data across multiple clients. Consider the following example. Here we are creating two clients that -require the same API public key and secret key. The clients are created using their ``factory()`` methods. - -.. code-block:: php - - use MyService\FooClient; - use MyService\BarClient; - - $foo = FooClient::factory(array( - 'key' => 'abc', - 'secret' => '123', - 'custom' => 'and above all' - )); - - $bar = BarClient::factory(array( - 'key' => 'abc', - 'secret' => '123', - 'custom' => 'listen to me' - )); - -The redundant specification of the API keys can be removed using a service builder. - -.. code-block:: php - - use Guzzle\Service\Builder\ServiceBuilder; - - $builder = ServiceBuilder::factory(array( - 'services' => array( - 'abstract_client' => array( - 'params' => array( - 'key' => 'abc', - 'secret' => '123' - ) - ), - 'foo' => array( - 'extends' => 'abstract_client', - 'class' => 'MyService\FooClient', - 'params' => array( - 'custom' => 'and above all' - ) - ), - 'bar' => array( - 'extends' => 'abstract_client', - 'class' => 'MyService\FooClient', - 'params' => array( - 'custom' => 'listen to me' - ) - ) - ) - )); - - $foo = $builder->get('foo'); - $bar = $builder->get('bar'); - -You can make managing your API keys even easier by saving the service builder configuration in a JSON format in a -.json file. - -Creating a service builder --------------------------- - -A ServiceBuilder can source information from an array, an PHP include file that returns an array, or a JSON file. - -.. code-block:: php - - use Guzzle\Service\Builder\ServiceBuilder; - - // Source service definitions from a JSON file - $builder = ServiceBuilder::factory('services.json'); - -Sourcing data from an array -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Data can be source from a PHP array. The array must contain an associative ``services`` array that maps the name of a -client to the configuration information used by the service builder to create the client. Clients are given names -which are used to identify how a client is retrieved from a service builder. This can be useful for using multiple -accounts for the same service or creating development clients vs. production clients. - -.. code-block:: php - - $services = array( - 'includes' => array( - '/path/to/other/services.json', - '/path/to/other/php_services.php' - ), - 'services' => array( - 'abstract.foo' => array( - 'params' => array( - 'username' => 'foo', - 'password' => 'bar' - ) - ), - 'bar' => array( - 'extends' => 'abstract.foo', - 'class' => 'MyClientClass', - 'params' => array( - 'other' => 'abc' - ) - ) - ) - ); - -A service builder configuration array contains two top-level array keys: - -+------------+---------------------------------------------------------------------------------------------------------+ -| Key | Description | -+============+=========================================================================================================+ -| includes | Array of paths to JSON or PHP include files to include in the configuration. | -+------------+---------------------------------------------------------------------------------------------------------+ -| services | Associative array of defined services that can be created by the service builder. Each service can | -| | contain the following keys: | -| | | -| | +------------+----------------------------------------------------------------------------------------+ | -| | | Key | Description | | -| | +============+========================================================================================+ | -| | | class | The concrete class to instantiate that implements the | | -| | | | ``Guzzle\Common\FromConfigInterface``. | | -| | +------------+----------------------------------------------------------------------------------------+ | -| | | extends | The name of a previously defined service to extend from | | -| | +------------+----------------------------------------------------------------------------------------+ | -| | | params | Associative array of parameters to pass to the factory method of the service it is | | -| | | | instantiated | | -| | +------------+----------------------------------------------------------------------------------------+ | -| | | alias | An alias that can be used in addition to the array key for retrieving a client from | | -| | | | the service builder. | | -| | +------------+----------------------------------------------------------------------------------------+ | -+------------+---------------------------------------------------------------------------------------------------------+ - -The first client defined, ``abstract.foo``, is used as a placeholder of shared configuration values. Any service -extending abstract.foo will inherit its params. As an example, this can be useful when clients share the same username -and password. - -The next client, ``bar``, extends from ``abstract.foo`` using the ``extends`` attribute referencing the client from -which to extend. Additional parameters can be merged into the original service definition when extending a parent -service. - -.. important:: - - Each client that you intend to instantiate must specify a ``class`` attribute that references the full class name - of the client being created. The class referenced in the ``class`` parameter must implement a static ``factory()`` - method that accepts an array or ``Guzzle\Common\Collection`` object and returns an instantiated object. - -Sourcing from a PHP include -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can create service builder configurations using a PHP include file. This can be useful if you wish to take -advantage of an opcode cache like APC to speed up the process of loading and processing the configuration. The PHP -include file is the same format as an array, but you simply create a PHP script that returns an array and save the -file with the .php file extension. - -.. code-block:: php - - '...'); - // Saved as config.php - -This configuration file can then be used with a service builder. - -.. code-block:: php - - $builder = ServiceBuilder::factory('/path/to/config.php'); - -Sourcing from a JSON document -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can use JSON documents to serialize your service descriptions. The JSON format uses the exact same structure as -the PHP array syntax, but it's just serialized using JSON. - -.. code-block:: javascript - - { - "includes": ["/path/to/other/services.json", "/path/to/other/php_services.php"], - "services": { - "abstract.foo": { - "params": { - "username": "foo", - "password": "bar" - } - }, - "bar": { - "extends": "abstract.foo", - "class": "MyClientClass", - "params": { - "other": "abc" - } - } - } - } - -Referencing other clients in parameters -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If one of your clients depends on another client as one of its parameters, you can reference that client by name by -enclosing the client's reference key in ``{}``. - -.. code-block:: javascript - - { - "services": { - "token": { - "class": "My\Token\TokenFactory", - "params": { - "access_key": "xyz" - } - }, - "client": { - "class": "My\Client", - "params": { - "token_client": "{token}", - "version": "1.0" - } - } - } - } - -When ``client`` is constructed by the service builder, the service builder will first create the ``token`` service -and then inject the token service into ``client``'s factory method in the ``token_client`` parameter. - -Retrieving clients from a service builder ------------------------------------------ - -Clients are referenced using a customizable name you provide in your service definition. The ServiceBuilder is a sort -of multiton object-- it will only instantiate a client once and return that client for subsequent retrievals. Clients -are retrieved by name (the array key used in the configuration) or by the ``alias`` setting of a service. - -Here's an example of retrieving a client from your ServiceBuilder: - -.. code-block:: php - - $client = $builder->get('foo'); - - // You can also use the ServiceBuilder object as an array - $client = $builder['foo']; - -Creating throwaway clients -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can get a "throwaway" client (a client that is not persisted by the ServiceBuilder) by passing ``true`` in the -second argument of ``ServiceBuilder::get()``. This allows you to create a client that will not be returned by other -parts of your code that use the service builder. Instead of passing ``true``, you can pass an array of configuration -settings that will override the configuration settings specified in the service builder. - -.. code-block:: php - - // Get a throwaway client and overwrite the "custom" setting of the client - $foo = $builder->get('foo', array( - 'custom' => 'in this world there are rules' - )); - -Getting raw configuration settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can get the raw configuration settings provided to the service builder for a specific service using the -``getData($name)`` method of a service builder. This method will null if the service was not found in the service -builder or an array of configuration settings if the service was found. - -.. code-block:: php - - $data = $builder->getData('foo'); - echo $data['key'] . "\n"; - echo $data['secret'] . "\n"; - echo $data['custom'] . "\n"; - -Adding a plugin to all clients ------------------------------- - -You can add a plugin to all clients created by a service builder using the ``addGlobalPlugin($plugin)`` method of a -service builder and passing a ``Symfony\Component\EventDispatcher\EventSubscriberInterface`` object. The service builder -will then attach each global plugin to every client as it is created. This allows you to, for example, add a LogPlugin -to every request created by a service builder for easy debugging. - -.. code-block:: php - - use Guzzle\Plugin\Log\LogPlugin; - - // Add a debug log plugin to every client as it is created - $builder->addGlobalPlugin(LogPlugin::getDebugPlugin()); - - $foo = $builder->get('foo'); - $foo->get('/')->send(); - // Should output all of the data sent over the wire - -.. _service-builder-events: - -Events emitted from a service builder -------------------------------------- - -A ``Guzzle\Service\Builder\ServiceBuilder`` object emits the following events: - -+-------------------------------+--------------------------------------------+-----------------------------------------+ -| Event name | Description | Event data | -+===============================+============================================+=========================================+ -| service_builder.create_client | Called when a client is created | * client: The created client object | -+-------------------------------+--------------------------------------------+-----------------------------------------+ - -.. code-block:: php - - use Guzzle\Common\Event; - use Guzzle\Service\Builder\ServiceBuilder; - - $builder = ServiceBuilder::factory('/path/to/config.json'); - - // Add an event listener to print out each client client as it is created - $builder->getEventDispatcher()->addListener('service_builder.create_client', function (Event $e) { - echo 'Client created: ' . get_class($e['client']) . "\n"; - }); - - $foo = $builder->get('foo'); - // Should output the class used for the "foo" client diff --git a/vendor/guzzle/guzzle/docs/webservice-client/webservice-client.rst b/vendor/guzzle/guzzle/docs/webservice-client/webservice-client.rst deleted file mode 100644 index 7ec771e1c..000000000 --- a/vendor/guzzle/guzzle/docs/webservice-client/webservice-client.rst +++ /dev/null @@ -1,659 +0,0 @@ -====================== -The web service client -====================== - -The ``Guzzle\Service`` namespace contains various abstractions that help to make it easier to interact with a web -service API, including commands, service descriptions, and resource iterators. - -In this chapter, we'll build a simple `Twitter API client `_. - -Creating a client -================= - -A class that extends from ``Guzzle\Service\Client`` or implements ``Guzzle\Service\ClientInterface`` must implement a -``factory()`` method in order to be used with a :doc:`service builder `. - -Factory method --------------- - -You can use the ``factory()`` method of a client directly if you do not need a service builder. - -.. code-block:: php - - use mtdowling\TwitterClient; - - // Create a client and pass an array of configuration data - $twitter = TwitterClient::factory(array( - 'consumer_key' => '****', - 'consumer_secret' => '****', - 'token' => '****', - 'token_secret' => '****' - )); - -.. note:: - - If you'd like to follow along, here's how to get your Twitter API credentials: - - 1. Visit https://dev.twitter.com/apps - 2. Click on an application that you've created - 3. Click on the "OAuth tool" tab - 4. Copy all of the settings under "OAuth Settings" - -Implementing a factory method ------------------------------ - -Creating a client and its factory method is pretty simple. You just need to implement ``Guzzle\Service\ClientInterface`` -or extend from ``Guzzle\Service\Client``. - -.. code-block:: php - - namespace mtdowling; - - use Guzzle\Common\Collection; - use Guzzle\Plugin\Oauth\OauthPlugin; - use Guzzle\Service\Client; - use Guzzle\Service\Description\ServiceDescription; - - /** - * A simple Twitter API client - */ - class TwitterClient extends Client - { - public static function factory($config = array()) - { - // Provide a hash of default client configuration options - $default = array('base_url' => 'https://api.twitter.com/1.1'); - - // The following values are required when creating the client - $required = array( - 'base_url', - 'consumer_key', - 'consumer_secret', - 'token', - 'token_secret' - ); - - // Merge in default settings and validate the config - $config = Collection::fromConfig($config, $default, $required); - - // Create a new Twitter client - $client = new self($config->get('base_url'), $config); - - // Ensure that the OauthPlugin is attached to the client - $client->addSubscriber(new OauthPlugin($config->toArray())); - - return $client; - } - } - -Service Builder ---------------- - -A service builder is used to easily create web service clients, provides a simple configuration driven approach to -creating clients, and allows you to share configuration settings across multiple clients. You can find out more about -Guzzle's service builder in :doc:`using-the-service-builder`. - -.. code-block:: php - - use Guzzle\Service\Builder\ServiceBuilder; - - // Create a service builder and provide client configuration data - $builder = ServiceBuilder::factory('/path/to/client_config.json'); - - // Get the client from the service builder by name - $twitter = $builder->get('twitter'); - -The above example assumes you have JSON data similar to the following stored in "/path/to/client_config.json": - -.. code-block:: json - - { - "services": { - "twitter": { - "class": "mtdowling\\TwitterClient", - "params": { - "consumer_key": "****", - "consumer_secret": "****", - "token": "****", - "token_secret": "****" - } - } - } - } - -.. note:: - - A service builder becomes much more valuable when using multiple web service clients in a single application or - if you need to utilize the same client with varying configuration settings (e.g. multiple accounts). - -Commands -======== - -Commands are a concept in Guzzle that helps to hide the underlying implementation of an API by providing an easy to use -parameter driven object for each action of an API. A command is responsible for accepting an array of configuration -parameters, serializing an HTTP request, and parsing an HTTP response. Following the -`command pattern `_, commands in Guzzle offer a greater level of -flexibility when implementing and utilizing a web service client. - -Executing commands ------------------- - -You must explicitly execute a command after creating a command using the ``getCommand()`` method. A command has an -``execute()`` method that may be called, or you can use the ``execute()`` method of a client object and pass in the -command object. Calling either of these execute methods will return the result value of the command. The result value is -the result of parsing the HTTP response with the ``process()`` method. - -.. code-block:: php - - // Get a command from the client and pass an array of parameters - $command = $twitter->getCommand('getMentions', array( - 'count' => 5 - )); - - // Other parameters can be set on the command after it is created - $command['trim_user'] = false; - - // Execute the command using the command object. - // The result value contains an array of JSON data from the response - $result = $command->execute(); - - // You can retrieve the result of the command later too - $result = $command->getResult(). - -Command object also contains methods that allow you to inspect the HTTP request and response that was utilized with -the command. - -.. code-block:: php - - $request = $command->getRequest(); - $response = $command->getResponse(); - -.. note:: - - The format and notation used to retrieve commands from a client can be customized by injecting a custom command - factory, ``Guzzle\Service\Command\Factory\FactoryInterface``, on the client using ``$client->setCommandFactory()``. - -Executing with magic methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When using method missing magic methods with a command, the command will be executed right away and the result of the -command is returned. - -.. code-block:: php - - $jsonData = $twitter->getMentions(array( - 'count' => 5, - 'trim_user' => true - )); - -Creating commands ------------------ - -Commands are created using either the ``getCommand()`` method of a client or a magic missing method of a client. Using -the ``getCommand()`` method allows you to create a command without executing it, allowing for customization of the -command or the request serialized by the command. - -When a client attempts to create a command, it uses the client's ``Guzzle\Service\Command\Factory\FactoryInterface``. -By default, Guzzle will utilize a command factory that first looks for a concrete class for a particular command -(concrete commands) followed by a command defined by a service description (operation commands). We'll learn more about -concrete commands and operation commands later in this chapter. - -.. code-block:: php - - // Get a command from the twitter client. - $command = $twitter->getCommand('getMentions'); - $result = $command->execute(); - -Unless you've skipped ahead, running the above code will throw an exception. - - PHP Fatal error: Uncaught exception 'Guzzle\Common\Exception\InvalidArgumentException' with message - 'Command was not found matching getMentions' - -This exception was thrown because the "getMentions" command has not yet been implemented. Let's implement one now. - -Concrete commands -~~~~~~~~~~~~~~~~~ - -Commands can be created in one of two ways: create a concrete command class that extends -``Guzzle\Service\Command\AbstractCommand`` or -:doc:`create an OperationCommand based on a service description `. The recommended -approach is to use a service description to define your web service, but you can use concrete commands when custom -logic must be implemented for marshaling or unmarshaling a HTTP message. - -Commands are the method in which you abstract away the underlying format of the requests that need to be sent to take -action on a web service. Commands in Guzzle are meant to be built by executing a series of setter methods on a command -object. Commands are only validated right before they are executed. A ``Guzzle\Service\Client`` object is responsible -for executing commands. Commands created for your web service must implement -``Guzzle\Service\Command\CommandInterface``, but it's easier to extend the ``Guzzle\Service\Command\AbstractCommand`` -class, implement the ``build()`` method, and optionally implement the ``process()`` method. - -Serializing requests -^^^^^^^^^^^^^^^^^^^^ - -The ``build()`` method of a command is responsible for using the arguments of the command to build and serialize a -HTTP request and set the request on the ``$request`` property of the command object. This step is usually taken care of -for you when using a service description driven command that uses the default -``Guzzle\Service\Command\OperationCommand``. You may wish to implement the process method yourself when you aren't -using a service description or need to implement more complex request serialization. - -.. important:::: - - When implementing a custom ``build()`` method, be sure to set the class property of ``$this->request`` to an - instantiated and ready to send request. - -The following example shows how to implement the ``getMentions`` -`Twitter API `_ method using a concrete command. - -.. code-block:: php - - namespace mtdowling\Twitter\Command; - - use Guzzle\Service\Command\AbstractCommand; - - class GetMentions extends AbstractCommand - { - protected function build() - { - // Create the request property of the command - $this->request = $this->client->get('statuses/mentions_timeline.json'); - - // Grab the query object of the request because we will use it for - // serializing command parameters on the request - $query = $this->request->getQuery(); - - if ($this['count']) { - $query->set('count', $this['count']); - } - - if ($this['since_id']) { - $query->set('since_id', $this['since_id']); - } - - if ($this['max_id']) { - $query->set('max_id', $this['max_id']); - } - - if ($this['trim_user'] !== null) { - $query->set('trim_user', $this['trim_user'] ? 'true' : 'false'); - } - - if ($this['contributor_details'] !== null) { - $query->set('contributor_details', $this['contributor_details'] ? 'true' : 'false'); - } - - if ($this['include_entities'] !== null) { - $query->set('include_entities', $this['include_entities'] ? 'true' : 'false'); - } - } - } - -By default, a client will attempt to find concrete command classes under the ``Command`` namespace of a client. First -the client will attempt to find an exact match for the name of the command to the name of the command class. If an -exact match is not found, the client will calculate a class name using inflection. This is calculated based on the -folder hierarchy of a command and converting the CamelCased named commands into snake_case. Here are some examples on -how the command names are calculated: - -#. ``Foo\Command\JarJar`` **->** jar_jar -#. ``Foo\Command\Test`` **->** test -#. ``Foo\Command\People\GetCurrentPerson`` **->** people.get_current_person - -Notice how any sub-namespace beneath ``Command`` is converted from ``\`` to ``.`` (a period). CamelCasing is converted -to lowercased snake_casing (e.g. JarJar == jar_jar). - -Parsing responses -^^^^^^^^^^^^^^^^^ - -The ``process()`` method of a command is responsible for converting an HTTP response into something more useful. For -example, a service description operation that has specified a model object in the ``responseClass`` attribute of the -operation will set a ``Guzzle\Service\Resource\Model`` object as the result of the command. This behavior can be -completely modified as needed-- even if you are using operations and responseClass models. Simply implement a custom -``process()`` method that sets the ``$this->result`` class property to whatever you choose. You can reuse parts of the -default Guzzle response parsing functionality or get inspiration from existing code by using -``Guzzle\Service\Command\OperationResponseParser`` and ``Guzzle\Service\Command\DefaultResponseParser`` classes. - -If you do not implement a custom ``process()`` method and are not using a service description, then Guzzle will attempt -to guess how a response should be processed based on the Content-Type header of the response. Because the Twitter API -sets a ``Content-Type: application/json`` header on this response, we do not need to implement any custom response -parsing. - -Operation commands -~~~~~~~~~~~~~~~~~~ - -Operation commands are commands in which the serialization of an HTTP request and the parsing of an HTTP response are -driven by a Guzzle service description. Because request serialization, validation, and response parsing are -described using a DSL, creating operation commands is a much faster process than writing concrete commands. - -Creating operation commands for our Twitter client can remove a great deal of redundancy from the previous concrete -command, and allows for a deeper runtime introspection of the API. Here's an example service description we can use to -create the Twitter API client: - -.. code-block:: json - - { - "name": "Twitter", - "apiVersion": "1.1", - "baseUrl": "https://api.twitter.com/1.1", - "description": "Twitter REST API client", - "operations": { - "GetMentions": { - "httpMethod": "GET", - "uri": "statuses/mentions_timeline.json", - "summary": "Returns the 20 most recent mentions for the authenticating user.", - "responseClass": "GetMentionsOutput", - "parameters": { - "count": { - "description": "Specifies the number of tweets to try and retrieve", - "type": "integer", - "location": "query" - }, - "since_id": { - "description": "Returns results with an ID greater than the specified ID", - "type": "integer", - "location": "query" - }, - "max_id": { - "description": "Returns results with an ID less than or equal to the specified ID.", - "type": "integer", - "location": "query" - }, - "trim_user": { - "description": "Limits the amount of data returned for each user", - "type": "boolean", - "location": "query" - }, - "contributor_details": { - "description": "Adds more data to contributor elements", - "type": "boolean", - "location": "query" - }, - "include_entities": { - "description": "The entities node will be disincluded when set to false.", - "type": "boolean", - "location": "query" - } - } - } - }, - "models": { - "GetMentionsOutput": { - "type": "object", - "additionalProperties": { - "location": "json" - } - } - } - } - -If you're lazy, you can define the API in a less descriptive manner using ``additionalParameters``. -``additionalParameters`` define the serialization and validation rules of parameters that are not explicitly defined -in a service description. - -.. code-block:: json - - { - "name": "Twitter", - "apiVersion": "1.1", - "baseUrl": "https://api.twitter.com/1.1", - "description": "Twitter REST API client", - "operations": { - "GetMentions": { - "httpMethod": "GET", - "uri": "statuses/mentions_timeline.json", - "summary": "Returns the 20 most recent mentions for the authenticating user.", - "responseClass": "GetMentionsOutput", - "additionalParameters": { - "location": "query" - } - } - }, - "models": { - "GetMentionsOutput": { - "type": "object", - "additionalProperties": { - "location": "json" - } - } - } - } - -You should attach the service description to the client at the end of the client's factory method: - -.. code-block:: php - - // ... - class TwitterClient extends Client - { - public static function factory($config = array()) - { - // ... same code as before ... - - // Set the service description - $client->setDescription(ServiceDescription::factory('path/to/twitter.json')); - - return $client; - } - } - -The client can now use operations defined in the service description instead of requiring you to create concrete -command classes. Feel free to delete the concrete command class we created earlier. - -.. code-block:: php - - $jsonData = $twitter->getMentions(array( - 'count' => 5, - 'trim_user' => true - )); - -Executing commands in parallel ------------------------------- - -Much like HTTP requests, Guzzle allows you to send multiple commands in parallel. You can send commands in parallel by -passing an array of command objects to a client's ``execute()`` method. The client will serialize each request and -send them all in parallel. If an error is encountered during the transfer, then a -``Guzzle\Service\Exception\CommandTransferException`` is thrown, which allows you to retrieve a list of commands that -succeeded and a list of commands that failed. - -.. code-block:: php - - use Guzzle\Service\Exception\CommandTransferException; - - $commands = array(); - $commands[] = $twitter->getCommand('getMentions'); - $commands[] = $twitter->getCommand('otherCommandName'); - // etc... - - try { - $result = $client->execute($commands); - foreach ($result as $command) { - echo $command->getName() . ': ' . $command->getResponse()->getStatusCode() . "\n"; - } - } catch (CommandTransferException $e) { - // Get an array of the commands that succeeded - foreach ($e->getSuccessfulCommands() as $command) { - echo $command->getName() . " succeeded\n"; - } - // Get an array of the commands that failed - foreach ($e->getFailedCommands() as $command) { - echo $command->getName() . " failed\n"; - } - } - -.. note:: - - All commands executed from a client using an array must originate from the same client. - -Special command options ------------------------ - -Guzzle exposes several options that help to control how commands are validated, serialized, and parsed. -Command options can be specified when creating a command or in the ``command.params`` parameter in the -``Guzzle\Service\Client``. - -=========================== ============================================================================================ -command.request_options Option used to add :ref:`Request options ` to the request created by a - command -command.hidden_params An array of the names of parameters ignored by the ``additionalParameters`` parameter schema -command.disable_validation Set to true to disable JSON schema validation of the command's input parameters -command.response_processing Determines how the default response parser will parse the command. One of "raw" no parsing, - "model" (the default method used to parse commands using response models defined in service - descriptions) -command.headers (deprecated) Option used to specify custom headers. Use ``command.request_options`` instead -command.on_complete (deprecated) Option used to add an onComplete method to a command. Use - ``command.after_send`` event instead -command.response_body (deprecated) Option used to change the entity body used to store a response. - Use ``command.request_options`` instead -=========================== ============================================================================================ - -Advanced client configuration -============================= - -Default command parameters --------------------------- - -When creating a client object, you can specify default command parameters to pass into all commands. Any key value pair -present in the ``command.params`` settings of a client will be added as default parameters to any command created -by the client. - -.. code-block:: php - - $client = new Guzzle\Service\Client(array( - 'command.params' => array( - 'default_1' => 'foo', - 'another' => 'bar' - ) - )); - -Magic methods -------------- - -Client objects will, by default, attempt to create and execute commands when a missing method is invoked on a client. -This powerful concept applies to both concrete commands and operation commands powered by a service description. This -makes it appear to the end user that you have defined actual methods on a client object, when in fact, the methods are -invoked using PHP's magic ``__call`` method. - -The ``__call`` method uses the ``getCommand()`` method of a client, which uses the client's internal -``Guzzle\Service\Command\Factory\FactoryInterface`` object. The default command factory allows you to instantiate -operations defined in a client's service description. The method in which a client determines which command to -execute is defined as follows: - -1. The client will first try to find a literal match for an operation in the service description. -2. If the literal match is not found, the client will try to uppercase the first character of the operation and find - the match again. -3. If a match is still not found, the command factory will inflect the method name from CamelCase to snake_case and - attempt to find a matching command. -4. If a command still does not match, an exception is thrown. - -.. code-block:: php - - // Use the magic method - $result = $twitter->getMentions(); - - // This is exactly the same as: - $result = $twitter->getCommand('getMentions')->execute(); - -You can disable magic methods on a client by passing ``false`` to the ``enableMagicMethod()`` method. - -Custom command factory ----------------------- - -A client by default uses the ``Guzzle\Service\Command\Factory\CompositeFactory`` which allows multiple command -factories to attempt to create a command by a certain name. The default CompositeFactory uses a ``ConcreteClassFactory`` -and a ``ServiceDescriptionFactory`` if a service description is specified on a client. You can specify a custom -command factory if your client requires custom command creation logic using the ``setCommandFactory()`` method of -a client. - -Custom resource Iterator factory --------------------------------- - -Resource iterators can be retrieved from a client using the ``getIterator($name)`` method of a client. This method uses -a client's internal ``Guzzle\Service\Resource\ResourceIteratorFactoryInterface`` object. A client by default uses a -``Guzzle\Service\Resource\ResourceIteratorClassFactory`` to attempt to find concrete classes that implement resource -iterators. The default factory will first look for matching iterators in the ``Iterator`` subdirectory of the client -followed by the ``Model`` subdirectory of a client. Use the ``setResourceIteratorFactory()`` method of a client to -specify a custom resource iterator factory. - -Plugins and events -================== - -``Guzzle\Service\Client`` exposes various events that allow you to hook in custom logic. A client object owns a -``Symfony\Component\EventDispatcher\EventDispatcher`` object that can be accessed by calling -``$client->getEventDispatcher()``. You can use the event dispatcher to add listeners (a simple callback function) or -event subscribers (classes that listen to specific events of a dispatcher). - -.. _service-client-events: - -Events emitted from a Service Client ------------------------------------- - -A ``Guzzle\Service\Client`` object emits the following events: - -+------------------------------+--------------------------------------------+------------------------------------------+ -| Event name | Description | Event data | -+==============================+============================================+==========================================+ -| client.command.create | The client created a command object | * client: Client object | -| | | * command: Command object | -+------------------------------+--------------------------------------------+------------------------------------------+ -| command.before_prepare | Before a command is validated and built. | * command: Command being prepared | -| | This is also before a request is created. | | -+------------------------------+--------------------------------------------+------------------------------------------+ -| command.after_prepare | After a command instantiates and | * command: Command that was prepared | -| | configures its request object. | | -+------------------------------+--------------------------------------------+------------------------------------------+ -| command.before_send | The client is about to execute a prepared | * command: Command to execute | -| | command | | -+------------------------------+--------------------------------------------+------------------------------------------+ -| command.after_send | The client successfully completed | * command: The command that was executed | -| | executing a command | | -+------------------------------+--------------------------------------------+------------------------------------------+ -| command.parse_response | Called when ``responseType`` is ``class`` | * command: The command with a response | -| | and the response is about to be parsed. | about to be parsed. | -+------------------------------+--------------------------------------------+------------------------------------------+ - -.. code-block:: php - - use Guzzle\Common\Event; - use Guzzle\Service\Client; - - $client = new Client(); - - // create an event listener that operates on request objects - $client->getEventDispatcher()->addListener('command.after_prepare', function (Event $event) { - $command = $event['command']; - $request = $command->getRequest(); - - // do something with request - }); - -.. code-block:: php - - use Guzzle\Common\Event; - use Guzzle\Common\Client; - use Symfony\Component\EventDispatcher\EventSubscriberInterface; - - class EventSubscriber implements EventSubscriberInterface - { - public static function getSubscribedEvents() - { - return array( - 'client.command.create' => 'onCommandCreate', - 'command.parse_response' => 'onParseResponse' - ); - } - - public function onCommandCreate(Event $event) - { - $client = $event['client']; - $command = $event['command']; - // operate on client and command - } - - public function onParseResponse(Event $event) - { - $command = $event['command']; - // operate on the command - } - } - - $client = new Client(); - - $client->addSubscriber(new EventSubscriber()); diff --git a/vendor/guzzle/guzzle/phar-stub.php b/vendor/guzzle/guzzle/phar-stub.php deleted file mode 100644 index cc2b53f4f..000000000 --- a/vendor/guzzle/guzzle/phar-stub.php +++ /dev/null @@ -1,16 +0,0 @@ -registerNamespaces(array( - 'Guzzle' => 'phar://guzzle.phar/src', - 'Symfony\\Component\\EventDispatcher' => 'phar://guzzle.phar/vendor/symfony/event-dispatcher', - 'Doctrine' => 'phar://guzzle.phar/vendor/doctrine/common/lib', - 'Monolog' => 'phar://guzzle.phar/vendor/monolog/monolog/src' -)); -$classLoader->register(); - -__HALT_COMPILER(); diff --git a/vendor/guzzle/guzzle/phing/build.properties.dist b/vendor/guzzle/guzzle/phing/build.properties.dist deleted file mode 100644 index c60d3d9cf..000000000 --- a/vendor/guzzle/guzzle/phing/build.properties.dist +++ /dev/null @@ -1,16 +0,0 @@ -# you may need to update this if you're working on a fork. -guzzle.remote=git@github.com:guzzle/guzzle.git - -# github credentials -- only used by GitHub API calls to create subtree repos -github.basicauth=username:password -# for the subtree split and testing -github.org=guzzle - -# your git path -cmd.git=git - -# your composer command -cmd.composer=composer - -# test server start -cmd.testserver=node diff --git a/vendor/guzzle/guzzle/phing/imports/dependencies.xml b/vendor/guzzle/guzzle/phing/imports/dependencies.xml deleted file mode 100644 index e40e037c2..000000000 --- a/vendor/guzzle/guzzle/phing/imports/dependencies.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - using git at ${cmd.git} - - - - found git at ${cmd.git} - - - - - - - - - - diff --git a/vendor/guzzle/guzzle/phing/imports/deploy.xml b/vendor/guzzle/guzzle/phing/imports/deploy.xml deleted file mode 100644 index 8476132e7..000000000 --- a/vendor/guzzle/guzzle/phing/imports/deploy.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - On branch ${head} - - - - - - - - - - working directory clean - - - ${git.status} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ChangeLog Match: ${version.changelog} - Guzzle\Common\Version Match: ${version.version} - - - - releasing: phing -Dnew.version=3.0.x -Dhead=master release - -- - - - - - - - - - - - - - - - BEGINNING RELEASE FOR ${new.version} - - - - - - - - - - - - - - - - - - - - - - - - Tip: to create a new release, do: phing -Dnew.version=[TAG] -Dhead=[BRANCH] release - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/guzzle/guzzle/phing/tasks/ComposerLintTask.php b/vendor/guzzle/guzzle/phing/tasks/ComposerLintTask.php deleted file mode 100644 index 3b7040982..000000000 --- a/vendor/guzzle/guzzle/phing/tasks/ComposerLintTask.php +++ /dev/null @@ -1,152 +0,0 @@ - - * @license http://claylo.mit-license.org/2012/ MIT License - */ - -require_once 'phing/Task.php'; - -class ComposerLintTask extends Task -{ - protected $dir = null; - protected $file = null; - protected $passthru = false; - protected $composer = null; - - /** - * The setter for the dir - * - * @param string $str Directory to crawl recursively for composer files - */ - public function setDir($str) - { - $this->dir = $str; - } - - /** - * The setter for the file - * - * @param string $str Individual file to validate - */ - public function setFile($str) - { - $this->file = $str; - } - - /** - * Whether to use PHP's passthru() function instead of exec() - * - * @param boolean $passthru If passthru shall be used - */ - public function setPassthru($passthru) - { - $this->passthru = (bool) $passthru; - } - - /** - * Composer to execute. If unset, will attempt composer.phar in project - * basedir, and if that fails, will attempt global composer - * installation. - * - * @param string $str Individual file to validate - */ - public function setComposer($str) - { - $this->file = $str; - } - - /** - * The init method: do init steps - */ - public function init() - { - // nothing needed here - } - - /** - * The main entry point - */ - public function main() - { - if ($this->composer === null) { - $this->findComposer(); - } - - $files = array(); - if (!empty($this->file) && file_exists($this->file)) { - $files[] = $this->file; - } - - if (!empty($this->dir)) { - $found = $this->findFiles(); - foreach ($found as $file) { - $files[] = $this->dir . DIRECTORY_SEPARATOR . $file; - } - } - - foreach ($files as $file) { - - $cmd = $this->composer . ' validate ' . $file; - $cmd = escapeshellcmd($cmd); - - if ($this->passthru) { - $retval = null; - passthru($cmd, $retval); - if ($retval == 1) { - throw new BuildException('invalid composer.json'); - } - } else { - $out = array(); - $retval = null; - exec($cmd, $out, $retval); - if ($retval == 1) { - $err = join("\n", $out); - throw new BuildException($err); - } else { - $this->log($out[0]); - } - } - - } - - } - - /** - * Find the composer.json files using Phing's directory scanner - * - * @return array - */ - protected function findFiles() - { - $ds = new DirectoryScanner(); - $ds->setBasedir($this->dir); - $ds->setIncludes(array('**/composer.json')); - $ds->scan(); - return $ds->getIncludedFiles(); - } - - /** - * Find composer installation - * - */ - protected function findComposer() - { - $basedir = $this->project->getBasedir(); - $php = $this->project->getProperty('php.interpreter'); - - if (file_exists($basedir . '/composer.phar')) { - $this->composer = "$php $basedir/composer.phar"; - } else { - $out = array(); - exec('which composer', $out); - if (empty($out)) { - throw new BuildException( - 'Could not determine composer location.' - ); - } - $this->composer = $out[0]; - } - } -} diff --git a/vendor/guzzle/guzzle/phing/tasks/GuzzlePearPharPackageTask.php b/vendor/guzzle/guzzle/phing/tasks/GuzzlePearPharPackageTask.php deleted file mode 100644 index f72a6b5d0..000000000 --- a/vendor/guzzle/guzzle/phing/tasks/GuzzlePearPharPackageTask.php +++ /dev/null @@ -1,338 +0,0 @@ - - * @license http://claylo.mit-license.org/2012/ MIT License - */ - -require_once 'phing/Task.php'; -require_once 'PEAR/PackageFileManager2.php'; -require_once 'PEAR/PackageFileManager/File.php'; -require_once 'PEAR/Packager.php'; - -class GuzzlePearPharPackageTask extends Task -{ - private $version; - private $deploy = true; - private $makephar = true; - - private $subpackages = array(); - - public function setVersion($str) - { - $this->version = $str; - } - - public function getVersion() - { - return $this->version; - } - - public function setDeploy($deploy) - { - $this->deploy = (bool) $deploy; - } - - public function getDeploy() - { - return $this->deploy; - } - - public function setMakephar($makephar) - { - $this->makephar = (bool) $makephar; - } - - public function getMakephar() - { - return $this->makephar; - } - - private $basedir; - private $guzzleinfo; - private $changelog_release_date; - private $changelog_notes = '-'; - - public function main() - { - $this->basedir = $this->getProject()->getBasedir(); - - if (!is_dir((string) $this->basedir.'/.subsplit')) { - throw new BuildException('PEAR packaging requires .subsplit directory'); - } - - // main composer file - $composer_file = file_get_contents((string) $this->basedir.'/.subsplit/composer.json'); - $this->guzzleinfo = json_decode($composer_file, true); - - // make sure we have a target - $pearwork = (string) $this->basedir . '/build/pearwork'; - if (!is_dir($pearwork)) { - mkdir($pearwork, 0777, true); - } - $pearlogs = (string) $this->basedir . '/build/artifacts/logs'; - if (!is_dir($pearlogs)) { - mkdir($pearlogs, 0777, true); - } - - $version = $this->getVersion(); - $this->grabChangelog(); - if ($version[0] == '2') { - $this->log('building single PEAR package'); - $this->buildSinglePackage(); - } else { - // $this->log("building PEAR subpackages"); - // $this->createSubPackages(); - // $this->log("building PEAR bundle package"); - $this->buildSinglePackage(); - } - - if ($this->getMakephar()) { - $this->log("building PHAR"); - $this->getProject()->executeTarget('package-phar'); - } - - if ($this->getDeploy()) { - $this->doDeployment(); - } - } - - public function doDeployment() - { - $basedir = (string) $this->basedir; - $this->log('beginning PEAR/PHAR deployment'); - - chdir($basedir . '/build/pearwork'); - if (!is_dir('./channel')) { - mkdir('./channel'); - } - - // Pull the PEAR channel down locally - passthru('aws s3 sync s3://pear.guzzlephp.org ./channel'); - - // add PEAR packages - foreach (scandir('./') as $file) { - if (substr($file, -4) == '.tgz') { - passthru('pirum add ./channel ' . $file); - } - } - - // if we have a new phar, add it - if ($this->getMakephar() && file_exists($basedir . '/build/artifacts/guzzle.phar')) { - rename($basedir . '/build/artifacts/guzzle.phar', './channel/guzzle.phar'); - } - - // Sync up with the S3 bucket - chdir($basedir . '/build/pearwork/channel'); - passthru('aws s3 sync . s3://pear.guzzlephp.org'); - } - - public function buildSinglePackage() - { - $v = $this->getVersion(); - $apiversion = $v[0] . '.0.0'; - - $opts = array( - 'packagedirectory' => (string) $this->basedir . '/.subsplit/src/', - 'filelistgenerator' => 'file', - 'ignore' => array('*composer.json'), - 'baseinstalldir' => '/', - 'packagefile' => 'package.xml' - //'outputdirectory' => (string) $this->basedir . '/build/pearwork/' - ); - $pfm = new PEAR_PackageFileManager2(); - $pfm->setOptions($opts); - $pfm->addRole('md', 'doc'); - $pfm->addRole('pem', 'php'); - $pfm->setPackage('Guzzle'); - $pfm->setSummary("Object-oriented PHP HTTP Client for PHP 5.3+"); - $pfm->setDescription($this->guzzleinfo['description']); - $pfm->setPackageType('php'); - $pfm->setChannel('guzzlephp.org/pear'); - $pfm->setAPIVersion($apiversion); - $pfm->setReleaseVersion($this->getVersion()); - $pfm->setAPIStability('stable'); - $pfm->setReleaseStability('stable'); - $pfm->setNotes($this->changelog_notes); - $pfm->setPackageType('php'); - $pfm->setLicense('MIT', 'http://github.com/guzzle/guzzle/blob/master/LICENSE'); - $pfm->addMaintainer('lead', 'mtdowling', 'Michael Dowling', 'mtdowling@gmail.com', 'yes'); - $pfm->setDate($this->changelog_release_date); - $pfm->generateContents(); - - $phpdep = $this->guzzleinfo['require']['php']; - $phpdep = str_replace('>=', '', $phpdep); - $pfm->setPhpDep($phpdep); - $pfm->addExtensionDep('required', 'curl'); - $pfm->setPearinstallerDep('1.4.6'); - $pfm->addPackageDepWithChannel('required', 'EventDispatcher', 'pear.symfony.com', '2.1.0'); - if (!empty($this->subpackages)) { - foreach ($this->subpackages as $package) { - $pkg = dirname($package); - $pkg = str_replace('/', '_', $pkg); - $pfm->addConflictingPackageDepWithChannel($pkg, 'guzzlephp.org/pear', false, $apiversion); - } - } - - ob_start(); - $startdir = getcwd(); - chdir((string) $this->basedir . '/build/pearwork'); - - echo "DEBUGGING GENERATED PACKAGE FILE\n"; - $result = $pfm->debugPackageFile(); - if ($result) { - $out = $pfm->writePackageFile(); - echo "\n\n\nWRITE PACKAGE FILE RESULT:\n"; - var_dump($out); - // load up package file and build package - $packager = new PEAR_Packager(); - echo "\n\n\nBUILDING PACKAGE FROM PACKAGE FILE:\n"; - $dest_package = $packager->package($opts['packagedirectory'].'package.xml'); - var_dump($dest_package); - } else { - echo "\n\n\nDEBUGGING RESULT:\n"; - var_dump($result); - } - echo "removing package.xml"; - unlink($opts['packagedirectory'].'package.xml'); - $log = ob_get_clean(); - file_put_contents((string) $this->basedir . '/build/artifacts/logs/pear_package.log', $log); - chdir($startdir); - } - - public function createSubPackages() - { - $this->findComponents(); - - foreach ($this->subpackages as $package) { - $baseinstalldir = dirname($package); - $dir = (string) $this->basedir.'/.subsplit/src/' . $baseinstalldir; - $composer_file = file_get_contents((string) $this->basedir.'/.subsplit/src/'. $package); - $package_info = json_decode($composer_file, true); - $this->log('building ' . $package_info['target-dir'] . ' subpackage'); - $this->buildSubPackage($dir, $baseinstalldir, $package_info); - } - } - - public function buildSubPackage($dir, $baseinstalldir, $info) - { - $package = str_replace('/', '_', $baseinstalldir); - $opts = array( - 'packagedirectory' => $dir, - 'filelistgenerator' => 'file', - 'ignore' => array('*composer.json', '*package.xml'), - 'baseinstalldir' => '/' . $info['target-dir'], - 'packagefile' => 'package.xml' - ); - $pfm = new PEAR_PackageFileManager2(); - $pfm->setOptions($opts); - $pfm->setPackage($package); - $pfm->setSummary($info['description']); - $pfm->setDescription($info['description']); - $pfm->setPackageType('php'); - $pfm->setChannel('guzzlephp.org/pear'); - $pfm->setAPIVersion('3.0.0'); - $pfm->setReleaseVersion($this->getVersion()); - $pfm->setAPIStability('stable'); - $pfm->setReleaseStability('stable'); - $pfm->setNotes($this->changelog_notes); - $pfm->setPackageType('php'); - $pfm->setLicense('MIT', 'http://github.com/guzzle/guzzle/blob/master/LICENSE'); - $pfm->addMaintainer('lead', 'mtdowling', 'Michael Dowling', 'mtdowling@gmail.com', 'yes'); - $pfm->setDate($this->changelog_release_date); - $pfm->generateContents(); - - $phpdep = $this->guzzleinfo['require']['php']; - $phpdep = str_replace('>=', '', $phpdep); - $pfm->setPhpDep($phpdep); - $pfm->setPearinstallerDep('1.4.6'); - - foreach ($info['require'] as $type => $version) { - if ($type == 'php') { - continue; - } - if ($type == 'symfony/event-dispatcher') { - $pfm->addPackageDepWithChannel('required', 'EventDispatcher', 'pear.symfony.com', '2.1.0'); - } - if ($type == 'ext-curl') { - $pfm->addExtensionDep('required', 'curl'); - } - if (substr($type, 0, 6) == 'guzzle') { - $gdep = str_replace('/', ' ', $type); - $gdep = ucwords($gdep); - $gdep = str_replace(' ', '_', $gdep); - $pfm->addPackageDepWithChannel('required', $gdep, 'guzzlephp.org/pear', $this->getVersion()); - } - } - - // can't have main Guzzle package AND sub-packages - $pfm->addConflictingPackageDepWithChannel('Guzzle', 'guzzlephp.org/pear', false, $apiversion); - - ob_start(); - $startdir = getcwd(); - chdir((string) $this->basedir . '/build/pearwork'); - - echo "DEBUGGING GENERATED PACKAGE FILE\n"; - $result = $pfm->debugPackageFile(); - if ($result) { - $out = $pfm->writePackageFile(); - echo "\n\n\nWRITE PACKAGE FILE RESULT:\n"; - var_dump($out); - // load up package file and build package - $packager = new PEAR_Packager(); - echo "\n\n\nBUILDING PACKAGE FROM PACKAGE FILE:\n"; - $dest_package = $packager->package($opts['packagedirectory'].'/package.xml'); - var_dump($dest_package); - } else { - echo "\n\n\nDEBUGGING RESULT:\n"; - var_dump($result); - } - echo "removing package.xml"; - unlink($opts['packagedirectory'].'/package.xml'); - $log = ob_get_clean(); - file_put_contents((string) $this->basedir . '/build/artifacts/logs/pear_package_'.$package.'.log', $log); - chdir($startdir); - } - - public function findComponents() - { - $ds = new DirectoryScanner(); - $ds->setBasedir((string) $this->basedir.'/.subsplit/src'); - $ds->setIncludes(array('**/composer.json')); - $ds->scan(); - $files = $ds->getIncludedFiles(); - $this->subpackages = $files; - } - - public function grabChangelog() - { - $cl = file((string) $this->basedir.'/.subsplit/CHANGELOG.md'); - $notes = ''; - $in_version = false; - $release_date = null; - - foreach ($cl as $line) { - $line = trim($line); - if (preg_match('/^\* '.$this->getVersion().' \(([0-9\-]+)\)$/', $line, $matches)) { - $release_date = $matches[1]; - $in_version = true; - continue; - } - if ($in_version && empty($line) && empty($notes)) { - continue; - } - if ($in_version && ! empty($line)) { - $notes .= $line."\n"; - } - if ($in_version && empty($line) && !empty($notes)) { - $in_version = false; - } - } - $this->changelog_release_date = $release_date; - - if (! empty($notes)) { - $this->changelog_notes = $notes; - } - } -} diff --git a/vendor/guzzle/guzzle/phing/tasks/GuzzleSubSplitTask.php b/vendor/guzzle/guzzle/phing/tasks/GuzzleSubSplitTask.php deleted file mode 100644 index 5d56a5bd5..000000000 --- a/vendor/guzzle/guzzle/phing/tasks/GuzzleSubSplitTask.php +++ /dev/null @@ -1,385 +0,0 @@ - - * @license http://claylo.mit-license.org/2012/ MIT License - */ - -require_once 'phing/tasks/ext/git/GitBaseTask.php'; - -// base - base of tree to split out -// subIndicatorFile - composer.json, package.xml? -class GuzzleSubSplitTask extends GitBaseTask -{ - /** - * What git repository to pull from and publish to - */ - protected $remote = null; - - /** - * Publish for comma-separated heads instead of all heads - */ - protected $heads = null; - - /** - * Publish for comma-separated tags instead of all tags - */ - protected $tags = null; - - /** - * Base of the tree RELATIVE TO .subsplit working dir - */ - protected $base = null; - - /** - * The presence of this file will indicate that the directory it resides - * in is at the top level of a split. - */ - protected $subIndicatorFile = 'composer.json'; - - /** - * Do everything except actually send the update. - */ - protected $dryRun = null; - - /** - * Do not sync any heads. - */ - protected $noHeads = false; - - /** - * Do not sync any tags. - */ - protected $noTags = false; - - /** - * The splits we found in the heads - */ - protected $splits; - - public function setRemote($str) - { - $this->remote = $str; - } - - public function getRemote() - { - return $this->remote; - } - - public function setHeads($str) - { - $this->heads = explode(',', $str); - } - - public function getHeads() - { - return $this->heads; - } - - public function setTags($str) - { - $this->tags = explode(',', $str); - } - - public function getTags() - { - return $this->tags; - } - - public function setBase($str) - { - $this->base = $str; - } - - public function getBase() - { - return $this->base; - } - - public function setSubIndicatorFile($str) - { - $this->subIndicatorFile = $str; - } - - public function getSubIndicatorFile() - { - return $this->subIndicatorFile; - } - - public function setDryRun($bool) - { - $this->dryRun = (bool) $bool; - } - - public function getDryRun() - { - return $this->dryRun; - } - - public function setNoHeads($bool) - { - $this->noHeads = (bool) $bool; - } - - public function getNoHeads() - { - return $this->noHeads; - } - - public function setNoTags($bool) - { - $this->noTags = (bool) $bool; - } - - public function getNoTags() - { - return $this->noTags; - } - - /** - * GitClient from VersionControl_Git - */ - protected $client = null; - - /** - * The main entry point - */ - public function main() - { - $repo = $this->getRepository(); - if (empty($repo)) { - throw new BuildException('"repository" is a required parameter'); - } - - $remote = $this->getRemote(); - if (empty($remote)) { - throw new BuildException('"remote" is a required parameter'); - } - - chdir($repo); - $this->client = $this->getGitClient(false, $repo); - - // initalized yet? - if (!is_dir('.subsplit')) { - $this->subsplitInit(); - } else { - // update - $this->subsplitUpdate(); - } - - // find all splits based on heads requested - $this->findSplits(); - - // check that GitHub has the repos - $this->verifyRepos(); - - // execute the subsplits - $this->publish(); - } - - public function publish() - { - $this->log('DRY RUN ONLY FOR NOW'); - $base = $this->getBase(); - $base = rtrim($base, '/') . '/'; - $org = $this->getOwningTarget()->getProject()->getProperty('github.org'); - - $splits = array(); - - $heads = $this->getHeads(); - foreach ($heads as $head) { - foreach ($this->splits[$head] as $component => $meta) { - $splits[] = $base . $component . ':git@github.com:'. $org.'/'.$meta['repo']; - } - - $cmd = 'git subsplit publish '; - $cmd .= escapeshellarg(implode(' ', $splits)); - - if ($this->getNoHeads()) { - $cmd .= ' --no-heads'; - } else { - $cmd .= ' --heads='.$head; - } - - if ($this->getNoTags()) { - $cmd .= ' --no-tags'; - } else { - if ($this->getTags()) { - $cmd .= ' --tags=' . escapeshellarg(implode(' ', $this->getTags())); - } - } - - passthru($cmd); - } - } - - /** - * Runs `git subsplit update` - */ - public function subsplitUpdate() - { - $repo = $this->getRepository(); - $this->log('git-subsplit update...'); - $cmd = $this->client->getCommand('subsplit'); - $cmd->addArgument('update'); - try { - $cmd->execute(); - } catch (Exception $e) { - throw new BuildException('git subsplit update failed'. $e); - } - chdir($repo . '/.subsplit'); - passthru('php ../composer.phar update --dev'); - chdir($repo); - } - - /** - * Runs `git subsplit init` based on the remote repository. - */ - public function subsplitInit() - { - $remote = $this->getRemote(); - $cmd = $this->client->getCommand('subsplit'); - $this->log('running git-subsplit init ' . $remote); - - $cmd->setArguments(array( - 'init', - $remote - )); - - try { - $output = $cmd->execute(); - } catch (Exception $e) { - throw new BuildException('git subsplit init failed'. $e); - } - $this->log(trim($output), Project::MSG_INFO); - $repo = $this->getRepository(); - chdir($repo . '/.subsplit'); - passthru('php ../composer.phar install --dev'); - chdir($repo); - } - - /** - * Find the composer.json files using Phing's directory scanner - * - * @return array - */ - protected function findSplits() - { - $this->log("checking heads for subsplits"); - $repo = $this->getRepository(); - $base = $this->getBase(); - - $splits = array(); - $heads = $this->getHeads(); - - if (!empty($base)) { - $base = '/' . ltrim($base, '/'); - } else { - $base = '/'; - } - - chdir($repo . '/.subsplit'); - foreach ($heads as $head) { - $splits[$head] = array(); - - // check each head requested *BEFORE* the actual subtree split command gets it - passthru("git checkout '$head'"); - $ds = new DirectoryScanner(); - $ds->setBasedir($repo . '/.subsplit' . $base); - $ds->setIncludes(array('**/'.$this->subIndicatorFile)); - $ds->scan(); - $files = $ds->getIncludedFiles(); - - // Process the files we found - foreach ($files as $file) { - $pkg = file_get_contents($repo . '/.subsplit' . $base .'/'. $file); - $pkg_json = json_decode($pkg, true); - $name = $pkg_json['name']; - $component = str_replace('/composer.json', '', $file); - // keep this for split cmd - $tmpreponame = explode('/', $name); - $reponame = $tmpreponame[1]; - $splits[$head][$component]['repo'] = $reponame; - $nscomponent = str_replace('/', '\\', $component); - $splits[$head][$component]['desc'] = "[READ ONLY] Subtree split of $nscomponent: " . $pkg_json['description']; - } - } - - // go back to how we found it - passthru("git checkout master"); - chdir($repo); - $this->splits = $splits; - } - - /** - * Based on list of repositories we determined we *should* have, talk - * to GitHub and make sure they're all there. - * - */ - protected function verifyRepos() - { - $this->log('verifying GitHub target repos'); - $github_org = $this->getOwningTarget()->getProject()->getProperty('github.org'); - $github_creds = $this->getOwningTarget()->getProject()->getProperty('github.basicauth'); - - if ($github_creds == 'username:password') { - $this->log('Skipping GitHub repo checks. Update github.basicauth in build.properties to verify repos.', 1); - return; - } - - $ch = curl_init('https://api.github.com/orgs/'.$github_org.'/repos?type=all'); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_USERPWD, $github_creds); - // change this when we know we can use our bundled CA bundle! - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - $result = curl_exec($ch); - curl_close($ch); - $repos = json_decode($result, true); - $existing_repos = array(); - - // parse out the repos we found on GitHub - foreach ($repos as $repo) { - $tmpreponame = explode('/', $repo['full_name']); - $reponame = $tmpreponame[1]; - $existing_repos[$reponame] = $repo['description']; - } - - $heads = $this->getHeads(); - foreach ($heads as $head) { - foreach ($this->splits[$head] as $component => $meta) { - - $reponame = $meta['repo']; - - if (!isset($existing_repos[$reponame])) { - $this->log("Creating missing repo $reponame"); - $payload = array( - 'name' => $reponame, - 'description' => $meta['desc'], - 'homepage' => 'http://www.guzzlephp.org/', - 'private' => true, - 'has_issues' => false, - 'has_wiki' => false, - 'has_downloads' => true, - 'auto_init' => false - ); - $ch = curl_init('https://api.github.com/orgs/'.$github_org.'/repos'); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_USERPWD, $github_creds); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload)); - // change this when we know we can use our bundled CA bundle! - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - $result = curl_exec($ch); - echo "Response code: ".curl_getinfo($ch, CURLINFO_HTTP_CODE)."\n"; - curl_close($ch); - } else { - $this->log("Repo $reponame exists", 2); - } - } - } - } -} diff --git a/vendor/guzzle/guzzle/phpunit.xml.dist b/vendor/guzzle/guzzle/phpunit.xml.dist deleted file mode 100644 index 208fdc08e..000000000 --- a/vendor/guzzle/guzzle/phpunit.xml.dist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - ./tests/Guzzle/Tests - - - - - - - - - - ./src/Guzzle - - ./src/Guzzle - ./src/Guzzle/Common/Exception/GuzzleException.php - ./src/Guzzle/Http/Exception/HttpException.php - ./src/Guzzle/Http/Exception/ServerErrorResponseException.php - ./src/Guzzle/Http/Exception/ClientErrorResponseException.php - ./src/Guzzle/Http/Exception/TooManyRedirectsException.php - ./src/Guzzle/Http/Exception/CouldNotRewindStreamException.php - ./src/Guzzle/Common/Exception/BadMethodCallException.php - ./src/Guzzle/Common/Exception/InvalidArgumentException.php - ./src/Guzzle/Common/Exception/RuntimeException.php - ./src/Guzzle/Common/Exception/UnexpectedValueException.php - ./src/Guzzle/Service/Exception/ClientNotFoundException.php - ./src/Guzzle/Service/Exception/CommandException.php - ./src/Guzzle/Service/Exception/DescriptionBuilderException.php - ./src/Guzzle/Service/Exception/ServiceBuilderException.php - ./src/Guzzle/Service/Exception/ServiceNotFoundException.php - ./src/Guzzle/Service/Exception/ValidationException.php - ./src/Guzzle/Service/Exception/JsonException.php - - - - - diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/AbstractBatchDecorator.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/AbstractBatchDecorator.php deleted file mode 100644 index 0625d71c3..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/AbstractBatchDecorator.php +++ /dev/null @@ -1,66 +0,0 @@ -decoratedBatch = $decoratedBatch; - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - * @codeCoverageIgnore - */ - public function __call($method, array $args) - { - return call_user_func_array(array($this->decoratedBatch, $method), $args); - } - - public function add($item) - { - $this->decoratedBatch->add($item); - - return $this; - } - - public function flush() - { - return $this->decoratedBatch->flush(); - } - - public function isEmpty() - { - return $this->decoratedBatch->isEmpty(); - } - - /** - * Trace the decorators associated with the batch - * - * @return array - */ - public function getDecorators() - { - $found = array($this); - if (method_exists($this->decoratedBatch, 'getDecorators')) { - $found = array_merge($found, $this->decoratedBatch->getDecorators()); - } - - return $found; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/Batch.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/Batch.php deleted file mode 100644 index 4d41c54f8..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/Batch.php +++ /dev/null @@ -1,92 +0,0 @@ -transferStrategy = $transferStrategy; - $this->divisionStrategy = $divisionStrategy; - $this->queue = new \SplQueue(); - $this->queue->setIteratorMode(\SplQueue::IT_MODE_DELETE); - $this->dividedBatches = array(); - } - - public function add($item) - { - $this->queue->enqueue($item); - - return $this; - } - - public function flush() - { - $this->createBatches(); - - $items = array(); - foreach ($this->dividedBatches as $batchIndex => $dividedBatch) { - while ($dividedBatch->valid()) { - $batch = $dividedBatch->current(); - $dividedBatch->next(); - try { - $this->transferStrategy->transfer($batch); - $items = array_merge($items, $batch); - } catch (\Exception $e) { - throw new BatchTransferException($batch, $items, $e, $this->transferStrategy, $this->divisionStrategy); - } - } - // Keep the divided batch down to a minimum in case of a later exception - unset($this->dividedBatches[$batchIndex]); - } - - return $items; - } - - public function isEmpty() - { - return count($this->queue) == 0 && count($this->dividedBatches) == 0; - } - - /** - * Create batches for any queued items - */ - protected function createBatches() - { - if (count($this->queue)) { - if ($batches = $this->divisionStrategy->createBatches($this->queue)) { - // Convert arrays into iterators - if (is_array($batches)) { - $batches = new \ArrayIterator($batches); - } - $this->dividedBatches[] = $batches; - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchBuilder.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchBuilder.php deleted file mode 100644 index ea99b4dd0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchBuilder.php +++ /dev/null @@ -1,199 +0,0 @@ - 'Guzzle\Batch\BatchRequestTransfer', - 'command' => 'Guzzle\Batch\BatchCommandTransfer' - ); - - /** - * Create a new instance of the BatchBuilder - * - * @return BatchBuilder - */ - public static function factory() - { - return new self(); - } - - /** - * Automatically flush the batch when the size of the queue reaches a certain threshold. Adds {@see FlushingBatch}. - * - * @param $threshold Number of items to allow in the queue before a flush - * - * @return BatchBuilder - */ - public function autoFlushAt($threshold) - { - $this->autoFlush = $threshold; - - return $this; - } - - /** - * Maintain a history of all items that have been transferred using the batch. Adds {@see HistoryBatch}. - * - * @return BatchBuilder - */ - public function keepHistory() - { - $this->history = true; - - return $this; - } - - /** - * Buffer exceptions thrown during transfer so that you can transfer as much as possible, and after a transfer - * completes, inspect each exception that was thrown. Enables the {@see ExceptionBufferingBatch} decorator. - * - * @return BatchBuilder - */ - public function bufferExceptions() - { - $this->exceptionBuffering = true; - - return $this; - } - - /** - * Notify a callable each time a batch flush completes. Enables the {@see NotifyingBatch} decorator. - * - * @param mixed $callable Callable function to notify - * - * @return BatchBuilder - * @throws InvalidArgumentException if the argument is not callable - */ - public function notify($callable) - { - $this->afterFlush = $callable; - - return $this; - } - - /** - * Configures the batch to transfer batches of requests. Associates a {@see \Guzzle\Http\BatchRequestTransfer} - * object as both the transfer and divisor strategy. - * - * @param int $batchSize Batch size for each batch of requests - * - * @return BatchBuilder - */ - public function transferRequests($batchSize = 50) - { - $className = self::$mapping['request']; - $this->transferStrategy = new $className($batchSize); - $this->divisorStrategy = $this->transferStrategy; - - return $this; - } - - /** - * Configures the batch to transfer batches commands. Associates as - * {@see \Guzzle\Service\Command\BatchCommandTransfer} as both the transfer and divisor strategy. - * - * @param int $batchSize Batch size for each batch of commands - * - * @return BatchBuilder - */ - public function transferCommands($batchSize = 50) - { - $className = self::$mapping['command']; - $this->transferStrategy = new $className($batchSize); - $this->divisorStrategy = $this->transferStrategy; - - return $this; - } - - /** - * Specify the strategy used to divide the queue into an array of batches - * - * @param BatchDivisorInterface $divisorStrategy Strategy used to divide a batch queue into batches - * - * @return BatchBuilder - */ - public function createBatchesWith(BatchDivisorInterface $divisorStrategy) - { - $this->divisorStrategy = $divisorStrategy; - - return $this; - } - - /** - * Specify the strategy used to transport the items when flush is called - * - * @param BatchTransferInterface $transferStrategy How items are transferred - * - * @return BatchBuilder - */ - public function transferWith(BatchTransferInterface $transferStrategy) - { - $this->transferStrategy = $transferStrategy; - - return $this; - } - - /** - * Create and return the instantiated batch - * - * @return BatchInterface - * @throws RuntimeException if no transfer strategy has been specified - */ - public function build() - { - if (!$this->transferStrategy) { - throw new RuntimeException('No transfer strategy has been specified'); - } - - if (!$this->divisorStrategy) { - throw new RuntimeException('No divisor strategy has been specified'); - } - - $batch = new Batch($this->transferStrategy, $this->divisorStrategy); - - if ($this->exceptionBuffering) { - $batch = new ExceptionBufferingBatch($batch); - } - - if ($this->afterFlush) { - $batch = new NotifyingBatch($batch, $this->afterFlush); - } - - if ($this->autoFlush) { - $batch = new FlushingBatch($batch, $this->autoFlush); - } - - if ($this->history) { - $batch = new HistoryBatch($batch); - } - - return $batch; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureDivisor.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureDivisor.php deleted file mode 100644 index e0a2d9568..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureDivisor.php +++ /dev/null @@ -1,39 +0,0 @@ -callable = $callable; - $this->context = $context; - } - - public function createBatches(\SplQueue $queue) - { - return call_user_func($this->callable, $queue, $this->context); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureTransfer.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureTransfer.php deleted file mode 100644 index 9cbf1aba4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureTransfer.php +++ /dev/null @@ -1,40 +0,0 @@ -callable = $callable; - $this->context = $context; - } - - public function transfer(array $batch) - { - return empty($batch) ? null : call_user_func($this->callable, $batch, $this->context); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchCommandTransfer.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchCommandTransfer.php deleted file mode 100644 index d55ac7d1f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchCommandTransfer.php +++ /dev/null @@ -1,75 +0,0 @@ -batchSize = $batchSize; - } - - /** - * Creates batches by grouping commands by their associated client - * {@inheritdoc} - */ - public function createBatches(\SplQueue $queue) - { - $groups = new \SplObjectStorage(); - foreach ($queue as $item) { - if (!$item instanceof CommandInterface) { - throw new InvalidArgumentException('All items must implement Guzzle\Service\Command\CommandInterface'); - } - $client = $item->getClient(); - if (!$groups->contains($client)) { - $groups->attach($client, new \ArrayObject(array($item))); - } else { - $groups[$client]->append($item); - } - } - - $batches = array(); - foreach ($groups as $batch) { - $batches = array_merge($batches, array_chunk($groups[$batch]->getArrayCopy(), $this->batchSize)); - } - - return $batches; - } - - public function transfer(array $batch) - { - if (empty($batch)) { - return; - } - - // Get the client of the first found command - $client = reset($batch)->getClient(); - - // Keep a list of all commands with invalid clients - $invalid = array_filter($batch, function ($command) use ($client) { - return $command->getClient() !== $client; - }); - - if (!empty($invalid)) { - throw new InconsistentClientTransferException($invalid); - } - - $client->execute($batch); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchDivisorInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchDivisorInterface.php deleted file mode 100644 index 0214f05f4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchDivisorInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -batchSize = $batchSize; - } - - /** - * Creates batches of requests by grouping requests by their associated curl multi object. - * {@inheritdoc} - */ - public function createBatches(\SplQueue $queue) - { - // Create batches by client objects - $groups = new \SplObjectStorage(); - foreach ($queue as $item) { - if (!$item instanceof RequestInterface) { - throw new InvalidArgumentException('All items must implement Guzzle\Http\Message\RequestInterface'); - } - $client = $item->getClient(); - if (!$groups->contains($client)) { - $groups->attach($client, array($item)); - } else { - $current = $groups[$client]; - $current[] = $item; - $groups[$client] = $current; - } - } - - $batches = array(); - foreach ($groups as $batch) { - $batches = array_merge($batches, array_chunk($groups[$batch], $this->batchSize)); - } - - return $batches; - } - - public function transfer(array $batch) - { - if ($batch) { - reset($batch)->getClient()->send($batch); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchSizeDivisor.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchSizeDivisor.php deleted file mode 100644 index 67f90a581..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchSizeDivisor.php +++ /dev/null @@ -1,47 +0,0 @@ -size = $size; - } - - /** - * Set the size of each batch - * - * @param int $size Size of each batch - * - * @return BatchSizeDivisor - */ - public function setSize($size) - { - $this->size = $size; - - return $this; - } - - /** - * Get the size of each batch - * - * @return int - */ - public function getSize() - { - return $this->size; - } - - public function createBatches(\SplQueue $queue) - { - return array_chunk(iterator_to_array($queue, false), $this->size); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchTransferInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchTransferInterface.php deleted file mode 100644 index 2e0b60dad..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchTransferInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -batch = $batch; - $this->transferredItems = $transferredItems; - $this->transferStrategy = $transferStrategy; - $this->divisorStrategy = $divisorStrategy; - parent::__construct( - 'Exception encountered while transferring batch: ' . $exception->getMessage(), - $exception->getCode(), - $exception - ); - } - - /** - * Get the batch that we being sent when the exception occurred - * - * @return array - */ - public function getBatch() - { - return $this->batch; - } - - /** - * Get the items transferred at the point in which the exception was encountered - * - * @return array - */ - public function getTransferredItems() - { - return $this->transferredItems; - } - - /** - * Get the transfer strategy - * - * @return TransferStrategy - */ - public function getTransferStrategy() - { - return $this->transferStrategy; - } - - /** - * Get the divisor strategy - * - * @return DivisorStrategy - */ - public function getDivisorStrategy() - { - return $this->divisorStrategy; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/ExceptionBufferingBatch.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/ExceptionBufferingBatch.php deleted file mode 100644 index d7a892885..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/ExceptionBufferingBatch.php +++ /dev/null @@ -1,50 +0,0 @@ -decoratedBatch->isEmpty()) { - try { - $transferredItems = $this->decoratedBatch->flush(); - } catch (BatchTransferException $e) { - $this->exceptions[] = $e; - $transferredItems = $e->getTransferredItems(); - } - $items = array_merge($items, $transferredItems); - } - - return $items; - } - - /** - * Get the buffered exceptions - * - * @return array Array of BatchTransferException objects - */ - public function getExceptions() - { - return $this->exceptions; - } - - /** - * Clear the buffered exceptions - */ - public function clearExceptions() - { - $this->exceptions = array(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/FlushingBatch.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/FlushingBatch.php deleted file mode 100644 index 367b68427..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/FlushingBatch.php +++ /dev/null @@ -1,60 +0,0 @@ -threshold = $threshold; - parent::__construct($decoratedBatch); - } - - /** - * Set the auto-flush threshold - * - * @param int $threshold The auto-flush threshold - * - * @return FlushingBatch - */ - public function setThreshold($threshold) - { - $this->threshold = $threshold; - - return $this; - } - - /** - * Get the auto-flush threshold - * - * @return int - */ - public function getThreshold() - { - return $this->threshold; - } - - public function add($item) - { - $this->decoratedBatch->add($item); - if (++$this->currentTotal >= $this->threshold) { - $this->currentTotal = 0; - $this->decoratedBatch->flush(); - } - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/HistoryBatch.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/HistoryBatch.php deleted file mode 100644 index e345fdc34..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/HistoryBatch.php +++ /dev/null @@ -1,39 +0,0 @@ -history[] = $item; - $this->decoratedBatch->add($item); - - return $this; - } - - /** - * Get the batch history - * - * @return array - */ - public function getHistory() - { - return $this->history; - } - - /** - * Clear the batch history - */ - public function clearHistory() - { - $this->history = array(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/NotifyingBatch.php b/vendor/guzzle/guzzle/src/Guzzle/Batch/NotifyingBatch.php deleted file mode 100644 index 96d04daa8..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/NotifyingBatch.php +++ /dev/null @@ -1,38 +0,0 @@ -callable = $callable; - parent::__construct($decoratedBatch); - } - - public function flush() - { - $items = $this->decoratedBatch->flush(); - call_user_func($this->callable, $items); - - return $items; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Batch/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Batch/composer.json deleted file mode 100644 index 12404d381..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Batch/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "guzzle/batch", - "description": "Guzzle batch component for batching requests, commands, or custom transfers", - "homepage": "http://guzzlephp.org/", - "keywords": ["batch", "HTTP", "REST", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/common": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Batch": "" } - }, - "suggest": { - "guzzle/http": "self.version", - "guzzle/service": "self.version" - }, - "target-dir": "Guzzle/Batch", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php deleted file mode 100644 index a5c527167..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php +++ /dev/null @@ -1,21 +0,0 @@ -cache; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterFactory.php deleted file mode 100644 index 94e623463..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterFactory.php +++ /dev/null @@ -1,117 +0,0 @@ -newInstanceArgs($args); - } - } catch (\Exception $e) { - throw new RuntimeException($e->getMessage(), $e->getCode(), $e); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php deleted file mode 100644 index 970c9e228..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php +++ /dev/null @@ -1,55 +0,0 @@ -callables = $callables; - } - - public function contains($id, array $options = null) - { - return call_user_func($this->callables['contains'], $id, $options); - } - - public function delete($id, array $options = null) - { - return call_user_func($this->callables['delete'], $id, $options); - } - - public function fetch($id, array $options = null) - { - return call_user_func($this->callables['fetch'], $id, $options); - } - - public function save($id, $data, $lifeTime = false, array $options = null) - { - return call_user_func($this->callables['save'], $id, $data, $lifeTime, $options); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php deleted file mode 100644 index 321dd6baf..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php +++ /dev/null @@ -1,41 +0,0 @@ -cache = $cache; - } - - public function contains($id, array $options = null) - { - return $this->cache->contains($id); - } - - public function delete($id, array $options = null) - { - return $this->cache->delete($id); - } - - public function fetch($id, array $options = null) - { - return $this->cache->fetch($id); - } - - public function save($id, $data, $lifeTime = false, array $options = null) - { - return $this->cache->save($id, $data, $lifeTime); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php deleted file mode 100644 index 68bd4af97..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php +++ /dev/null @@ -1,31 +0,0 @@ -cache = $cache; - } - - public function contains($id, array $options = null) - { - return $this->cache->test($id); - } - - public function delete($id, array $options = null) - { - return $this->cache->remove($id); - } - - public function fetch($id, array $options = null) - { - return $this->cache->load($id); - } - - public function save($id, $data, $lifeTime = false, array $options = null) - { - return $this->cache->save($data, $id, array(), $lifeTime); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf2CacheAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf2CacheAdapter.php deleted file mode 100644 index 1fc18a555..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf2CacheAdapter.php +++ /dev/null @@ -1,41 +0,0 @@ -cache = $cache; - } - - public function contains($id, array $options = null) - { - return $this->cache->hasItem($id); - } - - public function delete($id, array $options = null) - { - return $this->cache->removeItem($id); - } - - public function fetch($id, array $options = null) - { - return $this->cache->getItem($id); - } - - public function save($id, $data, $lifeTime = false, array $options = null) - { - return $this->cache->setItem($id, $data); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Cache/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Cache/composer.json deleted file mode 100644 index a5d999bd6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Cache/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/cache", - "description": "Guzzle cache adapter component", - "homepage": "http://guzzlephp.org/", - "keywords": ["cache", "adapter", "zf", "doctrine", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/common": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Cache": "" } - }, - "target-dir": "Guzzle/Cache", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php b/vendor/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php deleted file mode 100644 index d1e842b1c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php +++ /dev/null @@ -1,49 +0,0 @@ -eventDispatcher = $eventDispatcher; - - return $this; - } - - public function getEventDispatcher() - { - if (!$this->eventDispatcher) { - $this->eventDispatcher = new EventDispatcher(); - } - - return $this->eventDispatcher; - } - - public function dispatch($eventName, array $context = array()) - { - return $this->getEventDispatcher()->dispatch($eventName, new Event($context)); - } - - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->getEventDispatcher()->addSubscriber($subscriber); - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php b/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php deleted file mode 100644 index 5cb1535d0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php +++ /dev/null @@ -1,403 +0,0 @@ -data = $data; - } - - /** - * Create a new collection from an array, validate the keys, and add default values where missing - * - * @param array $config Configuration values to apply. - * @param array $defaults Default parameters - * @param array $required Required parameter names - * - * @return self - * @throws InvalidArgumentException if a parameter is missing - */ - public static function fromConfig(array $config = array(), array $defaults = array(), array $required = array()) - { - $data = $config + $defaults; - - if ($missing = array_diff($required, array_keys($data))) { - throw new InvalidArgumentException('Config is missing the following keys: ' . implode(', ', $missing)); - } - - return new self($data); - } - - public function count() - { - return count($this->data); - } - - public function getIterator() - { - return new \ArrayIterator($this->data); - } - - public function toArray() - { - return $this->data; - } - - /** - * Removes all key value pairs - * - * @return Collection - */ - public function clear() - { - $this->data = array(); - - return $this; - } - - /** - * Get all or a subset of matching key value pairs - * - * @param array $keys Pass an array of keys to retrieve only a subset of key value pairs - * - * @return array Returns an array of all matching key value pairs - */ - public function getAll(array $keys = null) - { - return $keys ? array_intersect_key($this->data, array_flip($keys)) : $this->data; - } - - /** - * Get a specific key value. - * - * @param string $key Key to retrieve. - * - * @return mixed|null Value of the key or NULL - */ - public function get($key) - { - return isset($this->data[$key]) ? $this->data[$key] : null; - } - - /** - * Set a key value pair - * - * @param string $key Key to set - * @param mixed $value Value to set - * - * @return Collection Returns a reference to the object - */ - public function set($key, $value) - { - $this->data[$key] = $value; - - return $this; - } - - /** - * Add a value to a key. If a key of the same name has already been added, the key value will be converted into an - * array and the new value will be pushed to the end of the array. - * - * @param string $key Key to add - * @param mixed $value Value to add to the key - * - * @return Collection Returns a reference to the object. - */ - public function add($key, $value) - { - if (!array_key_exists($key, $this->data)) { - $this->data[$key] = $value; - } elseif (is_array($this->data[$key])) { - $this->data[$key][] = $value; - } else { - $this->data[$key] = array($this->data[$key], $value); - } - - return $this; - } - - /** - * Remove a specific key value pair - * - * @param string $key A key to remove - * - * @return Collection - */ - public function remove($key) - { - unset($this->data[$key]); - - return $this; - } - - /** - * Get all keys in the collection - * - * @return array - */ - public function getKeys() - { - return array_keys($this->data); - } - - /** - * Returns whether or not the specified key is present. - * - * @param string $key The key for which to check the existence. - * - * @return bool - */ - public function hasKey($key) - { - return array_key_exists($key, $this->data); - } - - /** - * Case insensitive search the keys in the collection - * - * @param string $key Key to search for - * - * @return bool|string Returns false if not found, otherwise returns the key - */ - public function keySearch($key) - { - foreach (array_keys($this->data) as $k) { - if (!strcasecmp($k, $key)) { - return $k; - } - } - - return false; - } - - /** - * Checks if any keys contains a certain value - * - * @param string $value Value to search for - * - * @return mixed Returns the key if the value was found FALSE if the value was not found. - */ - public function hasValue($value) - { - return array_search($value, $this->data); - } - - /** - * Replace the data of the object with the value of an array - * - * @param array $data Associative array of data - * - * @return Collection Returns a reference to the object - */ - public function replace(array $data) - { - $this->data = $data; - - return $this; - } - - /** - * Add and merge in a Collection or array of key value pair data. - * - * @param Collection|array $data Associative array of key value pair data - * - * @return Collection Returns a reference to the object. - */ - public function merge($data) - { - foreach ($data as $key => $value) { - $this->add($key, $value); - } - - return $this; - } - - /** - * Over write key value pairs in this collection with all of the data from an array or collection. - * - * @param array|\Traversable $data Values to override over this config - * - * @return self - */ - public function overwriteWith($data) - { - if (is_array($data)) { - $this->data = $data + $this->data; - } elseif ($data instanceof Collection) { - $this->data = $data->toArray() + $this->data; - } else { - foreach ($data as $key => $value) { - $this->data[$key] = $value; - } - } - - return $this; - } - - /** - * Returns a Collection containing all the elements of the collection after applying the callback function to each - * one. The Closure should accept three parameters: (string) $key, (string) $value, (array) $context and return a - * modified value - * - * @param \Closure $closure Closure to apply - * @param array $context Context to pass to the closure - * @param bool $static Set to TRUE to use the same class as the return rather than returning a Collection - * - * @return Collection - */ - public function map(\Closure $closure, array $context = array(), $static = true) - { - $collection = $static ? new static() : new self(); - foreach ($this as $key => $value) { - $collection->add($key, $closure($key, $value, $context)); - } - - return $collection; - } - - /** - * Iterates over each key value pair in the collection passing them to the Closure. If the Closure function returns - * true, the current value from input is returned into the result Collection. The Closure must accept three - * parameters: (string) $key, (string) $value and return Boolean TRUE or FALSE for each value. - * - * @param \Closure $closure Closure evaluation function - * @param bool $static Set to TRUE to use the same class as the return rather than returning a Collection - * - * @return Collection - */ - public function filter(\Closure $closure, $static = true) - { - $collection = ($static) ? new static() : new self(); - foreach ($this->data as $key => $value) { - if ($closure($key, $value)) { - $collection->add($key, $value); - } - } - - return $collection; - } - - public function offsetExists($offset) - { - return isset($this->data[$offset]); - } - - public function offsetGet($offset) - { - return isset($this->data[$offset]) ? $this->data[$offset] : null; - } - - public function offsetSet($offset, $value) - { - $this->data[$offset] = $value; - } - - public function offsetUnset($offset) - { - unset($this->data[$offset]); - } - - /** - * Set a value into a nested array key. Keys will be created as needed to set the value. - * - * @param string $path Path to set - * @param mixed $value Value to set at the key - * - * @return self - * @throws RuntimeException when trying to setPath using a nested path that travels through a scalar value - */ - public function setPath($path, $value) - { - $current =& $this->data; - $queue = explode('/', $path); - while (null !== ($key = array_shift($queue))) { - if (!is_array($current)) { - throw new RuntimeException("Trying to setPath {$path}, but {$key} is set and is not an array"); - } elseif (!$queue) { - $current[$key] = $value; - } elseif (isset($current[$key])) { - $current =& $current[$key]; - } else { - $current[$key] = array(); - $current =& $current[$key]; - } - } - - return $this; - } - - /** - * Gets a value from the collection using an array path (e.g. foo/baz/bar would retrieve bar from two nested arrays) - * Allows for wildcard searches which recursively combine matches up to the level at which the wildcard occurs. This - * can be useful for accepting any key of a sub-array and combining matching keys from each diverging path. - * - * @param string $path Path to traverse and retrieve a value from - * @param string $separator Character used to add depth to the search - * @param mixed $data Optional data to descend into (used when wildcards are encountered) - * - * @return mixed|null - */ - public function getPath($path, $separator = '/', $data = null) - { - if ($data === null) { - $data =& $this->data; - } - - $path = is_array($path) ? $path : explode($separator, $path); - while (null !== ($part = array_shift($path))) { - if (!is_array($data)) { - return null; - } elseif (isset($data[$part])) { - $data =& $data[$part]; - } elseif ($part != '*') { - return null; - } else { - // Perform a wildcard search by diverging and merging paths - $result = array(); - foreach ($data as $value) { - if (!$path) { - $result = array_merge_recursive($result, (array) $value); - } elseif (null !== ($test = $this->getPath($path, $separator, $value))) { - $result = array_merge_recursive($result, (array) $test); - } - } - return $result; - } - } - - return $data; - } - - /** - * Inject configuration settings into an input string - * - * @param string $input Input to inject - * - * @return string - * @deprecated - */ - public function inject($input) - { - Version::warn(__METHOD__ . ' is deprecated'); - $replace = array(); - foreach ($this->data as $key => $val) { - $replace['{' . $key . '}'] = $val; - } - - return strtr($input, $replace); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Common/Event.php b/vendor/guzzle/guzzle/src/Guzzle/Common/Event.php deleted file mode 100644 index fad76a9b8..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Common/Event.php +++ /dev/null @@ -1,52 +0,0 @@ -context = $context; - } - - public function getIterator() - { - return new \ArrayIterator($this->context); - } - - public function offsetGet($offset) - { - return isset($this->context[$offset]) ? $this->context[$offset] : null; - } - - public function offsetSet($offset, $value) - { - $this->context[$offset] = $value; - } - - public function offsetExists($offset) - { - return isset($this->context[$offset]); - } - - public function offsetUnset($offset) - { - unset($this->context[$offset]); - } - - public function toArray() - { - return $this->context; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/BadMethodCallException.php b/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/BadMethodCallException.php deleted file mode 100644 index 08d1c7256..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/BadMethodCallException.php +++ /dev/null @@ -1,5 +0,0 @@ -shortMessage = $message; - } - - /** - * Set all of the exceptions - * - * @param array $exceptions Array of exceptions - * - * @return self - */ - public function setExceptions(array $exceptions) - { - $this->exceptions = array(); - foreach ($exceptions as $exception) { - $this->add($exception); - } - - return $this; - } - - /** - * Add exceptions to the collection - * - * @param ExceptionCollection|\Exception $e Exception to add - * - * @return ExceptionCollection; - */ - public function add($e) - { - $this->exceptions[] = $e; - if ($this->message) { - $this->message .= "\n"; - } - - $this->message .= $this->getExceptionMessage($e, 0); - - return $this; - } - - /** - * Get the total number of request exceptions - * - * @return int - */ - public function count() - { - return count($this->exceptions); - } - - /** - * Allows array-like iteration over the request exceptions - * - * @return \ArrayIterator - */ - public function getIterator() - { - return new \ArrayIterator($this->exceptions); - } - - /** - * Get the first exception in the collection - * - * @return \Exception - */ - public function getFirst() - { - return $this->exceptions ? $this->exceptions[0] : null; - } - - private function getExceptionMessage(\Exception $e, $depth = 0) - { - static $sp = ' '; - $prefix = $depth ? str_repeat($sp, $depth) : ''; - $message = "{$prefix}(" . get_class($e) . ') ' . $e->getFile() . ' line ' . $e->getLine() . "\n"; - - if ($e instanceof self) { - if ($e->shortMessage) { - $message .= "\n{$prefix}{$sp}" . str_replace("\n", "\n{$prefix}{$sp}", $e->shortMessage) . "\n"; - } - foreach ($e as $ee) { - $message .= "\n" . $this->getExceptionMessage($ee, $depth + 1); - } - } else { - $message .= "\n{$prefix}{$sp}" . str_replace("\n", "\n{$prefix}{$sp}", $e->getMessage()) . "\n"; - $message .= "\n{$prefix}{$sp}" . str_replace("\n", "\n{$prefix}{$sp}", $e->getTraceAsString()) . "\n"; - } - - return str_replace(getcwd(), '.', $message); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/GuzzleException.php b/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/GuzzleException.php deleted file mode 100644 index 458e6f2ea..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/GuzzleException.php +++ /dev/null @@ -1,8 +0,0 @@ -=5.3.2", - "symfony/event-dispatcher": ">=2.1" - }, - "autoload": { - "psr-0": { "Guzzle\\Common": "" } - }, - "target-dir": "Guzzle/Common", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/AbstractEntityBodyDecorator.php b/vendor/guzzle/guzzle/src/Guzzle/Http/AbstractEntityBodyDecorator.php deleted file mode 100644 index 5005a887c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/AbstractEntityBodyDecorator.php +++ /dev/null @@ -1,221 +0,0 @@ -body = $body; - } - - public function __toString() - { - return (string) $this->body; - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - return call_user_func_array(array($this->body, $method), $args); - } - - public function close() - { - return $this->body->close(); - } - - public function setRewindFunction($callable) - { - $this->body->setRewindFunction($callable); - - return $this; - } - - public function rewind() - { - return $this->body->rewind(); - } - - public function compress($filter = 'zlib.deflate') - { - return $this->body->compress($filter); - } - - public function uncompress($filter = 'zlib.inflate') - { - return $this->body->uncompress($filter); - } - - public function getContentLength() - { - return $this->getSize(); - } - - public function getContentType() - { - return $this->body->getContentType(); - } - - public function getContentMd5($rawOutput = false, $base64Encode = false) - { - $hash = Stream::getHash($this, 'md5', $rawOutput); - - return $hash && $base64Encode ? base64_encode($hash) : $hash; - } - - public function getContentEncoding() - { - return $this->body->getContentEncoding(); - } - - public function getMetaData($key = null) - { - return $this->body->getMetaData($key); - } - - public function getStream() - { - return $this->body->getStream(); - } - - public function setStream($stream, $size = 0) - { - $this->body->setStream($stream, $size); - - return $this; - } - - public function detachStream() - { - $this->body->detachStream(); - - return $this; - } - - public function getWrapper() - { - return $this->body->getWrapper(); - } - - public function getWrapperData() - { - return $this->body->getWrapperData(); - } - - public function getStreamType() - { - return $this->body->getStreamType(); - } - - public function getUri() - { - return $this->body->getUri(); - } - - public function getSize() - { - return $this->body->getSize(); - } - - public function isReadable() - { - return $this->body->isReadable(); - } - - public function isRepeatable() - { - return $this->isSeekable() && $this->isReadable(); - } - - public function isWritable() - { - return $this->body->isWritable(); - } - - public function isConsumed() - { - return $this->body->isConsumed(); - } - - /** - * Alias of isConsumed() - * {@inheritdoc} - */ - public function feof() - { - return $this->isConsumed(); - } - - public function isLocal() - { - return $this->body->isLocal(); - } - - public function isSeekable() - { - return $this->body->isSeekable(); - } - - public function setSize($size) - { - $this->body->setSize($size); - - return $this; - } - - public function seek($offset, $whence = SEEK_SET) - { - return $this->body->seek($offset, $whence); - } - - public function read($length) - { - return $this->body->read($length); - } - - public function write($string) - { - return $this->body->write($string); - } - - public function readLine($maxLength = null) - { - return $this->body->readLine($maxLength); - } - - public function ftell() - { - return $this->body->ftell(); - } - - public function getCustomData($key) - { - return $this->body->getCustomData($key); - } - - public function setCustomData($key, $value) - { - $this->body->setCustomData($key, $value); - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/CachingEntityBody.php b/vendor/guzzle/guzzle/src/Guzzle/Http/CachingEntityBody.php deleted file mode 100644 index c65c13650..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/CachingEntityBody.php +++ /dev/null @@ -1,229 +0,0 @@ -remoteStream = $body; - $this->body = new EntityBody(fopen('php://temp', 'r+')); - } - - /** - * Will give the contents of the buffer followed by the exhausted remote stream. - * - * Warning: Loads the entire stream into memory - * - * @return string - */ - public function __toString() - { - $pos = $this->ftell(); - $this->rewind(); - - $str = ''; - while (!$this->isConsumed()) { - $str .= $this->read(16384); - } - - $this->seek($pos); - - return $str; - } - - public function getSize() - { - return max($this->body->getSize(), $this->remoteStream->getSize()); - } - - /** - * {@inheritdoc} - * @throws RuntimeException When seeking with SEEK_END or when seeking past the total size of the buffer stream - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence == SEEK_SET) { - $byte = $offset; - } elseif ($whence == SEEK_CUR) { - $byte = $offset + $this->ftell(); - } else { - throw new RuntimeException(__CLASS__ . ' supports only SEEK_SET and SEEK_CUR seek operations'); - } - - // You cannot skip ahead past where you've read from the remote stream - if ($byte > $this->body->getSize()) { - throw new RuntimeException( - "Cannot seek to byte {$byte} when the buffered stream only contains {$this->body->getSize()} bytes" - ); - } - - return $this->body->seek($byte); - } - - public function rewind() - { - return $this->seek(0); - } - - /** - * Does not support custom rewind functions - * - * @throws RuntimeException - */ - public function setRewindFunction($callable) - { - throw new RuntimeException(__CLASS__ . ' does not support custom stream rewind functions'); - } - - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->body->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have been filled from the remote stream, - // then we must skip bytes on the remote stream to emulate overwriting bytes from that position. This - // mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->body->write($remoteData); - } - - return $data; - } - - public function write($string) - { - // When appending to the end of the currently read stream, you'll want to skip bytes from being read from - // the remote stream to emulate other stream wrappers. Basically replacing bytes of data of a fixed length. - $overflow = (strlen($string) + $this->ftell()) - $this->remoteStream->ftell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->body->write($string); - } - - /** - * {@inheritdoc} - * @link http://php.net/manual/en/function.fgets.php - */ - public function readLine($maxLength = null) - { - $buffer = ''; - $size = 0; - while (!$this->isConsumed()) { - $byte = $this->read(1); - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte == PHP_EOL || ++$size == $maxLength - 1) { - break; - } - } - - return $buffer; - } - - public function isConsumed() - { - return $this->body->isConsumed() && $this->remoteStream->isConsumed(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - return $this->remoteStream->close() && $this->body->close(); - } - - public function setStream($stream, $size = 0) - { - $this->remoteStream->setStream($stream, $size); - } - - public function getContentType() - { - return $this->remoteStream->getContentType(); - } - - public function getContentEncoding() - { - return $this->remoteStream->getContentEncoding(); - } - - public function getMetaData($key = null) - { - return $this->remoteStream->getMetaData($key); - } - - public function getStream() - { - return $this->remoteStream->getStream(); - } - - public function getWrapper() - { - return $this->remoteStream->getWrapper(); - } - - public function getWrapperData() - { - return $this->remoteStream->getWrapperData(); - } - - public function getStreamType() - { - return $this->remoteStream->getStreamType(); - } - - public function getUri() - { - return $this->remoteStream->getUri(); - } - - /** - * Always retrieve custom data from the remote stream - * {@inheritdoc} - */ - public function getCustomData($key) - { - return $this->remoteStream->getCustomData($key); - } - - /** - * Always set custom data on the remote stream - * {@inheritdoc} - */ - public function setCustomData($key, $value) - { - $this->remoteStream->setCustomData($key, $value); - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php deleted file mode 100644 index 3bda450e1..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php +++ /dev/null @@ -1,506 +0,0 @@ -setConfig($config ?: new Collection()); - $this->initSsl(); - $this->setBaseUrl($baseUrl); - $this->defaultHeaders = new Collection(); - $this->setRequestFactory(RequestFactory::getInstance()); - $this->userAgent = $this->getDefaultUserAgent(); - if (!$this->config[self::DISABLE_REDIRECTS]) { - $this->addSubscriber(new RedirectPlugin()); - } - } - - final public function setConfig($config) - { - if ($config instanceof Collection) { - $this->config = $config; - } elseif (is_array($config)) { - $this->config = new Collection($config); - } else { - throw new InvalidArgumentException('Config must be an array or Collection'); - } - - return $this; - } - - final public function getConfig($key = false) - { - return $key ? $this->config[$key] : $this->config; - } - - /** - * Set a default request option on the client that will be used as a default for each request - * - * @param string $keyOrPath request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) - * @param mixed $value Value to set - * - * @return $this - */ - public function setDefaultOption($keyOrPath, $value) - { - $keyOrPath = self::REQUEST_OPTIONS . '/' . $keyOrPath; - $this->config->setPath($keyOrPath, $value); - - return $this; - } - - /** - * Retrieve a default request option from the client - * - * @param string $keyOrPath request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) - * - * @return mixed|null - */ - public function getDefaultOption($keyOrPath) - { - $keyOrPath = self::REQUEST_OPTIONS . '/' . $keyOrPath; - - return $this->config->getPath($keyOrPath); - } - - final public function setSslVerification($certificateAuthority = true, $verifyPeer = true, $verifyHost = 2) - { - $opts = $this->config[self::CURL_OPTIONS] ?: array(); - - if ($certificateAuthority === true) { - // use bundled CA bundle, set secure defaults - $opts[CURLOPT_CAINFO] = __DIR__ . '/Resources/cacert.pem'; - $opts[CURLOPT_SSL_VERIFYPEER] = true; - $opts[CURLOPT_SSL_VERIFYHOST] = 2; - } elseif ($certificateAuthority === false) { - unset($opts[CURLOPT_CAINFO]); - $opts[CURLOPT_SSL_VERIFYPEER] = false; - $opts[CURLOPT_SSL_VERIFYHOST] = 0; - } elseif ($verifyPeer !== true && $verifyPeer !== false && $verifyPeer !== 1 && $verifyPeer !== 0) { - throw new InvalidArgumentException('verifyPeer must be 1, 0 or boolean'); - } elseif ($verifyHost !== 0 && $verifyHost !== 1 && $verifyHost !== 2) { - throw new InvalidArgumentException('verifyHost must be 0, 1 or 2'); - } else { - $opts[CURLOPT_SSL_VERIFYPEER] = $verifyPeer; - $opts[CURLOPT_SSL_VERIFYHOST] = $verifyHost; - if (is_file($certificateAuthority)) { - unset($opts[CURLOPT_CAPATH]); - $opts[CURLOPT_CAINFO] = $certificateAuthority; - } elseif (is_dir($certificateAuthority)) { - unset($opts[CURLOPT_CAINFO]); - $opts[CURLOPT_CAPATH] = $certificateAuthority; - } else { - throw new RuntimeException( - 'Invalid option passed to ' . self::SSL_CERT_AUTHORITY . ': ' . $certificateAuthority - ); - } - } - - $this->config->set(self::CURL_OPTIONS, $opts); - - return $this; - } - - public function createRequest($method = 'GET', $uri = null, $headers = null, $body = null, array $options = array()) - { - if (!$uri) { - $url = $this->getBaseUrl(); - } else { - if (!is_array($uri)) { - $templateVars = null; - } else { - list($uri, $templateVars) = $uri; - } - if (substr($uri, 0, 4) === 'http') { - // Use absolute URLs as-is - $url = $this->expandTemplate($uri, $templateVars); - } else { - $url = Url::factory($this->getBaseUrl())->combine($this->expandTemplate($uri, $templateVars)); - } - } - - // If default headers are provided, then merge them under any explicitly provided headers for the request - if (count($this->defaultHeaders)) { - if (!$headers) { - $headers = $this->defaultHeaders->toArray(); - } elseif (is_array($headers)) { - $headers += $this->defaultHeaders->toArray(); - } elseif ($headers instanceof Collection) { - $headers = $headers->toArray() + $this->defaultHeaders->toArray(); - } - } - - return $this->prepareRequest($this->requestFactory->create($method, (string) $url, $headers, $body), $options); - } - - public function getBaseUrl($expand = true) - { - return $expand ? $this->expandTemplate($this->baseUrl) : $this->baseUrl; - } - - public function setBaseUrl($url) - { - $this->baseUrl = $url; - - return $this; - } - - public function setUserAgent($userAgent, $includeDefault = false) - { - if ($includeDefault) { - $userAgent .= ' ' . $this->getDefaultUserAgent(); - } - $this->userAgent = $userAgent; - - return $this; - } - - /** - * Get the default User-Agent string to use with Guzzle - * - * @return string - */ - public function getDefaultUserAgent() - { - return 'Guzzle/' . Version::VERSION - . ' curl/' . CurlVersion::getInstance()->get('version') - . ' PHP/' . PHP_VERSION; - } - - public function get($uri = null, $headers = null, $options = array()) - { - // BC compat: $options can be a string, resource, etc to specify where the response body is downloaded - return is_array($options) - ? $this->createRequest('GET', $uri, $headers, null, $options) - : $this->createRequest('GET', $uri, $headers, $options); - } - - public function head($uri = null, $headers = null, array $options = array()) - { - return $this->createRequest('HEAD', $uri, $headers, null, $options); - } - - public function delete($uri = null, $headers = null, $body = null, array $options = array()) - { - return $this->createRequest('DELETE', $uri, $headers, $body, $options); - } - - public function put($uri = null, $headers = null, $body = null, array $options = array()) - { - return $this->createRequest('PUT', $uri, $headers, $body, $options); - } - - public function patch($uri = null, $headers = null, $body = null, array $options = array()) - { - return $this->createRequest('PATCH', $uri, $headers, $body, $options); - } - - public function post($uri = null, $headers = null, $postBody = null, array $options = array()) - { - return $this->createRequest('POST', $uri, $headers, $postBody, $options); - } - - public function options($uri = null, array $options = array()) - { - return $this->createRequest('OPTIONS', $uri, $options); - } - - public function send($requests) - { - if (!($requests instanceof RequestInterface)) { - return $this->sendMultiple($requests); - } - - try { - /** @var $requests RequestInterface */ - $this->getCurlMulti()->add($requests)->send(); - return $requests->getResponse(); - } catch (ExceptionCollection $e) { - throw $e->getFirst(); - } - } - - /** - * Set a curl multi object to be used internally by the client for transferring requests. - * - * @param CurlMultiInterface $curlMulti Multi object - * - * @return self - */ - public function setCurlMulti(CurlMultiInterface $curlMulti) - { - $this->curlMulti = $curlMulti; - - return $this; - } - - /** - * @return CurlMultiInterface|CurlMultiProxy - */ - public function getCurlMulti() - { - if (!$this->curlMulti) { - $this->curlMulti = new CurlMultiProxy(); - } - - return $this->curlMulti; - } - - public function setRequestFactory(RequestFactoryInterface $factory) - { - $this->requestFactory = $factory; - - return $this; - } - - /** - * Set the URI template expander to use with the client - * - * @param UriTemplateInterface $uriTemplate URI template expander - * - * @return self - */ - public function setUriTemplate(UriTemplateInterface $uriTemplate) - { - $this->uriTemplate = $uriTemplate; - - return $this; - } - - /** - * Copy the cacert.pem file from the phar if it is not in the temp folder and validate the MD5 checksum - * - * @param bool $md5Check Set to false to not perform the MD5 validation - * - * @return string Returns the path to the extracted cacert - * @throws RuntimeException if the file cannot be copied or there is a MD5 mismatch - */ - public function preparePharCacert($md5Check = true) - { - $from = __DIR__ . '/Resources/cacert.pem'; - $certFile = sys_get_temp_dir() . '/guzzle-cacert.pem'; - if (!file_exists($certFile) && !copy($from, $certFile)) { - throw new RuntimeException("Could not copy {$from} to {$certFile}: " . var_export(error_get_last(), true)); - } elseif ($md5Check) { - $actualMd5 = md5_file($certFile); - $expectedMd5 = trim(file_get_contents("{$from}.md5")); - if ($actualMd5 != $expectedMd5) { - throw new RuntimeException("{$certFile} MD5 mismatch: expected {$expectedMd5} but got {$actualMd5}"); - } - } - - return $certFile; - } - - /** - * Expand a URI template while merging client config settings into the template variables - * - * @param string $template Template to expand - * @param array $variables Variables to inject - * - * @return string - */ - protected function expandTemplate($template, array $variables = null) - { - $expansionVars = $this->getConfig()->toArray(); - if ($variables) { - $expansionVars = $variables + $expansionVars; - } - - return $this->getUriTemplate()->expand($template, $expansionVars); - } - - /** - * Get the URI template expander used by the client - * - * @return UriTemplateInterface - */ - protected function getUriTemplate() - { - if (!$this->uriTemplate) { - $this->uriTemplate = ParserRegistry::getInstance()->getParser('uri_template'); - } - - return $this->uriTemplate; - } - - /** - * Send multiple requests in parallel - * - * @param array $requests Array of RequestInterface objects - * - * @return array Returns an array of Response objects - */ - protected function sendMultiple(array $requests) - { - $curlMulti = $this->getCurlMulti(); - foreach ($requests as $request) { - $curlMulti->add($request); - } - $curlMulti->send(); - - /** @var $request RequestInterface */ - $result = array(); - foreach ($requests as $request) { - $result[] = $request->getResponse(); - } - - return $result; - } - - /** - * Prepare a request to be sent from the Client by adding client specific behaviors and properties to the request. - * - * @param RequestInterface $request Request to prepare for the client - * @param array $options Options to apply to the request - * - * @return RequestInterface - */ - protected function prepareRequest(RequestInterface $request, array $options = array()) - { - $request->setClient($this)->setEventDispatcher(clone $this->getEventDispatcher()); - - if ($curl = $this->config[self::CURL_OPTIONS]) { - $request->getCurlOptions()->overwriteWith(CurlHandle::parseCurlConfig($curl)); - } - - if ($params = $this->config[self::REQUEST_PARAMS]) { - Version::warn('request.params is deprecated. Use request.options to add default request options.'); - $request->getParams()->overwriteWith($params); - } - - if ($this->userAgent && !$request->hasHeader('User-Agent')) { - $request->setHeader('User-Agent', $this->userAgent); - } - - if ($defaults = $this->config[self::REQUEST_OPTIONS]) { - $this->requestFactory->applyOptions($request, $defaults, RequestFactoryInterface::OPTIONS_AS_DEFAULTS); - } - - if ($options) { - $this->requestFactory->applyOptions($request, $options); - } - - $this->dispatch('client.create_request', array('client' => $this, 'request' => $request)); - - return $request; - } - - /** - * Initializes SSL settings - */ - protected function initSsl() - { - if ('system' == ($authority = $this->config[self::SSL_CERT_AUTHORITY])) { - return; - } - - if ($authority === null) { - $authority = true; - } - - if ($authority === true && substr(__FILE__, 0, 7) == 'phar://') { - $authority = $this->preparePharCacert(); - $that = $this; - $this->getEventDispatcher()->addListener('request.before_send', function ($event) use ($authority, $that) { - if ($authority == $event['request']->getCurlOptions()->get(CURLOPT_CAINFO)) { - $that->preparePharCacert(false); - } - }); - } - - $this->setSslVerification($authority); - } - - /** - * @deprecated - */ - public function getDefaultHeaders() - { - Version::warn(__METHOD__ . ' is deprecated. Use the request.options array to retrieve default request options'); - return $this->defaultHeaders; - } - - /** - * @deprecated - */ - public function setDefaultHeaders($headers) - { - Version::warn(__METHOD__ . ' is deprecated. Use the request.options array to specify default request options'); - if ($headers instanceof Collection) { - $this->defaultHeaders = $headers; - } elseif (is_array($headers)) { - $this->defaultHeaders = new Collection($headers); - } else { - throw new InvalidArgumentException('Headers must be an array or Collection'); - } - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/ClientInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/ClientInterface.php deleted file mode 100644 index 10e4de2ab..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/ClientInterface.php +++ /dev/null @@ -1,223 +0,0 @@ -getCurlOptions(); - $mediator = new RequestMediator($request, $requestCurlOptions->get('emit_io')); - $tempContentLength = null; - $method = $request->getMethod(); - $bodyAsString = $requestCurlOptions->get(self::BODY_AS_STRING); - - // Prepare url - $url = (string)$request->getUrl(); - if(($pos = strpos($url, '#')) !== false ){ - // strip fragment from url - $url = substr($url, 0, $pos); - } - - // Array of default cURL options. - $curlOptions = array( - CURLOPT_URL => $url, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_RETURNTRANSFER => false, - CURLOPT_HEADER => false, - CURLOPT_PORT => $request->getPort(), - CURLOPT_HTTPHEADER => array(), - CURLOPT_WRITEFUNCTION => array($mediator, 'writeResponseBody'), - CURLOPT_HEADERFUNCTION => array($mediator, 'receiveResponseHeader'), - CURLOPT_HTTP_VERSION => $request->getProtocolVersion() === '1.0' - ? CURL_HTTP_VERSION_1_0 : CURL_HTTP_VERSION_1_1, - // Verifies the authenticity of the peer's certificate - CURLOPT_SSL_VERIFYPEER => 1, - // Certificate must indicate that the server is the server to which you meant to connect - CURLOPT_SSL_VERIFYHOST => 2 - ); - - if (defined('CURLOPT_PROTOCOLS')) { - // Allow only HTTP and HTTPS protocols - $curlOptions[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - // Add CURLOPT_ENCODING if Accept-Encoding header is provided - if ($acceptEncodingHeader = $request->getHeader('Accept-Encoding')) { - $curlOptions[CURLOPT_ENCODING] = (string) $acceptEncodingHeader; - // Let cURL set the Accept-Encoding header, prevents duplicate values - $request->removeHeader('Accept-Encoding'); - } - - // Enable curl debug information if the 'debug' param was set - if ($requestCurlOptions->get('debug')) { - $curlOptions[CURLOPT_STDERR] = fopen('php://temp', 'r+'); - // @codeCoverageIgnoreStart - if (false === $curlOptions[CURLOPT_STDERR]) { - throw new RuntimeException('Unable to create a stream for CURLOPT_STDERR'); - } - // @codeCoverageIgnoreEnd - $curlOptions[CURLOPT_VERBOSE] = true; - } - - // Specify settings according to the HTTP method - if ($method == 'GET') { - $curlOptions[CURLOPT_HTTPGET] = true; - } elseif ($method == 'HEAD') { - $curlOptions[CURLOPT_NOBODY] = true; - // HEAD requests do not use a write function - unset($curlOptions[CURLOPT_WRITEFUNCTION]); - } elseif (!($request instanceof EntityEnclosingRequest)) { - $curlOptions[CURLOPT_CUSTOMREQUEST] = $method; - } else { - - $curlOptions[CURLOPT_CUSTOMREQUEST] = $method; - - // Handle sending raw bodies in a request - if ($request->getBody()) { - // You can send the body as a string using curl's CURLOPT_POSTFIELDS - if ($bodyAsString) { - $curlOptions[CURLOPT_POSTFIELDS] = (string) $request->getBody(); - // Allow curl to add the Content-Length for us to account for the times when - // POST redirects are followed by GET requests - if ($tempContentLength = $request->getHeader('Content-Length')) { - $tempContentLength = (int) (string) $tempContentLength; - } - // Remove the curl generated Content-Type header if none was set manually - if (!$request->hasHeader('Content-Type')) { - $curlOptions[CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } else { - $curlOptions[CURLOPT_UPLOAD] = true; - // Let cURL handle setting the Content-Length header - if ($tempContentLength = $request->getHeader('Content-Length')) { - $tempContentLength = (int) (string) $tempContentLength; - $curlOptions[CURLOPT_INFILESIZE] = $tempContentLength; - } - // Add a callback for curl to read data to send with the request only if a body was specified - $curlOptions[CURLOPT_READFUNCTION] = array($mediator, 'readRequestBody'); - // Attempt to seek to the start of the stream - $request->getBody()->seek(0); - } - - } else { - - // Special handling for POST specific fields and files - $postFields = false; - if (count($request->getPostFiles())) { - $postFields = $request->getPostFields()->useUrlEncoding(false)->urlEncode(); - foreach ($request->getPostFiles() as $key => $data) { - $prefixKeys = count($data) > 1; - foreach ($data as $index => $file) { - // Allow multiple files in the same key - $fieldKey = $prefixKeys ? "{$key}[{$index}]" : $key; - $postFields[$fieldKey] = $file->getCurlValue(); - } - } - } elseif (count($request->getPostFields())) { - $postFields = (string) $request->getPostFields()->useUrlEncoding(true); - } - - if ($postFields !== false) { - if ($method == 'POST') { - unset($curlOptions[CURLOPT_CUSTOMREQUEST]); - $curlOptions[CURLOPT_POST] = true; - } - $curlOptions[CURLOPT_POSTFIELDS] = $postFields; - $request->removeHeader('Content-Length'); - } - } - - // If the Expect header is not present, prevent curl from adding it - if (!$request->hasHeader('Expect')) { - $curlOptions[CURLOPT_HTTPHEADER][] = 'Expect:'; - } - } - - // If a Content-Length header was specified but we want to allow curl to set one for us - if (null !== $tempContentLength) { - $request->removeHeader('Content-Length'); - } - - // Set custom cURL options - foreach ($requestCurlOptions->toArray() as $key => $value) { - if (is_numeric($key)) { - $curlOptions[$key] = $value; - } - } - - // Do not set an Accept header by default - if (!isset($curlOptions[CURLOPT_ENCODING])) { - $curlOptions[CURLOPT_HTTPHEADER][] = 'Accept:'; - } - - // Add any custom headers to the request. Empty headers will cause curl to not send the header at all. - foreach ($request->getHeaderLines() as $line) { - $curlOptions[CURLOPT_HTTPHEADER][] = $line; - } - - // Add the content-length header back if it was temporarily removed - if ($tempContentLength) { - $request->setHeader('Content-Length', $tempContentLength); - } - - // Apply the options to a new cURL handle. - $handle = curl_init(); - - // Enable the progress function if the 'progress' param was set - if ($requestCurlOptions->get('progress')) { - // Wrap the function in a function that provides the curl handle to the mediator's progress function - // Using this rather than injecting the handle into the mediator prevents a circular reference - $curlOptions[CURLOPT_PROGRESSFUNCTION] = function () use ($mediator, $handle) { - $args = func_get_args(); - $args[] = $handle; - - // PHP 5.5 pushed the handle onto the start of the args - if (is_resource($args[0])) { - array_shift($args); - } - - call_user_func_array(array($mediator, 'progress'), $args); - }; - $curlOptions[CURLOPT_NOPROGRESS] = false; - } - - curl_setopt_array($handle, $curlOptions); - - return new static($handle, $curlOptions); - } - - /** - * Construct a new CurlHandle object that wraps a cURL handle - * - * @param resource $handle Configured cURL handle resource - * @param Collection|array $options Curl options to use with the handle - * - * @throws InvalidArgumentException - */ - public function __construct($handle, $options) - { - if (!is_resource($handle)) { - throw new InvalidArgumentException('Invalid handle provided'); - } - if (is_array($options)) { - $this->options = new Collection($options); - } elseif ($options instanceof Collection) { - $this->options = $options; - } else { - throw new InvalidArgumentException('Expected array or Collection'); - } - $this->handle = $handle; - } - - /** - * Destructor - */ - public function __destruct() - { - $this->close(); - } - - /** - * Close the curl handle - */ - public function close() - { - if (is_resource($this->handle)) { - curl_close($this->handle); - } - $this->handle = null; - } - - /** - * Check if the handle is available and still OK - * - * @return bool - */ - public function isAvailable() - { - return is_resource($this->handle); - } - - /** - * Get the last error that occurred on the cURL handle - * - * @return string - */ - public function getError() - { - return $this->isAvailable() ? curl_error($this->handle) : ''; - } - - /** - * Get the last error number that occurred on the cURL handle - * - * @return int - */ - public function getErrorNo() - { - if ($this->errorNo) { - return $this->errorNo; - } - - return $this->isAvailable() ? curl_errno($this->handle) : CURLE_OK; - } - - /** - * Set the curl error number - * - * @param int $error Error number to set - * - * @return CurlHandle - */ - public function setErrorNo($error) - { - $this->errorNo = $error; - - return $this; - } - - /** - * Get cURL curl_getinfo data - * - * @param int $option Option to retrieve. Pass null to retrieve all data as an array. - * - * @return array|mixed - */ - public function getInfo($option = null) - { - if (!is_resource($this->handle)) { - return null; - } - - if (null !== $option) { - return curl_getinfo($this->handle, $option) ?: null; - } - - return curl_getinfo($this->handle) ?: array(); - } - - /** - * Get the stderr output - * - * @param bool $asResource Set to TRUE to get an fopen resource - * - * @return string|resource|null - */ - public function getStderr($asResource = false) - { - $stderr = $this->getOptions()->get(CURLOPT_STDERR); - if (!$stderr) { - return null; - } - - if ($asResource) { - return $stderr; - } - - fseek($stderr, 0); - $e = stream_get_contents($stderr); - fseek($stderr, 0, SEEK_END); - - return $e; - } - - /** - * Get the URL that this handle is connecting to - * - * @return Url - */ - public function getUrl() - { - return Url::factory($this->options->get(CURLOPT_URL)); - } - - /** - * Get the wrapped curl handle - * - * @return resource|null Returns the cURL handle or null if it was closed - */ - public function getHandle() - { - return $this->isAvailable() ? $this->handle : null; - } - - /** - * Get the cURL setopt options of the handle. Changing values in the return object will have no effect on the curl - * handle after it is created. - * - * @return Collection - */ - public function getOptions() - { - return $this->options; - } - - /** - * Update a request based on the log messages of the CurlHandle - * - * @param RequestInterface $request Request to update - */ - public function updateRequestFromTransfer(RequestInterface $request) - { - if (!$request->getResponse()) { - return; - } - - // Update the transfer stats of the response - $request->getResponse()->setInfo($this->getInfo()); - - if (!$log = $this->getStderr(true)) { - return; - } - - // Parse the cURL stderr output for outgoing requests - $headers = ''; - fseek($log, 0); - while (($line = fgets($log)) !== false) { - if ($line && $line[0] == '>') { - $headers = substr(trim($line), 2) . "\r\n"; - while (($line = fgets($log)) !== false) { - if ($line[0] == '*' || $line[0] == '<') { - break; - } else { - $headers .= trim($line) . "\r\n"; - } - } - } - } - - // Add request headers to the request exactly as they were sent - if ($headers) { - $parsed = ParserRegistry::getInstance()->getParser('message')->parseRequest($headers); - if (!empty($parsed['headers'])) { - $request->setHeaders(array()); - foreach ($parsed['headers'] as $name => $value) { - $request->setHeader($name, $value); - } - } - if (!empty($parsed['version'])) { - $request->setProtocolVersion($parsed['version']); - } - } - } - - /** - * Parse the config and replace curl.* configurators into the constant based values so it can be used elsewhere - * - * @param array|Collection $config The configuration we want to parse - * - * @return array - */ - public static function parseCurlConfig($config) - { - $curlOptions = array(); - foreach ($config as $key => $value) { - if (is_string($key) && defined($key)) { - // Convert constants represented as string to constant int values - $key = constant($key); - } - if (is_string($value) && defined($value)) { - $value = constant($value); - } - $curlOptions[$key] = $value; - } - - return $curlOptions; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php deleted file mode 100644 index f09ca0cac..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php +++ /dev/null @@ -1,363 +0,0 @@ - array('CURLM_BAD_HANDLE', 'The passed-in handle is not a valid CURLM handle.'), - CURLM_BAD_EASY_HANDLE => array('CURLM_BAD_EASY_HANDLE', "An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle."), - CURLM_OUT_OF_MEMORY => array('CURLM_OUT_OF_MEMORY', 'You are doomed.'), - CURLM_INTERNAL_ERROR => array('CURLM_INTERNAL_ERROR', 'This can only be returned if libcurl bugs. Please report it to us!') - ); - - public function __construct() - { - $this->multiHandle = curl_multi_init(); - // @codeCoverageIgnoreStart - if ($this->multiHandle === false) { - throw new CurlException('Unable to create multi handle'); - } - // @codeCoverageIgnoreEnd - $this->reset(); - } - - public function __destruct() - { - if (is_resource($this->multiHandle)) { - curl_multi_close($this->multiHandle); - } - } - - public function add(RequestInterface $request) - { - $this->requests[] = $request; - // If requests are currently transferring and this is async, then the - // request must be prepared now as the send() method is not called. - $this->beforeSend($request); - $this->dispatch(self::ADD_REQUEST, array('request' => $request)); - - return $this; - } - - public function all() - { - return $this->requests; - } - - public function remove(RequestInterface $request) - { - $this->removeHandle($request); - if (($index = array_search($request, $this->requests, true)) !== false) { - $request = $this->requests[$index]; - unset($this->requests[$index]); - $this->requests = array_values($this->requests); - $this->dispatch(self::REMOVE_REQUEST, array('request' => $request)); - return true; - } - - return false; - } - - public function reset($hard = false) - { - // Remove each request - if ($this->requests) { - foreach ($this->requests as $request) { - $this->remove($request); - } - } - - $this->handles = new \SplObjectStorage(); - $this->requests = $this->resourceHash = $this->exceptions = $this->successful = array(); - } - - public function send() - { - $this->perform(); - $exceptions = $this->exceptions; - $successful = $this->successful; - $this->reset(); - - if ($exceptions) { - $this->throwMultiException($exceptions, $successful); - } - } - - public function count() - { - return count($this->requests); - } - - /** - * Build and throw a MultiTransferException - * - * @param array $exceptions Exceptions encountered - * @param array $successful Successful requests - * @throws MultiTransferException - */ - protected function throwMultiException(array $exceptions, array $successful) - { - $multiException = new MultiTransferException('Errors during multi transfer'); - - while ($e = array_shift($exceptions)) { - $multiException->addFailedRequestWithException($e['request'], $e['exception']); - } - - // Add successful requests - foreach ($successful as $request) { - if (!$multiException->containsRequest($request)) { - $multiException->addSuccessfulRequest($request); - } - } - - throw $multiException; - } - - /** - * Prepare for sending - * - * @param RequestInterface $request Request to prepare - * @throws \Exception on error preparing the request - */ - protected function beforeSend(RequestInterface $request) - { - try { - $state = $request->setState(RequestInterface::STATE_TRANSFER); - if ($state == RequestInterface::STATE_TRANSFER) { - // Add the request curl handle to the multi handle - $handle = $this->createCurlHandle($request)->getHandle(); - $this->checkCurlResult(curl_multi_add_handle($this->multiHandle, $handle)); - } else { - // Requests might decide they don't need to be sent just before transfer (e.g. CachePlugin) - $this->remove($request); - if ($state == RequestInterface::STATE_COMPLETE) { - $this->successful[] = $request; - } - } - } catch (\Exception $e) { - // Queue the exception to be thrown when sent - $this->removeErroredRequest($request, $e); - } - } - - /** - * Create a curl handle for a request - * - * @param RequestInterface $request Request - * - * @return CurlHandle - */ - protected function createCurlHandle(RequestInterface $request) - { - $wrapper = CurlHandle::factory($request); - $this->handles[$request] = $wrapper; - $this->resourceHash[(int) $wrapper->getHandle()] = $request; - - return $wrapper; - } - - /** - * Get the data from the multi handle - */ - protected function perform() - { - $event = new Event(array('curl_multi' => $this)); - - while ($this->requests) { - // Notify each request as polling - $blocking = $total = 0; - foreach ($this->requests as $request) { - ++$total; - $event['request'] = $request; - $request->getEventDispatcher()->dispatch(self::POLLING_REQUEST, $event); - // The blocking variable just has to be non-falsey to block the loop - if ($request->getParams()->hasKey(self::BLOCKING)) { - ++$blocking; - } - } - if ($blocking == $total) { - // Sleep to prevent eating CPU because no requests are actually pending a select call - usleep(500); - } else { - $this->executeHandles(); - } - } - } - - /** - * Execute and select curl handles - */ - private function executeHandles() - { - // The first curl_multi_select often times out no matter what, but is usually required for fast transfers - $selectTimeout = 0.001; - $active = false; - do { - while (($mrc = curl_multi_exec($this->multiHandle, $active)) == CURLM_CALL_MULTI_PERFORM); - $this->checkCurlResult($mrc); - $this->processMessages(); - if ($active && curl_multi_select($this->multiHandle, $selectTimeout) === -1) { - // Perform a usleep if a select returns -1: https://bugs.php.net/bug.php?id=61141 - usleep(150); - } - $selectTimeout = 1; - } while ($active); - } - - /** - * Process any received curl multi messages - */ - private function processMessages() - { - while ($done = curl_multi_info_read($this->multiHandle)) { - $request = $this->resourceHash[(int) $done['handle']]; - try { - $this->processResponse($request, $this->handles[$request], $done); - $this->successful[] = $request; - } catch (\Exception $e) { - $this->removeErroredRequest($request, $e); - } - } - } - - /** - * Remove a request that encountered an exception - * - * @param RequestInterface $request Request to remove - * @param \Exception $e Exception encountered - */ - protected function removeErroredRequest(RequestInterface $request, \Exception $e = null) - { - $this->exceptions[] = array('request' => $request, 'exception' => $e); - $this->remove($request); - $this->dispatch(self::MULTI_EXCEPTION, array('exception' => $e, 'all_exceptions' => $this->exceptions)); - } - - /** - * Check for errors and fix headers of a request based on a curl response - * - * @param RequestInterface $request Request to process - * @param CurlHandle $handle Curl handle object - * @param array $curl Array returned from curl_multi_info_read - * - * @throws CurlException on Curl error - */ - protected function processResponse(RequestInterface $request, CurlHandle $handle, array $curl) - { - // Set the transfer stats on the response - $handle->updateRequestFromTransfer($request); - // Check if a cURL exception occurred, and if so, notify things - $curlException = $this->isCurlException($request, $handle, $curl); - - // Always remove completed curl handles. They can be added back again - // via events if needed (e.g. ExponentialBackoffPlugin) - $this->removeHandle($request); - - if (!$curlException) { - $state = $request->setState(RequestInterface::STATE_COMPLETE, array('handle' => $handle)); - // Only remove the request if it wasn't resent as a result of the state change - if ($state != RequestInterface::STATE_TRANSFER) { - $this->remove($request); - } - } else { - // Set the state of the request to an error - $state = $request->setState(RequestInterface::STATE_ERROR, array('exception' => $curlException)); - // Allow things to ignore the error if possible - if ($state != RequestInterface::STATE_TRANSFER) { - $this->remove($request); - } - // The error was not handled, so fail - if ($state == RequestInterface::STATE_ERROR) { - /** @var CurlException $curlException */ - throw $curlException; - } - } - } - - /** - * Remove a curl handle from the curl multi object - * - * @param RequestInterface $request Request that owns the handle - */ - protected function removeHandle(RequestInterface $request) - { - if (isset($this->handles[$request])) { - $handle = $this->handles[$request]; - curl_multi_remove_handle($this->multiHandle, $handle->getHandle()); - unset($this->handles[$request]); - unset($this->resourceHash[(int) $handle->getHandle()]); - $handle->close(); - } - } - - /** - * Check if a cURL transfer resulted in what should be an exception - * - * @param RequestInterface $request Request to check - * @param CurlHandle $handle Curl handle object - * @param array $curl Array returned from curl_multi_info_read - * - * @return CurlException|bool - */ - private function isCurlException(RequestInterface $request, CurlHandle $handle, array $curl) - { - if (CURLM_OK == $curl['result'] || CURLM_CALL_MULTI_PERFORM == $curl['result']) { - return false; - } - - $handle->setErrorNo($curl['result']); - $e = new CurlException(sprintf('[curl] %s: %s [url] %s', - $handle->getErrorNo(), $handle->getError(), $handle->getUrl())); - $e->setCurlHandle($handle) - ->setRequest($request) - ->setCurlInfo($handle->getInfo()) - ->setError($handle->getError(), $handle->getErrorNo()); - - return $e; - } - - /** - * Throw an exception for a cURL multi response if needed - * - * @param int $code Curl response code - * @throws CurlException - */ - private function checkCurlResult($code) - { - if ($code != CURLM_OK && $code != CURLM_CALL_MULTI_PERFORM) { - throw new CurlException(isset($this->multiErrors[$code]) - ? "cURL error: {$code} ({$this->multiErrors[$code][0]}): cURL message: {$this->multiErrors[$code][1]}" - : 'Unexpected cURL error: ' . $code - ); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php deleted file mode 100644 index 0ead75735..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php +++ /dev/null @@ -1,58 +0,0 @@ -maxHandles = $maxHandles; - // You can get some weird "Too many open files" errors when sending a large amount of requests in parallel. - // These two statements autoload classes before a system runs out of file descriptors so that you can get back - // valuable error messages if you run out. - class_exists('Guzzle\Http\Message\Response'); - class_exists('Guzzle\Http\Exception\CurlException'); - } - - public function add(RequestInterface $request) - { - $this->queued[] = $request; - - return $this; - } - - public function all() - { - $requests = $this->queued; - foreach ($this->handles as $handle) { - $requests = array_merge($requests, $handle->all()); - } - - return $requests; - } - - public function remove(RequestInterface $request) - { - foreach ($this->queued as $i => $r) { - if ($request === $r) { - unset($this->queued[$i]); - return true; - } - } - - foreach ($this->handles as $handle) { - if ($handle->remove($request)) { - return true; - } - } - - return false; - } - - public function reset($hard = false) - { - $this->queued = array(); - $this->groups = array(); - foreach ($this->handles as $handle) { - $handle->reset(); - } - if ($hard) { - $this->handles = array(); - } - - return $this; - } - - public function send() - { - if ($this->queued) { - $group = $this->getAvailableHandle(); - // Add this handle to a list of handles than is claimed - $this->groups[] = $group; - while ($request = array_shift($this->queued)) { - $group->add($request); - } - try { - $group->send(); - array_pop($this->groups); - $this->cleanupHandles(); - } catch (\Exception $e) { - // Remove the group and cleanup if an exception was encountered and no more requests in group - if (!$group->count()) { - array_pop($this->groups); - $this->cleanupHandles(); - } - throw $e; - } - } - } - - public function count() - { - return count($this->all()); - } - - /** - * Get an existing available CurlMulti handle or create a new one - * - * @return CurlMulti - */ - protected function getAvailableHandle() - { - // Grab a handle that is not claimed - foreach ($this->handles as $h) { - if (!in_array($h, $this->groups, true)) { - return $h; - } - } - - // All are claimed, so create one - $handle = new CurlMulti(); - $handle->setEventDispatcher($this->getEventDispatcher()); - $this->handles[] = $handle; - - return $handle; - } - - /** - * Trims down unused CurlMulti handles to limit the number of open connections - */ - protected function cleanupHandles() - { - if ($diff = max(0, count($this->handles) - $this->maxHandles)) { - for ($i = count($this->handles) - 1; $i > 0 && $diff > 0; $i--) { - if (!count($this->handles[$i])) { - unset($this->handles[$i]); - $diff--; - } - } - $this->handles = array_values($this->handles); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php deleted file mode 100644 index c3f99dd25..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php +++ /dev/null @@ -1,66 +0,0 @@ -version) { - $this->version = curl_version(); - } - - return $this->version; - } - - /** - * Get a specific type of curl information - * - * @param string $type Version information to retrieve. This value is one of: - * - version_number: cURL 24 bit version number - * - version: cURL version number, as a string - * - ssl_version_number: OpenSSL 24 bit version number - * - ssl_version: OpenSSL version number, as a string - * - libz_version: zlib version number, as a string - * - host: Information about the host where cURL was built - * - features: A bitmask of the CURL_VERSION_XXX constants - * - protocols: An array of protocols names supported by cURL - * - * @return string|float|bool if the $type is found, and false if not found - */ - public function get($type) - { - $version = $this->getAll(); - - return isset($version[$type]) ? $version[$type] : false; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/RequestMediator.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/RequestMediator.php deleted file mode 100644 index 5d1a0cd87..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/RequestMediator.php +++ /dev/null @@ -1,147 +0,0 @@ -request = $request; - $this->emitIo = $emitIo; - } - - /** - * Receive a response header from curl - * - * @param resource $curl Curl handle - * @param string $header Received header - * - * @return int - */ - public function receiveResponseHeader($curl, $header) - { - static $normalize = array("\r", "\n"); - $length = strlen($header); - $header = str_replace($normalize, '', $header); - - if (strpos($header, 'HTTP/') === 0) { - - $startLine = explode(' ', $header, 3); - $code = $startLine[1]; - $status = isset($startLine[2]) ? $startLine[2] : ''; - - // Only download the body of the response to the specified response - // body when a successful response is received. - if ($code >= 200 && $code < 300) { - $body = $this->request->getResponseBody(); - } else { - $body = EntityBody::factory(); - } - - $response = new Response($code, null, $body); - $response->setStatus($code, $status); - $this->request->startResponse($response); - - $this->request->dispatch('request.receive.status_line', array( - 'request' => $this, - 'line' => $header, - 'status_code' => $code, - 'reason_phrase' => $status - )); - - } elseif ($pos = strpos($header, ':')) { - $this->request->getResponse()->addHeader( - trim(substr($header, 0, $pos)), - trim(substr($header, $pos + 1)) - ); - } - - return $length; - } - - /** - * Received a progress notification - * - * @param int $downloadSize Total download size - * @param int $downloaded Amount of bytes downloaded - * @param int $uploadSize Total upload size - * @param int $uploaded Amount of bytes uploaded - * @param resource $handle CurlHandle object - */ - public function progress($downloadSize, $downloaded, $uploadSize, $uploaded, $handle = null) - { - $this->request->dispatch('curl.callback.progress', array( - 'request' => $this->request, - 'handle' => $handle, - 'download_size' => $downloadSize, - 'downloaded' => $downloaded, - 'upload_size' => $uploadSize, - 'uploaded' => $uploaded - )); - } - - /** - * Write data to the response body of a request - * - * @param resource $curl Curl handle - * @param string $write Data that was received - * - * @return int - */ - public function writeResponseBody($curl, $write) - { - if ($this->emitIo) { - $this->request->dispatch('curl.callback.write', array( - 'request' => $this->request, - 'write' => $write - )); - } - - if ($response = $this->request->getResponse()) { - return $response->getBody()->write($write); - } else { - // Unexpected data received before response headers - abort transfer - return 0; - } - } - - /** - * Read data from the request body and send it to curl - * - * @param resource $ch Curl handle - * @param resource $fd File descriptor - * @param int $length Amount of data to read - * - * @return string - */ - public function readRequestBody($ch, $fd, $length) - { - if (!($body = $this->request->getBody())) { - return ''; - } - - $read = (string) $body->read($length); - if ($this->emitIo) { - $this->request->dispatch('curl.callback.read', array('request' => $this->request, 'read' => $read)); - } - - return $read; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBody.php b/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBody.php deleted file mode 100644 index b60d170f0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBody.php +++ /dev/null @@ -1,201 +0,0 @@ -rewindFunction = $callable; - - return $this; - } - - public function rewind() - { - return $this->rewindFunction ? call_user_func($this->rewindFunction, $this) : parent::rewind(); - } - - /** - * Create a new EntityBody from a string - * - * @param string $string String of data - * - * @return EntityBody - */ - public static function fromString($string) - { - $stream = fopen('php://temp', 'r+'); - if ($string !== '') { - fwrite($stream, $string); - rewind($stream); - } - - return new static($stream); - } - - public function compress($filter = 'zlib.deflate') - { - $result = $this->handleCompression($filter); - $this->contentEncoding = $result ? $filter : false; - - return $result; - } - - public function uncompress($filter = 'zlib.inflate') - { - $offsetStart = 0; - - // When inflating gzipped data, the first 10 bytes must be stripped - // if a gzip header is present - if ($filter == 'zlib.inflate') { - // @codeCoverageIgnoreStart - if (!$this->isReadable() || ($this->isConsumed() && !$this->isSeekable())) { - return false; - } - // @codeCoverageIgnoreEnd - if (stream_get_contents($this->stream, 3, 0) === "\x1f\x8b\x08") { - $offsetStart = 10; - } - } - - $this->contentEncoding = false; - - return $this->handleCompression($filter, $offsetStart); - } - - public function getContentLength() - { - return $this->getSize(); - } - - public function getContentType() - { - return $this->getUri() ? Mimetypes::getInstance()->fromFilename($this->getUri()) : null; - } - - public function getContentMd5($rawOutput = false, $base64Encode = false) - { - if ($hash = self::getHash($this, 'md5', $rawOutput)) { - return $hash && $base64Encode ? base64_encode($hash) : $hash; - } else { - return false; - } - } - - /** - * Calculate the MD5 hash of an entity body - * - * @param EntityBodyInterface $body Entity body to calculate the hash for - * @param bool $rawOutput Whether or not to use raw output - * @param bool $base64Encode Whether or not to base64 encode raw output (only if raw output is true) - * - * @return bool|string Returns an MD5 string on success or FALSE on failure - * @deprecated This will be deprecated soon - * @codeCoverageIgnore - */ - public static function calculateMd5(EntityBodyInterface $body, $rawOutput = false, $base64Encode = false) - { - Version::warn(__CLASS__ . ' is deprecated. Use getContentMd5()'); - return $body->getContentMd5($rawOutput, $base64Encode); - } - - public function setStreamFilterContentEncoding($streamFilterContentEncoding) - { - $this->contentEncoding = $streamFilterContentEncoding; - - return $this; - } - - public function getContentEncoding() - { - return strtr($this->contentEncoding, array( - 'zlib.deflate' => 'gzip', - 'bzip2.compress' => 'compress' - )) ?: false; - } - - protected function handleCompression($filter, $offsetStart = 0) - { - // @codeCoverageIgnoreStart - if (!$this->isReadable() || ($this->isConsumed() && !$this->isSeekable())) { - return false; - } - // @codeCoverageIgnoreEnd - - $handle = fopen('php://temp', 'r+'); - $filter = @stream_filter_append($handle, $filter, STREAM_FILTER_WRITE); - if (!$filter) { - return false; - } - - // Seek to the offset start if possible - $this->seek($offsetStart); - while ($data = fread($this->stream, 8096)) { - fwrite($handle, $data); - } - - fclose($this->stream); - $this->stream = $handle; - stream_filter_remove($filter); - $stat = fstat($this->stream); - $this->size = $stat['size']; - $this->rebuildCache(); - $this->seek(0); - - // Remove any existing rewind function as the underlying stream has been replaced - $this->rewindFunction = null; - - return true; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php deleted file mode 100644 index e640f5785..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php +++ /dev/null @@ -1,73 +0,0 @@ -isClientError()) { - $label = 'Client error response'; - $class = __NAMESPACE__ . '\\ClientErrorResponseException'; - } elseif ($response->isServerError()) { - $label = 'Server error response'; - $class = __NAMESPACE__ . '\\ServerErrorResponseException'; - } else { - $label = 'Unsuccessful response'; - $class = __CLASS__; - } - - $message = $label . PHP_EOL . implode(PHP_EOL, array( - '[status code] ' . $response->getStatusCode(), - '[reason phrase] ' . $response->getReasonPhrase(), - '[url] ' . $request->getUrl(), - )); - - $e = new $class($message); - $e->setResponse($response); - $e->setRequest($request); - - return $e; - } - - /** - * Set the response that caused the exception - * - * @param Response $response Response to set - */ - public function setResponse(Response $response) - { - $this->response = $response; - } - - /** - * Get the response that caused the exception - * - * @return Response - */ - public function getResponse() - { - return $this->response; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ClientErrorResponseException.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ClientErrorResponseException.php deleted file mode 100644 index 04d7ddc05..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ClientErrorResponseException.php +++ /dev/null @@ -1,8 +0,0 @@ -curlError = $error; - $this->curlErrorNo = $number; - - return $this; - } - - /** - * Set the associated curl handle - * - * @param CurlHandle $handle Curl handle - * - * @return self - */ - public function setCurlHandle(CurlHandle $handle) - { - $this->handle = $handle; - - return $this; - } - - /** - * Get the associated cURL handle - * - * @return CurlHandle|null - */ - public function getCurlHandle() - { - return $this->handle; - } - - /** - * Get the associated cURL error message - * - * @return string|null - */ - public function getError() - { - return $this->curlError; - } - - /** - * Get the associated cURL error number - * - * @return int|null - */ - public function getErrorNo() - { - return $this->curlErrorNo; - } - - /** - * Returns curl information about the transfer - * - * @return array - */ - public function getCurlInfo() - { - return $this->curlInfo; - } - - /** - * Set curl transfer information - * - * @param array $info Array of curl transfer information - * - * @return self - * @link http://php.net/manual/en/function.curl-getinfo.php - */ - public function setCurlInfo(array $info) - { - $this->curlInfo = $info; - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php deleted file mode 100644 index ee87295d3..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php +++ /dev/null @@ -1,10 +0,0 @@ -successfulRequests, $this->failedRequests); - } - - /** - * Add to the array of successful requests - * - * @param RequestInterface $request Successful request - * - * @return self - */ - public function addSuccessfulRequest(RequestInterface $request) - { - $this->successfulRequests[] = $request; - - return $this; - } - - /** - * Add to the array of failed requests - * - * @param RequestInterface $request Failed request - * - * @return self - */ - public function addFailedRequest(RequestInterface $request) - { - $this->failedRequests[] = $request; - - return $this; - } - - /** - * Add to the array of failed requests and associate with exceptions - * - * @param RequestInterface $request Failed request - * @param \Exception $exception Exception to add and associate with - * - * @return self - */ - public function addFailedRequestWithException(RequestInterface $request, \Exception $exception) - { - $this->add($exception) - ->addFailedRequest($request) - ->exceptionForRequest[spl_object_hash($request)] = $exception; - - return $this; - } - - /** - * Get the Exception that caused the given $request to fail - * - * @param RequestInterface $request Failed command - * - * @return \Exception|null - */ - public function getExceptionForFailedRequest(RequestInterface $request) - { - $oid = spl_object_hash($request); - - return isset($this->exceptionForRequest[$oid]) ? $this->exceptionForRequest[$oid] : null; - } - - /** - * Set all of the successful requests - * - * @param array Array of requests - * - * @return self - */ - public function setSuccessfulRequests(array $requests) - { - $this->successfulRequests = $requests; - - return $this; - } - - /** - * Set all of the failed requests - * - * @param array Array of requests - * - * @return self - */ - public function setFailedRequests(array $requests) - { - $this->failedRequests = $requests; - - return $this; - } - - /** - * Get an array of successful requests sent in the multi transfer - * - * @return array - */ - public function getSuccessfulRequests() - { - return $this->successfulRequests; - } - - /** - * Get an array of failed requests sent in the multi transfer - * - * @return array - */ - public function getFailedRequests() - { - return $this->failedRequests; - } - - /** - * Check if the exception object contains a request - * - * @param RequestInterface $request Request to check - * - * @return bool - */ - public function containsRequest(RequestInterface $request) - { - return in_array($request, $this->failedRequests, true) || in_array($request, $this->successfulRequests, true); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/RequestException.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/RequestException.php deleted file mode 100644 index 274df2cb1..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/RequestException.php +++ /dev/null @@ -1,39 +0,0 @@ -request = $request; - - return $this; - } - - /** - * Get the request that caused the exception - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php deleted file mode 100644 index f0f7cfe48..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php +++ /dev/null @@ -1,8 +0,0 @@ -eventDispatcher = $eventDispatcher; - - return $this; - } - - public function getEventDispatcher() - { - if (!$this->eventDispatcher) { - $this->eventDispatcher = new EventDispatcher(); - } - - return $this->eventDispatcher; - } - - public function dispatch($eventName, array $context = array()) - { - return $this->getEventDispatcher()->dispatch($eventName, new Event($context)); - } - - /** - * {@inheritdoc} - * @codeCoverageIgnore - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->getEventDispatcher()->addSubscriber($subscriber); - - return $this; - } - - public function read($length) - { - $event = array( - 'body' => $this, - 'length' => $length, - 'read' => $this->body->read($length) - ); - $this->dispatch('body.read', $event); - - return $event['read']; - } - - public function write($string) - { - $event = array( - 'body' => $this, - 'write' => $string, - 'result' => $this->body->write($string) - ); - $this->dispatch('body.write', $event); - - return $event['result']; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/AbstractMessage.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/AbstractMessage.php deleted file mode 100644 index 0d066ffce..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/AbstractMessage.php +++ /dev/null @@ -1,220 +0,0 @@ -params = new Collection(); - $this->headerFactory = new HeaderFactory(); - $this->headers = new HeaderCollection(); - } - - /** - * Set the header factory to use to create headers - * - * @param HeaderFactoryInterface $factory - * - * @return self - */ - public function setHeaderFactory(HeaderFactoryInterface $factory) - { - $this->headerFactory = $factory; - - return $this; - } - - public function getParams() - { - return $this->params; - } - - public function addHeader($header, $value) - { - if (isset($this->headers[$header])) { - $this->headers[$header]->add($value); - } elseif ($value instanceof HeaderInterface) { - $this->headers[$header] = $value; - } else { - $this->headers[$header] = $this->headerFactory->createHeader($header, $value); - } - - return $this; - } - - public function addHeaders(array $headers) - { - foreach ($headers as $key => $value) { - $this->addHeader($key, $value); - } - - return $this; - } - - public function getHeader($header) - { - return $this->headers[$header]; - } - - public function getHeaders() - { - return $this->headers; - } - - public function getHeaderLines() - { - $headers = array(); - foreach ($this->headers as $value) { - $headers[] = $value->getName() . ': ' . $value; - } - - return $headers; - } - - public function setHeader($header, $value) - { - unset($this->headers[$header]); - $this->addHeader($header, $value); - - return $this; - } - - public function setHeaders(array $headers) - { - $this->headers->clear(); - foreach ($headers as $key => $value) { - $this->addHeader($key, $value); - } - - return $this; - } - - public function hasHeader($header) - { - return isset($this->headers[$header]); - } - - public function removeHeader($header) - { - unset($this->headers[$header]); - - return $this; - } - - /** - * @deprecated Use $message->getHeader()->parseParams() - * @codeCoverageIgnore - */ - public function getTokenizedHeader($header, $token = ';') - { - Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader()->parseParams()'); - if ($this->hasHeader($header)) { - $data = new Collection(); - foreach ($this->getHeader($header)->parseParams() as $values) { - foreach ($values as $key => $value) { - if ($value === '') { - $data->set($data->count(), $key); - } else { - $data->add($key, $value); - } - } - } - return $data; - } - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function setTokenizedHeader($header, $data, $token = ';') - { - Version::warn(__METHOD__ . ' is deprecated.'); - return $this; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function getCacheControlDirective($directive) - { - Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->getDirective()'); - if (!($header = $this->getHeader('Cache-Control'))) { - return null; - } - - return $header->getDirective($directive); - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function hasCacheControlDirective($directive) - { - Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->hasDirective()'); - if ($header = $this->getHeader('Cache-Control')) { - return $header->hasDirective($directive); - } else { - return false; - } - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function addCacheControlDirective($directive, $value = true) - { - Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->addDirective()'); - if (!($header = $this->getHeader('Cache-Control'))) { - $this->addHeader('Cache-Control', ''); - $header = $this->getHeader('Cache-Control'); - } - - $header->addDirective($directive, $value); - - return $this; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function removeCacheControlDirective($directive) - { - Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->removeDirective()'); - if ($header = $this->getHeader('Cache-Control')) { - $header->removeDirective($directive); - } - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php deleted file mode 100644 index 212850a25..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -postFields = new QueryString(); - parent::__construct($method, $url, $headers); - } - - /** - * @return string - */ - public function __toString() - { - // Only attempt to include the POST data if it's only fields - if (count($this->postFields) && empty($this->postFiles)) { - return parent::__toString() . (string) $this->postFields; - } - - return parent::__toString() . $this->body; - } - - public function setState($state, array $context = array()) - { - parent::setState($state, $context); - if ($state == self::STATE_TRANSFER && !$this->body && !count($this->postFields) && !count($this->postFiles)) { - $this->setHeader('Content-Length', 0)->removeHeader('Transfer-Encoding'); - } - - return $this->state; - } - - public function setBody($body, $contentType = null) - { - $this->body = EntityBody::factory($body); - - // Auto detect the Content-Type from the path of the request if possible - if ($contentType === null && !$this->hasHeader('Content-Type')) { - $contentType = $this->body->getContentType(); - } - - if ($contentType) { - $this->setHeader('Content-Type', $contentType); - } - - // Always add the Expect 100-Continue header if the body cannot be rewound. This helps with redirects. - if (!$this->body->isSeekable() && $this->expectCutoff !== false) { - $this->setHeader('Expect', '100-Continue'); - } - - // Set the Content-Length header if it can be determined - $size = $this->body->getContentLength(); - if ($size !== null && $size !== false) { - $this->setHeader('Content-Length', $size); - if ($size > $this->expectCutoff) { - $this->setHeader('Expect', '100-Continue'); - } - } elseif (!$this->hasHeader('Content-Length')) { - if ('1.1' == $this->protocolVersion) { - $this->setHeader('Transfer-Encoding', 'chunked'); - } else { - throw new RequestException( - 'Cannot determine Content-Length and cannot use chunked Transfer-Encoding when using HTTP/1.0' - ); - } - } - - return $this; - } - - public function getBody() - { - return $this->body; - } - - /** - * Set the size that the entity body of the request must exceed before adding the Expect: 100-Continue header. - * - * @param int|bool $size Cutoff in bytes. Set to false to never send the expect header (even with non-seekable data) - * - * @return self - */ - public function setExpectHeaderCutoff($size) - { - $this->expectCutoff = $size; - if ($size === false || !$this->body) { - $this->removeHeader('Expect'); - } elseif ($this->body && $this->body->getSize() && $this->body->getSize() > $size) { - $this->setHeader('Expect', '100-Continue'); - } - - return $this; - } - - public function configureRedirects($strict = false, $maxRedirects = 5) - { - $this->getParams()->set(RedirectPlugin::STRICT_REDIRECTS, $strict); - if ($maxRedirects == 0) { - $this->getParams()->set(RedirectPlugin::DISABLE, true); - } else { - $this->getParams()->set(RedirectPlugin::MAX_REDIRECTS, $maxRedirects); - } - - return $this; - } - - public function getPostField($field) - { - return $this->postFields->get($field); - } - - public function getPostFields() - { - return $this->postFields; - } - - public function setPostField($key, $value) - { - $this->postFields->set($key, $value); - $this->processPostFields(); - - return $this; - } - - public function addPostFields($fields) - { - $this->postFields->merge($fields); - $this->processPostFields(); - - return $this; - } - - public function removePostField($field) - { - $this->postFields->remove($field); - $this->processPostFields(); - - return $this; - } - - public function getPostFiles() - { - return $this->postFiles; - } - - public function getPostFile($fieldName) - { - return isset($this->postFiles[$fieldName]) ? $this->postFiles[$fieldName] : null; - } - - public function removePostFile($fieldName) - { - unset($this->postFiles[$fieldName]); - $this->processPostFields(); - - return $this; - } - - public function addPostFile($field, $filename = null, $contentType = null, $postname = null) - { - $data = null; - - if ($field instanceof PostFileInterface) { - $data = $field; - } elseif (is_array($filename)) { - // Allow multiple values to be set in a single key - foreach ($filename as $file) { - $this->addPostFile($field, $file, $contentType); - } - return $this; - } elseif (!is_string($filename)) { - throw new RequestException('The path to a file must be a string'); - } elseif (!empty($filename)) { - // Adding an empty file will cause cURL to error out - $data = new PostFile($field, $filename, $contentType, $postname); - } - - if ($data) { - if (!isset($this->postFiles[$data->getFieldName()])) { - $this->postFiles[$data->getFieldName()] = array($data); - } else { - $this->postFiles[$data->getFieldName()][] = $data; - } - $this->processPostFields(); - } - - return $this; - } - - public function addPostFiles(array $files) - { - foreach ($files as $key => $file) { - if ($file instanceof PostFileInterface) { - $this->addPostFile($file, null, null, false); - } elseif (is_string($file)) { - // Convert non-associative array keys into 'file' - if (is_numeric($key)) { - $key = 'file'; - } - $this->addPostFile($key, $file, null, false); - } else { - throw new RequestException('File must be a string or instance of PostFileInterface'); - } - } - - return $this; - } - - /** - * Determine what type of request should be sent based on post fields - */ - protected function processPostFields() - { - if (!$this->postFiles) { - $this->removeHeader('Expect')->setHeader('Content-Type', self::URL_ENCODED); - } else { - $this->setHeader('Content-Type', self::MULTIPART); - if ($this->expectCutoff !== false) { - $this->setHeader('Expect', '100-Continue'); - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php deleted file mode 100644 index 49ad4595d..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php +++ /dev/null @@ -1,137 +0,0 @@ - filenames where filename can be a string or PostFileInterface - * - * @return self - */ - public function addPostFiles(array $files); - - /** - * Configure how redirects are handled for the request - * - * @param bool $strict Set to true to follow strict RFC compliance when redirecting POST requests. Most - * browsers with follow a 301-302 redirect for a POST request with a GET request. This is - * the default behavior of Guzzle. Enable strict redirects to redirect these responses - * with a POST rather than a GET request. - * @param int $maxRedirects Specify the maximum number of allowed redirects. Set to 0 to disable redirects. - * - * @return self - */ - public function configureRedirects($strict = false, $maxRedirects = 5); -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header.php deleted file mode 100644 index 50597b2a6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header.php +++ /dev/null @@ -1,182 +0,0 @@ -header = trim($header); - $this->glue = $glue; - - foreach ((array) $values as $value) { - foreach ((array) $value as $v) { - $this->values[] = $v; - } - } - } - - public function __toString() - { - return implode($this->glue . ' ', $this->toArray()); - } - - public function add($value) - { - $this->values[] = $value; - - return $this; - } - - public function getName() - { - return $this->header; - } - - public function setName($name) - { - $this->header = $name; - - return $this; - } - - public function setGlue($glue) - { - $this->glue = $glue; - - return $this; - } - - public function getGlue() - { - return $this->glue; - } - - /** - * Normalize the header to be a single header with an array of values. - * - * If any values of the header contains the glue string value (e.g. ","), then the value will be exploded into - * multiple entries in the header. - * - * @return self - */ - public function normalize() - { - $values = $this->toArray(); - - for ($i = 0, $total = count($values); $i < $total; $i++) { - if (strpos($values[$i], $this->glue) !== false) { - // Explode on glue when the glue is not inside of a comma - foreach (preg_split('/' . preg_quote($this->glue) . '(?=([^"]*"[^"]*")*[^"]*$)/', $values[$i]) as $v) { - $values[] = trim($v); - } - unset($values[$i]); - } - } - - $this->values = array_values($values); - - return $this; - } - - public function hasValue($searchValue) - { - return in_array($searchValue, $this->toArray()); - } - - public function removeValue($searchValue) - { - $this->values = array_values(array_filter($this->values, function ($value) use ($searchValue) { - return $value != $searchValue; - })); - - return $this; - } - - public function toArray() - { - return $this->values; - } - - public function count() - { - return count($this->toArray()); - } - - public function getIterator() - { - return new \ArrayIterator($this->toArray()); - } - - public function parseParams() - { - $params = $matches = array(); - $callback = array($this, 'trimHeader'); - - // Normalize the header into a single array and iterate over all values - foreach ($this->normalize()->toArray() as $val) { - $part = array(); - foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { - if (!preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { - continue; - } - $pieces = array_map($callback, $matches[0]); - $part[$pieces[0]] = isset($pieces[1]) ? $pieces[1] : ''; - } - if ($part) { - $params[] = $part; - } - } - - return $params; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function hasExactHeader($header) - { - Version::warn(__METHOD__ . ' is deprecated'); - return $this->header == $header; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function raw() - { - Version::warn(__METHOD__ . ' is deprecated. Use toArray()'); - return $this->toArray(); - } - - /** - * Trim a header by removing excess spaces and wrapping quotes - * - * @param $str - * - * @return string - */ - protected function trimHeader($str) - { - static $trimmed = "\"' \n\t"; - - return trim($str, $trimmed); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/CacheControl.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/CacheControl.php deleted file mode 100644 index 77789e51f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/CacheControl.php +++ /dev/null @@ -1,121 +0,0 @@ -directives = null; - } - - public function removeValue($searchValue) - { - parent::removeValue($searchValue); - $this->directives = null; - } - - /** - * Check if a specific cache control directive exists - * - * @param string $param Directive to retrieve - * - * @return bool - */ - public function hasDirective($param) - { - $directives = $this->getDirectives(); - - return isset($directives[$param]); - } - - /** - * Get a specific cache control directive - * - * @param string $param Directive to retrieve - * - * @return string|bool|null - */ - public function getDirective($param) - { - $directives = $this->getDirectives(); - - return isset($directives[$param]) ? $directives[$param] : null; - } - - /** - * Add a cache control directive - * - * @param string $param Directive to add - * @param string $value Value to set - * - * @return self - */ - public function addDirective($param, $value) - { - $directives = $this->getDirectives(); - $directives[$param] = $value; - $this->updateFromDirectives($directives); - - return $this; - } - - /** - * Remove a cache control directive by name - * - * @param string $param Directive to remove - * - * @return self - */ - public function removeDirective($param) - { - $directives = $this->getDirectives(); - unset($directives[$param]); - $this->updateFromDirectives($directives); - - return $this; - } - - /** - * Get an associative array of cache control directives - * - * @return array - */ - public function getDirectives() - { - if ($this->directives === null) { - $this->directives = array(); - foreach ($this->parseParams() as $collection) { - foreach ($collection as $key => $value) { - $this->directives[$key] = $value === '' ? true : $value; - } - } - } - - return $this->directives; - } - - /** - * Updates the header value based on the parsed directives - * - * @param array $directives Array of cache control directives - */ - protected function updateFromDirectives(array $directives) - { - $this->directives = $directives; - $this->values = array(); - - foreach ($directives as $key => $value) { - $this->values[] = $value === true ? $key : "{$key}={$value}"; - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderCollection.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderCollection.php deleted file mode 100644 index 8c7f6aefb..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderCollection.php +++ /dev/null @@ -1,108 +0,0 @@ -headers = $headers; - } - - public function __clone() - { - foreach ($this->headers as &$header) { - $header = clone $header; - } - } - - /** - * Clears the header collection - */ - public function clear() - { - $this->headers = array(); - } - - /** - * Set a header on the collection - * - * @param HeaderInterface $header Header to add - * - * @return self - */ - public function add(HeaderInterface $header) - { - $this->headers[strtolower($header->getName())] = $header; - - return $this; - } - - /** - * Get an array of header objects - * - * @return array - */ - public function getAll() - { - return $this->headers; - } - - /** - * Alias of offsetGet - */ - public function get($key) - { - return $this->offsetGet($key); - } - - public function count() - { - return count($this->headers); - } - - public function offsetExists($offset) - { - return isset($this->headers[strtolower($offset)]); - } - - public function offsetGet($offset) - { - $l = strtolower($offset); - - return isset($this->headers[$l]) ? $this->headers[$l] : null; - } - - public function offsetSet($offset, $value) - { - $this->add($value); - } - - public function offsetUnset($offset) - { - unset($this->headers[strtolower($offset)]); - } - - public function getIterator() - { - return new \ArrayIterator($this->headers); - } - - public function toArray() - { - $result = array(); - foreach ($this->headers as $header) { - $result[$header->getName()] = $header->toArray(); - } - - return $result; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactory.php deleted file mode 100644 index 0273be52f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactory.php +++ /dev/null @@ -1,26 +0,0 @@ - 'Guzzle\Http\Message\Header\CacheControl', - 'link' => 'Guzzle\Http\Message\Header\Link', - ); - - public function createHeader($header, $value = null) - { - $lowercase = strtolower($header); - - return isset($this->mapping[$lowercase]) - ? new $this->mapping[$lowercase]($header, $value) - : new Header($header, $value); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactoryInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactoryInterface.php deleted file mode 100644 index 9457cf64a..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactoryInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -", "rel=\"{$rel}\""); - - foreach ($params as $k => $v) { - $values[] = "{$k}=\"{$v}\""; - } - - return $this->add(implode('; ', $values)); - } - - /** - * Check if a specific link exists for a given rel attribute - * - * @param string $rel rel value - * - * @return bool - */ - public function hasLink($rel) - { - return $this->getLink($rel) !== null; - } - - /** - * Get a specific link for a given rel attribute - * - * @param string $rel Rel value - * - * @return array|null - */ - public function getLink($rel) - { - foreach ($this->getLinks() as $link) { - if (isset($link['rel']) && $link['rel'] == $rel) { - return $link; - } - } - - return null; - } - - /** - * Get an associative array of links - * - * For example: - * Link: ; rel=front; type="image/jpeg", ; rel=back; type="image/jpeg" - * - * - * var_export($response->getLinks()); - * array( - * array( - * 'url' => 'http:/.../front.jpeg', - * 'rel' => 'back', - * 'type' => 'image/jpeg', - * ) - * ) - * - * - * @return array - */ - public function getLinks() - { - $links = $this->parseParams(); - - foreach ($links as &$link) { - $key = key($link); - unset($link[$key]); - $link['url'] = trim($key, '<> '); - } - - return $links; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/MessageInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/MessageInterface.php deleted file mode 100644 index 62bcd4391..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/MessageInterface.php +++ /dev/null @@ -1,102 +0,0 @@ -fieldName = $fieldName; - $this->setFilename($filename); - $this->postname = $postname ? $postname : basename($filename); - $this->contentType = $contentType ?: $this->guessContentType(); - } - - public function setFieldName($name) - { - $this->fieldName = $name; - - return $this; - } - - public function getFieldName() - { - return $this->fieldName; - } - - public function setFilename($filename) - { - // Remove leading @ symbol - if (strpos($filename, '@') === 0) { - $filename = substr($filename, 1); - } - - if (!is_readable($filename)) { - throw new InvalidArgumentException("Unable to open {$filename} for reading"); - } - - $this->filename = $filename; - - return $this; - } - - public function setPostname($postname) - { - $this->postname = $postname; - - return $this; - } - - public function getFilename() - { - return $this->filename; - } - - public function getPostname() - { - return $this->postname; - } - - public function setContentType($type) - { - $this->contentType = $type; - - return $this; - } - - public function getContentType() - { - return $this->contentType; - } - - public function getCurlValue() - { - // PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax - // See: https://wiki.php.net/rfc/curl-file-upload - if (function_exists('curl_file_create')) { - return curl_file_create($this->filename, $this->contentType, $this->postname); - } - - // Use the old style if using an older version of PHP - $value = "@{$this->filename};filename=" . $this->postname; - if ($this->contentType) { - $value .= ';type=' . $this->contentType; - } - - return $value; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function getCurlString() - { - Version::warn(__METHOD__ . ' is deprecated. Use getCurlValue()'); - return $this->getCurlValue(); - } - - /** - * Determine the Content-Type of the file - */ - protected function guessContentType() - { - return Mimetypes::getInstance()->fromFilename($this->filename) ?: 'application/octet-stream'; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFileInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFileInterface.php deleted file mode 100644 index 7f0779d1e..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFileInterface.php +++ /dev/null @@ -1,83 +0,0 @@ -method = strtoupper($method); - $this->curlOptions = new Collection(); - $this->setUrl($url); - - if ($headers) { - // Special handling for multi-value headers - foreach ($headers as $key => $value) { - // Deal with collisions with Host and Authorization - if ($key == 'host' || $key == 'Host') { - $this->setHeader($key, $value); - } elseif ($value instanceof HeaderInterface) { - $this->addHeader($key, $value); - } else { - foreach ((array) $value as $v) { - $this->addHeader($key, $v); - } - } - } - } - - $this->setState(self::STATE_NEW); - } - - public function __clone() - { - if ($this->eventDispatcher) { - $this->eventDispatcher = clone $this->eventDispatcher; - } - $this->curlOptions = clone $this->curlOptions; - $this->params = clone $this->params; - $this->url = clone $this->url; - $this->response = $this->responseBody = null; - $this->headers = clone $this->headers; - - $this->setState(RequestInterface::STATE_NEW); - $this->dispatch('request.clone', array('request' => $this)); - } - - /** - * Get the HTTP request as a string - * - * @return string - */ - public function __toString() - { - return $this->getRawHeaders() . "\r\n\r\n"; - } - - /** - * Default method that will throw exceptions if an unsuccessful response is received. - * - * @param Event $event Received - * @throws BadResponseException if the response is not successful - */ - public static function onRequestError(Event $event) - { - $e = BadResponseException::factory($event['request'], $event['response']); - $event['request']->setState(self::STATE_ERROR, array('exception' => $e) + $event->toArray()); - throw $e; - } - - public function setClient(ClientInterface $client) - { - $this->client = $client; - - return $this; - } - - public function getClient() - { - return $this->client; - } - - public function getRawHeaders() - { - $protocolVersion = $this->protocolVersion ?: '1.1'; - - return trim($this->method . ' ' . $this->getResource()) . ' ' - . strtoupper(str_replace('https', 'http', $this->url->getScheme())) - . '/' . $protocolVersion . "\r\n" . implode("\r\n", $this->getHeaderLines()); - } - - public function setUrl($url) - { - if ($url instanceof Url) { - $this->url = $url; - } else { - $this->url = Url::factory($url); - } - - // Update the port and host header - $this->setPort($this->url->getPort()); - - if ($this->url->getUsername() || $this->url->getPassword()) { - $this->setAuth($this->url->getUsername(), $this->url->getPassword()); - // Remove the auth info from the URL - $this->url->setUsername(null); - $this->url->setPassword(null); - } - - return $this; - } - - public function send() - { - if (!$this->client) { - throw new RuntimeException('A client must be set on the request'); - } - - return $this->client->send($this); - } - - public function getResponse() - { - return $this->response; - } - - public function getQuery($asString = false) - { - return $asString - ? (string) $this->url->getQuery() - : $this->url->getQuery(); - } - - public function getMethod() - { - return $this->method; - } - - public function getScheme() - { - return $this->url->getScheme(); - } - - public function setScheme($scheme) - { - $this->url->setScheme($scheme); - - return $this; - } - - public function getHost() - { - return $this->url->getHost(); - } - - public function setHost($host) - { - $this->url->setHost($host); - $this->setPort($this->url->getPort()); - - return $this; - } - - public function getProtocolVersion() - { - return $this->protocolVersion; - } - - public function setProtocolVersion($protocol) - { - $this->protocolVersion = $protocol; - - return $this; - } - - public function getPath() - { - return '/' . ltrim($this->url->getPath(), '/'); - } - - public function setPath($path) - { - $this->url->setPath($path); - - return $this; - } - - public function getPort() - { - return $this->url->getPort(); - } - - public function setPort($port) - { - $this->url->setPort($port); - - // Include the port in the Host header if it is not the default port for the scheme of the URL - $scheme = $this->url->getScheme(); - if (($scheme == 'http' && $port != 80) || ($scheme == 'https' && $port != 443)) { - $this->headers['host'] = $this->headerFactory->createHeader('Host', $this->url->getHost() . ':' . $port); - } else { - $this->headers['host'] = $this->headerFactory->createHeader('Host', $this->url->getHost()); - } - - return $this; - } - - public function getUsername() - { - return $this->username; - } - - public function getPassword() - { - return $this->password; - } - - public function setAuth($user, $password = '', $scheme = CURLAUTH_BASIC) - { - static $authMap = array( - 'basic' => CURLAUTH_BASIC, - 'digest' => CURLAUTH_DIGEST, - 'ntlm' => CURLAUTH_NTLM, - 'any' => CURLAUTH_ANY - ); - - // If we got false or null, disable authentication - if (!$user) { - $this->password = $this->username = null; - $this->removeHeader('Authorization'); - $this->getCurlOptions()->remove(CURLOPT_HTTPAUTH); - return $this; - } - - if (!is_numeric($scheme)) { - $scheme = strtolower($scheme); - if (!isset($authMap[$scheme])) { - throw new InvalidArgumentException($scheme . ' is not a valid authentication type'); - } - $scheme = $authMap[$scheme]; - } - - $this->username = $user; - $this->password = $password; - - // Bypass CURL when using basic auth to promote connection reuse - if ($scheme == CURLAUTH_BASIC) { - $this->getCurlOptions()->remove(CURLOPT_HTTPAUTH); - $this->setHeader('Authorization', 'Basic ' . base64_encode($this->username . ':' . $this->password)); - } else { - $this->getCurlOptions() - ->set(CURLOPT_HTTPAUTH, $scheme) - ->set(CURLOPT_USERPWD, $this->username . ':' . $this->password); - } - - return $this; - } - - public function getResource() - { - $resource = $this->getPath(); - if ($query = (string) $this->url->getQuery()) { - $resource .= '?' . $query; - } - - return $resource; - } - - public function getUrl($asObject = false) - { - return $asObject ? clone $this->url : (string) $this->url; - } - - public function getState() - { - return $this->state; - } - - public function setState($state, array $context = array()) - { - $oldState = $this->state; - $this->state = $state; - - switch ($state) { - case self::STATE_NEW: - $this->response = null; - break; - case self::STATE_TRANSFER: - if ($oldState !== $state) { - // Fix Content-Length and Transfer-Encoding collisions - if ($this->hasHeader('Transfer-Encoding') && $this->hasHeader('Content-Length')) { - $this->removeHeader('Transfer-Encoding'); - } - $this->dispatch('request.before_send', array('request' => $this)); - } - break; - case self::STATE_COMPLETE: - if ($oldState !== $state) { - $this->processResponse($context); - $this->responseBody = null; - } - break; - case self::STATE_ERROR: - if (isset($context['exception'])) { - $this->dispatch('request.exception', array( - 'request' => $this, - 'response' => isset($context['response']) ? $context['response'] : $this->response, - 'exception' => isset($context['exception']) ? $context['exception'] : null - )); - } - } - - return $this->state; - } - - public function getCurlOptions() - { - return $this->curlOptions; - } - - public function startResponse(Response $response) - { - $this->state = self::STATE_TRANSFER; - $response->setEffectiveUrl((string) $this->getUrl()); - $this->response = $response; - - return $this; - } - - public function setResponse(Response $response, $queued = false) - { - $response->setEffectiveUrl((string) $this->url); - - if ($queued) { - $ed = $this->getEventDispatcher(); - $ed->addListener('request.before_send', $f = function ($e) use ($response, &$f, $ed) { - $e['request']->setResponse($response); - $ed->removeListener('request.before_send', $f); - }, -9999); - } else { - $this->response = $response; - // If a specific response body is specified, then use it instead of the response's body - if ($this->responseBody && !$this->responseBody->getCustomData('default') && !$response->isRedirect()) { - $this->getResponseBody()->write((string) $this->response->getBody()); - } else { - $this->responseBody = $this->response->getBody(); - } - $this->setState(self::STATE_COMPLETE); - } - - return $this; - } - - public function setResponseBody($body) - { - // Attempt to open a file for writing if a string was passed - if (is_string($body)) { - // @codeCoverageIgnoreStart - if (!($body = fopen($body, 'w+'))) { - throw new InvalidArgumentException('Could not open ' . $body . ' for writing'); - } - // @codeCoverageIgnoreEnd - } - - $this->responseBody = EntityBody::factory($body); - - return $this; - } - - public function getResponseBody() - { - if ($this->responseBody === null) { - $this->responseBody = EntityBody::factory()->setCustomData('default', true); - } - - return $this->responseBody; - } - - /** - * Determine if the response body is repeatable (readable + seekable) - * - * @return bool - * @deprecated Use getResponseBody()->isSeekable() - * @codeCoverageIgnore - */ - public function isResponseBodyRepeatable() - { - Version::warn(__METHOD__ . ' is deprecated. Use $request->getResponseBody()->isRepeatable()'); - return !$this->responseBody ? true : $this->responseBody->isRepeatable(); - } - - public function getCookies() - { - if ($cookie = $this->getHeader('Cookie')) { - $data = ParserRegistry::getInstance()->getParser('cookie')->parseCookie($cookie); - return $data['cookies']; - } - - return array(); - } - - public function getCookie($name) - { - $cookies = $this->getCookies(); - - return isset($cookies[$name]) ? $cookies[$name] : null; - } - - public function addCookie($name, $value) - { - if (!$this->hasHeader('Cookie')) { - $this->setHeader('Cookie', "{$name}={$value}"); - } else { - $this->getHeader('Cookie')->add("{$name}={$value}"); - } - - // Always use semicolons to separate multiple cookie headers - $this->getHeader('Cookie')->setGlue(';'); - - return $this; - } - - public function removeCookie($name) - { - if ($cookie = $this->getHeader('Cookie')) { - foreach ($cookie as $cookieValue) { - if (strpos($cookieValue, $name . '=') === 0) { - $cookie->removeValue($cookieValue); - } - } - } - - return $this; - } - - public function setEventDispatcher(EventDispatcherInterface $eventDispatcher) - { - $this->eventDispatcher = $eventDispatcher; - $this->eventDispatcher->addListener('request.error', array(__CLASS__, 'onRequestError'), -255); - - return $this; - } - - public function getEventDispatcher() - { - if (!$this->eventDispatcher) { - $this->setEventDispatcher(new EventDispatcher()); - } - - return $this->eventDispatcher; - } - - public function dispatch($eventName, array $context = array()) - { - $context['request'] = $this; - - return $this->getEventDispatcher()->dispatch($eventName, new Event($context)); - } - - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->getEventDispatcher()->addSubscriber($subscriber); - - return $this; - } - - /** - * Get an array containing the request and response for event notifications - * - * @return array - */ - protected function getEventArray() - { - return array( - 'request' => $this, - 'response' => $this->response - ); - } - - /** - * Process a received response - * - * @param array $context Contextual information - * @throws RequestException|BadResponseException on unsuccessful responses - */ - protected function processResponse(array $context = array()) - { - if (!$this->response) { - // If no response, then processResponse shouldn't have been called - $e = new RequestException('Error completing request'); - $e->setRequest($this); - throw $e; - } - - $this->state = self::STATE_COMPLETE; - - // A request was sent, but we don't know if we'll send more or if the final response will be successful - $this->dispatch('request.sent', $this->getEventArray() + $context); - - // Some response processors will remove the response or reset the state (example: ExponentialBackoffPlugin) - if ($this->state == RequestInterface::STATE_COMPLETE) { - - // The request completed, so the HTTP transaction is complete - $this->dispatch('request.complete', $this->getEventArray()); - - // If the response is bad, allow listeners to modify it or throw exceptions. You can change the response by - // modifying the Event object in your listeners or calling setResponse() on the request - if ($this->response->isError()) { - $event = new Event($this->getEventArray()); - $this->getEventDispatcher()->dispatch('request.error', $event); - // Allow events of request.error to quietly change the response - if ($event['response'] !== $this->response) { - $this->response = $event['response']; - } - } - - // If a successful response was received, dispatch an event - if ($this->response->isSuccessful()) { - $this->dispatch('request.success', $this->getEventArray()); - } - } - } - - /** - * @deprecated Use Guzzle\Plugin\Cache\DefaultCanCacheStrategy - * @codeCoverageIgnore - */ - public function canCache() - { - Version::warn(__METHOD__ . ' is deprecated. Use Guzzle\Plugin\Cache\DefaultCanCacheStrategy.'); - if (class_exists('Guzzle\Plugin\Cache\DefaultCanCacheStrategy')) { - $canCache = new \Guzzle\Plugin\Cache\DefaultCanCacheStrategy(); - return $canCache->canCacheRequest($this); - } else { - return false; - } - } - - /** - * @deprecated Use the history plugin (not emitting a warning as this is built-into the RedirectPlugin for now) - * @codeCoverageIgnore - */ - public function setIsRedirect($isRedirect) - { - $this->isRedirect = $isRedirect; - - return $this; - } - - /** - * @deprecated Use the history plugin - * @codeCoverageIgnore - */ - public function isRedirect() - { - Version::warn(__METHOD__ . ' is deprecated. Use the HistoryPlugin to track this.'); - return $this->isRedirect; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactory.php deleted file mode 100644 index 598a2f697..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactory.php +++ /dev/null @@ -1,359 +0,0 @@ -methods = array_flip(get_class_methods(__CLASS__)); - } - - public function fromMessage($message) - { - $parsed = ParserRegistry::getInstance()->getParser('message')->parseRequest($message); - - if (!$parsed) { - return false; - } - - $request = $this->fromParts($parsed['method'], $parsed['request_url'], - $parsed['headers'], $parsed['body'], $parsed['protocol'], - $parsed['version']); - - // EntityEnclosingRequest adds an "Expect: 100-Continue" header when using a raw request body for PUT or POST - // requests. This factory method should accurately reflect the message, so here we are removing the Expect - // header if one was not supplied in the message. - if (!isset($parsed['headers']['Expect']) && !isset($parsed['headers']['expect'])) { - $request->removeHeader('Expect'); - } - - return $request; - } - - public function fromParts( - $method, - array $urlParts, - $headers = null, - $body = null, - $protocol = 'HTTP', - $protocolVersion = '1.1' - ) { - return $this->create($method, Url::buildUrl($urlParts), $headers, $body) - ->setProtocolVersion($protocolVersion); - } - - public function create($method, $url, $headers = null, $body = null, array $options = array()) - { - $method = strtoupper($method); - - if ($method == 'GET' || $method == 'HEAD' || $method == 'TRACE' || $method == 'OPTIONS') { - // Handle non-entity-enclosing request methods - $request = new $this->requestClass($method, $url, $headers); - if ($body) { - // The body is where the response body will be stored - $type = gettype($body); - if ($type == 'string' || $type == 'resource' || $type == 'object') { - $request->setResponseBody($body); - } - } - } else { - // Create an entity enclosing request by default - $request = new $this->entityEnclosingRequestClass($method, $url, $headers); - if ($body || $body === '0') { - // Add POST fields and files to an entity enclosing request if an array is used - if (is_array($body) || $body instanceof Collection) { - // Normalize PHP style cURL uploads with a leading '@' symbol - foreach ($body as $key => $value) { - if (is_string($value) && substr($value, 0, 1) == '@') { - $request->addPostFile($key, $value); - unset($body[$key]); - } - } - // Add the fields if they are still present and not all files - $request->addPostFields($body); - } else { - // Add a raw entity body body to the request - $request->setBody($body, (string) $request->getHeader('Content-Type')); - if ((string) $request->getHeader('Transfer-Encoding') == 'chunked') { - $request->removeHeader('Content-Length'); - } - } - } - } - - if ($options) { - $this->applyOptions($request, $options); - } - - return $request; - } - - /** - * Clone a request while changing the method. Emulates the behavior of - * {@see Guzzle\Http\Message\Request::clone}, but can change the HTTP method. - * - * @param RequestInterface $request Request to clone - * @param string $method Method to set - * - * @return RequestInterface - */ - public function cloneRequestWithMethod(RequestInterface $request, $method) - { - // Create the request with the same client if possible - if ($request->getClient()) { - $cloned = $request->getClient()->createRequest($method, $request->getUrl(), $request->getHeaders()); - } else { - $cloned = $this->create($method, $request->getUrl(), $request->getHeaders()); - } - - $cloned->getCurlOptions()->replace($request->getCurlOptions()->toArray()); - $cloned->setEventDispatcher(clone $request->getEventDispatcher()); - // Ensure that that the Content-Length header is not copied if changing to GET or HEAD - if (!($cloned instanceof EntityEnclosingRequestInterface)) { - $cloned->removeHeader('Content-Length'); - } elseif ($request instanceof EntityEnclosingRequestInterface) { - $cloned->setBody($request->getBody()); - } - $cloned->getParams()->replace($request->getParams()->toArray()); - $cloned->dispatch('request.clone', array('request' => $cloned)); - - return $cloned; - } - - public function applyOptions(RequestInterface $request, array $options = array(), $flags = self::OPTIONS_NONE) - { - // Iterate over each key value pair and attempt to apply a config using function visitors - foreach ($options as $key => $value) { - $method = "visit_{$key}"; - if (isset($this->methods[$method])) { - $this->{$method}($request, $value, $flags); - } - } - } - - protected function visit_headers(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('headers value must be an array'); - } - - if ($flags & self::OPTIONS_AS_DEFAULTS) { - // Merge headers in but do not overwrite existing values - foreach ($value as $key => $header) { - if (!$request->hasHeader($key)) { - $request->setHeader($key, $header); - } - } - } else { - $request->addHeaders($value); - } - } - - protected function visit_body(RequestInterface $request, $value, $flags) - { - if ($request instanceof EntityEnclosingRequestInterface) { - $request->setBody($value); - } else { - throw new InvalidArgumentException('Attempting to set a body on a non-entity-enclosing request'); - } - } - - protected function visit_allow_redirects(RequestInterface $request, $value, $flags) - { - if ($value === false) { - $request->getParams()->set(RedirectPlugin::DISABLE, true); - } - } - - protected function visit_auth(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('auth value must be an array'); - } - - $request->setAuth($value[0], isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : 'basic'); - } - - protected function visit_query(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('query value must be an array'); - } - - if ($flags & self::OPTIONS_AS_DEFAULTS) { - // Merge query string values in but do not overwrite existing values - $query = $request->getQuery(); - $query->overwriteWith(array_diff_key($value, $query->toArray())); - } else { - $request->getQuery()->overwriteWith($value); - } - } - - protected function visit_cookies(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('cookies value must be an array'); - } - - foreach ($value as $name => $v) { - $request->addCookie($name, $v); - } - } - - protected function visit_events(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('events value must be an array'); - } - - foreach ($value as $name => $method) { - if (is_array($method)) { - $request->getEventDispatcher()->addListener($name, $method[0], $method[1]); - } else { - $request->getEventDispatcher()->addListener($name, $method); - } - } - } - - protected function visit_plugins(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('plugins value must be an array'); - } - - foreach ($value as $plugin) { - $request->addSubscriber($plugin); - } - } - - protected function visit_exceptions(RequestInterface $request, $value, $flags) - { - if ($value === false || $value === 0) { - $dispatcher = $request->getEventDispatcher(); - foreach ($dispatcher->getListeners('request.error') as $listener) { - if (is_array($listener) && $listener[0] == 'Guzzle\Http\Message\Request' && $listener[1] = 'onRequestError') { - $dispatcher->removeListener('request.error', $listener); - break; - } - } - } - } - - protected function visit_save_to(RequestInterface $request, $value, $flags) - { - $request->setResponseBody($value); - } - - protected function visit_params(RequestInterface $request, $value, $flags) - { - if (!is_array($value)) { - throw new InvalidArgumentException('params value must be an array'); - } - - $request->getParams()->overwriteWith($value); - } - - protected function visit_timeout(RequestInterface $request, $value, $flags) - { - if (defined('CURLOPT_TIMEOUT_MS')) { - $request->getCurlOptions()->set(CURLOPT_TIMEOUT_MS, $value * 1000); - } else { - $request->getCurlOptions()->set(CURLOPT_TIMEOUT, $value); - } - } - - protected function visit_connect_timeout(RequestInterface $request, $value, $flags) - { - if (defined('CURLOPT_CONNECTTIMEOUT_MS')) { - $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT_MS, $value * 1000); - } else { - $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT, $value); - } - } - - protected function visit_debug(RequestInterface $request, $value, $flags) - { - if ($value) { - $request->getCurlOptions()->set(CURLOPT_VERBOSE, true); - } - } - - protected function visit_verify(RequestInterface $request, $value, $flags) - { - $curl = $request->getCurlOptions(); - if ($value === true || is_string($value)) { - $curl[CURLOPT_SSL_VERIFYHOST] = 2; - $curl[CURLOPT_SSL_VERIFYPEER] = true; - if ($value !== true) { - $curl[CURLOPT_CAINFO] = $value; - } - } elseif ($value === false) { - unset($curl[CURLOPT_CAINFO]); - $curl[CURLOPT_SSL_VERIFYHOST] = 0; - $curl[CURLOPT_SSL_VERIFYPEER] = false; - } - } - - protected function visit_proxy(RequestInterface $request, $value, $flags) - { - $request->getCurlOptions()->set(CURLOPT_PROXY, $value, $flags); - } - - protected function visit_cert(RequestInterface $request, $value, $flags) - { - if (is_array($value)) { - $request->getCurlOptions()->set(CURLOPT_SSLCERT, $value[0]); - $request->getCurlOptions()->set(CURLOPT_SSLCERTPASSWD, $value[1]); - } else { - $request->getCurlOptions()->set(CURLOPT_SSLCERT, $value); - } - } - - protected function visit_ssl_key(RequestInterface $request, $value, $flags) - { - if (is_array($value)) { - $request->getCurlOptions()->set(CURLOPT_SSLKEY, $value[0]); - $request->getCurlOptions()->set(CURLOPT_SSLKEYPASSWD, $value[1]); - } else { - $request->getCurlOptions()->set(CURLOPT_SSLKEY, $value); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactoryInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactoryInterface.php deleted file mode 100644 index 6088f10e9..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactoryInterface.php +++ /dev/null @@ -1,105 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', - 208 => 'Already Reported', - 226 => 'IM Used', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Reserved for WebDAV advanced collections expired proposal', - 426 => 'Upgrade required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates (Experimental)', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 510 => 'Not Extended', - 511 => 'Network Authentication Required', - ); - - /** @var EntityBodyInterface The response body */ - protected $body; - - /** @var string The reason phrase of the response (human readable code) */ - protected $reasonPhrase; - - /** @var string The status code of the response */ - protected $statusCode; - - /** @var array Information about the request */ - protected $info = array(); - - /** @var string The effective URL that returned this response */ - protected $effectiveUrl; - - /** @var array Cacheable response codes (see RFC 2616:13.4) */ - protected static $cacheResponseCodes = array(200, 203, 206, 300, 301, 410); - - /** - * Create a new Response based on a raw response message - * - * @param string $message Response message - * - * @return self|bool Returns false on error - */ - public static function fromMessage($message) - { - $data = ParserRegistry::getInstance()->getParser('message')->parseResponse($message); - if (!$data) { - return false; - } - - $response = new static($data['code'], $data['headers'], $data['body']); - $response->setProtocol($data['protocol'], $data['version']) - ->setStatus($data['code'], $data['reason_phrase']); - - // Set the appropriate Content-Length if the one set is inaccurate (e.g. setting to X) - $contentLength = (string) $response->getHeader('Content-Length'); - $actualLength = strlen($data['body']); - if (strlen($data['body']) > 0 && $contentLength != $actualLength) { - $response->setHeader('Content-Length', $actualLength); - } - - return $response; - } - - /** - * Construct the response - * - * @param string $statusCode The response status code (e.g. 200, 404, etc) - * @param ToArrayInterface|array $headers The response headers - * @param string|resource|EntityBodyInterface $body The body of the response - * - * @throws BadResponseException if an invalid response code is given - */ - public function __construct($statusCode, $headers = null, $body = null) - { - parent::__construct(); - $this->setStatus($statusCode); - $this->body = EntityBody::factory($body !== null ? $body : ''); - - if ($headers) { - if (is_array($headers)) { - $this->setHeaders($headers); - } elseif ($headers instanceof ToArrayInterface) { - $this->setHeaders($headers->toArray()); - } else { - throw new BadResponseException('Invalid headers argument received'); - } - } - } - - /** - * @return string - */ - public function __toString() - { - return $this->getMessage(); - } - - public function serialize() - { - return json_encode(array( - 'status' => $this->statusCode, - 'body' => (string) $this->body, - 'headers' => $this->headers->toArray() - )); - } - - public function unserialize($serialize) - { - $data = json_decode($serialize, true); - $this->__construct($data['status'], $data['headers'], $data['body']); - } - - /** - * Get the response entity body - * - * @param bool $asString Set to TRUE to return a string of the body rather than a full body object - * - * @return EntityBodyInterface|string - */ - public function getBody($asString = false) - { - return $asString ? (string) $this->body : $this->body; - } - - /** - * Set the response entity body - * - * @param EntityBodyInterface|string $body Body to set - * - * @return self - */ - public function setBody($body) - { - $this->body = EntityBody::factory($body); - - return $this; - } - - /** - * Set the protocol and protocol version of the response - * - * @param string $protocol Response protocol - * @param string $version Protocol version - * - * @return self - */ - public function setProtocol($protocol, $version) - { - $this->protocol = $protocol; - $this->protocolVersion = $version; - - return $this; - } - - /** - * Get the protocol used for the response (e.g. HTTP) - * - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Get the HTTP protocol version - * - * @return string - */ - public function getProtocolVersion() - { - return $this->protocolVersion; - } - - /** - * Get a cURL transfer information - * - * @param string $key A single statistic to check - * - * @return array|string|null Returns all stats if no key is set, a single stat if a key is set, or null if a key - * is set and not found - * @link http://www.php.net/manual/en/function.curl-getinfo.php - */ - public function getInfo($key = null) - { - if ($key === null) { - return $this->info; - } elseif (array_key_exists($key, $this->info)) { - return $this->info[$key]; - } else { - return null; - } - } - - /** - * Set the transfer information - * - * @param array $info Array of cURL transfer stats - * - * @return self - */ - public function setInfo(array $info) - { - $this->info = $info; - - return $this; - } - - /** - * Set the response status - * - * @param int $statusCode Response status code to set - * @param string $reasonPhrase Response reason phrase - * - * @return self - * @throws BadResponseException when an invalid response code is received - */ - public function setStatus($statusCode, $reasonPhrase = '') - { - $this->statusCode = (int) $statusCode; - - if (!$reasonPhrase && isset(self::$statusTexts[$this->statusCode])) { - $this->reasonPhrase = self::$statusTexts[$this->statusCode]; - } else { - $this->reasonPhrase = $reasonPhrase; - } - - return $this; - } - - /** - * Get the response status code - * - * @return integer - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * Get the entire response as a string - * - * @return string - */ - public function getMessage() - { - $message = $this->getRawHeaders(); - - // Only include the body in the message if the size is < 2MB - $size = $this->body->getSize(); - if ($size < 2097152) { - $message .= (string) $this->body; - } - - return $message; - } - - /** - * Get the the raw message headers as a string - * - * @return string - */ - public function getRawHeaders() - { - $headers = 'HTTP/1.1 ' . $this->statusCode . ' ' . $this->reasonPhrase . "\r\n"; - $lines = $this->getHeaderLines(); - if (!empty($lines)) { - $headers .= implode("\r\n", $lines) . "\r\n"; - } - - return $headers . "\r\n"; - } - - /** - * Get the response reason phrase- a human readable version of the numeric - * status code - * - * @return string - */ - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - /** - * Get the Accept-Ranges HTTP header - * - * @return string Returns what partial content range types this server supports. - */ - public function getAcceptRanges() - { - return (string) $this->getHeader('Accept-Ranges'); - } - - /** - * Calculate the age of the response - * - * @return integer - */ - public function calculateAge() - { - $age = $this->getHeader('Age'); - - if ($age === null && $this->getDate()) { - $age = time() - strtotime($this->getDate()); - } - - return $age === null ? null : (int) (string) $age; - } - - /** - * Get the Age HTTP header - * - * @return integer|null Returns the age the object has been in a proxy cache in seconds. - */ - public function getAge() - { - return (string) $this->getHeader('Age'); - } - - /** - * Get the Allow HTTP header - * - * @return string|null Returns valid actions for a specified resource. To be used for a 405 Method not allowed. - */ - public function getAllow() - { - return (string) $this->getHeader('Allow'); - } - - /** - * Check if an HTTP method is allowed by checking the Allow response header - * - * @param string $method Method to check - * - * @return bool - */ - public function isMethodAllowed($method) - { - $allow = $this->getHeader('Allow'); - if ($allow) { - foreach (explode(',', $allow) as $allowable) { - if (!strcasecmp(trim($allowable), $method)) { - return true; - } - } - } - - return false; - } - - /** - * Get the Cache-Control HTTP header - * - * @return string - */ - public function getCacheControl() - { - return (string) $this->getHeader('Cache-Control'); - } - - /** - * Get the Connection HTTP header - * - * @return string - */ - public function getConnection() - { - return (string) $this->getHeader('Connection'); - } - - /** - * Get the Content-Encoding HTTP header - * - * @return string|null - */ - public function getContentEncoding() - { - return (string) $this->getHeader('Content-Encoding'); - } - - /** - * Get the Content-Language HTTP header - * - * @return string|null Returns the language the content is in. - */ - public function getContentLanguage() - { - return (string) $this->getHeader('Content-Language'); - } - - /** - * Get the Content-Length HTTP header - * - * @return integer Returns the length of the response body in bytes - */ - public function getContentLength() - { - return (int) (string) $this->getHeader('Content-Length'); - } - - /** - * Get the Content-Location HTTP header - * - * @return string|null Returns an alternate location for the returned data (e.g /index.htm) - */ - public function getContentLocation() - { - return (string) $this->getHeader('Content-Location'); - } - - /** - * Get the Content-Disposition HTTP header - * - * @return string|null Returns the Content-Disposition header - */ - public function getContentDisposition() - { - return (string) $this->getHeader('Content-Disposition'); - } - - /** - * Get the Content-MD5 HTTP header - * - * @return string|null Returns a Base64-encoded binary MD5 sum of the content of the response. - */ - public function getContentMd5() - { - return (string) $this->getHeader('Content-MD5'); - } - - /** - * Get the Content-Range HTTP header - * - * @return string Returns where in a full body message this partial message belongs (e.g. bytes 21010-47021/47022). - */ - public function getContentRange() - { - return (string) $this->getHeader('Content-Range'); - } - - /** - * Get the Content-Type HTTP header - * - * @return string Returns the mime type of this content. - */ - public function getContentType() - { - return (string) $this->getHeader('Content-Type'); - } - - /** - * Checks if the Content-Type is of a certain type. This is useful if the - * Content-Type header contains charset information and you need to know if - * the Content-Type matches a particular type. - * - * @param string $type Content type to check against - * - * @return bool - */ - public function isContentType($type) - { - return stripos($this->getHeader('Content-Type'), $type) !== false; - } - - /** - * Get the Date HTTP header - * - * @return string|null Returns the date and time that the message was sent. - */ - public function getDate() - { - return (string) $this->getHeader('Date'); - } - - /** - * Get the ETag HTTP header - * - * @return string|null Returns an identifier for a specific version of a resource, often a Message digest. - */ - public function getEtag() - { - return (string) $this->getHeader('ETag'); - } - - /** - * Get the Expires HTTP header - * - * @return string|null Returns the date/time after which the response is considered stale. - */ - public function getExpires() - { - return (string) $this->getHeader('Expires'); - } - - /** - * Get the Last-Modified HTTP header - * - * @return string|null Returns the last modified date for the requested object, in RFC 2822 format - * (e.g. Tue, 15 Nov 1994 12:45:26 GMT) - */ - public function getLastModified() - { - return (string) $this->getHeader('Last-Modified'); - } - - /** - * Get the Location HTTP header - * - * @return string|null Used in redirection, or when a new resource has been created. - */ - public function getLocation() - { - return (string) $this->getHeader('Location'); - } - - /** - * Get the Pragma HTTP header - * - * @return Header|null Returns the implementation-specific headers that may have various effects anywhere along - * the request-response chain. - */ - public function getPragma() - { - return (string) $this->getHeader('Pragma'); - } - - /** - * Get the Proxy-Authenticate HTTP header - * - * @return string|null Authentication to access the proxy (e.g. Basic) - */ - public function getProxyAuthenticate() - { - return (string) $this->getHeader('Proxy-Authenticate'); - } - - /** - * Get the Retry-After HTTP header - * - * @return int|null If an entity is temporarily unavailable, this instructs the client to try again after a - * specified period of time. - */ - public function getRetryAfter() - { - return (string) $this->getHeader('Retry-After'); - } - - /** - * Get the Server HTTP header - * - * @return string|null A name for the server - */ - public function getServer() - { - return (string) $this->getHeader('Server'); - } - - /** - * Get the Set-Cookie HTTP header - * - * @return string|null An HTTP cookie. - */ - public function getSetCookie() - { - return (string) $this->getHeader('Set-Cookie'); - } - - /** - * Get the Trailer HTTP header - * - * @return string|null The Trailer general field value indicates that the given set of header fields is present in - * the trailer of a message encoded with chunked transfer-coding. - */ - public function getTrailer() - { - return (string) $this->getHeader('Trailer'); - } - - /** - * Get the Transfer-Encoding HTTP header - * - * @return string|null The form of encoding used to safely transfer the entity to the user - */ - public function getTransferEncoding() - { - return (string) $this->getHeader('Transfer-Encoding'); - } - - /** - * Get the Vary HTTP header - * - * @return string|null Tells downstream proxies how to match future request headers to decide whether the cached - * response can be used rather than requesting a fresh one from the origin server. - */ - public function getVary() - { - return (string) $this->getHeader('Vary'); - } - - /** - * Get the Via HTTP header - * - * @return string|null Informs the client of proxies through which the response was sent. - */ - public function getVia() - { - return (string) $this->getHeader('Via'); - } - - /** - * Get the Warning HTTP header - * - * @return string|null A general warning about possible problems with the entity body - */ - public function getWarning() - { - return (string) $this->getHeader('Warning'); - } - - /** - * Get the WWW-Authenticate HTTP header - * - * @return string|null Indicates the authentication scheme that should be used to access the requested entity - */ - public function getWwwAuthenticate() - { - return (string) $this->getHeader('WWW-Authenticate'); - } - - /** - * Checks if HTTP Status code is a Client Error (4xx) - * - * @return bool - */ - public function isClientError() - { - return $this->statusCode >= 400 && $this->statusCode < 500; - } - - /** - * Checks if HTTP Status code is Server OR Client Error (4xx or 5xx) - * - * @return boolean - */ - public function isError() - { - return $this->isClientError() || $this->isServerError(); - } - - /** - * Checks if HTTP Status code is Information (1xx) - * - * @return bool - */ - public function isInformational() - { - return $this->statusCode < 200; - } - - /** - * Checks if HTTP Status code is a Redirect (3xx) - * - * @return bool - */ - public function isRedirect() - { - return $this->statusCode >= 300 && $this->statusCode < 400; - } - - /** - * Checks if HTTP Status code is Server Error (5xx) - * - * @return bool - */ - public function isServerError() - { - return $this->statusCode >= 500 && $this->statusCode < 600; - } - - /** - * Checks if HTTP Status code is Successful (2xx | 304) - * - * @return bool - */ - public function isSuccessful() - { - return ($this->statusCode >= 200 && $this->statusCode < 300) || $this->statusCode == 304; - } - - /** - * Check if the response can be cached based on the response headers - * - * @return bool Returns TRUE if the response can be cached or false if not - */ - public function canCache() - { - // Check if the response is cacheable based on the code - if (!in_array((int) $this->getStatusCode(), self::$cacheResponseCodes)) { - return false; - } - - // Make sure a valid body was returned and can be cached - if ((!$this->getBody()->isReadable() || !$this->getBody()->isSeekable()) - && ($this->getContentLength() > 0 || $this->getTransferEncoding() == 'chunked')) { - return false; - } - - // Never cache no-store resources (this is a private cache, so private - // can be cached) - if ($this->getHeader('Cache-Control') && $this->getHeader('Cache-Control')->hasDirective('no-store')) { - return false; - } - - return $this->isFresh() || $this->getFreshness() === null || $this->canValidate(); - } - - /** - * Gets the number of seconds from the current time in which this response is still considered fresh - * - * @return int|null Returns the number of seconds - */ - public function getMaxAge() - { - if ($header = $this->getHeader('Cache-Control')) { - // s-max-age, then max-age, then Expires - if ($age = $header->getDirective('s-maxage')) { - return $age; - } - if ($age = $header->getDirective('max-age')) { - return $age; - } - } - - if ($this->getHeader('Expires')) { - return strtotime($this->getExpires()) - time(); - } - - return null; - } - - /** - * Check if the response is considered fresh. - * - * A response is considered fresh when its age is less than or equal to the freshness lifetime (maximum age) of the - * response. - * - * @return bool|null - */ - public function isFresh() - { - $fresh = $this->getFreshness(); - - return $fresh === null ? null : $fresh >= 0; - } - - /** - * Check if the response can be validated against the origin server using a conditional GET request. - * - * @return bool - */ - public function canValidate() - { - return $this->getEtag() || $this->getLastModified(); - } - - /** - * Get the freshness of the response by returning the difference of the maximum lifetime of the response and the - * age of the response (max-age - age). - * - * Freshness values less than 0 mean that the response is no longer fresh and is ABS(freshness) seconds expired. - * Freshness values of greater than zero is the number of seconds until the response is no longer fresh. A NULL - * result means that no freshness information is available. - * - * @return int - */ - public function getFreshness() - { - $maxAge = $this->getMaxAge(); - $age = $this->calculateAge(); - - return $maxAge && $age ? ($maxAge - $age) : null; - } - - /** - * Parse the JSON response body and return an array - * - * @return array|string|int|bool|float - * @throws RuntimeException if the response body is not in JSON format - */ - public function json() - { - $data = json_decode((string) $this->body, true); - if (JSON_ERROR_NONE !== json_last_error()) { - throw new RuntimeException('Unable to parse response body into JSON: ' . json_last_error()); - } - - return $data === null ? array() : $data; - } - - /** - * Parse the XML response body and return a \SimpleXMLElement. - * - * In order to prevent XXE attacks, this method disables loading external - * entities. If you rely on external entities, then you must parse the - * XML response manually by accessing the response body directly. - * - * @return \SimpleXMLElement - * @throws RuntimeException if the response body is not in XML format - * @link http://websec.io/2012/08/27/Preventing-XXE-in-PHP.html - */ - public function xml() - { - $errorMessage = null; - $internalErrors = libxml_use_internal_errors(true); - $disableEntities = libxml_disable_entity_loader(true); - libxml_clear_errors(); - - try { - $xml = new \SimpleXMLElement((string) $this->body ?: '', LIBXML_NONET); - if ($error = libxml_get_last_error()) { - $errorMessage = $error->message; - } - } catch (\Exception $e) { - $errorMessage = $e->getMessage(); - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - libxml_disable_entity_loader($disableEntities); - - if ($errorMessage) { - throw new RuntimeException('Unable to parse response body into XML: ' . $errorMessage); - } - - return $xml; - } - - /** - * Get the redirect count of this response - * - * @return int - */ - public function getRedirectCount() - { - return (int) $this->params->get(RedirectPlugin::REDIRECT_COUNT); - } - - /** - * Set the effective URL that resulted in this response (e.g. the last redirect URL) - * - * @param string $url The effective URL - * - * @return self - */ - public function setEffectiveUrl($url) - { - $this->effectiveUrl = $url; - - return $this; - } - - /** - * Get the effective URL that resulted in this response (e.g. the last redirect URL) - * - * @return string - */ - public function getEffectiveUrl() - { - return $this->effectiveUrl; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function getPreviousResponse() - { - Version::warn(__METHOD__ . ' is deprecated. Use the HistoryPlugin.'); - return null; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function setRequest($request) - { - Version::warn(__METHOD__ . ' is deprecated'); - return $this; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function getRequest() - { - Version::warn(__METHOD__ . ' is deprecated'); - return null; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Mimetypes.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Mimetypes.php deleted file mode 100644 index d71586a05..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Mimetypes.php +++ /dev/null @@ -1,962 +0,0 @@ - 'text/vnd.in3d.3dml', - '3g2' => 'video/3gpp2', - '3gp' => 'video/3gpp', - '7z' => 'application/x-7z-compressed', - 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-aac', - 'aam' => 'application/x-authorware-map', - 'aas' => 'application/x-authorware-seg', - 'abw' => 'application/x-abiword', - 'ac' => 'application/pkix-attr-cert', - 'acc' => 'application/vnd.americandynamics.acc', - 'ace' => 'application/x-ace-compressed', - 'acu' => 'application/vnd.acucobol', - 'acutc' => 'application/vnd.acucorp', - 'adp' => 'audio/adpcm', - 'aep' => 'application/vnd.audiograph', - 'afm' => 'application/x-font-type1', - 'afp' => 'application/vnd.ibm.modcap', - 'ahead' => 'application/vnd.ahead.space', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'air' => 'application/vnd.adobe.air-application-installer-package+zip', - 'ait' => 'application/vnd.dvb.ait', - 'ami' => 'application/vnd.amiga.ami', - 'apk' => 'application/vnd.android.package-archive', - 'application' => 'application/x-ms-application', - 'apr' => 'application/vnd.lotus-approach', - 'asa' => 'text/plain', - 'asax' => 'application/octet-stream', - 'asc' => 'application/pgp-signature', - 'ascx' => 'text/plain', - 'asf' => 'video/x-ms-asf', - 'ashx' => 'text/plain', - 'asm' => 'text/x-asm', - 'asmx' => 'text/plain', - 'aso' => 'application/vnd.accpac.simply.aso', - 'asp' => 'text/plain', - 'aspx' => 'text/plain', - 'asx' => 'video/x-ms-asf', - 'atc' => 'application/vnd.acucorp', - 'atom' => 'application/atom+xml', - 'atomcat' => 'application/atomcat+xml', - 'atomsvc' => 'application/atomsvc+xml', - 'atx' => 'application/vnd.antix.game-component', - 'au' => 'audio/basic', - 'avi' => 'video/x-msvideo', - 'aw' => 'application/applixware', - 'axd' => 'text/plain', - 'azf' => 'application/vnd.airzip.filesecure.azf', - 'azs' => 'application/vnd.airzip.filesecure.azs', - 'azw' => 'application/vnd.amazon.ebook', - 'bat' => 'application/x-msdownload', - 'bcpio' => 'application/x-bcpio', - 'bdf' => 'application/x-font-bdf', - 'bdm' => 'application/vnd.syncml.dm+wbxml', - 'bed' => 'application/vnd.realvnc.bed', - 'bh2' => 'application/vnd.fujitsu.oasysprs', - 'bin' => 'application/octet-stream', - 'bmi' => 'application/vnd.bmi', - 'bmp' => 'image/bmp', - 'book' => 'application/vnd.framemaker', - 'box' => 'application/vnd.previewsystems.box', - 'boz' => 'application/x-bzip2', - 'bpk' => 'application/octet-stream', - 'btif' => 'image/prs.btif', - 'bz' => 'application/x-bzip', - 'bz2' => 'application/x-bzip2', - 'c' => 'text/x-c', - 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', - 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', - 'c4d' => 'application/vnd.clonk.c4group', - 'c4f' => 'application/vnd.clonk.c4group', - 'c4g' => 'application/vnd.clonk.c4group', - 'c4p' => 'application/vnd.clonk.c4group', - 'c4u' => 'application/vnd.clonk.c4group', - 'cab' => 'application/vnd.ms-cab-compressed', - 'car' => 'application/vnd.curl.car', - 'cat' => 'application/vnd.ms-pki.seccat', - 'cc' => 'text/x-c', - 'cct' => 'application/x-director', - 'ccxml' => 'application/ccxml+xml', - 'cdbcmsg' => 'application/vnd.contact.cmsg', - 'cdf' => 'application/x-netcdf', - 'cdkey' => 'application/vnd.mediastation.cdkey', - 'cdmia' => 'application/cdmi-capability', - 'cdmic' => 'application/cdmi-container', - 'cdmid' => 'application/cdmi-domain', - 'cdmio' => 'application/cdmi-object', - 'cdmiq' => 'application/cdmi-queue', - 'cdx' => 'chemical/x-cdx', - 'cdxml' => 'application/vnd.chemdraw+xml', - 'cdy' => 'application/vnd.cinderella', - 'cer' => 'application/pkix-cert', - 'cfc' => 'application/x-coldfusion', - 'cfm' => 'application/x-coldfusion', - 'cgm' => 'image/cgm', - 'chat' => 'application/x-chat', - 'chm' => 'application/vnd.ms-htmlhelp', - 'chrt' => 'application/vnd.kde.kchart', - 'cif' => 'chemical/x-cif', - 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', - 'cil' => 'application/vnd.ms-artgalry', - 'cla' => 'application/vnd.claymore', - 'class' => 'application/java-vm', - 'clkk' => 'application/vnd.crick.clicker.keyboard', - 'clkp' => 'application/vnd.crick.clicker.palette', - 'clkt' => 'application/vnd.crick.clicker.template', - 'clkw' => 'application/vnd.crick.clicker.wordbank', - 'clkx' => 'application/vnd.crick.clicker', - 'clp' => 'application/x-msclip', - 'cmc' => 'application/vnd.cosmocaller', - 'cmdf' => 'chemical/x-cmdf', - 'cml' => 'chemical/x-cml', - 'cmp' => 'application/vnd.yellowriver-custom-menu', - 'cmx' => 'image/x-cmx', - 'cod' => 'application/vnd.rim.cod', - 'com' => 'application/x-msdownload', - 'conf' => 'text/plain', - 'cpio' => 'application/x-cpio', - 'cpp' => 'text/x-c', - 'cpt' => 'application/mac-compactpro', - 'crd' => 'application/x-mscardfile', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'cryptonote' => 'application/vnd.rig.cryptonote', - 'cs' => 'text/plain', - 'csh' => 'application/x-csh', - 'csml' => 'chemical/x-csml', - 'csp' => 'application/vnd.commonspace', - 'css' => 'text/css', - 'cst' => 'application/x-director', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'curl' => 'text/vnd.curl', - 'cww' => 'application/prs.cww', - 'cxt' => 'application/x-director', - 'cxx' => 'text/x-c', - 'dae' => 'model/vnd.collada+xml', - 'daf' => 'application/vnd.mobius.daf', - 'dataless' => 'application/vnd.fdsn.seed', - 'davmount' => 'application/davmount+xml', - 'dcr' => 'application/x-director', - 'dcurl' => 'text/vnd.curl.dcurl', - 'dd2' => 'application/vnd.oma.dd2+xml', - 'ddd' => 'application/vnd.fujixerox.ddd', - 'deb' => 'application/x-debian-package', - 'def' => 'text/plain', - 'deploy' => 'application/octet-stream', - 'der' => 'application/x-x509-ca-cert', - 'dfac' => 'application/vnd.dreamfactory', - 'dic' => 'text/x-c', - 'dir' => 'application/x-director', - 'dis' => 'application/vnd.mobius.dis', - 'dist' => 'application/octet-stream', - 'distz' => 'application/octet-stream', - 'djv' => 'image/vnd.djvu', - 'djvu' => 'image/vnd.djvu', - 'dll' => 'application/x-msdownload', - 'dmg' => 'application/octet-stream', - 'dms' => 'application/octet-stream', - 'dna' => 'application/vnd.dna', - 'doc' => 'application/msword', - 'docm' => 'application/vnd.ms-word.document.macroenabled.12', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot' => 'application/msword', - 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dp' => 'application/vnd.osgi.dp', - 'dpg' => 'application/vnd.dpgraph', - 'dra' => 'audio/vnd.dra', - 'dsc' => 'text/prs.lines.tag', - 'dssc' => 'application/dssc+der', - 'dtb' => 'application/x-dtbook+xml', - 'dtd' => 'application/xml-dtd', - 'dts' => 'audio/vnd.dts', - 'dtshd' => 'audio/vnd.dts.hd', - 'dump' => 'application/octet-stream', - 'dvi' => 'application/x-dvi', - 'dwf' => 'model/vnd.dwf', - 'dwg' => 'image/vnd.dwg', - 'dxf' => 'image/vnd.dxf', - 'dxp' => 'application/vnd.spotfire.dxp', - 'dxr' => 'application/x-director', - 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', - 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', - 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', - 'ecma' => 'application/ecmascript', - 'edm' => 'application/vnd.novadigm.edm', - 'edx' => 'application/vnd.novadigm.edx', - 'efif' => 'application/vnd.picsel', - 'ei6' => 'application/vnd.pg.osasli', - 'elc' => 'application/octet-stream', - 'eml' => 'message/rfc822', - 'emma' => 'application/emma+xml', - 'eol' => 'audio/vnd.digital-winds', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'es3' => 'application/vnd.eszigno3+xml', - 'esf' => 'application/vnd.epson.esf', - 'et3' => 'application/vnd.eszigno3+xml', - 'etx' => 'text/x-setext', - 'exe' => 'application/x-msdownload', - 'exi' => 'application/exi', - 'ext' => 'application/vnd.novadigm.ext', - 'ez' => 'application/andrew-inset', - 'ez2' => 'application/vnd.ezpix-album', - 'ez3' => 'application/vnd.ezpix-package', - 'f' => 'text/x-fortran', - 'f4v' => 'video/x-f4v', - 'f77' => 'text/x-fortran', - 'f90' => 'text/x-fortran', - 'fbs' => 'image/vnd.fastbidsheet', - 'fcs' => 'application/vnd.isac.fcs', - 'fdf' => 'application/vnd.fdf', - 'fe_launch' => 'application/vnd.denovo.fcselayout-link', - 'fg5' => 'application/vnd.fujitsu.oasysgp', - 'fgd' => 'application/x-director', - 'fh' => 'image/x-freehand', - 'fh4' => 'image/x-freehand', - 'fh5' => 'image/x-freehand', - 'fh7' => 'image/x-freehand', - 'fhc' => 'image/x-freehand', - 'fig' => 'application/x-xfig', - 'fli' => 'video/x-fli', - 'flo' => 'application/vnd.micrografx.flo', - 'flv' => 'video/x-flv', - 'flw' => 'application/vnd.kde.kivio', - 'flx' => 'text/vnd.fmi.flexstor', - 'fly' => 'text/vnd.fly', - 'fm' => 'application/vnd.framemaker', - 'fnc' => 'application/vnd.frogans.fnc', - 'for' => 'text/x-fortran', - 'fpx' => 'image/vnd.fpx', - 'frame' => 'application/vnd.framemaker', - 'fsc' => 'application/vnd.fsc.weblaunch', - 'fst' => 'image/vnd.fst', - 'ftc' => 'application/vnd.fluxtime.clip', - 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', - 'fvt' => 'video/vnd.fvt', - 'fxp' => 'application/vnd.adobe.fxp', - 'fxpl' => 'application/vnd.adobe.fxp', - 'fzs' => 'application/vnd.fuzzysheet', - 'g2w' => 'application/vnd.geoplan', - 'g3' => 'image/g3fax', - 'g3w' => 'application/vnd.geospace', - 'gac' => 'application/vnd.groove-account', - 'gdl' => 'model/vnd.gdl', - 'geo' => 'application/vnd.dynageo', - 'gex' => 'application/vnd.geometry-explorer', - 'ggb' => 'application/vnd.geogebra.file', - 'ggt' => 'application/vnd.geogebra.tool', - 'ghf' => 'application/vnd.groove-help', - 'gif' => 'image/gif', - 'gim' => 'application/vnd.groove-identity-message', - 'gmx' => 'application/vnd.gmx', - 'gnumeric' => 'application/x-gnumeric', - 'gph' => 'application/vnd.flographit', - 'gqf' => 'application/vnd.grafeq', - 'gqs' => 'application/vnd.grafeq', - 'gram' => 'application/srgs', - 'gre' => 'application/vnd.geometry-explorer', - 'grv' => 'application/vnd.groove-injector', - 'grxml' => 'application/srgs+xml', - 'gsf' => 'application/x-font-ghostscript', - 'gtar' => 'application/x-gtar', - 'gtm' => 'application/vnd.groove-tool-message', - 'gtw' => 'model/vnd.gtw', - 'gv' => 'text/vnd.graphviz', - 'gxt' => 'application/vnd.geonext', - 'h' => 'text/x-c', - 'h261' => 'video/h261', - 'h263' => 'video/h263', - 'h264' => 'video/h264', - 'hal' => 'application/vnd.hal+xml', - 'hbci' => 'application/vnd.hbci', - 'hdf' => 'application/x-hdf', - 'hh' => 'text/x-c', - 'hlp' => 'application/winhlp', - 'hpgl' => 'application/vnd.hp-hpgl', - 'hpid' => 'application/vnd.hp-hpid', - 'hps' => 'application/vnd.hp-hps', - 'hqx' => 'application/mac-binhex40', - 'hta' => 'application/octet-stream', - 'htc' => 'text/html', - 'htke' => 'application/vnd.kenameaapp', - 'htm' => 'text/html', - 'html' => 'text/html', - 'hvd' => 'application/vnd.yamaha.hv-dic', - 'hvp' => 'application/vnd.yamaha.hv-voice', - 'hvs' => 'application/vnd.yamaha.hv-script', - 'i2g' => 'application/vnd.intergeo', - 'icc' => 'application/vnd.iccprofile', - 'ice' => 'x-conference/x-cooltalk', - 'icm' => 'application/vnd.iccprofile', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ief' => 'image/ief', - 'ifb' => 'text/calendar', - 'ifm' => 'application/vnd.shana.informed.formdata', - 'iges' => 'model/iges', - 'igl' => 'application/vnd.igloader', - 'igm' => 'application/vnd.insors.igm', - 'igs' => 'model/iges', - 'igx' => 'application/vnd.micrografx.igx', - 'iif' => 'application/vnd.shana.informed.interchange', - 'imp' => 'application/vnd.accpac.simply.imp', - 'ims' => 'application/vnd.ms-ims', - 'in' => 'text/plain', - 'ini' => 'text/plain', - 'ipfix' => 'application/ipfix', - 'ipk' => 'application/vnd.shana.informed.package', - 'irm' => 'application/vnd.ibm.rights-management', - 'irp' => 'application/vnd.irepository.package+xml', - 'iso' => 'application/octet-stream', - 'itp' => 'application/vnd.shana.informed.formtemplate', - 'ivp' => 'application/vnd.immervision-ivp', - 'ivu' => 'application/vnd.immervision-ivu', - 'jad' => 'text/vnd.sun.j2me.app-descriptor', - 'jam' => 'application/vnd.jam', - 'jar' => 'application/java-archive', - 'java' => 'text/x-java-source', - 'jisp' => 'application/vnd.jisp', - 'jlt' => 'application/vnd.hp-jlyt', - 'jnlp' => 'application/x-java-jnlp-file', - 'joda' => 'application/vnd.joost.joda-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'jpgm' => 'video/jpm', - 'jpgv' => 'video/jpeg', - 'jpm' => 'video/jpm', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'kar' => 'audio/midi', - 'karbon' => 'application/vnd.kde.karbon', - 'kfo' => 'application/vnd.kde.kformula', - 'kia' => 'application/vnd.kidspiration', - 'kml' => 'application/vnd.google-earth.kml+xml', - 'kmz' => 'application/vnd.google-earth.kmz', - 'kne' => 'application/vnd.kinar', - 'knp' => 'application/vnd.kinar', - 'kon' => 'application/vnd.kde.kontour', - 'kpr' => 'application/vnd.kde.kpresenter', - 'kpt' => 'application/vnd.kde.kpresenter', - 'ksp' => 'application/vnd.kde.kspread', - 'ktr' => 'application/vnd.kahootz', - 'ktx' => 'image/ktx', - 'ktz' => 'application/vnd.kahootz', - 'kwd' => 'application/vnd.kde.kword', - 'kwt' => 'application/vnd.kde.kword', - 'lasxml' => 'application/vnd.las.las+xml', - 'latex' => 'application/x-latex', - 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', - 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', - 'les' => 'application/vnd.hhe.lesson-player', - 'lha' => 'application/octet-stream', - 'link66' => 'application/vnd.route66.link66+xml', - 'list' => 'text/plain', - 'list3820' => 'application/vnd.ibm.modcap', - 'listafp' => 'application/vnd.ibm.modcap', - 'log' => 'text/plain', - 'lostxml' => 'application/lost+xml', - 'lrf' => 'application/octet-stream', - 'lrm' => 'application/vnd.ms-lrm', - 'ltf' => 'application/vnd.frogans.ltf', - 'lvp' => 'audio/vnd.lucent.voice', - 'lwp' => 'application/vnd.lotus-wordpro', - 'lzh' => 'application/octet-stream', - 'm13' => 'application/x-msmediaview', - 'm14' => 'application/x-msmediaview', - 'm1v' => 'video/mpeg', - 'm21' => 'application/mp21', - 'm2a' => 'audio/mpeg', - 'm2v' => 'video/mpeg', - 'm3a' => 'audio/mpeg', - 'm3u' => 'audio/x-mpegurl', - 'm3u8' => 'application/vnd.apple.mpegurl', - 'm4a' => 'audio/mp4', - 'm4u' => 'video/vnd.mpegurl', - 'm4v' => 'video/mp4', - 'ma' => 'application/mathematica', - 'mads' => 'application/mads+xml', - 'mag' => 'application/vnd.ecowin.chart', - 'maker' => 'application/vnd.framemaker', - 'man' => 'text/troff', - 'mathml' => 'application/mathml+xml', - 'mb' => 'application/mathematica', - 'mbk' => 'application/vnd.mobius.mbk', - 'mbox' => 'application/mbox', - 'mc1' => 'application/vnd.medcalcdata', - 'mcd' => 'application/vnd.mcd', - 'mcurl' => 'text/vnd.curl.mcurl', - 'mdb' => 'application/x-msaccess', - 'mdi' => 'image/vnd.ms-modi', - 'me' => 'text/troff', - 'mesh' => 'model/mesh', - 'meta4' => 'application/metalink4+xml', - 'mets' => 'application/mets+xml', - 'mfm' => 'application/vnd.mfmp', - 'mgp' => 'application/vnd.osgeo.mapguide.package', - 'mgz' => 'application/vnd.proteus.magazine', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mif' => 'application/vnd.mif', - 'mime' => 'message/rfc822', - 'mj2' => 'video/mj2', - 'mjp2' => 'video/mj2', - 'mlp' => 'application/vnd.dolby.mlp', - 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', - 'mmf' => 'application/vnd.smaf', - 'mmr' => 'image/vnd.fujixerox.edmics-mmr', - 'mny' => 'application/x-msmoney', - 'mobi' => 'application/x-mobipocket-ebook', - 'mods' => 'application/mods+xml', - 'mov' => 'video/quicktime', - 'movie' => 'video/x-sgi-movie', - 'mp2' => 'audio/mpeg', - 'mp21' => 'application/mp21', - 'mp2a' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4s' => 'application/mp4', - 'mp4v' => 'video/mp4', - 'mpc' => 'application/vnd.mophun.certificate', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'mpga' => 'audio/mpeg', - 'mpkg' => 'application/vnd.apple.installer+xml', - 'mpm' => 'application/vnd.blueice.multipass', - 'mpn' => 'application/vnd.mophun.application', - 'mpp' => 'application/vnd.ms-project', - 'mpt' => 'application/vnd.ms-project', - 'mpy' => 'application/vnd.ibm.minipay', - 'mqy' => 'application/vnd.mobius.mqy', - 'mrc' => 'application/marc', - 'mrcx' => 'application/marcxml+xml', - 'ms' => 'text/troff', - 'mscml' => 'application/mediaservercontrol+xml', - 'mseed' => 'application/vnd.fdsn.mseed', - 'mseq' => 'application/vnd.mseq', - 'msf' => 'application/vnd.epson.msf', - 'msh' => 'model/mesh', - 'msi' => 'application/x-msdownload', - 'msl' => 'application/vnd.mobius.msl', - 'msty' => 'application/vnd.muvee.style', - 'mts' => 'model/vnd.mts', - 'mus' => 'application/vnd.musician', - 'musicxml' => 'application/vnd.recordare.musicxml+xml', - 'mvb' => 'application/x-msmediaview', - 'mwf' => 'application/vnd.mfer', - 'mxf' => 'application/mxf', - 'mxl' => 'application/vnd.recordare.musicxml', - 'mxml' => 'application/xv+xml', - 'mxs' => 'application/vnd.triscape.mxs', - 'mxu' => 'video/vnd.mpegurl', - 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', - 'n3' => 'text/n3', - 'nb' => 'application/mathematica', - 'nbp' => 'application/vnd.wolfram.player', - 'nc' => 'application/x-netcdf', - 'ncx' => 'application/x-dtbncx+xml', - 'ngdat' => 'application/vnd.nokia.n-gage.data', - 'nlu' => 'application/vnd.neurolanguage.nlu', - 'nml' => 'application/vnd.enliven', - 'nnd' => 'application/vnd.noblenet-directory', - 'nns' => 'application/vnd.noblenet-sealer', - 'nnw' => 'application/vnd.noblenet-web', - 'npx' => 'image/vnd.net-fpx', - 'nsf' => 'application/vnd.lotus-notes', - 'oa2' => 'application/vnd.fujitsu.oasys2', - 'oa3' => 'application/vnd.fujitsu.oasys3', - 'oas' => 'application/vnd.fujitsu.oasys', - 'obd' => 'application/x-msbinder', - 'oda' => 'application/oda', - 'odb' => 'application/vnd.oasis.opendocument.database', - 'odc' => 'application/vnd.oasis.opendocument.chart', - 'odf' => 'application/vnd.oasis.opendocument.formula', - 'odft' => 'application/vnd.oasis.opendocument.formula-template', - 'odg' => 'application/vnd.oasis.opendocument.graphics', - 'odi' => 'application/vnd.oasis.opendocument.image', - 'odm' => 'application/vnd.oasis.opendocument.text-master', - 'odp' => 'application/vnd.oasis.opendocument.presentation', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'onepkg' => 'application/onenote', - 'onetmp' => 'application/onenote', - 'onetoc' => 'application/onenote', - 'onetoc2' => 'application/onenote', - 'opf' => 'application/oebps-package+xml', - 'oprc' => 'application/vnd.palm', - 'org' => 'application/vnd.lotus-organizer', - 'osf' => 'application/vnd.yamaha.openscoreformat', - 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', - 'otc' => 'application/vnd.oasis.opendocument.chart-template', - 'otf' => 'application/x-font-otf', - 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - 'oth' => 'application/vnd.oasis.opendocument.text-web', - 'oti' => 'application/vnd.oasis.opendocument.image-template', - 'otp' => 'application/vnd.oasis.opendocument.presentation-template', - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', - 'ott' => 'application/vnd.oasis.opendocument.text-template', - 'oxt' => 'application/vnd.openofficeorg.extension', - 'p' => 'text/x-pascal', - 'p10' => 'application/pkcs10', - 'p12' => 'application/x-pkcs12', - 'p7b' => 'application/x-pkcs7-certificates', - 'p7c' => 'application/pkcs7-mime', - 'p7m' => 'application/pkcs7-mime', - 'p7r' => 'application/x-pkcs7-certreqresp', - 'p7s' => 'application/pkcs7-signature', - 'p8' => 'application/pkcs8', - 'pas' => 'text/x-pascal', - 'paw' => 'application/vnd.pawaafile', - 'pbd' => 'application/vnd.powerbuilder6', - 'pbm' => 'image/x-portable-bitmap', - 'pcf' => 'application/x-font-pcf', - 'pcl' => 'application/vnd.hp-pcl', - 'pclxl' => 'application/vnd.hp-pclxl', - 'pct' => 'image/x-pict', - 'pcurl' => 'application/vnd.curl.pcurl', - 'pcx' => 'image/x-pcx', - 'pdb' => 'application/vnd.palm', - 'pdf' => 'application/pdf', - 'pfa' => 'application/x-font-type1', - 'pfb' => 'application/x-font-type1', - 'pfm' => 'application/x-font-type1', - 'pfr' => 'application/font-tdpfr', - 'pfx' => 'application/x-pkcs12', - 'pgm' => 'image/x-portable-graymap', - 'pgn' => 'application/x-chess-pgn', - 'pgp' => 'application/pgp-encrypted', - 'php' => 'text/x-php', - 'phps' => 'application/x-httpd-phps', - 'pic' => 'image/x-pict', - 'pkg' => 'application/octet-stream', - 'pki' => 'application/pkixcmp', - 'pkipath' => 'application/pkix-pkipath', - 'plb' => 'application/vnd.3gpp.pic-bw-large', - 'plc' => 'application/vnd.mobius.plc', - 'plf' => 'application/vnd.pocketlearn', - 'pls' => 'application/pls+xml', - 'pml' => 'application/vnd.ctc-posml', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'portpkg' => 'application/vnd.macports.portpkg', - 'pot' => 'application/vnd.ms-powerpoint', - 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', - 'ppd' => 'application/vnd.cups-ppd', - 'ppm' => 'image/x-portable-pixmap', - 'pps' => 'application/vnd.ms-powerpoint', - 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'pqa' => 'application/vnd.palm', - 'prc' => 'application/x-mobipocket-ebook', - 'pre' => 'application/vnd.lotus-freelance', - 'prf' => 'application/pics-rules', - 'ps' => 'application/postscript', - 'psb' => 'application/vnd.3gpp.pic-bw-small', - 'psd' => 'image/vnd.adobe.photoshop', - 'psf' => 'application/x-font-linux-psf', - 'pskcxml' => 'application/pskc+xml', - 'ptid' => 'application/vnd.pvi.ptid1', - 'pub' => 'application/x-mspublisher', - 'pvb' => 'application/vnd.3gpp.pic-bw-var', - 'pwn' => 'application/vnd.3m.post-it-notes', - 'pya' => 'audio/vnd.ms-playready.media.pya', - 'pyv' => 'video/vnd.ms-playready.media.pyv', - 'qam' => 'application/vnd.epson.quickanime', - 'qbo' => 'application/vnd.intu.qbo', - 'qfx' => 'application/vnd.intu.qfx', - 'qps' => 'application/vnd.publishare-delta-tree', - 'qt' => 'video/quicktime', - 'qwd' => 'application/vnd.quark.quarkxpress', - 'qwt' => 'application/vnd.quark.quarkxpress', - 'qxb' => 'application/vnd.quark.quarkxpress', - 'qxd' => 'application/vnd.quark.quarkxpress', - 'qxl' => 'application/vnd.quark.quarkxpress', - 'qxt' => 'application/vnd.quark.quarkxpress', - 'ra' => 'audio/x-pn-realaudio', - 'ram' => 'audio/x-pn-realaudio', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rb' => 'text/plain', - 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', - 'rdf' => 'application/rdf+xml', - 'rdz' => 'application/vnd.data-vision.rdz', - 'rep' => 'application/vnd.businessobjects', - 'res' => 'application/x-dtbresource+xml', - 'resx' => 'text/xml', - 'rgb' => 'image/x-rgb', - 'rif' => 'application/reginfo+xml', - 'rip' => 'audio/vnd.rip', - 'rl' => 'application/resource-lists+xml', - 'rlc' => 'image/vnd.fujixerox.edmics-rlc', - 'rld' => 'application/resource-lists-diff+xml', - 'rm' => 'application/vnd.rn-realmedia', - 'rmi' => 'audio/midi', - 'rmp' => 'audio/x-pn-realaudio-plugin', - 'rms' => 'application/vnd.jcp.javame.midlet-rms', - 'rnc' => 'application/relax-ng-compact-syntax', - 'roff' => 'text/troff', - 'rp9' => 'application/vnd.cloanto.rp9', - 'rpss' => 'application/vnd.nokia.radio-presets', - 'rpst' => 'application/vnd.nokia.radio-preset', - 'rq' => 'application/sparql-query', - 'rs' => 'application/rls-services+xml', - 'rsd' => 'application/rsd+xml', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'rtx' => 'text/richtext', - 's' => 'text/x-asm', - 'saf' => 'application/vnd.yamaha.smaf-audio', - 'sbml' => 'application/sbml+xml', - 'sc' => 'application/vnd.ibm.secure-container', - 'scd' => 'application/x-msschedule', - 'scm' => 'application/vnd.lotus-screencam', - 'scq' => 'application/scvp-cv-request', - 'scs' => 'application/scvp-cv-response', - 'scurl' => 'text/vnd.curl.scurl', - 'sda' => 'application/vnd.stardivision.draw', - 'sdc' => 'application/vnd.stardivision.calc', - 'sdd' => 'application/vnd.stardivision.impress', - 'sdkd' => 'application/vnd.solent.sdkm+xml', - 'sdkm' => 'application/vnd.solent.sdkm+xml', - 'sdp' => 'application/sdp', - 'sdw' => 'application/vnd.stardivision.writer', - 'see' => 'application/vnd.seemail', - 'seed' => 'application/vnd.fdsn.seed', - 'sema' => 'application/vnd.sema', - 'semd' => 'application/vnd.semd', - 'semf' => 'application/vnd.semf', - 'ser' => 'application/java-serialized-object', - 'setpay' => 'application/set-payment-initiation', - 'setreg' => 'application/set-registration-initiation', - 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', - 'sfs' => 'application/vnd.spotfire.sfs', - 'sgl' => 'application/vnd.stardivision.writer-global', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'sh' => 'application/x-sh', - 'shar' => 'application/x-shar', - 'shf' => 'application/shf+xml', - 'sig' => 'application/pgp-signature', - 'silo' => 'model/mesh', - 'sis' => 'application/vnd.symbian.install', - 'sisx' => 'application/vnd.symbian.install', - 'sit' => 'application/x-stuffit', - 'sitx' => 'application/x-stuffitx', - 'skd' => 'application/vnd.koan', - 'skm' => 'application/vnd.koan', - 'skp' => 'application/vnd.koan', - 'skt' => 'application/vnd.koan', - 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'slt' => 'application/vnd.epson.salt', - 'sm' => 'application/vnd.stepmania.stepchart', - 'smf' => 'application/vnd.stardivision.math', - 'smi' => 'application/smil+xml', - 'smil' => 'application/smil+xml', - 'snd' => 'audio/basic', - 'snf' => 'application/x-font-snf', - 'so' => 'application/octet-stream', - 'spc' => 'application/x-pkcs7-certificates', - 'spf' => 'application/vnd.yamaha.smaf-phrase', - 'spl' => 'application/x-futuresplash', - 'spot' => 'text/vnd.in3d.spot', - 'spp' => 'application/scvp-vp-response', - 'spq' => 'application/scvp-vp-request', - 'spx' => 'audio/ogg', - 'src' => 'application/x-wais-source', - 'sru' => 'application/sru+xml', - 'srx' => 'application/sparql-results+xml', - 'sse' => 'application/vnd.kodak-descriptor', - 'ssf' => 'application/vnd.epson.ssf', - 'ssml' => 'application/ssml+xml', - 'st' => 'application/vnd.sailingtracker.track', - 'stc' => 'application/vnd.sun.xml.calc.template', - 'std' => 'application/vnd.sun.xml.draw.template', - 'stf' => 'application/vnd.wt.stf', - 'sti' => 'application/vnd.sun.xml.impress.template', - 'stk' => 'application/hyperstudio', - 'stl' => 'application/vnd.ms-pki.stl', - 'str' => 'application/vnd.pg.format', - 'stw' => 'application/vnd.sun.xml.writer.template', - 'sub' => 'image/vnd.dvb.subtitle', - 'sus' => 'application/vnd.sus-calendar', - 'susp' => 'application/vnd.sus-calendar', - 'sv4cpio' => 'application/x-sv4cpio', - 'sv4crc' => 'application/x-sv4crc', - 'svc' => 'application/vnd.dvb.service', - 'svd' => 'application/vnd.svd', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - 'swa' => 'application/x-director', - 'swf' => 'application/x-shockwave-flash', - 'swi' => 'application/vnd.aristanetworks.swi', - 'sxc' => 'application/vnd.sun.xml.calc', - 'sxd' => 'application/vnd.sun.xml.draw', - 'sxg' => 'application/vnd.sun.xml.writer.global', - 'sxi' => 'application/vnd.sun.xml.impress', - 'sxm' => 'application/vnd.sun.xml.math', - 'sxw' => 'application/vnd.sun.xml.writer', - 't' => 'text/troff', - 'tao' => 'application/vnd.tao.intent-module-archive', - 'tar' => 'application/x-tar', - 'tcap' => 'application/vnd.3gpp2.tcap', - 'tcl' => 'application/x-tcl', - 'teacher' => 'application/vnd.smart.teacher', - 'tei' => 'application/tei+xml', - 'teicorpus' => 'application/tei+xml', - 'tex' => 'application/x-tex', - 'texi' => 'application/x-texinfo', - 'texinfo' => 'application/x-texinfo', - 'text' => 'text/plain', - 'tfi' => 'application/thraud+xml', - 'tfm' => 'application/x-tex-tfm', - 'thmx' => 'application/vnd.ms-officetheme', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'tmo' => 'application/vnd.tmobile-livetv', - 'torrent' => 'application/x-bittorrent', - 'tpl' => 'application/vnd.groove-tool-template', - 'tpt' => 'application/vnd.trid.tpt', - 'tr' => 'text/troff', - 'tra' => 'application/vnd.trueapp', - 'trm' => 'application/x-msterminal', - 'tsd' => 'application/timestamped-data', - 'tsv' => 'text/tab-separated-values', - 'ttc' => 'application/x-font-ttf', - 'ttf' => 'application/x-font-ttf', - 'ttl' => 'text/turtle', - 'twd' => 'application/vnd.simtech-mindmapper', - 'twds' => 'application/vnd.simtech-mindmapper', - 'txd' => 'application/vnd.genomatix.tuxedo', - 'txf' => 'application/vnd.mobius.txf', - 'txt' => 'text/plain', - 'u32' => 'application/x-authorware-bin', - 'udeb' => 'application/x-debian-package', - 'ufd' => 'application/vnd.ufdl', - 'ufdl' => 'application/vnd.ufdl', - 'umj' => 'application/vnd.umajin', - 'unityweb' => 'application/vnd.unity', - 'uoml' => 'application/vnd.uoml+xml', - 'uri' => 'text/uri-list', - 'uris' => 'text/uri-list', - 'urls' => 'text/uri-list', - 'ustar' => 'application/x-ustar', - 'utz' => 'application/vnd.uiq.theme', - 'uu' => 'text/x-uuencode', - 'uva' => 'audio/vnd.dece.audio', - 'uvd' => 'application/vnd.dece.data', - 'uvf' => 'application/vnd.dece.data', - 'uvg' => 'image/vnd.dece.graphic', - 'uvh' => 'video/vnd.dece.hd', - 'uvi' => 'image/vnd.dece.graphic', - 'uvm' => 'video/vnd.dece.mobile', - 'uvp' => 'video/vnd.dece.pd', - 'uvs' => 'video/vnd.dece.sd', - 'uvt' => 'application/vnd.dece.ttml+xml', - 'uvu' => 'video/vnd.uvvu.mp4', - 'uvv' => 'video/vnd.dece.video', - 'uvva' => 'audio/vnd.dece.audio', - 'uvvd' => 'application/vnd.dece.data', - 'uvvf' => 'application/vnd.dece.data', - 'uvvg' => 'image/vnd.dece.graphic', - 'uvvh' => 'video/vnd.dece.hd', - 'uvvi' => 'image/vnd.dece.graphic', - 'uvvm' => 'video/vnd.dece.mobile', - 'uvvp' => 'video/vnd.dece.pd', - 'uvvs' => 'video/vnd.dece.sd', - 'uvvt' => 'application/vnd.dece.ttml+xml', - 'uvvu' => 'video/vnd.uvvu.mp4', - 'uvvv' => 'video/vnd.dece.video', - 'uvvx' => 'application/vnd.dece.unspecified', - 'uvx' => 'application/vnd.dece.unspecified', - 'vcd' => 'application/x-cdlink', - 'vcf' => 'text/x-vcard', - 'vcg' => 'application/vnd.groove-vcard', - 'vcs' => 'text/x-vcalendar', - 'vcx' => 'application/vnd.vcx', - 'vis' => 'application/vnd.visionary', - 'viv' => 'video/vnd.vivo', - 'vor' => 'application/vnd.stardivision.writer', - 'vox' => 'application/x-authorware-bin', - 'vrml' => 'model/vrml', - 'vsd' => 'application/vnd.visio', - 'vsf' => 'application/vnd.vsf', - 'vss' => 'application/vnd.visio', - 'vst' => 'application/vnd.visio', - 'vsw' => 'application/vnd.visio', - 'vtu' => 'model/vnd.vtu', - 'vxml' => 'application/voicexml+xml', - 'w3d' => 'application/x-director', - 'wad' => 'application/x-doom', - 'wav' => 'audio/x-wav', - 'wax' => 'audio/x-ms-wax', - 'wbmp' => 'image/vnd.wap.wbmp', - 'wbs' => 'application/vnd.criticaltools.wbs+xml', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wcm' => 'application/vnd.ms-works', - 'wdb' => 'application/vnd.ms-works', - 'weba' => 'audio/webm', - 'webm' => 'video/webm', - 'webp' => 'image/webp', - 'wg' => 'application/vnd.pmi.widget', - 'wgt' => 'application/widget', - 'wks' => 'application/vnd.ms-works', - 'wm' => 'video/x-ms-wm', - 'wma' => 'audio/x-ms-wma', - 'wmd' => 'application/x-ms-wmd', - 'wmf' => 'application/x-msmetafile', - 'wml' => 'text/vnd.wap.wml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'wmls' => 'text/vnd.wap.wmlscript', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wmv' => 'video/x-ms-wmv', - 'wmx' => 'video/x-ms-wmx', - 'wmz' => 'application/x-ms-wmz', - 'woff' => 'application/x-font-woff', - 'wpd' => 'application/vnd.wordperfect', - 'wpl' => 'application/vnd.ms-wpl', - 'wps' => 'application/vnd.ms-works', - 'wqd' => 'application/vnd.wqd', - 'wri' => 'application/x-mswrite', - 'wrl' => 'model/vrml', - 'wsdl' => 'application/wsdl+xml', - 'wspolicy' => 'application/wspolicy+xml', - 'wtb' => 'application/vnd.webturbo', - 'wvx' => 'video/x-ms-wvx', - 'x32' => 'application/x-authorware-bin', - 'x3d' => 'application/vnd.hzn-3d-crossword', - 'xap' => 'application/x-silverlight-app', - 'xar' => 'application/vnd.xara', - 'xbap' => 'application/x-ms-xbap', - 'xbd' => 'application/vnd.fujixerox.docuworks.binder', - 'xbm' => 'image/x-xbitmap', - 'xdf' => 'application/xcap-diff+xml', - 'xdm' => 'application/vnd.syncml.dm+xml', - 'xdp' => 'application/vnd.adobe.xdp+xml', - 'xdssc' => 'application/dssc+xml', - 'xdw' => 'application/vnd.fujixerox.docuworks', - 'xenc' => 'application/xenc+xml', - 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', - 'xfdl' => 'application/vnd.xfdl', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'xhvml' => 'application/xv+xml', - 'xif' => 'image/vnd.xiff', - 'xla' => 'application/vnd.ms-excel', - 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', - 'xlc' => 'application/vnd.ms-excel', - 'xlm' => 'application/vnd.ms-excel', - 'xls' => 'application/vnd.ms-excel', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', - 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xlt' => 'application/vnd.ms-excel', - 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'xlw' => 'application/vnd.ms-excel', - 'xml' => 'application/xml', - 'xo' => 'application/vnd.olpc-sugar', - 'xop' => 'application/xop+xml', - 'xpi' => 'application/x-xpinstall', - 'xpm' => 'image/x-xpixmap', - 'xpr' => 'application/vnd.is-xpr', - 'xps' => 'application/vnd.ms-xpsdocument', - 'xpw' => 'application/vnd.intercon.formnet', - 'xpx' => 'application/vnd.intercon.formnet', - 'xsl' => 'application/xml', - 'xslt' => 'application/xslt+xml', - 'xsm' => 'application/vnd.syncml+xml', - 'xspf' => 'application/xspf+xml', - 'xul' => 'application/vnd.mozilla.xul+xml', - 'xvm' => 'application/xv+xml', - 'xvml' => 'application/xv+xml', - 'xwd' => 'image/x-xwindowdump', - 'xyz' => 'chemical/x-xyz', - 'yaml' => 'text/yaml', - 'yang' => 'application/yang', - 'yin' => 'application/yin+xml', - 'yml' => 'text/yaml', - 'zaz' => 'application/vnd.zzazz.deck+xml', - 'zip' => 'application/zip', - 'zir' => 'application/vnd.zul', - 'zirz' => 'application/vnd.zul', - 'zmm' => 'application/vnd.handheld-entertainment+xml' - ); - - /** - * Get a singleton instance of the class - * - * @return self - * @codeCoverageIgnore - */ - public static function getInstance() - { - if (!self::$instance) { - self::$instance = new self(); - } - - return self::$instance; - } - - /** - * Get a mimetype value from a file extension - * - * @param string $extension File extension - * - * @return string|null - * - */ - public function fromExtension($extension) - { - $extension = strtolower($extension); - - return isset($this->mimetypes[$extension]) ? $this->mimetypes[$extension] : null; - } - - /** - * Get a mimetype from a filename - * - * @param string $filename Filename to generate a mimetype from - * - * @return string|null - */ - public function fromFilename($filename) - { - return $this->fromExtension(pathinfo($filename, PATHINFO_EXTENSION)); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/CommaAggregator.php b/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/CommaAggregator.php deleted file mode 100644 index 4b4e49d05..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/CommaAggregator.php +++ /dev/null @@ -1,20 +0,0 @@ -isUrlEncoding()) { - return array($query->encodeValue($key) => implode(',', array_map(array($query, 'encodeValue'), $value))); - } else { - return array($key => implode(',', $value)); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/DuplicateAggregator.php b/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/DuplicateAggregator.php deleted file mode 100644 index 1bf1730e4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/DuplicateAggregator.php +++ /dev/null @@ -1,22 +0,0 @@ -isUrlEncoding()) { - return array($query->encodeValue($key) => array_map(array($query, 'encodeValue'), $value)); - } else { - return array($key => $value); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/PhpAggregator.php b/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/PhpAggregator.php deleted file mode 100644 index 133ea2bd9..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/PhpAggregator.php +++ /dev/null @@ -1,27 +0,0 @@ - $v) { - $k = "{$key}[{$k}]"; - if (is_array($v)) { - $ret = array_merge($ret, self::aggregate($k, $v, $query)); - } else { - $ret[$query->encodeValue($k)] = $query->encodeValue($v); - } - } - - return $ret; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php deleted file mode 100644 index 72bee620c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -add($key, $value); - $foundDuplicates = true; - } elseif ($paramIsPhpStyleArray) { - $q[$key] = array($value); - } else { - $q[$key] = $value; - } - } else { - $q->add($key, self::BLANK); - } - } - - // Use the duplicate aggregator if duplicates were found and not using PHP style arrays - if ($foundDuplicates && !$foundPhpStyle) { - $q->setAggregator(new DuplicateAggregator()); - } - - return $q; - } - - /** - * Convert the query string parameters to a query string string - * - * @return string - */ - public function __toString() - { - if (!$this->data) { - return ''; - } - - $queryString = ''; - - foreach ($this->prepareData($this->data) as $name => $value) { - foreach ((array) $value as $v) { - if ($queryString) { - $queryString .= $this->fieldSeparator; - } - $queryString .= $name; - if ($v !== self::BLANK) { - $queryString .= $this->valueSeparator . $v; - } - } - } - - return $queryString; - } - - /** - * Get the query string field separator - * - * @return string - */ - public function getFieldSeparator() - { - return $this->fieldSeparator; - } - - /** - * Get the query string value separator - * - * @return string - */ - public function getValueSeparator() - { - return $this->valueSeparator; - } - - /** - * Returns the type of URL encoding used by the query string - * - * One of: false, "RFC 3986", or "application/x-www-form-urlencoded" - * - * @return bool|string - */ - public function getUrlEncoding() - { - return $this->urlEncode; - } - - /** - * Returns true or false if using URL encoding - * - * @return bool - */ - public function isUrlEncoding() - { - return $this->urlEncode !== false; - } - - /** - * Provide a function for combining multi-valued query string parameters into a single or multiple fields - * - * @param null|QueryAggregatorInterface $aggregator Pass in a QueryAggregatorInterface object to handle converting - * deeply nested query string variables into a flattened array. - * Pass null to use the default PHP style aggregator. For legacy - * reasons, this function accepts a callable that must accepts a - * $key, $value, and query object. - * @return self - * @see \Guzzle\Http\QueryString::aggregateUsingComma() - */ - public function setAggregator(QueryAggregatorInterface $aggregator = null) - { - // Use the default aggregator if none was set - if (!$aggregator) { - if (!self::$defaultAggregator) { - self::$defaultAggregator = new PhpAggregator(); - } - $aggregator = self::$defaultAggregator; - } - - $this->aggregator = $aggregator; - - return $this; - } - - /** - * Set whether or not field names and values should be rawurlencoded - * - * @param bool|string $encode Set to TRUE to use RFC 3986 encoding (rawurlencode), false to disable encoding, or - * form_urlencoding to use application/x-www-form-urlencoded encoding (urlencode) - * @return self - */ - public function useUrlEncoding($encode) - { - $this->urlEncode = ($encode === true) ? self::RFC_3986 : $encode; - - return $this; - } - - /** - * Set the query string separator - * - * @param string $separator The query string separator that will separate fields - * - * @return self - */ - public function setFieldSeparator($separator) - { - $this->fieldSeparator = $separator; - - return $this; - } - - /** - * Set the query string value separator - * - * @param string $separator The query string separator that will separate values from fields - * - * @return self - */ - public function setValueSeparator($separator) - { - $this->valueSeparator = $separator; - - return $this; - } - - /** - * Returns an array of url encoded field names and values - * - * @return array - */ - public function urlEncode() - { - return $this->prepareData($this->data); - } - - /** - * URL encodes a value based on the url encoding type of the query string object - * - * @param string $value Value to encode - * - * @return string - */ - public function encodeValue($value) - { - if ($this->urlEncode == self::RFC_3986) { - return rawurlencode($value); - } elseif ($this->urlEncode == self::FORM_URLENCODED) { - return urlencode($value); - } else { - return (string) $value; - } - } - - /** - * Url encode parameter data and convert nested query strings into a flattened hash. - * - * @param array $data The data to encode - * - * @return array Returns an array of encoded values and keys - */ - protected function prepareData(array $data) - { - // If no aggregator is present then set the default - if (!$this->aggregator) { - $this->setAggregator(null); - } - - $temp = array(); - foreach ($data as $key => $value) { - if (is_array($value)) { - $temp = array_merge($temp, $this->aggregator->aggregate($key, $value, $this)); - } else { - $temp[$this->encodeValue($key)] = $this->encodeValue($value); - } - } - - return $temp; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php b/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php deleted file mode 100644 index 1173908c5..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php +++ /dev/null @@ -1,105 +0,0 @@ -setLimit($limit)->setOffset($offset); - } - - /** - * Returns only a subset of the decorated entity body when cast as a string - * {@inheritdoc} - */ - public function __toString() - { - return substr((string) $this->body, $this->offset, $this->limit) ?: ''; - } - - public function isConsumed() - { - return (($this->offset + $this->limit) - $this->body->ftell()) <= 0; - } - - /** - * Returns the Content-Length of the limited subset of data - * {@inheritdoc} - */ - public function getContentLength() - { - $length = $this->body->getContentLength(); - - return $length === false - ? $this->limit - : min($this->limit, min($length, $this->offset + $this->limit) - $this->offset); - } - - /** - * Allow for a bounded seek on the read limited entity body - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - return $whence === SEEK_SET - ? $this->body->seek(max($this->offset, min($this->offset + $this->limit, $offset))) - : false; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @return self - */ - public function setOffset($offset) - { - $this->body->seek($offset); - $this->offset = $offset; - - return $this; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the stream - * - * @param int $limit Total number of bytes to allow to be read from the stream - * - * @return self - */ - public function setLimit($limit) - { - $this->limit = $limit; - - return $this; - } - - public function read($length) - { - // Check if the current position is less than the total allowed bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->body->ftell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte limit is not exceeded - return $this->body->read(min($remaining, $length)); - } else { - return false; - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php deleted file mode 100644 index 1a824b8b7..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php +++ /dev/null @@ -1,250 +0,0 @@ - array('onRequestSent', 100), - 'request.clone' => 'cleanupRequest', - 'request.before_send' => 'cleanupRequest' - ); - } - - /** - * Clean up the parameters of a request when it is cloned - * - * @param Event $event Event emitted - */ - public function cleanupRequest(Event $event) - { - $params = $event['request']->getParams(); - unset($params[self::REDIRECT_COUNT]); - unset($params[self::PARENT_REQUEST]); - } - - /** - * Called when a request receives a redirect response - * - * @param Event $event Event emitted - */ - public function onRequestSent(Event $event) - { - $response = $event['response']; - $request = $event['request']; - - // Only act on redirect requests with Location headers - if (!$response || $request->getParams()->get(self::DISABLE)) { - return; - } - - // Trace the original request based on parameter history - $original = $this->getOriginalRequest($request); - - // Terminating condition to set the effective response on the original request - if (!$response->isRedirect() || !$response->hasHeader('Location')) { - if ($request !== $original) { - // This is a terminating redirect response, so set it on the original request - $response->getParams()->set(self::REDIRECT_COUNT, $original->getParams()->get(self::REDIRECT_COUNT)); - $original->setResponse($response); - $response->setEffectiveUrl($request->getUrl()); - } - return; - } - - $this->sendRedirectRequest($original, $request, $response); - } - - /** - * Get the original request that initiated a series of redirects - * - * @param RequestInterface $request Request to get the original request from - * - * @return RequestInterface - */ - protected function getOriginalRequest(RequestInterface $request) - { - $original = $request; - // The number of redirects is held on the original request, so determine which request that is - while ($parent = $original->getParams()->get(self::PARENT_REQUEST)) { - $original = $parent; - } - - return $original; - } - - /** - * Create a redirect request for a specific request object - * - * Takes into account strict RFC compliant redirection (e.g. redirect POST with POST) vs doing what most clients do - * (e.g. redirect POST with GET). - * - * @param RequestInterface $request Request being redirected - * @param RequestInterface $original Original request - * @param int $statusCode Status code of the redirect - * @param string $location Location header of the redirect - * - * @return RequestInterface Returns a new redirect request - * @throws CouldNotRewindStreamException If the body needs to be rewound but cannot - */ - protected function createRedirectRequest( - RequestInterface $request, - $statusCode, - $location, - RequestInterface $original - ) { - $redirectRequest = null; - $strict = $original->getParams()->get(self::STRICT_REDIRECTS); - - // Switch method to GET for 303 redirects. 301 and 302 redirects also switch to GET unless we are forcing RFC - // compliance to emulate what most browsers do. NOTE: IE only switches methods on 301/302 when coming from a POST. - if ($request instanceof EntityEnclosingRequestInterface && ($statusCode == 303 || (!$strict && $statusCode <= 302))) { - $redirectRequest = RequestFactory::getInstance()->cloneRequestWithMethod($request, 'GET'); - } else { - $redirectRequest = clone $request; - } - - $redirectRequest->setIsRedirect(true); - // Always use the same response body when redirecting - $redirectRequest->setResponseBody($request->getResponseBody()); - - $location = Url::factory($location); - // If the location is not absolute, then combine it with the original URL - if (!$location->isAbsolute()) { - $originalUrl = $redirectRequest->getUrl(true); - // Remove query string parameters and just take what is present on the redirect Location header - $originalUrl->getQuery()->clear(); - $location = $originalUrl->combine((string) $location, true); - } - - $redirectRequest->setUrl($location); - - // Add the parent request to the request before it sends (make sure it's before the onRequestClone event too) - $redirectRequest->getEventDispatcher()->addListener( - 'request.before_send', - $func = function ($e) use (&$func, $request, $redirectRequest) { - $redirectRequest->getEventDispatcher()->removeListener('request.before_send', $func); - $e['request']->getParams()->set(RedirectPlugin::PARENT_REQUEST, $request); - } - ); - - // Rewind the entity body of the request if needed - if ($redirectRequest instanceof EntityEnclosingRequestInterface && $redirectRequest->getBody()) { - $body = $redirectRequest->getBody(); - // Only rewind the body if some of it has been read already, and throw an exception if the rewind fails - if ($body->ftell() && !$body->rewind()) { - throw new CouldNotRewindStreamException( - 'Unable to rewind the non-seekable entity body of the request after redirecting. cURL probably ' - . 'sent part of body before the redirect occurred. Try adding acustom rewind function using on the ' - . 'entity body of the request using setRewindFunction().' - ); - } - } - - return $redirectRequest; - } - - /** - * Prepare the request for redirection and enforce the maximum number of allowed redirects per client - * - * @param RequestInterface $original Original request - * @param RequestInterface $request Request to prepare and validate - * @param Response $response The current response - * - * @return RequestInterface - */ - protected function prepareRedirection(RequestInterface $original, RequestInterface $request, Response $response) - { - $params = $original->getParams(); - // This is a new redirect, so increment the redirect counter - $current = $params[self::REDIRECT_COUNT] + 1; - $params[self::REDIRECT_COUNT] = $current; - // Use a provided maximum value or default to a max redirect count of 5 - $max = isset($params[self::MAX_REDIRECTS]) ? $params[self::MAX_REDIRECTS] : $this->defaultMaxRedirects; - - // Throw an exception if the redirect count is exceeded - if ($current > $max) { - $this->throwTooManyRedirectsException($original, $max); - return false; - } else { - // Create a redirect request based on the redirect rules set on the request - return $this->createRedirectRequest( - $request, - $response->getStatusCode(), - trim($response->getLocation()), - $original - ); - } - } - - /** - * Send a redirect request and handle any errors - * - * @param RequestInterface $original The originating request - * @param RequestInterface $request The current request being redirected - * @param Response $response The response of the current request - * - * @throws BadResponseException|\Exception - */ - protected function sendRedirectRequest(RequestInterface $original, RequestInterface $request, Response $response) - { - // Validate and create a redirect request based on the original request and current response - if ($redirectRequest = $this->prepareRedirection($original, $request, $response)) { - try { - $redirectRequest->send(); - } catch (BadResponseException $e) { - $e->getResponse(); - if (!$e->getResponse()) { - throw $e; - } - } - } - } - - /** - * Throw a too many redirects exception for a request - * - * @param RequestInterface $original Request - * @param int $max Max allowed redirects - * - * @throws TooManyRedirectsException when too many redirects have been issued - */ - protected function throwTooManyRedirectsException(RequestInterface $original, $max) - { - $original->getEventDispatcher()->addListener( - 'request.complete', - $func = function ($e) use (&$func, $original, $max) { - $original->getEventDispatcher()->removeListener('request.complete', $func); - $str = "{$max} redirects were issued for this request:\n" . $e['request']->getRawHeaders(); - throw new TooManyRedirectsException($str); - } - ); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem b/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem deleted file mode 100644 index 93d3d2dbf..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem +++ /dev/null @@ -1,3554 +0,0 @@ -## -## ca-bundle.crt -- Bundle of CA Root Certificates -## -## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012 -## -## 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/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1 -## -## 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. -## - -# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.87 $ $Date: 2012/12/29 16:32:45 $ - -GTE CyberTrust Global Root -========================== ------BEGIN CERTIFICATE----- -MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg -Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG -A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz -MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL -Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0 -IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u -sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql -HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID -AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW -M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF -NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ ------END CERTIFICATE----- - -Thawte Server CA -================ ------BEGIN CERTIFICATE----- -MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT -DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs -dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE -AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j -b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV -BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u -c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG -A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0 -ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl -/Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7 -1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR -MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J -GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ -GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc= ------END CERTIFICATE----- - -Thawte Premium Server CA -======================== ------BEGIN CERTIFICAT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6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB -BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 -70+sB3c4 ------END CERTIFICATE----- - -Digital Signature Trust Co. Global CA 1 -======================================= ------BEGIN CERTIFICATE----- -MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE -ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy -MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs -IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA -A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE -NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i -o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo -BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 -dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw -IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY -MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM -BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB -ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq -kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4 -RbyhkwS7hp86W0N6w4pl ------END CERTIFICATE----- - -Digital Signature Trust Co. Global CA 3 -======================================= ------BEGIN CERTIFICATE----- -MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE -ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMjAeFw05ODEy -MDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs -IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUA -A4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGOD -VvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JS -xhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo -BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 -dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw -IoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQY -MBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAM -BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB -AEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfi -up/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1 -mPnHfxsb1gYgAlihw6ID ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 -f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol -hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA -TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah -WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf -Tqj/ZA1k ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority - G2 -============================================================ ------BEGIN CERTIFICATE----- -MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO -FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71 -lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB -MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT -1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD -Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 ------END CERTIFICATE----- - -GlobalSign Root CA -================== ------BEGIN CERTIFICATE----- -MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx -GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds -b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV -BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD -VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa -DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc -THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb -Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP -c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX -gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV -HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF -AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj -Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG -j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH -hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC -X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- - -GlobalSign Root CA - R2 -======================= ------BEGIN CERTIFICATE----- -MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv -YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh -bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT -aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln -bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 -ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp -s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN -S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL -TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C -ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ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BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg -UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 -LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td -3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H -BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs -3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF -V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r -on+jjBXu ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv -cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw -CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy -dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 -EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc -cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw -EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj -055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA -ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f -j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC -/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 -xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa -t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== ------END CERTIFICATE----- - -Verisign Class 4 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MII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OCAQEA -j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt -mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm -fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd -RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG -UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== ------END CERTIFICATE----- - -Entrust.net Secure Server CA -============================ ------BEGIN CERTIFICATE----- -MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV -BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg -cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl -ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIG -A1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBi -eSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1p -dGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDN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vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdER -gL7YibkIozH5oSQJFrlwMB0GCSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0B -AQUFAAOCAQEAWUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo -oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQh7A6tcOdBTcS -o8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18f3v/rxzP5tsHrV7bhZ3QKw0z -2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfNB/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjX -OP/swNlQ8C5LWK5Gb9Auw2DaclVyvUxFnmG6v4SBkgPR0ml8xQ== ------END CERTIFICATE----- - -Baltimore CyberTrust Root -========================= ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE -ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li -ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC -SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs -dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME -uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB -UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C -G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 -XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr -l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI -VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB -BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh -cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 -hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa -Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H -RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp ------END CERTIFICATE----- - -Equifax Secure Global eBusiness CA -================================== ------BEGIN CERTIFICATE----- -MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp -bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx -HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds -b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV -PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN -qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn -hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j -BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs -MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN -I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY -NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV ------END CERTIFICATE----- - -Equifax Secure eBusiness CA 1 -============================= ------BEGIN CERTIFICATE----- -MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB -LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE -ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz -IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ -1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a -IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk -MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW -Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF -AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5 -lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+ -KpYrtWKmpj29f5JZzVoqgrI3eQ== ------END CERTIFICATE----- - -Equifax Secure eBusiness CA 2 -============================= ------BEGIN CERTIFICATE----- -MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEXMBUGA1UE -ChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0y -MB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoT -DkVxdWlmYXggU2VjdXJlMSYwJAYDVQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCB -nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn -2Z0GvxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/BPO3QSQ5 -BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0CAwEAAaOCAQkwggEFMHAG -A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUx -JjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoG -A1UdEAQTMBGBDzIwMTkwNjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9e -uSBIplBqy/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQFMAMB -Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAAyGgq3oThr1 -jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia -78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm -V+GRMOrN ------END CERTIFICATE----- - -AddTrust Low-Value Services Root -================================ ------BEGIN CERTIFICATE----- -MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU -cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw -CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO -ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6 -54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr -oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1 -Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui -GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w -HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD -AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT -RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw -HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt -ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph -iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY -eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr -mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj -ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= ------END CERTIFICATE----- - -AddTrust External Root -====================== ------BEGIN CERTIFICATE----- -MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxJjAkBgNVBAsT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kyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 -6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 -e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u -G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= ------END CERTIFICATE----- - -AddTrust Public Services Root -============================= ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU -cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ -BgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5l -dHdvcmsxIDAeBgNVBAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV6tsfSlbu -nyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nXGCwwfQ56HmIexkvA/X1i -d9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnPdzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSG -Aa2Il+tmzV7R/9x98oTaunet3IAIx6eH1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAw -HM+A+WD+eeSI8t0A65RF62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0G -A1UdDgQWBBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB -/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDELMAkGA1UEBhMCU0Ux -FDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29yazEgMB4G -A1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4 -JNojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL -+YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao -GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9 -Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H -EufOX1362KqxMy3ZdvJOOjMMK7MtkAY= ------END CERTIFICATE----- - -AddTrust Qualified Certificates Root -==================================== ------BEGIN CERTIFICATE----- -MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU -cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx -CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ -I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z95OdBEsIJuQRno3eDB -iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE= ------END CERTIFICATE----- - -Entrust Root Certification Authority -==================================== ------BEGIN CERTIFICATE----- -MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV -BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw -b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG -A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 -MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu -MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu -Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v -dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz -A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww -Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 -j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN -rziGLp5/V6+eF67rHMsoIV+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CMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j -LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo -BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet -8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc -T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU -vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD -AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk -DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q -zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 -d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 -mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p -XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm -Mw== ------END CERTIFICATE----- - -GeoTrust Global CA 2 -==================== ------BEGIN CERTIFICATE----- -MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQY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AszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF -H4z1Ir+rzoPz4iIprn2DQKi6bA== ------END CERTIFICATE----- - -GeoTrust Universal CA -===================== ------BEGIN CERTIFICATE----- -MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN -R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 -MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu -Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t -JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e -RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs -7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d -8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V -qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga -Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB -Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu -KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08 -ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0 -XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB -hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc -aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2 -qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL -oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK -xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF -KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 -DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK -xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU -p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI -P/rmMuGNG2+k5o7Y+SlIis5z/iw= ------END CERTIFICATE----- - -GeoTrust Universal CA 2 -======================= ------BEGIN CERTIFICATE----- -MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN -R2VvVHJ1c3Q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AOBgNVHQ8BAf8E -BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z -dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ -4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+ -mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq -A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg -Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP -pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d -FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp -gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm -X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS ------END CERTIFICATE----- - -America Online Root Certification Authority 1 -============================================= ------BEGIN CERTIFICATE----- -MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG -A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg -T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG -v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z -DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh -sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP -8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T -AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z -o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf -GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF -VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft -3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g -Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds -sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 ------END CERTIFICATE----- - -America Online Root Certification Authority 2 -============================================= ------BEGIN CERTIFICATE----- -MIIFpDCCA4ygAwIBAgIBATANBgk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J7f/hC3euiInlhBx6yLt -398znM/jra6O1I7mT1GvFpLgXPYHDw== ------END CERTIFICATE----- - -Certum Root CA -============== ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK -ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla -Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u -by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x -wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL -kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ -89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K -Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P -NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq -hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+ -GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg -GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/ -0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS -qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw== ------END CERTIFICATE----- - -Comodo AAA Services root -======================== ------BEGIN CERTIFICATE----- -MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS -R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg -TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw -MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl -c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV -BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG -C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs -i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW -Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH -Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK -Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f -BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl -cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz -LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm -7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz -Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z -8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C -12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- - -Comodo Secure Services root -=========================== ------BEGIN CERTIFICATE----- -MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS -R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg -TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw -MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFu -Y2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAi -BgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP -9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc -rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC -oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V -p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E -FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w -gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj -YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm -aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm -4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj -Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL -DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw -pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H -RR3B7Hzs/Sk= ------END CERTIFICATE----- - -Comodo Trusted Services root -============================ ------BEGIN CERTIFICATE----- -MIIEQzCCA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SkfnIYj9lo -fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul -LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x -gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi -5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi -5nrQNiOKSnQ2+Q== ------END CERTIFICATE----- - -QuoVadis Root CA 2 -================== ------BEGIN CERTIFICATE----- -MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT -EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx -ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM -aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 -XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk -lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB -lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy -lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2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m5X -f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II -4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 -VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u ------END CERTIFICATE----- - -QuoVadis Root CA 3 -================== ------BEGIN CERTIFICATE----- -MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT -EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx -OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM -aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg -DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij -KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K -DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv -BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp -p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 -nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTy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9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp -8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC -bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu -g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p -vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr -qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= ------END CERTIFICATE----- - -Security Communication Root CA -============================== ------BEGIN CERTIFICATE----- -MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP -U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw -HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP -U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw -8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM -DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX -5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd -DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 -JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g -0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a -mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ -s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ -6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi -FL39vmwLAw== ------END CERTIFICATE----- - -Sonera Class 2 Root CA -====================== ------BEGIN CERTIFICATE----- -MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG -U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw -NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh -IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 -/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT -dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG -f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P -tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH -nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT -XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt -0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI -cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph -Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx -EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH -llpwrN9M ------END CERTIFICATE----- - -Staat der Nederlanden Root CA -============================= ------BEGIN CERTIFICATE----- -MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE -ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g -Um9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4w -HAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxh -bmRlbiBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFt -vsznExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw719tV2U02P -jLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MOhXeiD+EwR+4A5zN9RGca -C1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+UtFE5A3+y3qcym7RHjm+0Sq7lr7HcsBth -vJly3uSJt3omXdozSVtSnA71iq3DuD3oBmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn6 -22r+I/q85Ej0ZytqERAhSQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRV -HSAAMDwwOgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMvcm9v -dC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA7Jbg0zTBLL9s+DAN -BgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k/rvuFbQvBgwp8qiSpGEN/KtcCFtR -EytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzmeafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbw -MVcoEoJz6TMvplW0C5GUR5z6u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3y -nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR -iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw== ------END CERTIFICATE----- - -TDC Internet Root CA -==================== ------BEGIN CERTIFICATE----- -MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJESzEVMBMGA1UE -ChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREM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YE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+ -2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm899qNLPg7kbWzb -O0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0jUNAE4z9mQNUecYu6oah9jrU -Cbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38aQNiuJkFBT1reBK9sG9l ------END CERTIFICATE----- - -UTN DATACorp SGC Root CA -======================== ------BEGIN CERTIFICATE----- -MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZ -BgNVBAMTElVUTiAtIERBVEFDb3JwIFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBa -MIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4w -HAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRy -dXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ys -raP6LnD43m77VkIVni5c7yPeIbkFdicZD0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlo -wHDyUwDAXlCCpVZvNvlK4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA -9P4yPykqlXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulWbfXv -33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQABo4GrMIGoMAsGA1Ud -DwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRTMtGzz3/64PGgXYVOktKeRR20TzA9 -BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dD -LmNybDAqBgNVHSUEIzAhBggrBgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3 -DQEBBQUAA4IBAQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft -Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyjj98C5OBxOvG0 -I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVHKWss5nbZqSl9Mt3JNjy9rjXx -EZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP -DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI ------END CERTIFICATE----- - -UTN USERFirst Hardware Root CA -============================== ------BEGIN CERTIFICATE----- -MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd -BgN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iskliCE7/yMgUsogW -XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2 -lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn -iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67 -nfhmqA== ------END CERTIFICATE----- - -Camerfirma Chambers of Commerce Root -==================================== ------BEGIN CERTIFICATE----- -MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i -ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx -NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp -cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn -MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC -AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU -xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH -NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW -DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV -d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud -EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v -cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P -AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh -bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD -VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz -aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi -fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD -L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN -UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n -ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1 -erfutGWaIZDgqtCYvDi1czyL+Nw= ------END CERTIFICATE----- - -Camerfirma Global Chambersign Root -================================== ------BEGIN CERTIFICATE----- -MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQY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FAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh -bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA -PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y -gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ -PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4 -IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes -t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== ------END CERTIFICATE----- - -NetLock Notary (Class A) Root -============================= ------BEGIN CERTIFICATE----- -MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI -EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6 -dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9j -ayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oX -DTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQH -EwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYD -VQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9p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ZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVu -b3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBh -bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sg -Q1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFp -bCBhdCBjcHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5 -ayZrU3/b39/zcT0mwBQOxmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjP -ytoUMaFP0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQQeJB -CWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr -KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM -8CgHrTwXZoi1/baI ------END CERTIFICATE----- - -NetLock Business (Class B) Root -=============================== ------BEGIN CERTIFICATE----- -MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT -CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV -BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg -VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD -VQQGEwJIVTERMA8GA1UEBxMIQnVkYX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ZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl -IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2 -YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj -cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM -43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR -stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI ------END CERTIFICATE----- - -NetLock Express (Class C) Root -============================== ------BEGIN CERTIFICATE----- -MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT -CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV -BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD -KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ -BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6 -dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9j -ayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzANBgkqhkiG9w0BAQEFAAOB -jQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNA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2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2 -xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW -gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A== ------END CERTIFICATE----- - -XRamp Global CA Root -==================== ------BEGIN CERTIFICATE----- -MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE -BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj -dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx -HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg -U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu -IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx -foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE -zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs -AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjh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eTCCASAwDQYJKoZIhvcNAQEBBQAD -ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv -2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 -qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j -YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY -vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O -BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o -atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu -MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG -A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim -PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt -I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI -Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b -vZ8= ------END CERTIFICATE----- - -Starfield Class 2 CA -==================== ------BEGIN CERTIFICAT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WdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM -PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD -KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 -QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- - -StartCom Certification Authority -================================ ------BEGIN CERTIFICATE----- -MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu -ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 -NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg -U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw -ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y -o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/ -Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d -eMotHweXMAEtcnn6R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N0YXJ0Q29tIENl -cnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFpbGFibGUgYXQgaHR0cDovL2NlcnQuc3Rh -cnRjb20ub3JnL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilT -dGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOC -AgEAFmyZ9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8jhvh -3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUWFjgKXlf2Ysd6AgXm -vB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJzewT4F+irsfMuXGRuczE6Eri8sxHk -fY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3 -fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ -EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq -yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl -1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/ -lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro -g14= ------END CERTIFICATE----- - -Taiwan GRCA -=========== ------BEGIN CERTIFICATE----- -MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG -EwJUVzEw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7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ -TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj -Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 -Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU -D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz -DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk -Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk -7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ -CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy -+fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS ------END CERTIFICATE----- - -Firmaprofesional Root CA -======================== ------BEGIN CERTIFICATE----- -MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMxIjAgBgNVBAcT -GUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1dG9yaWRhZCBkZSBDZXJ0aWZp -Y2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FA -ZmlybWFwcm9mZXNpb25hbC5jb20wHhcNMDExMDI0MjIwMDAwWhcNM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p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl -vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl -OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3 -1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq -nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy -x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW -NY6E0F/6MBr1mmz0DlP5OlvRHA== ------END CERTIFICATE----- - -DigiCert Assured ID Root CA -=========================== ------BEGIN CERTIFICATE----- -MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw -IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx -MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL -ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO -9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy -UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW -/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy -oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf -GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF -66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq -hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc -EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn -SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i -8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe -+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== ------END CERTIFICATE----- - -DigiCert Global Root CA -======================= ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw -HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw -MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 -dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn -TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 -BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H -4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y -7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB -o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm -8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF -BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr -EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt -tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 -UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- - -DigiCert High Assurance EV Root CA -================================== ------BEGIN CERTIFICATE----- -MI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opmzN6cN82oNLFp -myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK -mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K ------END CERTIFICATE----- - -Certplus Class 2 Primary CA -=========================== ------BEGIN CERTIFICATE----- -MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE -BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN -OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy -dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR -5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ -Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO -YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e -e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME -CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkw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qzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d -utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ -MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug -dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE -GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw -RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS -fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ ------END CERTIFICATE----- - -DST ACES CA X6 -============== ------BEGIN CERTIFICATE----- -MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT -MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha -MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE -CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI -DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa -pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow -GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy -MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud -EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu -Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy -dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU -CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2 -5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t -Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq -nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs -vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 -oKfN5XozNmr6mis= ------END CERTIFICATE----- - -TURKTRUST Certificate Services Provider Root 1 -============================================== ------BEGIN CERTIFICATE----- -MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BA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g0Uw2ZkUd82YCdAR7kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxE -q8Sn5RTOPEFhfEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy -B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdAaLX/7KfS0zgY -nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H ------END CERTIFICATE----- - -TURKTRUST Certificate Services Provider Root 2 -============================================== ------BEGIN CERTIFICATE----- -MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP -MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg -QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcN -MDUxMTA3MTAwNzU3WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVr -dHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEPMA0G -A1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls -acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqe -LCDe2JAOCtFp0if7qnefJ1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKI -x+XlZEdhR3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJQv2g -QrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGXJHpsmxcPbe9TmJEr -5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1pzpwACPI2/z7woQ8arBT9pmAPAgMB -AAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58SFq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8G -A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/ntt -Rbj2hWyfIvwqECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4 -Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFzgw2lGh1uEpJ+ -hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotHuFEJjOp9zYhys2AzsfAKRO8P -9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LSy3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5 -UrbnBEI= ------END CERTIFICATE----- - -SwissSign Gold CA - G2 -====================== ------BEGIN CERTIFICATE----- -MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw -EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN -MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp -c3NTaWduIE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S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr -44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf -Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m -Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp -mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk -vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf -KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br -NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj -viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ ------END CERTIFICATE----- - -SwissSign Silver CA - G2 -======================== ------BEGIN CERTIFICATE----- -MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT -BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X -DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 -aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG -9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfj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xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L -3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx -/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa -DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP -e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu -WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ -DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub -DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u ------END CERTIFICATE----- - -GeoTrust Primary Certification Authority -======================================== ------BEGIN CERTIFICATE----- -MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD -ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx -CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ -cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN -b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 -nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge -RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt -tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI -hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K -Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN -NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa -Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG -1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= ------END CERTIFICATE----- - -thawte Primary Root CA -====================== ------BEGIN CERTIFICATE----- -MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE -BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 -aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG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sEG89 -jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH -z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== ------END CERTIFICATE----- - -VeriSign Class 3 Public Primary Certification Authority - G5 -============================================================ ------BEGIN CERTIFICATE----- -MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE -BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO -ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk -IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB -yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln -biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh -dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt -YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz -j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD -Y2pSS9KP6HBRTdGJ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yOOvaliTFGCRsoTciE6+ -OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn -CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 -3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc -f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW ------END CERTIFICATE----- - -COMODO Certification Authority -============================== ------BEGIN CERTIFICATE----- -MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE -BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG -A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb -MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD -T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH -+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww -xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV -4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA -1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI -rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k -b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC -AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP -OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ -RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc -IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN -+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== ------END CERTIFICATE----- - -Network Solutions Certificate Authority -======================================= ------BEGIN CERTIFICATE----- -MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG -EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr -IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx -MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTm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r+8ukYEywVaCge1ey ------END CERTIFICATE----- - -WellsSecure Public Root Certificate Authority -============================================= ------BEGIN CERTIFICATE----- -MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM -F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw -NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN -MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl -bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD -VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+rWxxTkqxtnt3CxC5FlAM1 -iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjUDk/41itMpBb570OYj7OeUt9tkTmPOL13 -i0Nj67eT/DBMHAGTthP796EfvyXhdDcsHqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8 -bJVhHlfXBIEyg1J55oNjz7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiB -K0HmOFafSZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/SlwxlAgMB -AAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqGKGh0dHA6Ly9jcmwu -cGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0PAQH/BAQDAgHGMB0GA1UdDgQWBBQm -lRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0jBIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGB -i6SBiDCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRww -GgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg -Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI -K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0 -bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj -qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es -E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ -tylv2G0xffX8oRAHh84vWdw+WNs= ------END CERTIFICATE----- - -COMODO ECC Certification Authority -================================== ------BEGIN CERTIFICATE----- -MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC -R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE -ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix -GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3Rlc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-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaIs9z4iPf930Pfeo2aSVz2 -TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCW -So7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYy -HF2fYPepraX/z9E0+X1bF8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNd -frGoRpAxVs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGdPDPQ -tQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNVHSAEDjAMMAoGCCqB -egF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAxNjAfBgNVHSMEGDAWgBSjBS8YYFDC -iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK -q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q -MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg -Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI -lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF -0mBWWg== ------END CERTIFICATE----- - -Security Communication EV RootCA1 -================================= ------BEGIN CERTIFICATE----- -MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc -U0VD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cm+7XeEW -T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490 ------END CERTIFICATE----- - -OISTE WISeKey Global Root GA CA -=============================== ------BEGIN CERTIFICATE----- -MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE -BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG -A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH -bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD -VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw -IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 -IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 -Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg -Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD -d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ -/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R -LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw -AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ -KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm -MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 -+vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa -hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY -okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= ------END CERTIFICATE----- - -Microsec e-Szigno Root CA -========================= ------BEGIN CERTIFICATE----- -MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE -BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL -EwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9zZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0 -MDYxMjI4NDRaFw0xNzA0MDYxMjI4NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVz -dDEWMBQGA1UEChMNTWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMT -GU1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB -AQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2uuO/TEdyB5s87lozWbxXG -d36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+LMs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u -PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY -1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw -WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== ------END CERTIFICATE----- - -AC Ra\xC3\xADz Certic\xC3\xA1mara S.A. -====================================== ------BEGIN CERTIFICATE----- -MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNVBAYT -AkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRpZmljYWNpw7NuIERpZ2l0YWwg -LSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwaQUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4w -HhcNMDYxMTI3MjA0NjI5WhcNMzAwNDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+ -U29jaWVkYWQgQ2FtZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJh -IFMuQS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeGqentLhM0R7LQcNzJPNCN -yu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzLfDe3fezTf3MZsGqy2IiKLUV0qPezuMDU -2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQY5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU3 -4ojC2I+GdV75LaeHM/J4Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP -2yYe68yQ54v5aHxwD6Mq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8DYSwaN0jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wk -eZBWN7PGKX6jD/EpOe9+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f -/RWmnkJDW2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/RL5h -RqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecU -Iw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ== ------END CERTIFICATE----- - -TC TrustCenter Class 2 CA II -============================ ------BEGIN CERTIFICATE----- -MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy -IENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYw -MTEyMTQzODQzWhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1 -c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UE -AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jftMjWQ+nEdVl//OEd+DFw -IxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKguNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2 -xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2JXjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQ -Xa7pIXSSTYtZgo+U4+lK8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7u -SNQZu+995OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1UdEwEB -/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3kUrL84J6E1wIqzCB -7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90 -Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU -cnVzdENlbnRlciUyMENsYXNzJTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i -SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u -TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iSGNn3Bzn1LL4G -dXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprtZjluS5TmVfwLG4t3wVMTZonZ -KNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8au0WOB9/WIFaGusyiC2y8zl3gK9etmF1Kdsj -TYjKUCjLhdLTEKJZbtOTVAB6okaVhgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kP -JOzHdiEoZa5X6AeIdUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfk -vQ== ------END CERTIFICATE----- - -TC TrustCenter Class 3 CA II -============================ ------BEGIN CERTIFICATE----- -MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQ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wSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i -SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u -TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlNirTzwppVMXzE -O2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8TtXqluJucsG7Kv5sbviRmEb8 -yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9 -IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal -092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc -5A== ------END CERTIFICATE----- - -TC TrustCenter Universal CA I -============================= ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy -IFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcN -MDYwMzIyMTU1NDI4WhcNMjUxMjMxMjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMg -VHJ1c3RDZW50ZXIgR21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYw -JAYDVQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSRJJZ4Hgmgm5qVSkr1YnwC -qMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3TfCZdzHd55yx4Oagmcw6iXSVphU9VDprv -xrlE4Vc93x9UIuVvZaozhDrzznq+VZeujRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtw -ag+1m7Z3W0hZneTvWq3zwZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9O -gdwZu5GQfezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYDVR0j -BBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0GCSqGSIb3DQEBBQUAA4IBAQAo0uCG -1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X17caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/Cy -vwbZ71q+s2IhtNerNXxTPqYn8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3 -ghUJGooWMNjsydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT -ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/2TYcuiUaUj0a -7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY ------END CERTIFICATE----- - -Deutsche Telekom Root CA 2 -========================== ------BEGIN CERTIFICATE----- -MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT -RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG -A1UEAxMaRGV1dH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GeQFsOY3wo3a -BijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtCdsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtp -FhpFfTMDZflScZAmlaxMDPWLkz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP -51qJThRv4zdLhfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz -OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw== ------END CERTIFICATE----- - -Cybertrust Global Root -====================== ------BEGIN CERTIFICATE----- -MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li -ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 -MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD -ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -+Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW -0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL -AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin -89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT -8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 -MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G -A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO -lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi -5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 -hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T -X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW -WL1WMRJOEcgh4LMRkWXbtKaIOM5V ------END CERTIFICATE----- - -ePKI Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG -EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg -Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx -MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq -MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs -IZ5qyNUD9WB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MdjmEP -NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r -GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE -xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx -gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy -sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD -BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= ------END CERTIFICATE----- - -T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3 -============================================================================================================================= ------BEGIN CERTIFICATE----- -MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH -DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q -aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry -b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV -BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg -S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4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z35FBtYt2IpNeBLWrcLT -y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh -LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M -dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI= ------END CERTIFICATE----- - -Buypass Class 2 CA 1 -==================== ------BEGIN CERTIFICATE----- -MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2 -MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh -c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7M -cXA0ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLXl18xoS83 -0r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVBHfCuuCkslFJgNJQ72uA4 -0Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/R -uFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0P -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MYKWsUnTYjdbiAwKYjT+p0h+mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0P -AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFPBdy7 -pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27sEzNxZy5p+qksP2bA -EllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2mSlf56oBzKwzqBwKu5HEA6BvtjT5 -htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yCe/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQj -el/wroQk5PMr+4okoyeYZdowdXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915 ------END CERTIFICATE----- - -EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 -========================================================================== ------BEGIN CERTIFICATE----- -MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg -QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe -Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p -ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt -IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVya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jDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64k -XPBfrAowzIpAoHMEwfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqT -bCmYIai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJnxk1Gj7sU -RT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4QDgZxGhBM/nV+/x5XOULK -1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9qKd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt -2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11thie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQ -Y9iJSrSq3RZj9W6+YKH47ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9 -AahH3eU7QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT ------END CERTIFICATE----- - -certSIGN ROOT CA -================ ------BEGIN CERTIFICATE----- -MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD -VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa -Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE -CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I -JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH -rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 -ssHQnIFKquSy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SFIhxFXf2tiz -VHa6dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZOV/kbZKKT -VrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrCGHn2emU1z5DrvTOTn1Or -czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK -y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC -wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S -lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5 -Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM -O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8 -BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2 -G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m -mxE= ------END CERTIFICATE----- - -ApplicationCA - Japanese Government -=================================== ------BEGIN CERTIFICATE----- -MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT -SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw -MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl -cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4 -fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN -wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE -jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu -nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU -WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV -BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD -vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs -o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g -/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD -io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW -dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL -rosot4LKGAfmt1t06SAZf7IbiVQ= ------END CERTIFICATE----- - -GeoTrust Primary Certification Authority - G3 -============================================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ni9n64smefv2t+UXglpp+duaIy9 -cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE -Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD -AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s -t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt ------END CERTIFICATE----- - -thawte Primary Root CA - G2 -=========================== ------BEGIN CERTIFICATE----- -MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC -VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu -IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg -Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV -MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG -b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt -IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS -LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 -8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU -mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN -G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K -rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== ------END CERTIFICATE----- - -thawte Primary Root CA - G3 -=========================== ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE -BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 -aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w -ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh -d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD -VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG -A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At -P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC -+BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY -7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW -vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ -KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK -A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu -t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC -8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm -er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= ------END CERTIFICATE----- - -GeoTrust Primary Certification Authority - G2 -============================================= ------BEGIN CERTIFICATE----- -MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC -VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu -Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD -ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 -OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg -MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl -b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG -BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc -KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD -VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ -EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m -ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 -npaqBA+K ------END CERTIFICATE----- - -VeriSign Universal Root Certification Authority -=============================================== ------BEGIN CERTIFICATE----- -MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE -BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO -ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk -IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u -IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl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B2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P -wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 -mJO37M2CYfE45k+XmCpajQ== ------END CERTIFICATE----- - -VeriSign Class 3 Public Primary Certification Authority - G4 -============================================================ ------BEGIN CERTIFICATE----- -MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC -VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 -b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz -ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL -MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU -cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo -b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 -Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz -rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB -/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw -HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u -Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD -A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx -AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== ------END CERTIFICATE----- - -NetLock Arany (Class Gold) Főtanúsítvány -============================================ ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G -A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 -dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB -cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx -MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO -ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv -biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 -c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu -0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw -/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk -H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw -fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 -neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB -BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW -qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta -YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC -bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna -NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu -dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= ------END CERTIFICATE----- - -Staat der Nederlanden Root CA - G2 -================================== ------BEGIN CERTIFICATE----- -MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE -CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g -Um9vdCBDQSAtIEcyMB4XDTA4M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HIAdABpAGYAaQB0AHMAZQBlAHIAaQBtAGkAcwBrAGUA -cwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABzAGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABr -AGkAbgBuAGkAdABhAG0AaQBzAGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nw -cy8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE -FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcYP2/v6X2+MA4G -A1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOiCfP+JmeaUOTDBS8rNXiRTHyo -ERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+gkcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyL -abVAyJRld/JXIWY7zoVAtjNjGr95HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678 -IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh -Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2 -yyqcjg== ------END CERTIFICATE----- - -Hongkong Post Root CA 1 -======================= ------BEGIN CERTIFICATE----- -MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT -DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx -NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n -IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 -ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr -auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh -qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY -V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV -HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i -h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio -l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei -IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps -T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT -c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== ------END CERTIFICATE----- - -SecureSign RootCA11 -=================== ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi -SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS -b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0y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c6GqlPUB53NlTKxQMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU -9QHnc2VMrFAwRAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv -bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWImfQwng4/F9tqg -aHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3gvoFNTPhNahXwOf9jU8/kzJP -eGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKeI6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1Pwk -zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1 -ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI -KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq -nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE -I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp -MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o -tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 -f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol -hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky -CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX -bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/ -D/xwzoiQ ------END CERTIFICATE----- - -Microsec e-Szigno Root CA 2009 -============================== ------BEGIN CERTIFICATE----- -MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER -MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv -c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o -dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE -BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3J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ERTIFICATE----- - -E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi -=================================================== ------BEGIN CERTIFICATE----- -MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG -EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz -ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3 -MDEwNDExMzI0OFoXDTE3MDEwNDExMzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0 -cm9uaWsgQmlsZ2kgR3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9u -aWsgU2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdUMZTe1RK6UxYC6lhj71vY -8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlTL/jDj/6z/P2douNffb7tC+Bg62nsM+3Y -jfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAI -JjjcJRFHLfO6IxClv7wC90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk -9Ok0oSy1c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/BAQD -AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoEVtstxNulMA0GCSqG -SIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLPqk/CaOv/gKlR6D1id4k9CnU58W5d -F4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwq -D2fK/A+JYZ1lpTzlvBNbCNvj/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4 -Vwpm+Vganf2XKWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq -fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX ------END CERTIFICATE----- - -GlobalSign Root CA - R3 -======================= ------BEGIN CERTIFICATE----- -MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv -YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh -bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT -aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln -bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt -iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ -0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 -rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl -OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 -xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE -FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 -lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 -EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E -bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 -YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r -kpeDMdmztcpHWD9f ------END CERTIFICATE----- - -TC TrustCenter Universal CA III -=============================== ------BEGIN CERTIFICATE----- -MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy -IFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAe -Fw0wOTA5MDkwODE1MjdaFw0yOTEyMzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNU -QyBUcnVzdENlbnRlciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0Ex -KDAmBgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF5+cvAqBNLaT6hdqbJYUt -QCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYvDIRlzg9uwliT6CwLOunBjvvya8o84pxO -juT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8vzArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+Eut -CHnNaYlAJ/Uqwa1D7KRTyGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1 -M4BDj5yjdipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBhMB8G -A1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ -BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI4jANBgkqhkiG9w0BAQUFAAOCAQEA -g8ev6n9NCjw5sWi+e22JLumzCecYV42FmhfzdkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+ -KGwWaODIl0YgoGhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK -BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV -CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq -woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg== ------END CERTIFICATE----- - -Autoridad de Certificacion Firmaprofesional CIF A62634068 -========================================================= ------BEGIN CERTIFICATE----- -MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA -BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 -MjYzNDA2ODAeFw0wOTA1MjAwODM4MTV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29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA -bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx -ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx -51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk -R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP -T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f -Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl -osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR -crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR -saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD -KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi -6Et8Vcad+qMUu2WFbm5PEn4KPJ2V ------END CERTIFICATE----- - -Izenpe.com -========== ------BEGIN CERTIFICATE----- -MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG -EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz -MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYD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BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O -BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l -Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga -kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q -hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs -g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 -aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 -nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC -ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo -Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z -WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== ------END CERTIFICATE----- - -Chambers of Commerce Root - 2008 -================================ ------BEGIN CERTIFICATE----- -MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD -MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv -bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW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k9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG -nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg -OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ ------END CERTIFICATE----- - -Global Chambersign Root - 2008 -============================== ------BEGIN CERTIFICATE----- -MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD -MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv -bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu -QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx -NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg -Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ -QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD -aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf -VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf -XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0 -ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg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WbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6 -ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s -dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg -9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH -foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du -qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr -P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq -c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z -09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B ------END CERTIFICATE----- - -Go Daddy Root Certificate Authority - G2 -======================================== ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu -MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 -MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 -b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G -A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq -9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD -+qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd -fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl -NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 -BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac -vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r -5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV -N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO -LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 ------END CERTIFICATE----- - -Starfield Root Certificate Authority - G2 -========================================= ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R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lZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K -pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ -c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 ------END CERTIFICATE----- - -Starfield Services Root Certificate Authority - G2 -================================================== ------BEGIN CERTIFICATE----- -MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s -b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl -IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV -BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT -dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg -Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 -h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa -hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP -LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB -rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG -SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP -E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy -xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd -iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza -YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 ------END CERTIFICATE----- - -AffirmTrust Commercial -====================== ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw -MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly -bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb -DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV -C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 -BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww -MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV -HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG -hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi -qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv -0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh -sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= ------END CERTIFICATE----- - -AffirmTrust Networking -====================== ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw -MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly -bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE -Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI -dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 -/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb -h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV -HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu -UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 -12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 -WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 -/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= ------END CERTIFICATE----- - -AffirmTrust Premium -=================== ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy -OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy -dXN0MRwwGgYDVQQDDBNBZmZp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Yj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S -L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK -+4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV -BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg -IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 -g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb -zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== ------END CERTIFICATE----- - -AffirmTrust Premium ECC -======================= ------BEGIN CERTIFICATE----- -MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV -BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx -MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U -cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA -IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ -N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW -BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK -BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X -57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM -eQ== ------END CERTIFICATE----- - -Certum Trusted Network CA -========================= ------BEGIN CERTIFICATE----- -MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK -ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy -MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU -ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC -l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J -J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 -fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 -cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB -Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw -DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj -jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 -mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj -Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI -03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= ------END CERTIFICATE----- - -Certinomis - Autorité Racine -============================= ------BEGIN CERTIFICATE----- -MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK -Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg -LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG -A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw -JAYDVQQDDB1DZXJ0aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jYF1AMnmHa -wE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N8y4o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eMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv -JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE -qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b -WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE -wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/ -vgt2Fl43N+bYdJeimUV5 ------END CERTIFICATE----- - -Root CA Generalitat Valenciana -============================== ------BEGIN CERTIFICATE----- -MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE -ChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290 -IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcNMDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3 -WjBoMQswCQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UE -CxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+WmmmO3I2 -F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKjSgbwJ/BXufjpTjJ3Cj9B -ZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGlu6GzwZTNVOAydTGRGmKy3nXiz0+J2ZGQ -D0EbtFpKd71ng+C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J1 -c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtPWFuA/OQO8BBC4SA -zewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUjlUC5B3ilJfYKvUWG6Nm9wASOhURh73+n -yfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZznF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPE -SU7l0+m0iKsMrmKS1GWH2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4 -iHQF63n1k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs2e3V -cuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0OBAoECERqlWdV -eRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAVdRU0VlIXLOThaq/Yy/kgM40 -ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fGKOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmr -sQd7TZjTXLDR8KdCoLXEjq/+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd -JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS -mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6 -ahq97BvIxYSazQ== ------END CERTIFICATE----- - -TWCA Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ -VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh -dG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ication RootCA2 -============================== ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc -U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh -dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC -SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy -aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ -+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R -3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV -spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K -EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 -QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB -CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj -u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk -3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+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QBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT -ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 -HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a -E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw -0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD -VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 -Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l -dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ -lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa -Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe -l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 -E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D -5EI= ------END CERTIFICATE----- - -Hellenic Academic and Research Institutions RootCA 2011 -======================================================= ------BEGIN CERTIFIC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ELmVkdTAGgQQu -b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt -XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 -TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD -/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N -7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 ------END CERTIFICATE----- - -Actalis Authentication Root CA -============================== ------BEGIN CERTIFICATE----- -MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM -BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE -AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky -MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz -IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ -wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa -by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 -zfB9E1fAXdKDa0hMxKufgFpbOr3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JIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz -lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem -OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 -vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== ------END CERTIFICATE----- - -Trustis FPS Root CA -=================== ------BEGIN CERTIFICATE----- -MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG -EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290 -IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV -BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ -KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ -RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk -H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa -cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt -o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA -AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd -BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c -GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC -yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P -8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV -l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl -iB6XzCGcKQENZetX2fNXlrtIzYE= ------END CERTIFICATE----- - -StartCom Certification Authority -================================ ------BEGIN CERTIFICATE----- -MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu -ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 -NjM3WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg -U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw -ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y -o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedI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dGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0aWZpY2F0 -aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93d3cuc3RhcnRzc2wuY29t -L3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBG -cmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5 -fPGFf59Jb2vKXfuM/gTFwWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWm -N3PH/UvSTa0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst0OcN -Org+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNcpRJvkrKTlMeIFw6T -tn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKlCcWw0bdT82AUuoVpaiF8H3VhFyAX -e2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVFP0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA -2MFrLH9ZXF2RsXAiV+uKa0hK1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBs -HvUwyKMQ5bLmKhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE -JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ8dCAWZvLMdib -D4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnmfyWl8kgAwKQB2j8= ------END CERTIFICATE----- - -StartCom Certification Authority G2 -=================================== ------BEGIN CERTIFICATE----- -MIIFYzCCA0ugAwIBAgIBOzANBgk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gNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJ -KoZIhvcNAQELBQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K -2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfXUfEpY9Z1zRbk -J4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl6/2o1PXWT6RbdejF0mCy2wl+ -JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG -/+gyRr61M3Z3qAFdlsHB1b6uJcDJHgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTc -nIhT76IxW1hPkWLIwpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/Xld -blhYXzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5lIxKVCCIc -l85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoohdVddLHRDiBYmxOlsGOm -7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulrso8uBtjRkcfGEvRM/TAXw8HaOFvjqerm -obp573PYtlNXLfbQ4ddI ------END CERTIFICATE----- - -Buypass Class 2 Root CA -======================= ------BEGIN CERTIFICATE----- -MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X -DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 -eXBhc3MgQVMtOTgzMT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C8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S -aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd -DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD -LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 -oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC -wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS -CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN -rJgWVqA= ------END CERTIFICATE----- - -Buypass Class 3 Root CA -======================= ------BEGIN CERTIFICATE----- -MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X -DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 -eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH -sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR -5r/VUv1xLXA+58bEiuPwKAv0dpihi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Blk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz -6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug -UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe -eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi -Cp/HuZc= ------END CERTIFICATE----- - -T-TeleSec GlobalRoot Class 3 -============================ ------BEGIN CERTIFICATE----- -MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM -IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU -cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx -MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz -dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD -ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK -9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU -NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF -iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W -0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr -AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb -fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT -ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h -P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml -e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== ------END CERTIFICATE----- - -EE Certification Centre Root CA -=============================== ------BEGIN CERTIFICATE----- -MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG -EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy -dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw -MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB -UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy -ZSBSb290IENBMRgwFgYJKoZIhvcNAQk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zle/Http/Resources/cacert.pem.md5 deleted file mode 100644 index 7112ccf62..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem.md5 +++ /dev/null @@ -1 +0,0 @@ -349ba2d6964db9ca558c9e1daf38e428 diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/StaticClient.php b/vendor/guzzle/guzzle/src/Guzzle/Http/StaticClient.php deleted file mode 100644 index dbd4c1841..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/StaticClient.php +++ /dev/null @@ -1,157 +0,0 @@ -createRequest($method, $url, null, null, $options); - - if (isset($options['stream'])) { - if ($options['stream'] instanceof StreamRequestFactoryInterface) { - return $options['stream']->fromRequest($request); - } elseif ($options['stream'] == true) { - $streamFactory = new PhpStreamRequestFactory(); - return $streamFactory->fromRequest($request); - } - } - - return $request->send(); - } - - /** - * Send a GET request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function get($url, $options = array()) - { - return self::request('GET', $url, $options); - } - - /** - * Send a HEAD request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function head($url, $options = array()) - { - return self::request('HEAD', $url, $options); - } - - /** - * Send a DELETE request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function delete($url, $options = array()) - { - return self::request('DELETE', $url, $options); - } - - /** - * Send a POST request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function post($url, $options = array()) - { - return self::request('POST', $url, $options); - } - - /** - * Send a PUT request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function put($url, $options = array()) - { - return self::request('PUT', $url, $options); - } - - /** - * Send a PATCH request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function patch($url, $options = array()) - { - return self::request('PATCH', $url, $options); - } - - /** - * Send an OPTIONS request - * - * @param string $url URL of the request - * @param array $options Array of request options - * - * @return \Guzzle\Http\Message\Response - * @see Guzzle::request for a list of available options - */ - public static function options($url, $options = array()) - { - return self::request('OPTIONS', $url, $options); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/Url.php b/vendor/guzzle/guzzle/src/Guzzle/Http/Url.php deleted file mode 100644 index 91de5c4f3..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/Url.php +++ /dev/null @@ -1,549 +0,0 @@ - null, 'host' => null, 'path' => null, 'port' => null, 'query' => null, - 'user' => null, 'pass' => null, 'fragment' => null); - - if (false === ($parts = parse_url($url))) { - throw new InvalidArgumentException('Was unable to parse malformed url: ' . $url); - } - - $parts += $defaults; - - // Convert the query string into a QueryString object - if ($parts['query'] || 0 !== strlen($parts['query'])) { - $parts['query'] = QueryString::fromString($parts['query']); - } - - return new static($parts['scheme'], $parts['host'], $parts['user'], - $parts['pass'], $parts['port'], $parts['path'], $parts['query'], - $parts['fragment']); - } - - /** - * Build a URL from parse_url parts. The generated URL will be a relative URL if a scheme or host are not provided. - * - * @param array $parts Array of parse_url parts - * - * @return string - */ - public static function buildUrl(array $parts) - { - $url = $scheme = ''; - - if (isset($parts['scheme'])) { - $scheme = $parts['scheme']; - $url .= $scheme . ':'; - } - - if (isset($parts['host'])) { - $url .= '//'; - if (isset($parts['user'])) { - $url .= $parts['user']; - if (isset($parts['pass'])) { - $url .= ':' . $parts['pass']; - } - $url .= '@'; - } - - $url .= $parts['host']; - - // Only include the port if it is not the default port of the scheme - if (isset($parts['port']) - && !(($scheme == 'http' && $parts['port'] == 80) || ($scheme == 'https' && $parts['port'] == 443)) - ) { - $url .= ':' . $parts['port']; - } - } - - // Add the path component if present - if (isset($parts['path']) && 0 !== strlen($parts['path'])) { - // Always ensure that the path begins with '/' if set and something is before the path - if ($url && $parts['path'][0] != '/' && substr($url, -1) != '/') { - $url .= '/'; - } - $url .= $parts['path']; - } - - // Add the query string if present - if (isset($parts['query'])) { - $url .= '?' . $parts['query']; - } - - // Ensure that # is only added to the url if fragment contains anything. - if (isset($parts['fragment'])) { - $url .= '#' . $parts['fragment']; - } - - return $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 QueryString|array|string $query Query string of the URL - * @param string $fragment Fragment of the URL - */ - public function __construct($scheme, $host, $username = null, $password = null, $port = null, $path = null, QueryString $query = null, $fragment = null) - { - $this->scheme = $scheme; - $this->host = $host; - $this->port = $port; - $this->username = $username; - $this->password = $password; - $this->fragment = $fragment; - if (!$query) { - $this->query = new QueryString(); - } else { - $this->setQuery($query); - } - $this->setPath($path); - } - - /** - * Clone the URL - */ - public function __clone() - { - $this->query = clone $this->query; - } - - /** - * Returns the URL as a URL string - * - * @return string - */ - public function __toString() - { - return self::buildUrl($this->getParts()); - } - - /** - * Get the parts of the URL as an array - * - * @return array - */ - public function getParts() - { - $query = (string) $this->query; - - return array( - 'scheme' => $this->scheme, - 'user' => $this->username, - 'pass' => $this->password, - 'host' => $this->host, - 'port' => $this->port, - 'path' => $this->getPath(), - 'query' => $query !== '' ? $query : null, - 'fragment' => $this->fragment, - ); - } - - /** - * Set the host of the request. - * - * @param string $host Host to set (e.g. www.yahoo.com, yahoo.com) - * - * @return Url - */ - public function setHost($host) - { - if (strpos($host, ':') === false) { - $this->host = $host; - } else { - list($host, $port) = explode(':', $host); - $this->host = $host; - $this->setPort($port); - } - - return $this; - } - - /** - * Get the host part of the URL - * - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Set the scheme part of the URL (http, https, ftp, etc) - * - * @param string $scheme Scheme to set - * - * @return Url - */ - public function setScheme($scheme) - { - $this->scheme = $scheme; - - return $this; - } - - /** - * Get the scheme part of the URL - * - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Set the port part of the URL - * - * @param int $port Port to set - * - * @return Url - */ - public function setPort($port) - { - $this->port = $port; - - return $this; - } - - /** - * Get the port part of the URl. Will return the default port for a given scheme if no port has been set. - * - * @return int|null - */ - public function getPort() - { - if ($this->port) { - return $this->port; - } elseif ($this->scheme == 'http') { - return 80; - } elseif ($this->scheme == 'https') { - return 443; - } - - return null; - } - - /** - * Set the path part of the URL - * - * @param array|string $path Path string or array of path segments - * - * @return Url - */ - public function setPath($path) - { - static $pathReplace = array(' ' => '%20', '?' => '%3F'); - if (is_array($path)) { - $path = '/' . implode('/', $path); - } - - $this->path = strtr($path, $pathReplace); - - return $this; - } - - /** - * Normalize the URL so that double slashes and relative paths are removed - * - * @return Url - */ - public function normalizePath() - { - if (!$this->path || $this->path == '/' || $this->path == '*') { - return $this; - } - - $results = array(); - $segments = $this->getPathSegments(); - foreach ($segments as $segment) { - if ($segment == '..') { - array_pop($results); - } elseif ($segment != '.' && $segment != '') { - $results[] = $segment; - } - } - - // Combine the normalized parts and add the leading slash if needed - $this->path = ($this->path[0] == '/' ? '/' : '') . implode('/', $results); - - // Add the trailing slash if necessary - if ($this->path != '/' && end($segments) == '') { - $this->path .= '/'; - } - - return $this; - } - - /** - * Add a relative path to the currently set path - * - * @param string $relativePath Relative path to add - * - * @return Url - */ - public function addPath($relativePath) - { - if (!$relativePath || $relativePath == '/') { - return $this; - } - - // Add a leading slash if needed - if ($relativePath[0] != '/') { - $relativePath = '/' . $relativePath; - } - - return $this->setPath(str_replace('//', '/', $this->getPath() . $relativePath)); - } - - /** - * Get the path part of the URL - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Get the path segments of the URL as an array - * - * @return array - */ - public function getPathSegments() - { - return array_slice(explode('/', $this->getPath()), 1); - } - - /** - * Set the password part of the URL - * - * @param string $password Password to set - * - * @return Url - */ - public function setPassword($password) - { - $this->password = $password; - - return $this; - } - - /** - * Get the password part of the URL - * - * @return null|string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Set the username part of the URL - * - * @param string $username Username to set - * - * @return Url - */ - public function setUsername($username) - { - $this->username = $username; - - return $this; - } - - /** - * Get the username part of the URl - * - * @return null|string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Get the query part of the URL as a QueryString object - * - * @return QueryString - */ - public function getQuery() - { - return $this->query; - } - - /** - * Set the query part of the URL - * - * @param QueryString|string|array $query Query to set - * - * @return Url - */ - public function setQuery($query) - { - if (is_string($query)) { - $output = null; - parse_str($query, $output); - $this->query = new QueryString($output); - } elseif (is_array($query)) { - $this->query = new QueryString($query); - } elseif ($query instanceof QueryString) { - $this->query = $query; - } - - return $this; - } - - /** - * Get the fragment part of the URL - * - * @return null|string - */ - public function getFragment() - { - return $this->fragment; - } - - /** - * Set the fragment part of the URL - * - * @param string $fragment Fragment to set - * - * @return Url - */ - public function setFragment($fragment) - { - $this->fragment = $fragment; - - return $this; - } - - /** - * Check if this is an absolute URL - * - * @return bool - */ - public function isAbsolute() - { - return $this->scheme && $this->host; - } - - /** - * Combine the URL with another URL. Follows the rules specific in RFC 3986 section 5.4. - * - * @param string $url Relative URL to combine with - * @param bool $strictRfc3986 Set to true to use strict RFC 3986 compliance when merging paths. When first - * released, Guzzle used an incorrect algorithm for combining relative URL paths. In - * order to not break users, we introduced this flag to allow the merging of URLs based - * on strict RFC 3986 section 5.4.1. This means that "http://a.com/foo/baz" merged with - * "bar" would become "http://a.com/foo/bar". When this value is set to false, it would - * become "http://a.com/foo/baz/bar". - * @return Url - * @throws InvalidArgumentException - * @link http://tools.ietf.org/html/rfc3986#section-5.4 - */ - public function combine($url, $strictRfc3986 = false) - { - $url = self::factory($url); - - // Use the more absolute URL as the base URL - if (!$this->isAbsolute() && $url->isAbsolute()) { - $url = $url->combine($this); - } - - // Passing a URL with a scheme overrides everything - if ($buffer = $url->getScheme()) { - $this->scheme = $buffer; - $this->host = $url->getHost(); - $this->port = $url->getPort(); - $this->username = $url->getUsername(); - $this->password = $url->getPassword(); - $this->path = $url->getPath(); - $this->query = $url->getQuery(); - $this->fragment = $url->getFragment(); - return $this; - } - - // Setting a host overrides the entire rest of the URL - if ($buffer = $url->getHost()) { - $this->host = $buffer; - $this->port = $url->getPort(); - $this->username = $url->getUsername(); - $this->password = $url->getPassword(); - $this->path = $url->getPath(); - $this->query = $url->getQuery(); - $this->fragment = $url->getFragment(); - return $this; - } - - $path = $url->getPath(); - $query = $url->getQuery(); - - if (!$path) { - if (count($query)) { - $this->addQuery($query, $strictRfc3986); - } - } else { - if ($path[0] == '/') { - $this->path = $path; - } elseif ($strictRfc3986) { - $this->path .= '/../' . $path; - } else { - $this->path .= '/' . $path; - } - $this->normalizePath(); - $this->addQuery($query, $strictRfc3986); - } - - $this->fragment = $url->getFragment(); - - return $this; - } - - private function addQuery(QueryString $new, $strictRfc386) - { - if (!$strictRfc386) { - $new->merge($this->query); - } - - $this->query = $new; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Http/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Http/composer.json deleted file mode 100644 index 9384a5bf9..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Http/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "guzzle/http", - "description": "HTTP libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": ["http client", "http", "client", "Guzzle", "curl"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/common": "self.version", - "guzzle/parser": "self.version", - "guzzle/stream": "self.version" - }, - "suggest": { - "ext-curl": "*" - }, - "autoload": { - "psr-0": { "Guzzle\\Http": "" } - }, - "target-dir": "Guzzle/Http", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Inflection/Inflector.php b/vendor/guzzle/guzzle/src/Guzzle/Inflection/Inflector.php deleted file mode 100644 index c6997734c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Inflection/Inflector.php +++ /dev/null @@ -1,38 +0,0 @@ - array(), - 'camel' => array() - ); - - /** @var int Max entries per cache */ - protected $maxCacheSize; - - /** @var InflectorInterface Decorated inflector */ - protected $decoratedInflector; - - /** - * @param InflectorInterface $inflector Inflector being decorated - * @param int $maxCacheSize Maximum number of cached items to hold per cache - */ - public function __construct(InflectorInterface $inflector, $maxCacheSize = 500) - { - $this->decoratedInflector = $inflector; - $this->maxCacheSize = $maxCacheSize; - } - - public function snake($word) - { - if (!isset($this->cache['snake'][$word])) { - $this->pruneCache('snake'); - $this->cache['snake'][$word] = $this->decoratedInflector->snake($word); - } - - return $this->cache['snake'][$word]; - } - - /** - * Converts strings from snake_case to upper CamelCase - * - * @param string $word Value to convert into upper CamelCase - * - * @return string - */ - public function camel($word) - { - if (!isset($this->cache['camel'][$word])) { - $this->pruneCache('camel'); - $this->cache['camel'][$word] = $this->decoratedInflector->camel($word); - } - - return $this->cache['camel'][$word]; - } - - /** - * Prune one of the named caches by removing 20% of the cache if it is full - * - * @param string $cache Type of cache to prune - */ - protected function pruneCache($cache) - { - if (count($this->cache[$cache]) == $this->maxCacheSize) { - $this->cache[$cache] = array_slice($this->cache[$cache], $this->maxCacheSize * 0.2); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Inflection/PreComputedInflector.php b/vendor/guzzle/guzzle/src/Guzzle/Inflection/PreComputedInflector.php deleted file mode 100644 index db37e4fe4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Inflection/PreComputedInflector.php +++ /dev/null @@ -1,59 +0,0 @@ - array(), - 'camel' => array() - ); - - /** @var InflectorInterface Decorated inflector */ - protected $decoratedInflector; - - /** - * @param InflectorInterface $inflector Inflector being decorated - * @param array $snake Hash of pre-computed camel to snake - * @param array $camel Hash of pre-computed snake to camel - * @param bool $mirror Mirror snake and camel reflections - */ - public function __construct(InflectorInterface $inflector, array $snake = array(), array $camel = array(), $mirror = false) - { - if ($mirror) { - $camel = array_merge(array_flip($snake), $camel); - $snake = array_merge(array_flip($camel), $snake); - } - - $this->decoratedInflector = $inflector; - $this->mapping = array( - 'snake' => $snake, - 'camel' => $camel - ); - } - - public function snake($word) - { - return isset($this->mapping['snake'][$word]) - ? $this->mapping['snake'][$word] - : $this->decoratedInflector->snake($word); - } - - /** - * Converts strings from snake_case to upper CamelCase - * - * @param string $word Value to convert into upper CamelCase - * - * @return string - */ - public function camel($word) - { - return isset($this->mapping['camel'][$word]) - ? $this->mapping['camel'][$word] - : $this->decoratedInflector->camel($word); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Inflection/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Inflection/composer.json deleted file mode 100644 index 93f9e7b72..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Inflection/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "guzzle/inflection", - "description": "Guzzle inflection component", - "homepage": "http://guzzlephp.org/", - "keywords": ["inflection", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2" - }, - "autoload": { - "psr-0": { "Guzzle\\Inflection": "" } - }, - "target-dir": "Guzzle/Inflection", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/AppendIterator.php b/vendor/guzzle/guzzle/src/Guzzle/Iterator/AppendIterator.php deleted file mode 100644 index 1b6bd7e53..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/AppendIterator.php +++ /dev/null @@ -1,19 +0,0 @@ -getArrayIterator()->append($iterator); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/ChunkedIterator.php b/vendor/guzzle/guzzle/src/Guzzle/Iterator/ChunkedIterator.php deleted file mode 100644 index d76cdd439..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/ChunkedIterator.php +++ /dev/null @@ -1,56 +0,0 @@ -chunkSize = $chunkSize; - } - - public function rewind() - { - parent::rewind(); - $this->next(); - } - - public function next() - { - $this->chunk = array(); - for ($i = 0; $i < $this->chunkSize && parent::valid(); $i++) { - $this->chunk[] = parent::current(); - parent::next(); - } - } - - public function current() - { - return $this->chunk; - } - - public function valid() - { - return (bool) $this->chunk; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/FilterIterator.php b/vendor/guzzle/guzzle/src/Guzzle/Iterator/FilterIterator.php deleted file mode 100644 index b103367b6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/FilterIterator.php +++ /dev/null @@ -1,36 +0,0 @@ -callback = $callback; - } - - public function accept() - { - return call_user_func($this->callback, $this->current()); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/MapIterator.php b/vendor/guzzle/guzzle/src/Guzzle/Iterator/MapIterator.php deleted file mode 100644 index 7e586bda6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/MapIterator.php +++ /dev/null @@ -1,34 +0,0 @@ -callback = $callback; - } - - public function current() - { - return call_user_func($this->callback, parent::current()); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/MethodProxyIterator.php b/vendor/guzzle/guzzle/src/Guzzle/Iterator/MethodProxyIterator.php deleted file mode 100644 index de4ab0360..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/MethodProxyIterator.php +++ /dev/null @@ -1,27 +0,0 @@ -getInnerIterator(); - while ($i instanceof \OuterIterator) { - $i = $i->getInnerIterator(); - } - - return call_user_func_array(array($i, $name), $args); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/README.md b/vendor/guzzle/guzzle/src/Guzzle/Iterator/README.md deleted file mode 100644 index 8bb7e08e2..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Guzzle Iterator -=============== - -Provides useful Iterators and Iterator decorators - -- ChunkedIterator: Pulls out chunks from an inner iterator and yields the chunks as arrays -- FilterIterator: Used when PHP 5.4's CallbackFilterIterator is not available -- MapIterator: Maps values before yielding -- MethodProxyIterator: Proxies missing method calls to the innermost iterator - -### Installing via Composer - -```bash -# Install Composer -curl -sS https://getcomposer.org/installer | php - -# Add Guzzle as a dependency -php composer.phar require guzzle/iterator:~3.0 -``` - -After installing, you need to require Composer's autoloader: - -```php -require 'vendor/autoload.php'; -``` diff --git a/vendor/guzzle/guzzle/src/Guzzle/Iterator/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Iterator/composer.json deleted file mode 100644 index 17e800526..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Iterator/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/iterator", - "description": "Provides helpful iterators and iterator decorators", - "keywords": ["iterator", "guzzle"], - "homepage": "http://guzzlephp.org/", - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/common": ">=2.8.0" - }, - "autoload": { - "psr-0": { "Guzzle\\Iterator": "/" } - }, - "target-dir": "Guzzle/Log", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/AbstractLogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/AbstractLogAdapter.php deleted file mode 100644 index 7f6271bcb..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/AbstractLogAdapter.php +++ /dev/null @@ -1,16 +0,0 @@ -log; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php deleted file mode 100644 index a70fc8d42..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/ArrayLogAdapter.php +++ /dev/null @@ -1,34 +0,0 @@ -logs[] = array('message' => $message, 'priority' => $priority, 'extras' => $extras); - } - - /** - * Get logged entries - * - * @return array - */ - public function getLogs() - { - return $this->logs; - } - - /** - * Clears logged entries - */ - public function clearLogs() - { - $this->logs = array(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/ClosureLogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/ClosureLogAdapter.php deleted file mode 100644 index d4bb73f21..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/ClosureLogAdapter.php +++ /dev/null @@ -1,23 +0,0 @@ -log = $logObject; - } - - public function log($message, $priority = LOG_INFO, $extras = array()) - { - call_user_func($this->log, $message, $priority, $extras); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/LogAdapterInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Log/LogAdapterInterface.php deleted file mode 100644 index d7ac4ea7c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/LogAdapterInterface.php +++ /dev/null @@ -1,18 +0,0 @@ ->>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{curl_stderr}"; - const SHORT_FORMAT = '[{ts}] "{method} {resource} {protocol}/{version}" {code}'; - - /** - * @var string Template used to format log messages - */ - protected $template; - - /** - * @param string $template Log message template - */ - public function __construct($template = self::DEFAULT_FORMAT) - { - $this->template = $template ?: self::DEFAULT_FORMAT; - } - - /** - * Set the template to use for logging - * - * @param string $template Log message template - * - * @return self - */ - public function setTemplate($template) - { - $this->template = $template; - - return $this; - } - - /** - * Returns a formatted message - * - * @param RequestInterface $request Request that was sent - * @param Response $response Response that was received - * @param CurlHandle $handle Curl handle associated with the message - * @param array $customData Associative array of custom template data - * - * @return string - */ - public function format( - RequestInterface $request, - Response $response = null, - CurlHandle $handle = null, - array $customData = array() - ) { - $cache = $customData; - - return preg_replace_callback( - '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', - function (array $matches) use ($request, $response, $handle, &$cache) { - - if (array_key_exists($matches[1], $cache)) { - return $cache[$matches[1]]; - } - - $result = ''; - switch ($matches[1]) { - case 'request': - $result = (string) $request; - break; - case 'response': - $result = (string) $response; - break; - case 'req_body': - $result = $request instanceof EntityEnclosingRequestInterface - ? (string) $request->getBody() : ''; - break; - case 'res_body': - $result = $response ? $response->getBody(true) : ''; - break; - case 'ts': - $result = gmdate('c'); - break; - case 'method': - $result = $request->getMethod(); - break; - case 'url': - $result = (string) $request->getUrl(); - break; - case 'resource': - $result = $request->getResource(); - break; - case 'protocol': - $result = 'HTTP'; - break; - case 'version': - $result = $request->getProtocolVersion(); - break; - case 'host': - $result = $request->getHost(); - break; - case 'hostname': - $result = gethostname(); - break; - case 'port': - $result = $request->getPort(); - break; - case 'code': - $result = $response ? $response->getStatusCode() : ''; - break; - case 'phrase': - $result = $response ? $response->getReasonPhrase() : ''; - break; - case 'connect_time': - $result = $handle && $handle->getInfo(CURLINFO_CONNECT_TIME) - ? $handle->getInfo(CURLINFO_CONNECT_TIME) - : ($response ? $response->getInfo('connect_time') : ''); - break; - case 'total_time': - $result = $handle && $handle->getInfo(CURLINFO_TOTAL_TIME) - ? $handle->getInfo(CURLINFO_TOTAL_TIME) - : ($response ? $response->getInfo('total_time') : ''); - break; - case 'curl_error': - $result = $handle ? $handle->getError() : ''; - break; - case 'curl_code': - $result = $handle ? $handle->getErrorNo() : ''; - break; - case 'curl_stderr': - $result = $handle ? $handle->getStderr() : ''; - break; - default: - if (strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeader(substr($matches[1], 11)); - } elseif ($response && strpos($matches[1], 'res_header_') === 0) { - $result = $response->getHeader(substr($matches[1], 11)); - } - } - - $cache[$matches[1]] = $result; - return $result; - }, - $this->template - ); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/MonologLogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/MonologLogAdapter.php deleted file mode 100644 index 8c74a45dc..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/MonologLogAdapter.php +++ /dev/null @@ -1,34 +0,0 @@ - Logger::DEBUG, - LOG_INFO => Logger::INFO, - LOG_WARNING => Logger::WARNING, - LOG_ERR => Logger::ERROR, - LOG_CRIT => Logger::CRITICAL, - LOG_ALERT => Logger::ALERT - ); - - public function __construct(Logger $logObject) - { - $this->log = $logObject; - } - - public function log($message, $priority = LOG_INFO, $extras = array()) - { - $this->log->addRecord(self::$mapping[$priority], $message); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/PsrLogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/PsrLogAdapter.php deleted file mode 100644 index 38a2b600d..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/PsrLogAdapter.php +++ /dev/null @@ -1,36 +0,0 @@ - LogLevel::DEBUG, - LOG_INFO => LogLevel::INFO, - LOG_WARNING => LogLevel::WARNING, - LOG_ERR => LogLevel::ERROR, - LOG_CRIT => LogLevel::CRITICAL, - LOG_ALERT => LogLevel::ALERT - ); - - public function __construct(LoggerInterface $logObject) - { - $this->log = $logObject; - } - - public function log($message, $priority = LOG_INFO, $extras = array()) - { - $this->log->log(self::$mapping[$priority], $message, $extras); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/Zf1LogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/Zf1LogAdapter.php deleted file mode 100644 index 0ea8e3b1d..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/Zf1LogAdapter.php +++ /dev/null @@ -1,24 +0,0 @@ -log = $logObject; - Version::warn(__CLASS__ . ' is deprecated'); - } - - public function log($message, $priority = LOG_INFO, $extras = array()) - { - $this->log->log($message, $priority, $extras); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/Zf2LogAdapter.php b/vendor/guzzle/guzzle/src/Guzzle/Log/Zf2LogAdapter.php deleted file mode 100644 index 863f6a1c4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/Zf2LogAdapter.php +++ /dev/null @@ -1,21 +0,0 @@ -log = $logObject; - } - - public function log($message, $priority = LOG_INFO, $extras = array()) - { - $this->log->log($priority, $message, $extras); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Log/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Log/composer.json deleted file mode 100644 index a8213e8b4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Log/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "guzzle/log", - "description": "Guzzle log adapter component", - "homepage": "http://guzzlephp.org/", - "keywords": ["log", "adapter", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2" - }, - "autoload": { - "psr-0": { "Guzzle\\Log": "" } - }, - "suggest": { - "guzzle/http": "self.version" - }, - "target-dir": "Guzzle/Log", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParser.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParser.php deleted file mode 100644 index 8e825f9bd..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParser.php +++ /dev/null @@ -1,86 +0,0 @@ - 'Domain', - 'path' => 'Path', - 'max_age' => 'Max-Age', - 'expires' => 'Expires', - 'version' => 'Version', - 'secure' => 'Secure', - 'port' => 'Port', - 'discard' => 'Discard', - 'comment' => 'Comment', - 'comment_url' => 'Comment-Url', - 'http_only' => 'HttpOnly' - ); - - public function parseCookie($cookie, $host = null, $path = null, $decode = false) - { - // Explode the cookie string using a series of semicolons - $pieces = array_filter(array_map('trim', explode(';', $cookie))); - - // The name of the cookie (first kvp) must include an equal sign. - if (empty($pieces) || !strpos($pieces[0], '=')) { - return false; - } - - // Create the default return array - $data = array_merge(array_fill_keys(array_keys(self::$cookieParts), null), array( - 'cookies' => array(), - 'data' => array(), - 'path' => $path ?: '/', - 'http_only' => false, - 'discard' => false, - 'domain' => $host - )); - $foundNonCookies = 0; - - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - - $cookieParts = explode('=', $part, 2); - $key = trim($cookieParts[0]); - - if (count($cookieParts) == 1) { - // Can be a single value (e.g. secure, httpOnly) - $value = true; - } else { - // Be sure to strip wrapping quotes - $value = trim($cookieParts[1], " \n\r\t\0\x0B\""); - if ($decode) { - $value = urldecode($value); - } - } - - // Only check for non-cookies when cookies have been found - if (!empty($data['cookies'])) { - foreach (self::$cookieParts as $mapValue => $search) { - if (!strcasecmp($search, $key)) { - $data[$mapValue] = $mapValue == 'port' ? array_map('trim', explode(',', $value)) : $value; - $foundNonCookies++; - continue 2; - } - } - } - - // If cookies have not yet been retrieved, or this value was not found in the pieces array, treat it as a - // cookie. IF non-cookies have been parsed, then this isn't a cookie, it's cookie data. Cookies then data. - $data[$foundNonCookies ? 'data' : 'cookies'][$key] = $value; - } - - // Calculate the expires date - if (!$data['expires'] && $data['max_age']) { - $data['expires'] = time() + (int) $data['max_age']; - } - - return $data; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParserInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParserInterface.php deleted file mode 100644 index d21ffe21c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParserInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - $requestUrl, - 'scheme' => 'http' - ); - - // Check for the Host header - if (isset($parts['headers']['Host'])) { - $urlParts['host'] = $parts['headers']['Host']; - } elseif (isset($parts['headers']['host'])) { - $urlParts['host'] = $parts['headers']['host']; - } else { - $urlParts['host'] = null; - } - - if (false === strpos($urlParts['host'], ':')) { - $urlParts['port'] = ''; - } else { - $hostParts = explode(':', $urlParts['host']); - $urlParts['host'] = trim($hostParts[0]); - $urlParts['port'] = (int) trim($hostParts[1]); - if ($urlParts['port'] == 443) { - $urlParts['scheme'] = 'https'; - } - } - - // Check if a query is present - $path = $urlParts['path']; - $qpos = strpos($path, '?'); - if ($qpos) { - $urlParts['query'] = substr($path, $qpos + 1); - $urlParts['path'] = substr($path, 0, $qpos); - } else { - $urlParts['query'] = ''; - } - - return $urlParts; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParser.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParser.php deleted file mode 100644 index 104740068..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParser.php +++ /dev/null @@ -1,110 +0,0 @@ -parseMessage($message); - - // Parse the protocol and protocol version - if (isset($parts['start_line'][2])) { - $startParts = explode('/', $parts['start_line'][2]); - $protocol = strtoupper($startParts[0]); - $version = isset($startParts[1]) ? $startParts[1] : '1.1'; - } else { - $protocol = 'HTTP'; - $version = '1.1'; - } - - $parsed = array( - 'method' => strtoupper($parts['start_line'][0]), - 'protocol' => $protocol, - 'version' => $version, - 'headers' => $parts['headers'], - 'body' => $parts['body'] - ); - - $parsed['request_url'] = $this->getUrlPartsFromMessage($parts['start_line'][1], $parsed); - - return $parsed; - } - - public function parseResponse($message) - { - if (!$message) { - return false; - } - - $parts = $this->parseMessage($message); - list($protocol, $version) = explode('/', trim($parts['start_line'][0])); - - return array( - 'protocol' => $protocol, - 'version' => $version, - 'code' => $parts['start_line'][1], - 'reason_phrase' => isset($parts['start_line'][2]) ? $parts['start_line'][2] : '', - 'headers' => $parts['headers'], - 'body' => $parts['body'] - ); - } - - /** - * Parse a message into parts - * - * @param string $message Message to parse - * - * @return array - */ - protected function parseMessage($message) - { - $startLine = null; - $headers = array(); - $body = ''; - - // Iterate over each line in the message, accounting for line endings - $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE); - for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) { - - $line = $lines[$i]; - - // If two line breaks were encountered, then this is the end of body - if (empty($line)) { - if ($i < $totalLines - 1) { - $body = implode('', array_slice($lines, $i + 2)); - } - break; - } - - // Parse message headers - if (!$startLine) { - $startLine = explode(' ', $line, 3); - } elseif (strpos($line, ':')) { - $parts = explode(':', $line, 2); - $key = trim($parts[0]); - $value = isset($parts[1]) ? trim($parts[1]) : ''; - if (!isset($headers[$key])) { - $headers[$key] = $value; - } elseif (!is_array($headers[$key])) { - $headers[$key] = array($headers[$key], $value); - } else { - $headers[$key][] = $value; - } - } - } - - return array( - 'start_line' => $startLine, - 'headers' => $headers, - 'body' => $body - ); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParserInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParserInterface.php deleted file mode 100644 index cc448088d..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParserInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - $parts->requestMethod, - 'protocol' => 'HTTP', - 'version' => number_format($parts->httpVersion, 1), - 'headers' => $parts->headers, - 'body' => $parts->body - ); - - $parsed['request_url'] = $this->getUrlPartsFromMessage($parts->requestUrl, $parsed); - - return $parsed; - } - - public function parseResponse($message) - { - if (!$message) { - return false; - } - - $parts = http_parse_message($message); - - return array( - 'protocol' => 'HTTP', - 'version' => number_format($parts->httpVersion, 1), - 'code' => $parts->responseCode, - 'reason_phrase' => $parts->responseStatus, - 'headers' => $parts->headers, - 'body' => $parts->body - ); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/ParserRegistry.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/ParserRegistry.php deleted file mode 100644 index f8386831c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/ParserRegistry.php +++ /dev/null @@ -1,75 +0,0 @@ - 'Guzzle\\Parser\\Message\\MessageParser', - 'cookie' => 'Guzzle\\Parser\\Cookie\\CookieParser', - 'url' => 'Guzzle\\Parser\\Url\\UrlParser', - 'uri_template' => 'Guzzle\\Parser\\UriTemplate\\UriTemplate', - ); - - /** - * @return self - * @codeCoverageIgnore - */ - public static function getInstance() - { - if (!self::$instance) { - self::$instance = new static; - } - - return self::$instance; - } - - public function __construct() - { - // Use the PECL URI template parser if available - if (extension_loaded('uri_template')) { - $this->mapping['uri_template'] = 'Guzzle\\Parser\\UriTemplate\\PeclUriTemplate'; - } - } - - /** - * Get a parser by name from an instance - * - * @param string $name Name of the parser to retrieve - * - * @return mixed|null - */ - public function getParser($name) - { - if (!isset($this->instances[$name])) { - if (!isset($this->mapping[$name])) { - return null; - } - $class = $this->mapping[$name]; - $this->instances[$name] = new $class(); - } - - return $this->instances[$name]; - } - - /** - * Register a custom parser by name with the register - * - * @param string $name Name or handle of the parser to register - * @param mixed $parser Instantiated parser to register - */ - public function registerParser($name, $parser) - { - $this->instances[$name] = $parser; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/PeclUriTemplate.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/PeclUriTemplate.php deleted file mode 100644 index b0764e837..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/PeclUriTemplate.php +++ /dev/null @@ -1,26 +0,0 @@ - true, '#' => true, '.' => true, '/' => true, ';' => true, '?' => true, '&' => true - ); - - /** @var array Delimiters */ - private static $delims = array( - ':', '/', '?', '#', '[', ']', '@', '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=' - ); - - /** @var array Percent encoded delimiters */ - private static $delimsPct = array( - '%3A', '%2F', '%3F', '%23', '%5B', '%5D', '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', - '%3B', '%3D' - ); - - public function expand($template, array $variables) - { - if ($this->regex == self::DEFAULT_PATTERN && false === strpos($template, '{')) { - return $template; - } - - $this->template = $template; - $this->variables = $variables; - - return preg_replace_callback($this->regex, array($this, 'expandMatch'), $this->template); - } - - /** - * Set the regex patten used to expand URI templates - * - * @param string $regexPattern - */ - public function setRegex($regexPattern) - { - $this->regex = $regexPattern; - } - - /** - * Parse an expression into parts - * - * @param string $expression Expression to parse - * - * @return array Returns an associative array of parts - */ - private function parseExpression($expression) - { - // Check for URI operators - $operator = ''; - - if (isset(self::$operatorHash[$expression[0]])) { - $operator = $expression[0]; - $expression = substr($expression, 1); - } - - $values = explode(',', $expression); - foreach ($values as &$value) { - $value = trim($value); - $varspec = array(); - $substrPos = strpos($value, ':'); - if ($substrPos) { - $varspec['value'] = substr($value, 0, $substrPos); - $varspec['modifier'] = ':'; - $varspec['position'] = (int) substr($value, $substrPos + 1); - } elseif (substr($value, -1) == '*') { - $varspec['modifier'] = '*'; - $varspec['value'] = substr($value, 0, -1); - } else { - $varspec['value'] = (string) $value; - $varspec['modifier'] = ''; - } - $value = $varspec; - } - - return array( - 'operator' => $operator, - 'values' => $values - ); - } - - /** - * Process an expansion - * - * @param array $matches Matches met in the preg_replace_callback - * - * @return string Returns the replacement string - */ - private function expandMatch(array $matches) - { - static $rfc1738to3986 = array( - '+' => '%20', - '%7e' => '~' - ); - - $parsed = self::parseExpression($matches[1]); - $replacements = array(); - - $prefix = $parsed['operator']; - $joiner = $parsed['operator']; - $useQueryString = false; - if ($parsed['operator'] == '?') { - $joiner = '&'; - $useQueryString = true; - } elseif ($parsed['operator'] == '&') { - $useQueryString = true; - } elseif ($parsed['operator'] == '#') { - $joiner = ','; - } elseif ($parsed['operator'] == ';') { - $useQueryString = true; - } elseif ($parsed['operator'] == '' || $parsed['operator'] == '+') { - $joiner = ','; - $prefix = ''; - } - - foreach ($parsed['values'] as $value) { - - if (!array_key_exists($value['value'], $this->variables) || $this->variables[$value['value']] === null) { - continue; - } - - $variable = $this->variables[$value['value']]; - $actuallyUseQueryString = $useQueryString; - $expanded = ''; - - if (is_array($variable)) { - - $isAssoc = $this->isAssoc($variable); - $kvp = array(); - foreach ($variable as $key => $var) { - - if ($isAssoc) { - $key = rawurlencode($key); - $isNestedArray = is_array($var); - } else { - $isNestedArray = false; - } - - if (!$isNestedArray) { - $var = rawurlencode($var); - if ($parsed['operator'] == '+' || $parsed['operator'] == '#') { - $var = $this->decodeReserved($var); - } - } - - if ($value['modifier'] == '*') { - if ($isAssoc) { - if ($isNestedArray) { - // Nested arrays must allow for deeply nested structures - $var = strtr(http_build_query(array($key => $var)), $rfc1738to3986); - } else { - $var = $key . '=' . $var; - } - } elseif ($key > 0 && $actuallyUseQueryString) { - $var = $value['value'] . '=' . $var; - } - } - - $kvp[$key] = $var; - } - - if (empty($variable)) { - $actuallyUseQueryString = false; - } elseif ($value['modifier'] == '*') { - $expanded = implode($joiner, $kvp); - if ($isAssoc) { - // Don't prepend the value name when using the explode modifier with an associative array - $actuallyUseQueryString = false; - } - } else { - if ($isAssoc) { - // When an associative array is encountered and the explode modifier is not set, then the - // result must be a comma separated list of keys followed by their respective values. - foreach ($kvp as $k => &$v) { - $v = $k . ',' . $v; - } - } - $expanded = implode(',', $kvp); - } - - } else { - if ($value['modifier'] == ':') { - $variable = substr($variable, 0, $value['position']); - } - $expanded = rawurlencode($variable); - if ($parsed['operator'] == '+' || $parsed['operator'] == '#') { - $expanded = $this->decodeReserved($expanded); - } - } - - if ($actuallyUseQueryString) { - if (!$expanded && $joiner != '&') { - $expanded = $value['value']; - } else { - $expanded = $value['value'] . '=' . $expanded; - } - } - - $replacements[] = $expanded; - } - - $ret = implode($joiner, $replacements); - if ($ret && $prefix) { - return $prefix . $ret; - } - - return $ret; - } - - /** - * Determines if an array is associative - * - * @param array $array Array to check - * - * @return bool - */ - private function isAssoc(array $array) - { - return (bool) count(array_filter(array_keys($array), 'is_string')); - } - - /** - * Removes percent encoding on reserved characters (used with + and # modifiers) - * - * @param string $string String to fix - * - * @return string - */ - private function decodeReserved($string) - { - return str_replace(self::$delimsPct, self::$delims, $string); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/UriTemplateInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/UriTemplateInterface.php deleted file mode 100644 index c81d51548..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/UriTemplateInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -utf8 = $utf8; - } - - public function parseUrl($url) - { - Version::warn(__CLASS__ . ' is deprecated. Just use parse_url()'); - - static $defaults = array('scheme' => null, 'host' => null, 'path' => null, 'port' => null, 'query' => null, - 'user' => null, 'pass' => null, 'fragment' => null); - - $parts = parse_url($url); - - // Need to handle query parsing specially for UTF-8 requirements - if ($this->utf8 && isset($parts['query'])) { - $queryPos = strpos($url, '?'); - if (isset($parts['fragment'])) { - $parts['query'] = substr($url, $queryPos + 1, strpos($url, '#') - $queryPos - 1); - } else { - $parts['query'] = substr($url, $queryPos + 1); - } - } - - return $parts + $defaults; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Parser/Url/UrlParserInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Parser/Url/UrlParserInterface.php deleted file mode 100644 index 89ac4b307..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Parser/Url/UrlParserInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -=5.3.2" - }, - "autoload": { - "psr-0": { "Guzzle\\Parser": "" } - }, - "target-dir": "Guzzle/Parser", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Async/AsyncPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Async/AsyncPlugin.php deleted file mode 100644 index ae5941873..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Async/AsyncPlugin.php +++ /dev/null @@ -1,84 +0,0 @@ - 'onBeforeSend', - 'request.exception' => 'onRequestTimeout', - 'request.sent' => 'onRequestSent', - 'curl.callback.progress' => 'onCurlProgress' - ); - } - - /** - * Event used to ensure that progress callback are emitted from the curl handle's request mediator. - * - * @param Event $event - */ - public function onBeforeSend(Event $event) - { - // Ensure that progress callbacks are dispatched - $event['request']->getCurlOptions()->set('progress', true); - } - - /** - * Event emitted when a curl progress function is called. When the amount of data uploaded == the amount of data to - * upload OR any bytes have been downloaded, then time the request out after 1ms because we're done with - * transmitting the request, and tell curl not download a body. - * - * @param Event $event - */ - public function onCurlProgress(Event $event) - { - if ($event['handle'] && - ($event['downloaded'] || (isset($event['uploaded']) && $event['upload_size'] === $event['uploaded'])) - ) { - // Timeout after 1ms - curl_setopt($event['handle'], CURLOPT_TIMEOUT_MS, 1); - // Even if the response is quick, tell curl not to download the body. - // - Note that we can only perform this shortcut if the request transmitted a body so as to ensure that the - // request method is not converted to a HEAD request before the request was sent via curl. - if ($event['uploaded']) { - curl_setopt($event['handle'], CURLOPT_NOBODY, true); - } - } - } - - /** - * Event emitted when a curl exception occurs. Ignore the exception and set a mock response. - * - * @param Event $event - */ - public function onRequestTimeout(Event $event) - { - if ($event['exception'] instanceof CurlException) { - $event['request']->setResponse(new Response(200, array( - 'X-Guzzle-Async' => 'Did not wait for the response' - ))); - } - } - - /** - * Event emitted when a request completes because it took less than 1ms. Add an X-Guzzle-Async header to notify the - * caller that there is no body in the message. - * - * @param Event $event - */ - public function onRequestSent(Event $event) - { - // Let the caller know this was meant to be async - $event['request']->getResponse()->setHeader('X-Guzzle-Async', 'Did not wait for the response'); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Async/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Async/composer.json deleted file mode 100644 index dc3fc5bf8..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Async/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/plugin-async", - "description": "Guzzle async request plugin", - "homepage": "http://guzzlephp.org/", - "keywords": ["plugin", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Async": "" } - }, - "target-dir": "Guzzle/Plugin/Async", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractBackoffStrategy.php deleted file mode 100644 index 0a8598345..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractBackoffStrategy.php +++ /dev/null @@ -1,91 +0,0 @@ -next = $next; - } - - /** - * Get the next backoff strategy in the chain - * - * @return AbstractBackoffStrategy|null - */ - public function getNext() - { - return $this->next; - } - - public function getBackoffPeriod( - $retries, - RequestInterface $request, - Response $response = null, - HttpException $e = null - ) { - $delay = $this->getDelay($retries, $request, $response, $e); - if ($delay === false) { - // The strategy knows that this must not be retried - return false; - } elseif ($delay === null) { - // If the strategy is deferring a decision and the next strategy will not make a decision then return false - return !$this->next || !$this->next->makesDecision() - ? false - : $this->next->getBackoffPeriod($retries, $request, $response, $e); - } elseif ($delay === true) { - // if the strategy knows that it must retry but is deferring to the next to determine the delay - if (!$this->next) { - return 0; - } else { - $next = $this->next; - while ($next->makesDecision() && $next->getNext()) { - $next = $next->getNext(); - } - return !$next->makesDecision() ? $next->getBackoffPeriod($retries, $request, $response, $e) : 0; - } - } else { - return $delay; - } - } - - /** - * Check if the strategy does filtering and makes decisions on whether or not to retry. - * - * Strategies that return false will never retry if all of the previous strategies in a chain defer on a backoff - * decision. - * - * @return bool - */ - abstract public function makesDecision(); - - /** - * Implement the concrete strategy - * - * @param int $retries Number of retries of the request - * @param RequestInterface $request Request that was sent - * @param Response $response Response that was received. Note that there may not be a response - * @param HttpException $e Exception that was encountered if any - * - * @return bool|int|null Returns false to not retry or the number of seconds to delay between retries. Return true - * or null to defer to the next strategy if available, and if not, return 0. - */ - abstract protected function getDelay( - $retries, - RequestInterface $request, - Response $response = null, - HttpException $e = null - ); -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractErrorCodeBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractErrorCodeBackoffStrategy.php deleted file mode 100644 index 6ebee6c1a..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractErrorCodeBackoffStrategy.php +++ /dev/null @@ -1,40 +0,0 @@ -errorCodes = array_fill_keys($codes ?: static::$defaultErrorCodes, 1); - $this->next = $next; - } - - /** - * Get the default failure codes to retry - * - * @return array - */ - public static function getDefaultFailureCodes() - { - return static::$defaultErrorCodes; - } - - public function makesDecision() - { - return true; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffLogger.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffLogger.php deleted file mode 100644 index ec54c289e..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffLogger.php +++ /dev/null @@ -1,76 +0,0 @@ -logger = $logger; - $this->formatter = $formatter ?: new MessageFormatter(self::DEFAULT_FORMAT); - } - - public static function getSubscribedEvents() - { - return array(BackoffPlugin::RETRY_EVENT => 'onRequestRetry'); - } - - /** - * Set the template to use for logging - * - * @param string $template Log message template - * - * @return self - */ - public function setTemplate($template) - { - $this->formatter->setTemplate($template); - - return $this; - } - - /** - * Called when a request is being retried - * - * @param Event $event Event emitted - */ - public function onRequestRetry(Event $event) - { - $this->logger->log($this->formatter->format( - $event['request'], - $event['response'], - $event['handle'], - array( - 'retries' => $event['retries'], - 'delay' => $event['delay'] - ) - )); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffPlugin.php deleted file mode 100644 index 99ace0538..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffPlugin.php +++ /dev/null @@ -1,126 +0,0 @@ -strategy = $strategy; - } - - /** - * Retrieve a basic truncated exponential backoff plugin that will retry HTTP errors and cURL errors - * - * @param int $maxRetries Maximum number of retries - * @param array $httpCodes HTTP response codes to retry - * @param array $curlCodes cURL error codes to retry - * - * @return self - */ - public static function getExponentialBackoff( - $maxRetries = 3, - array $httpCodes = null, - array $curlCodes = null - ) { - return new self(new TruncatedBackoffStrategy($maxRetries, - new HttpBackoffStrategy($httpCodes, - new CurlBackoffStrategy($curlCodes, - new ExponentialBackoffStrategy() - ) - ) - )); - } - - public static function getAllEvents() - { - return array(self::RETRY_EVENT); - } - - public static function getSubscribedEvents() - { - return array( - 'request.sent' => 'onRequestSent', - 'request.exception' => 'onRequestSent', - CurlMultiInterface::POLLING_REQUEST => 'onRequestPoll' - ); - } - - /** - * Called when a request has been sent and isn't finished processing - * - * @param Event $event - */ - public function onRequestSent(Event $event) - { - $request = $event['request']; - $response = $event['response']; - $exception = $event['exception']; - - $params = $request->getParams(); - $retries = (int) $params->get(self::RETRY_PARAM); - $delay = $this->strategy->getBackoffPeriod($retries, $request, $response, $exception); - - if ($delay !== false) { - // Calculate how long to wait until the request should be retried - $params->set(self::RETRY_PARAM, ++$retries) - ->set(self::DELAY_PARAM, microtime(true) + $delay); - // Send the request again - $request->setState(RequestInterface::STATE_TRANSFER); - $this->dispatch(self::RETRY_EVENT, array( - 'request' => $request, - 'response' => $response, - 'handle' => ($exception && $exception instanceof CurlException) ? $exception->getCurlHandle() : null, - 'retries' => $retries, - 'delay' => $delay - )); - } - } - - /** - * Called when a request is polling in the curl multi object - * - * @param Event $event - */ - public function onRequestPoll(Event $event) - { - $request = $event['request']; - $delay = $request->getParams()->get(self::DELAY_PARAM); - - // If the duration of the delay has passed, retry the request using the pool - if (null !== $delay && microtime(true) >= $delay) { - // Remove the request from the pool and then add it back again. This is required for cURL to know that we - // want to retry sending the easy handle. - $request->getParams()->remove(self::DELAY_PARAM); - // Rewind the request body if possible - if ($request instanceof EntityEnclosingRequestInterface && $request->getBody()) { - $request->getBody()->seek(0); - } - $multi = $event['curl_multi']; - $multi->remove($request); - $multi->add($request); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffStrategyInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffStrategyInterface.php deleted file mode 100644 index 4e590dbe0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffStrategyInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -callback = $callback; - $this->decision = (bool) $decision; - $this->next = $next; - } - - public function makesDecision() - { - return $this->decision; - } - - protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null) - { - return call_user_func($this->callback, $retries, $request, $response, $e); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ConstantBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ConstantBackoffStrategy.php deleted file mode 100644 index 061d2a407..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ConstantBackoffStrategy.php +++ /dev/null @@ -1,34 +0,0 @@ -delay = $delay; - } - - public function makesDecision() - { - return false; - } - - protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null) - { - return $this->delay; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/CurlBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/CurlBackoffStrategy.php deleted file mode 100644 index a584ed4a2..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/CurlBackoffStrategy.php +++ /dev/null @@ -1,28 +0,0 @@ -errorCodes[$e->getErrorNo()]) ? true : null; - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ExponentialBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ExponentialBackoffStrategy.php deleted file mode 100644 index fb2912d50..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ExponentialBackoffStrategy.php +++ /dev/null @@ -1,25 +0,0 @@ -isSuccessful()) { - return false; - } else { - return isset($this->errorCodes[$response->getStatusCode()]) ? true : null; - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/LinearBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/LinearBackoffStrategy.php deleted file mode 100644 index b35e8a490..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/LinearBackoffStrategy.php +++ /dev/null @@ -1,36 +0,0 @@ -step = $step; - } - - public function makesDecision() - { - return false; - } - - protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null) - { - return $retries * $this->step; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ReasonPhraseBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ReasonPhraseBackoffStrategy.php deleted file mode 100644 index 4fd73fedf..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ReasonPhraseBackoffStrategy.php +++ /dev/null @@ -1,25 +0,0 @@ -errorCodes[$response->getReasonPhrase()]) ? true : null; - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/TruncatedBackoffStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/TruncatedBackoffStrategy.php deleted file mode 100644 index 3608f3584..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/TruncatedBackoffStrategy.php +++ /dev/null @@ -1,36 +0,0 @@ -max = $maxRetries; - $this->next = $next; - } - - public function makesDecision() - { - return true; - } - - protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null) - { - return $retries < $this->max ? null : false; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/composer.json deleted file mode 100644 index 91c122cb4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "guzzle/plugin-backoff", - "description": "Guzzle backoff retry plugins", - "homepage": "http://guzzlephp.org/", - "keywords": ["plugin", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version", - "guzzle/log": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Backoff": "" } - }, - "target-dir": "Guzzle/Plugin/Backoff", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheKeyProviderInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheKeyProviderInterface.php deleted file mode 100644 index 7790f8844..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheKeyProviderInterface.php +++ /dev/null @@ -1,11 +0,0 @@ - new DefaultCacheStorage($options)); - } elseif ($options instanceof CacheStorageInterface) { - $options = array('storage' => $options); - } elseif ($options) { - $options = array('storage' => new DefaultCacheStorage(CacheAdapterFactory::fromCache($options))); - } elseif (!class_exists('Doctrine\Common\Cache\ArrayCache')) { - // @codeCoverageIgnoreStart - throw new InvalidArgumentException('No cache was provided and Doctrine is not installed'); - // @codeCoverageIgnoreEnd - } - } - - $this->autoPurge = isset($options['auto_purge']) ? $options['auto_purge'] : false; - - // Add a cache storage if a cache adapter was provided - $this->storage = isset($options['storage']) - ? $options['storage'] - : new DefaultCacheStorage(new DoctrineCacheAdapter(new ArrayCache())); - - if (!isset($options['can_cache'])) { - $this->canCache = new DefaultCanCacheStrategy(); - } else { - $this->canCache = is_callable($options['can_cache']) - ? new CallbackCanCacheStrategy($options['can_cache']) - : $options['can_cache']; - } - - // Use the provided revalidation strategy or the default - $this->revalidation = isset($options['revalidation']) - ? $options['revalidation'] - : new DefaultRevalidation($this->storage, $this->canCache); - } - - public static function getSubscribedEvents() - { - return array( - 'request.before_send' => array('onRequestBeforeSend', -255), - 'request.sent' => array('onRequestSent', 255), - 'request.error' => array('onRequestError', 0), - 'request.exception' => array('onRequestException', 0), - ); - } - - /** - * Check if a response in cache will satisfy the request before sending - * - * @param Event $event - */ - public function onRequestBeforeSend(Event $event) - { - $request = $event['request']; - $request->addHeader('Via', sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION)); - - if (!$this->canCache->canCacheRequest($request)) { - switch ($request->getMethod()) { - case 'PURGE': - $this->purge($request); - $request->setResponse(new Response(200, array(), 'purged')); - break; - case 'PUT': - case 'POST': - case 'DELETE': - case 'PATCH': - if ($this->autoPurge) { - $this->purge($request); - } - } - return; - } - - if ($response = $this->storage->fetch($request)) { - $params = $request->getParams(); - $params['cache.lookup'] = true; - $response->setHeader( - 'Age', - time() - strtotime($response->getDate() ? : $response->getLastModified() ?: 'now') - ); - // Validate that the response satisfies the request - if ($this->canResponseSatisfyRequest($request, $response)) { - if (!isset($params['cache.hit'])) { - $params['cache.hit'] = true; - } - $request->setResponse($response); - } - } - } - - /** - * If possible, store a response in cache after sending - * - * @param Event $event - */ - public function onRequestSent(Event $event) - { - $request = $event['request']; - $response = $event['response']; - - if ($request->getParams()->get('cache.hit') === null && - $this->canCache->canCacheRequest($request) && - $this->canCache->canCacheResponse($response) - ) { - $this->storage->cache($request, $response); - } - - $this->addResponseHeaders($request, $response); - } - - /** - * If possible, return a cache response on an error - * - * @param Event $event - */ - public function onRequestError(Event $event) - { - $request = $event['request']; - - if (!$this->canCache->canCacheRequest($request)) { - return; - } - - if ($response = $this->storage->fetch($request)) { - $response->setHeader( - 'Age', - time() - strtotime($response->getLastModified() ? : $response->getDate() ?: 'now') - ); - - if ($this->canResponseSatisfyFailedRequest($request, $response)) { - $request->getParams()->set('cache.hit', 'error'); - $this->addResponseHeaders($request, $response); - $event['response'] = $response; - $event->stopPropagation(); - } - } - } - - /** - * If possible, set a cache response on a cURL exception - * - * @param Event $event - * - * @return null - */ - public function onRequestException(Event $event) - { - if (!$event['exception'] instanceof CurlException) { - return; - } - - $request = $event['request']; - if (!$this->canCache->canCacheRequest($request)) { - return; - } - - if ($response = $this->storage->fetch($request)) { - $response->setHeader('Age', time() - strtotime($response->getDate() ? : 'now')); - if (!$this->canResponseSatisfyFailedRequest($request, $response)) { - return; - } - $request->getParams()->set('cache.hit', 'error'); - $request->setResponse($response); - $this->addResponseHeaders($request, $response); - $event->stopPropagation(); - } - } - - /** - * Check if a cache response satisfies a request's caching constraints - * - * @param RequestInterface $request Request to validate - * @param Response $response Response to validate - * - * @return bool - */ - public function canResponseSatisfyRequest(RequestInterface $request, Response $response) - { - $responseAge = $response->calculateAge(); - $reqc = $request->getHeader('Cache-Control'); - $resc = $response->getHeader('Cache-Control'); - - // Check the request's max-age header against the age of the response - if ($reqc && $reqc->hasDirective('max-age') && - $responseAge > $reqc->getDirective('max-age')) { - return false; - } - - // Check the response's max-age header - if ($response->isFresh() === false) { - $maxStale = $reqc ? $reqc->getDirective('max-stale') : null; - if (null !== $maxStale) { - if ($maxStale !== true && $response->getFreshness() < (-1 * $maxStale)) { - return false; - } - } elseif ($resc && $resc->hasDirective('max-age') - && $responseAge > $resc->getDirective('max-age') - ) { - return false; - } - } - - if ($this->revalidation->shouldRevalidate($request, $response)) { - try { - return $this->revalidation->revalidate($request, $response); - } catch (CurlException $e) { - $request->getParams()->set('cache.hit', 'error'); - return $this->canResponseSatisfyFailedRequest($request, $response); - } - } - - return true; - } - - /** - * Check if a cache response satisfies a failed request's caching constraints - * - * @param RequestInterface $request Request to validate - * @param Response $response Response to validate - * - * @return bool - */ - public function canResponseSatisfyFailedRequest(RequestInterface $request, Response $response) - { - $reqc = $request->getHeader('Cache-Control'); - $resc = $response->getHeader('Cache-Control'); - $requestStaleIfError = $reqc ? $reqc->getDirective('stale-if-error') : null; - $responseStaleIfError = $resc ? $resc->getDirective('stale-if-error') : null; - - if (!$requestStaleIfError && !$responseStaleIfError) { - return false; - } - - if (is_numeric($requestStaleIfError) && $response->getAge() - $response->getMaxAge() > $requestStaleIfError) { - return false; - } - - if (is_numeric($responseStaleIfError) && $response->getAge() - $response->getMaxAge() > $responseStaleIfError) { - return false; - } - - return true; - } - - /** - * Purge all cache entries for a given URL - * - * @param string $url URL to purge - */ - public function purge($url) - { - // BC compatibility with previous version that accepted a Request object - $url = $url instanceof RequestInterface ? $url->getUrl() : $url; - $this->storage->purge($url); - } - - /** - * Add the plugin's headers to a response - * - * @param RequestInterface $request Request - * @param Response $response Response to add headers to - */ - protected function addResponseHeaders(RequestInterface $request, Response $response) - { - $params = $request->getParams(); - $response->setHeader('Via', sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION)); - - $lookup = ($params['cache.lookup'] === true ? 'HIT' : 'MISS') . ' from GuzzleCache'; - if ($header = $response->getHeader('X-Cache-Lookup')) { - // Don't add duplicates - $values = $header->toArray(); - $values[] = $lookup; - $response->setHeader('X-Cache-Lookup', array_unique($values)); - } else { - $response->setHeader('X-Cache-Lookup', $lookup); - } - - if ($params['cache.hit'] === true) { - $xcache = 'HIT from GuzzleCache'; - } elseif ($params['cache.hit'] == 'error') { - $xcache = 'HIT_ERROR from GuzzleCache'; - } else { - $xcache = 'MISS from GuzzleCache'; - } - - if ($header = $response->getHeader('X-Cache')) { - // Don't add duplicates - $values = $header->toArray(); - $values[] = $xcache; - $response->setHeader('X-Cache', array_unique($values)); - } else { - $response->setHeader('X-Cache', $xcache); - } - - if ($response->isFresh() === false) { - $response->addHeader('Warning', sprintf('110 GuzzleCache/%s "Response is stale"', Version::VERSION)); - if ($params['cache.hit'] === 'error') { - $response->addHeader('Warning', sprintf('111 GuzzleCache/%s "Revalidation failed"', Version::VERSION)); - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheStorageInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheStorageInterface.php deleted file mode 100644 index f3d915458..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheStorageInterface.php +++ /dev/null @@ -1,43 +0,0 @@ -requestCallback = $requestCallback; - $this->responseCallback = $responseCallback; - } - - public function canCacheRequest(RequestInterface $request) - { - return $this->requestCallback - ? call_user_func($this->requestCallback, $request) - : parent::canCacheRequest($request); - } - - public function canCacheResponse(Response $response) - { - return $this->responseCallback - ? call_user_func($this->responseCallback, $response) - : parent::canCacheResponse($response); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CanCacheStrategyInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CanCacheStrategyInterface.php deleted file mode 100644 index 6e01a8e74..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/CanCacheStrategyInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -getParams()->get(self::CACHE_KEY); - - if (!$key) { - - $cloned = clone $request; - $cloned->removeHeader('Cache-Control'); - - // Check to see how and if the key should be filtered - foreach (explode(';', $request->getParams()->get(self::CACHE_KEY_FILTER)) as $part) { - $pieces = array_map('trim', explode('=', $part)); - if (isset($pieces[1])) { - foreach (array_map('trim', explode(',', $pieces[1])) as $remove) { - if ($pieces[0] == 'header') { - $cloned->removeHeader($remove); - } elseif ($pieces[0] == 'query') { - $cloned->getQuery()->remove($remove); - } - } - } - } - - $raw = (string) $cloned; - $key = 'GZ' . md5($raw); - $request->getParams()->set(self::CACHE_KEY, $key)->set(self::CACHE_KEY_RAW, $raw); - } - - return $key; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheStorage.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheStorage.php deleted file mode 100644 index 555c9b79c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheStorage.php +++ /dev/null @@ -1,251 +0,0 @@ -cache = CacheAdapterFactory::fromCache($cache); - $this->defaultTtl = $defaultTtl; - $this->keyPrefix = $keyPrefix; - } - - public function cache(RequestInterface $request, Response $response) - { - $currentTime = time(); - $ttl = $request->getParams()->get('cache.override_ttl') ?: $response->getMaxAge() ?: $this->defaultTtl; - - if ($cacheControl = $response->getHeader('Cache-Control')) { - $stale = $cacheControl->getDirective('stale-if-error'); - $ttl += $stale == true ? $ttl : $stale; - } - - // Determine which manifest key should be used - $key = $this->getCacheKey($request); - $persistedRequest = $this->persistHeaders($request); - $entries = array(); - - if ($manifest = $this->cache->fetch($key)) { - // Determine which cache entries should still be in the cache - $vary = $response->getVary(); - foreach (unserialize($manifest) as $entry) { - // Check if the entry is expired - if ($entry[4] < $currentTime) { - continue; - } - $entry[1]['vary'] = isset($entry[1]['vary']) ? $entry[1]['vary'] : ''; - if ($vary != $entry[1]['vary'] || !$this->requestsMatch($vary, $entry[0], $persistedRequest)) { - $entries[] = $entry; - } - } - } - - // Persist the response body if needed - $bodyDigest = null; - if ($response->getBody() && $response->getBody()->getContentLength() > 0) { - $bodyDigest = $this->getBodyKey($request->getUrl(), $response->getBody()); - $this->cache->save($bodyDigest, (string) $response->getBody(), $ttl); - } - - array_unshift($entries, array( - $persistedRequest, - $this->persistHeaders($response), - $response->getStatusCode(), - $bodyDigest, - $currentTime + $ttl - )); - - $this->cache->save($key, serialize($entries)); - } - - public function delete(RequestInterface $request) - { - $key = $this->getCacheKey($request); - if ($entries = $this->cache->fetch($key)) { - // Delete each cached body - foreach (unserialize($entries) as $entry) { - if ($entry[3]) { - $this->cache->delete($entry[3]); - } - } - $this->cache->delete($key); - } - } - - public function purge($url) - { - foreach (array('GET', 'HEAD', 'POST', 'PUT', 'DELETE') as $method) { - $this->delete(new Request($method, $url)); - } - } - - public function fetch(RequestInterface $request) - { - $key = $this->getCacheKey($request); - if (!($entries = $this->cache->fetch($key))) { - return null; - } - - $match = null; - $headers = $this->persistHeaders($request); - $entries = unserialize($entries); - foreach ($entries as $index => $entry) { - if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'] : '', $headers, $entry[0])) { - $match = $entry; - break; - } - } - - if (!$match) { - return null; - } - - // Ensure that the response is not expired - $response = null; - if ($match[4] < time()) { - $response = -1; - } else { - $response = new Response($match[2], $match[1]); - if ($match[3]) { - if ($body = $this->cache->fetch($match[3])) { - $response->setBody($body); - } else { - // The response is not valid because the body was somehow deleted - $response = -1; - } - } - } - - if ($response === -1) { - // Remove the entry from the metadata and update the cache - unset($entries[$index]); - if ($entries) { - $this->cache->save($key, serialize($entries)); - } else { - $this->cache->delete($key); - } - return null; - } - - return $response; - } - - /** - * Hash a request URL into a string that returns cache metadata - * - * @param RequestInterface $request - * - * @return string - */ - protected function getCacheKey(RequestInterface $request) - { - // Allow cache.key_filter to trim down the URL cache key by removing generate query string values (e.g. auth) - if ($filter = $request->getParams()->get('cache.key_filter')) { - $url = $request->getUrl(true); - foreach (explode(',', $filter) as $remove) { - $url->getQuery()->remove(trim($remove)); - } - } else { - $url = $request->getUrl(); - } - - return $this->keyPrefix . md5($request->getMethod() . ' ' . $url); - } - - /** - * Create a cache key for a response's body - * - * @param string $url URL of the entry - * @param EntityBodyInterface $body Response body - * - * @return string - */ - protected function getBodyKey($url, EntityBodyInterface $body) - { - return $this->keyPrefix . md5($url) . $body->getContentMd5(); - } - - /** - * Determines whether two Request HTTP header sets are non-varying - * - * @param string $vary Response vary header - * @param array $r1 HTTP header array - * @param array $r2 HTTP header array - * - * @return bool - */ - private function requestsMatch($vary, $r1, $r2) - { - if ($vary) { - foreach (explode(',', $vary) as $header) { - $key = trim(strtolower($header)); - $v1 = isset($r1[$key]) ? $r1[$key] : null; - $v2 = isset($r2[$key]) ? $r2[$key] : null; - if ($v1 !== $v2) { - return false; - } - } - } - - return true; - } - - /** - * Creates an array of cacheable and normalized message headers - * - * @param MessageInterface $message - * - * @return array - */ - private function persistHeaders(MessageInterface $message) - { - // Headers are excluded from the caching (see RFC 2616:13.5.1) - static $noCache = array( - 'age' => true, - 'connection' => true, - 'keep-alive' => true, - 'proxy-authenticate' => true, - 'proxy-authorization' => true, - 'te' => true, - 'trailers' => true, - 'transfer-encoding' => true, - 'upgrade' => true, - 'set-cookie' => true, - 'set-cookie2' => true - ); - - // Clone the response to not destroy any necessary headers when caching - $headers = $message->getHeaders()->getAll(); - $headers = array_diff_key($headers, $noCache); - // Cast the headers to a string - $headers = array_map(function ($h) { return (string) $h; }, $headers); - - return $headers; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCanCacheStrategy.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCanCacheStrategy.php deleted file mode 100644 index 3ca1fbf19..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCanCacheStrategy.php +++ /dev/null @@ -1,32 +0,0 @@ -getMethod() != RequestInterface::GET && $request->getMethod() != RequestInterface::HEAD) { - return false; - } - - // Never cache requests when using no-store - if ($request->hasHeader('Cache-Control') && $request->getHeader('Cache-Control')->hasDirective('no-store')) { - return false; - } - - return true; - } - - public function canCacheResponse(Response $response) - { - return $response->isSuccessful() && $response->canCache(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultRevalidation.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultRevalidation.php deleted file mode 100644 index ab2e2a2ce..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultRevalidation.php +++ /dev/null @@ -1,172 +0,0 @@ -storage = $cache; - $this->canCache = $canCache ?: new DefaultCanCacheStrategy(); - } - - public function revalidate(RequestInterface $request, Response $response) - { - try { - $revalidate = $this->createRevalidationRequest($request, $response); - $validateResponse = $revalidate->send(); - if ($validateResponse->getStatusCode() == 200) { - return $this->handle200Response($request, $validateResponse); - } elseif ($validateResponse->getStatusCode() == 304) { - return $this->handle304Response($request, $validateResponse, $response); - } - } catch (BadResponseException $e) { - $this->handleBadResponse($e); - } - - // Other exceptions encountered in the revalidation request are ignored - // in hopes that sending a request to the origin server will fix it - return false; - } - - public function shouldRevalidate(RequestInterface $request, Response $response) - { - if ($request->getMethod() != RequestInterface::GET) { - return false; - } - - $reqCache = $request->getHeader('Cache-Control'); - $resCache = $response->getHeader('Cache-Control'); - - $revalidate = $request->getHeader('Pragma') == 'no-cache' || - ($reqCache && ($reqCache->hasDirective('no-cache') || $reqCache->hasDirective('must-revalidate'))) || - ($resCache && ($resCache->hasDirective('no-cache') || $resCache->hasDirective('must-revalidate'))); - - // Use the strong ETag validator if available and the response contains no Cache-Control directive - if (!$revalidate && !$resCache && $response->hasHeader('ETag')) { - $revalidate = true; - } - - return $revalidate; - } - - /** - * Handles a bad response when attempting to revalidate - * - * @param BadResponseException $e Exception encountered - * - * @throws BadResponseException - */ - protected function handleBadResponse(BadResponseException $e) - { - // 404 errors mean the resource no longer exists, so remove from - // cache, and prevent an additional request by throwing the exception - if ($e->getResponse()->getStatusCode() == 404) { - $this->storage->delete($e->getRequest()); - throw $e; - } - } - - /** - * Creates a request to use for revalidation - * - * @param RequestInterface $request Request - * @param Response $response Response to revalidate - * - * @return RequestInterface returns a revalidation request - */ - protected function createRevalidationRequest(RequestInterface $request, Response $response) - { - $revalidate = clone $request; - $revalidate->removeHeader('Pragma') - ->removeHeader('Cache-Control') - ->setHeader('If-Modified-Since', $response->getLastModified() ?: $response->getDate()); - - if ($response->getEtag()) { - $revalidate->setHeader('If-None-Match', $response->getEtag()); - } - - // Remove any cache plugins that might be on the request to prevent infinite recursive revalidations - $dispatcher = $revalidate->getEventDispatcher(); - foreach ($dispatcher->getListeners() as $eventName => $listeners) { - foreach ($listeners as $listener) { - if (is_array($listener) && $listener[0] instanceof CachePlugin) { - $dispatcher->removeListener($eventName, $listener); - } - } - } - - return $revalidate; - } - - /** - * Handles a 200 response response from revalidating. The server does not support validation, so use this response. - * - * @param RequestInterface $request Request that was sent - * @param Response $validateResponse Response received - * - * @return bool Returns true if valid, false if invalid - */ - protected function handle200Response(RequestInterface $request, Response $validateResponse) - { - $request->setResponse($validateResponse); - if ($this->canCache->canCacheResponse($validateResponse)) { - $this->storage->cache($request, $validateResponse); - } - - return false; - } - - /** - * Handle a 304 response and ensure that it is still valid - * - * @param RequestInterface $request Request that was sent - * @param Response $validateResponse Response received - * @param Response $response Original cached response - * - * @return bool Returns true if valid, false if invalid - */ - protected function handle304Response(RequestInterface $request, Response $validateResponse, Response $response) - { - static $replaceHeaders = array('Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified'); - - // Make sure that this response has the same ETag - if ($validateResponse->getEtag() != $response->getEtag()) { - return false; - } - - // Replace cached headers with any of these headers from the - // origin server that might be more up to date - $modified = false; - foreach ($replaceHeaders as $name) { - if ($validateResponse->hasHeader($name)) { - $modified = true; - $response->setHeader($name, $validateResponse->getHeader($name)); - } - } - - // Store the updated response in cache - if ($modified && $this->canCache->canCacheResponse($response)) { - $this->storage->cache($request, $response); - } - - return true; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DenyRevalidation.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DenyRevalidation.php deleted file mode 100644 index 88b86f3ca..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cache/DenyRevalidation.php +++ /dev/null @@ -1,19 +0,0 @@ -=5.3.2", - "guzzle/http": "self.version", - "guzzle/cache": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Cache": "" } - }, - "target-dir": "Guzzle/Plugin/Cache", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php deleted file mode 100644 index f5803dcb1..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php +++ /dev/null @@ -1,513 +0,0 @@ - '', - 'value' => '', - 'domain' => '', - 'path' => '/', - 'expires' => null, - 'max_age' => 0, - 'comment' => null, - 'comment_url' => null, - 'port' => array(), - 'version' => null, - 'secure' => false, - 'discard' => false, - 'http_only' => false - ); - - $this->data = array_merge($defaults, $data); - // Extract the expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the expires date - $this->setExpires(time() + (int) $this->getMaxAge()); - } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { - $this->setExpires(strtotime($this->getExpires())); - } - } - - /** - * Get the cookie as an array - * - * @return array - */ - public function toArray() - { - return $this->data; - } - - /** - * Get the cookie name - * - * @return string - */ - public function getName() - { - return $this->data['name']; - } - - /** - * Set the cookie name - * - * @param string $name Cookie name - * - * @return Cookie - */ - public function setName($name) - { - return $this->setData('name', $name); - } - - /** - * Get the cookie value - * - * @return string - */ - public function getValue() - { - return $this->data['value']; - } - - /** - * Set the cookie value - * - * @param string $value Cookie value - * - * @return Cookie - */ - public function setValue($value) - { - return $this->setData('value', $value); - } - - /** - * Get the domain - * - * @return string|null - */ - public function getDomain() - { - return $this->data['domain']; - } - - /** - * Set the domain of the cookie - * - * @param string $domain - * - * @return Cookie - */ - public function setDomain($domain) - { - return $this->setData('domain', $domain); - } - - /** - * Get the path - * - * @return string - */ - public function getPath() - { - return $this->data['path']; - } - - /** - * Set the path of the cookie - * - * @param string $path Path of the cookie - * - * @return Cookie - */ - public function setPath($path) - { - return $this->setData('path', $path); - } - - /** - * Maximum lifetime of the cookie in seconds - * - * @return int|null - */ - public function getMaxAge() - { - return $this->data['max_age']; - } - - /** - * Set the max-age of the cookie - * - * @param int $maxAge Max age of the cookie in seconds - * - * @return Cookie - */ - public function setMaxAge($maxAge) - { - return $this->setData('max_age', $maxAge); - } - - /** - * The UNIX timestamp when the cookie expires - * - * @return mixed - */ - public function getExpires() - { - return $this->data['expires']; - } - - /** - * Set the unix timestamp for which the cookie will expire - * - * @param int $timestamp Unix timestamp - * - * @return Cookie - */ - public function setExpires($timestamp) - { - return $this->setData('expires', $timestamp); - } - - /** - * Version of the cookie specification. RFC 2965 is 1 - * - * @return mixed - */ - public function getVersion() - { - return $this->data['version']; - } - - /** - * Set the cookie version - * - * @param string|int $version Version to set - * - * @return Cookie - */ - public function setVersion($version) - { - return $this->setData('version', $version); - } - - /** - * Get whether or not this is a secure cookie - * - * @return null|bool - */ - public function getSecure() - { - return $this->data['secure']; - } - - /** - * Set whether or not the cookie is secure - * - * @param bool $secure Set to true or false if secure - * - * @return Cookie - */ - public function setSecure($secure) - { - return $this->setData('secure', (bool) $secure); - } - - /** - * Get whether or not this is a session cookie - * - * @return null|bool - */ - public function getDiscard() - { - return $this->data['discard']; - } - - /** - * Set whether or not this is a session cookie - * - * @param bool $discard Set to true or false if this is a session cookie - * - * @return Cookie - */ - public function setDiscard($discard) - { - return $this->setData('discard', $discard); - } - - /** - * Get the comment - * - * @return string|null - */ - public function getComment() - { - return $this->data['comment']; - } - - /** - * Set the comment of the cookie - * - * @param string $comment Cookie comment - * - * @return Cookie - */ - public function setComment($comment) - { - return $this->setData('comment', $comment); - } - - /** - * Get the comment URL of the cookie - * - * @return string|null - */ - public function getCommentUrl() - { - return $this->data['comment_url']; - } - - /** - * Set the comment URL of the cookie - * - * @param string $commentUrl Cookie comment URL for more information - * - * @return Cookie - */ - public function setCommentUrl($commentUrl) - { - return $this->setData('comment_url', $commentUrl); - } - - /** - * Get an array of acceptable ports this cookie can be used with - * - * @return array - */ - public function getPorts() - { - return $this->data['port']; - } - - /** - * Set a list of acceptable ports this cookie can be used with - * - * @param array $ports Array of acceptable ports - * - * @return Cookie - */ - public function setPorts(array $ports) - { - return $this->setData('port', $ports); - } - - /** - * Get whether or not this is an HTTP only cookie - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['http_only']; - } - - /** - * Set whether or not this is an HTTP only cookie - * - * @param bool $httpOnly Set to true or false if this is HTTP only - * - * @return Cookie - */ - public function setHttpOnly($httpOnly) - { - return $this->setData('http_only', $httpOnly); - } - - /** - * Get an array of extra cookie data - * - * @return array - */ - public function getAttributes() - { - return $this->data['data']; - } - - /** - * Get a specific data point from the extra cookie data - * - * @param string $name Name of the data point to retrieve - * - * @return null|string - */ - public function getAttribute($name) - { - return array_key_exists($name, $this->data['data']) ? $this->data['data'][$name] : null; - } - - /** - * Set a cookie data attribute - * - * @param string $name Name of the attribute to set - * @param string $value Value to set - * - * @return Cookie - */ - public function setAttribute($name, $value) - { - $this->data['data'][$name] = $value; - - return $this; - } - - /** - * Check if the cookie matches a path value - * - * @param string $path Path to check against - * - * @return bool - */ - public function matchesPath($path) - { - return !$this->getPath() || 0 === stripos($path, $this->getPath()); - } - - /** - * Check if the cookie matches a domain value - * - * @param string $domain Domain to check against - * - * @return bool - */ - public function matchesDomain($domain) - { - // Remove the leading '.' as per spec in RFC 6265: http://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = ltrim($this->getDomain(), '.'); - - // Domain not set or exact match. - if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { - return true; - } - - // Matching the subdomain according to RFC 6265: http://tools.ietf.org/html/rfc6265#section-5.1.3 - if (filter_var($domain, FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/i', $domain); - } - - /** - * Check if the cookie is compatible with a specific port - * - * @param int $port Port to check - * - * @return bool - */ - public function matchesPort($port) - { - return count($this->getPorts()) == 0 || in_array($port, $this->getPorts()); - } - - /** - * Check if the cookie is expired - * - * @return bool - */ - public function isExpired() - { - return $this->getExpires() && time() > $this->getExpires(); - } - - /** - * Check if the cookie is valid according to RFC 6265 - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - // Names must not be empty, but can be 0 - $name = $this->getName(); - if (empty($name) && !is_numeric($name)) { - return 'The cookie name must not be empty'; - } - - // Check if any of the invalid characters are present in the cookie name - if (strpbrk($name, self::getInvalidCharacters()) !== false) { - return 'The cookie name must not contain invalid characters: ' . $name; - } - - // Value must not be empty, but can be 0 - $value = $this->getValue(); - if (empty($value) && !is_numeric($value)) { - return 'The cookie value must not be empty'; - } - - // Domains must not be empty, but can be 0 - // A "0" is not a valid internet domain, but may be used as server name in a private network - $domain = $this->getDomain(); - if (empty($domain) && !is_numeric($domain)) { - return 'The cookie domain must not be empty'; - } - - return true; - } - - /** - * Set a value and return the cookie object - * - * @param string $key Key to set - * @param string $value Value to set - * - * @return Cookie - */ - private function setData($key, $value) - { - $this->data[$key] = $value; - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/ArrayCookieJar.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/ArrayCookieJar.php deleted file mode 100644 index 68d5be7e6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/ArrayCookieJar.php +++ /dev/null @@ -1,222 +0,0 @@ -strictMode = $strictMode; - } - - /** - * Enable or disable strict mode on the cookie jar - * - * @param bool $strictMode Set to true to throw exceptions when invalid cookies are added. False to ignore them. - * - * @return self - */ - public function setStrictMode($strictMode) - { - $this->strictMode = $strictMode; - } - - public function remove($domain = null, $path = null, $name = null) - { - $cookies = $this->all($domain, $path, $name, false, false); - $this->cookies = array_filter($this->cookies, function (Cookie $cookie) use ($cookies) { - return !in_array($cookie, $cookies, true); - }); - - return $this; - } - - public function removeTemporary() - { - $this->cookies = array_filter($this->cookies, function (Cookie $cookie) { - return !$cookie->getDiscard() && $cookie->getExpires(); - }); - - return $this; - } - - public function removeExpired() - { - $currentTime = time(); - $this->cookies = array_filter($this->cookies, function (Cookie $cookie) use ($currentTime) { - return !$cookie->getExpires() || $currentTime < $cookie->getExpires(); - }); - - return $this; - } - - public function all($domain = null, $path = null, $name = null, $skipDiscardable = false, $skipExpired = true) - { - return array_values(array_filter($this->cookies, function (Cookie $cookie) use ( - $domain, - $path, - $name, - $skipDiscardable, - $skipExpired - ) { - return false === (($name && $cookie->getName() != $name) || - ($skipExpired && $cookie->isExpired()) || - ($skipDiscardable && ($cookie->getDiscard() || !$cookie->getExpires())) || - ($path && !$cookie->matchesPath($path)) || - ($domain && !$cookie->matchesDomain($domain))); - })); - } - - public function add(Cookie $cookie) - { - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== true) { - if ($this->strictMode) { - throw new InvalidCookieException($result); - } else { - return false; - } - } - - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - - // Two cookies are identical, when their path, domain, port and name are identical - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getPorts() != $cookie->getPorts() || - $c->getName() != $cookie->getName() - ) { - continue; - } - - // The previously set cookie is a discard cookie and this one is not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - - // If the new cookie's expiration is further into the future, then replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - - // The cookie exists, so no need to continue - return false; - } - - $this->cookies[] = $cookie; - - return true; - } - - /** - * Serializes the cookie cookieJar - * - * @return string - */ - public function serialize() - { - // Only serialize long term cookies and unexpired cookies - return json_encode(array_map(function (Cookie $cookie) { - return $cookie->toArray(); - }, $this->all(null, null, null, true, true))); - } - - /** - * Unserializes the cookie cookieJar - */ - public function unserialize($data) - { - $data = json_decode($data, true); - if (empty($data)) { - $this->cookies = array(); - } else { - $this->cookies = array_map(function (array $cookie) { - return new Cookie($cookie); - }, $data); - } - } - - /** - * Returns the total number of stored cookies - * - * @return int - */ - public function count() - { - return count($this->cookies); - } - - /** - * Returns an iterator - * - * @return \ArrayIterator - */ - public function getIterator() - { - return new \ArrayIterator($this->cookies); - } - - public function addCookiesFromResponse(Response $response, RequestInterface $request = null) - { - if ($cookieHeader = $response->getHeader('Set-Cookie')) { - $parser = ParserRegistry::getInstance()->getParser('cookie'); - foreach ($cookieHeader as $cookie) { - if ($parsed = $request - ? $parser->parseCookie($cookie, $request->getHost(), $request->getPath()) - : $parser->parseCookie($cookie) - ) { - // Break up cookie v2 into multiple cookies - foreach ($parsed['cookies'] as $key => $value) { - $row = $parsed; - $row['name'] = $key; - $row['value'] = $value; - unset($row['cookies']); - $this->add(new Cookie($row)); - } - } - } - } - } - - public function getMatchingCookies(RequestInterface $request) - { - // Find cookies that match this request - $cookies = $this->all($request->getHost(), $request->getPath()); - // Remove ineligible cookies - foreach ($cookies as $index => $cookie) { - if (!$cookie->matchesPort($request->getPort()) || ($cookie->getSecure() && $request->getScheme() != 'https')) { - unset($cookies[$index]); - } - }; - - return $cookies; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/CookieJarInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/CookieJarInterface.php deleted file mode 100644 index 7faa7d21f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/CookieJarInterface.php +++ /dev/null @@ -1,85 +0,0 @@ -filename = $cookieFile; - $this->load(); - } - - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->persist(); - } - - /** - * Save the contents of the data array to the file - * - * @throws RuntimeException if the file cannot be found or created - */ - protected function persist() - { - if (false === file_put_contents($this->filename, $this->serialize())) { - // @codeCoverageIgnoreStart - throw new RuntimeException('Unable to open file ' . $this->filename); - // @codeCoverageIgnoreEnd - } - } - - /** - * Load the contents of the json formatted file into the data array and discard any unsaved state - */ - protected function load() - { - $json = file_get_contents($this->filename); - if (false === $json) { - // @codeCoverageIgnoreStart - throw new RuntimeException('Unable to open file ' . $this->filename); - // @codeCoverageIgnoreEnd - } - - $this->unserialize($json); - $this->cookies = $this->cookies ?: array(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookiePlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookiePlugin.php deleted file mode 100644 index df3210ee1..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookiePlugin.php +++ /dev/null @@ -1,70 +0,0 @@ -cookieJar = $cookieJar ?: new ArrayCookieJar(); - } - - public static function getSubscribedEvents() - { - return array( - 'request.before_send' => array('onRequestBeforeSend', 125), - 'request.sent' => array('onRequestSent', 125) - ); - } - - /** - * Get the cookie cookieJar - * - * @return CookieJarInterface - */ - public function getCookieJar() - { - return $this->cookieJar; - } - - /** - * Add cookies before a request is sent - * - * @param Event $event - */ - public function onRequestBeforeSend(Event $event) - { - $request = $event['request']; - if (!$request->getParams()->get('cookies.disable')) { - $request->removeHeader('Cookie'); - // Find cookies that match this request - foreach ($this->cookieJar->getMatchingCookies($request) as $cookie) { - $request->addCookie($cookie->getName(), $cookie->getValue()); - } - } - } - - /** - * Extract cookies from a sent request - * - * @param Event $event - */ - public function onRequestSent(Event $event) - { - $this->cookieJar->addCookiesFromResponse($event['response'], $event['request']); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Exception/InvalidCookieException.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Exception/InvalidCookieException.php deleted file mode 100644 index b1fa6fd89..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Exception/InvalidCookieException.php +++ /dev/null @@ -1,7 +0,0 @@ -=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Cookie": "" } - }, - "target-dir": "Guzzle/Plugin/Cookie", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/CurlAuthPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/CurlAuthPlugin.php deleted file mode 100644 index 610e60cad..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/CurlAuthPlugin.php +++ /dev/null @@ -1,46 +0,0 @@ -getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest'); - */ -class CurlAuthPlugin implements EventSubscriberInterface -{ - private $username; - private $password; - private $scheme; - - /** - * @param string $username HTTP basic auth username - * @param string $password Password - * @param int $scheme Curl auth scheme - */ - public function __construct($username, $password, $scheme=CURLAUTH_BASIC) - { - Version::warn(__CLASS__ . " is deprecated. Use \$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');"); - $this->username = $username; - $this->password = $password; - $this->scheme = $scheme; - } - - public static function getSubscribedEvents() - { - return array('client.create_request' => array('onRequestCreate', 255)); - } - - /** - * Add basic auth - * - * @param Event $event - */ - public function onRequestCreate(Event $event) - { - $event['request']->setAuth($this->username, $this->password, $this->scheme); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/composer.json deleted file mode 100644 index edc8b24e5..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/plugin-curlauth", - "description": "Guzzle cURL authorization plugin", - "homepage": "http://guzzlephp.org/", - "keywords": ["plugin", "curl", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\CurlAuth": "" } - }, - "target-dir": "Guzzle/Plugin/CurlAuth", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/ErrorResponseExceptionInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/ErrorResponseExceptionInterface.php deleted file mode 100644 index 5dce8bd6c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/ErrorResponseExceptionInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - array('onCommandBeforeSend', -1)); - } - - /** - * Adds a listener to requests before they sent from a command - * - * @param Event $event Event emitted - */ - public function onCommandBeforeSend(Event $event) - { - $command = $event['command']; - if ($operation = $command->getOperation()) { - if ($operation->getErrorResponses()) { - $request = $command->getRequest(); - $request->getEventDispatcher() - ->addListener('request.complete', $this->getErrorClosure($request, $command, $operation)); - } - } - } - - /** - * @param RequestInterface $request Request that received an error - * @param CommandInterface $command Command that created the request - * @param Operation $operation Operation that defines the request and errors - * - * @return \Closure Returns a closure - * @throws ErrorResponseException - */ - protected function getErrorClosure(RequestInterface $request, CommandInterface $command, Operation $operation) - { - return function (Event $event) use ($request, $command, $operation) { - $response = $event['response']; - foreach ($operation->getErrorResponses() as $error) { - if (!isset($error['class'])) { - continue; - } - if (isset($error['code']) && $response->getStatusCode() != $error['code']) { - continue; - } - if (isset($error['reason']) && $response->getReasonPhrase() != $error['reason']) { - continue; - } - $className = $error['class']; - $errorClassInterface = __NAMESPACE__ . '\\ErrorResponseExceptionInterface'; - if (!class_exists($className)) { - throw new ErrorResponseException("{$className} does not exist"); - } elseif (!is_subclass_of($className, $errorClassInterface)) { - throw new ErrorResponseException("{$className} must implement {$errorClassInterface}"); - } - throw $className::fromCommand($command, $response); - } - }; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/Exception/ErrorResponseException.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/Exception/ErrorResponseException.php deleted file mode 100644 index 1d89e40e7..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/Exception/ErrorResponseException.php +++ /dev/null @@ -1,7 +0,0 @@ -=5.3.2", - "guzzle/service": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\ErrorResponse": "" } - }, - "target-dir": "Guzzle/Plugin/ErrorResponse", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/History/HistoryPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/History/HistoryPlugin.php deleted file mode 100644 index 7375e892b..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/History/HistoryPlugin.php +++ /dev/null @@ -1,163 +0,0 @@ - array('onRequestSent', 9999)); - } - - /** - * Convert to a string that contains all request and response headers - * - * @return string - */ - public function __toString() - { - $lines = array(); - foreach ($this->transactions as $entry) { - $response = isset($entry['response']) ? $entry['response'] : ''; - $lines[] = '> ' . trim($entry['request']) . "\n\n< " . trim($response) . "\n"; - } - - return implode("\n", $lines); - } - - /** - * Add a request to the history - * - * @param RequestInterface $request Request to add - * @param Response $response Response of the request - * - * @return HistoryPlugin - */ - public function add(RequestInterface $request, Response $response = null) - { - if (!$response && $request->getResponse()) { - $response = $request->getResponse(); - } - - $this->transactions[] = array('request' => $request, 'response' => $response); - if (count($this->transactions) > $this->getlimit()) { - array_shift($this->transactions); - } - - return $this; - } - - /** - * Set the max number of requests to store - * - * @param int $limit Limit - * - * @return HistoryPlugin - */ - public function setLimit($limit) - { - $this->limit = (int) $limit; - - return $this; - } - - /** - * Get the request limit - * - * @return int - */ - public function getLimit() - { - return $this->limit; - } - - /** - * Get all of the raw transactions in the form of an array of associative arrays containing - * 'request' and 'response' keys. - * - * @return array - */ - public function getAll() - { - return $this->transactions; - } - - /** - * Get the requests in the history - * - * @return \ArrayIterator - */ - public function getIterator() - { - // Return an iterator just like the old iteration of the HistoryPlugin for BC compatibility (use getAll()) - return new \ArrayIterator(array_map(function ($entry) { - $entry['request']->getParams()->set('actual_response', $entry['response']); - return $entry['request']; - }, $this->transactions)); - } - - /** - * Get the number of requests in the history - * - * @return int - */ - public function count() - { - return count($this->transactions); - } - - /** - * Get the last request sent - * - * @return RequestInterface - */ - public function getLastRequest() - { - $last = end($this->transactions); - - return $last['request']; - } - - /** - * Get the last response in the history - * - * @return Response|null - */ - public function getLastResponse() - { - $last = end($this->transactions); - - return isset($last['response']) ? $last['response'] : null; - } - - /** - * Clears the history - * - * @return HistoryPlugin - */ - public function clear() - { - $this->transactions = array(); - - return $this; - } - - public function onRequestSent(Event $event) - { - $this->add($event['request'], $event['response']); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/History/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/History/composer.json deleted file mode 100644 index ba0bf2c4d..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/History/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/plugin-history", - "description": "Guzzle history plugin", - "homepage": "http://guzzlephp.org/", - "keywords": ["plugin", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\History": "" } - }, - "target-dir": "Guzzle/Plugin/History", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Log/LogPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Log/LogPlugin.php deleted file mode 100644 index cabdea854..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Log/LogPlugin.php +++ /dev/null @@ -1,161 +0,0 @@ -logAdapter = $logAdapter; - $this->formatter = $formatter instanceof MessageFormatter ? $formatter : new MessageFormatter($formatter); - $this->wireBodies = $wireBodies; - } - - /** - * Get a log plugin that outputs full request, response, and curl error information to stderr - * - * @param bool $wireBodies Set to false to disable request/response body output when they use are not repeatable - * @param resource $stream Stream to write to when logging. Defaults to STDERR when it is available - * - * @return self - */ - public static function getDebugPlugin($wireBodies = true, $stream = null) - { - if ($stream === null) { - if (defined('STDERR')) { - $stream = STDERR; - } else { - $stream = fopen('php://output', 'w'); - } - } - - return new self(new ClosureLogAdapter(function ($m) use ($stream) { - fwrite($stream, $m . PHP_EOL); - }), "# Request:\n{request}\n\n# Response:\n{response}\n\n# Errors: {curl_code} {curl_error}", $wireBodies); - } - - public static function getSubscribedEvents() - { - return array( - 'curl.callback.write' => array('onCurlWrite', 255), - 'curl.callback.read' => array('onCurlRead', 255), - 'request.before_send' => array('onRequestBeforeSend', 255), - 'request.sent' => array('onRequestSent', 255) - ); - } - - /** - * Event triggered when curl data is read from a request - * - * @param Event $event - */ - public function onCurlRead(Event $event) - { - // Stream the request body to the log if the body is not repeatable - if ($wire = $event['request']->getParams()->get('request_wire')) { - $wire->write($event['read']); - } - } - - /** - * Event triggered when curl data is written to a response - * - * @param Event $event - */ - public function onCurlWrite(Event $event) - { - // Stream the response body to the log if the body is not repeatable - if ($wire = $event['request']->getParams()->get('response_wire')) { - $wire->write($event['write']); - } - } - - /** - * Called before a request is sent - * - * @param Event $event - */ - public function onRequestBeforeSend(Event $event) - { - if ($this->wireBodies) { - $request = $event['request']; - // Ensure that curl IO events are emitted - $request->getCurlOptions()->set('emit_io', true); - // We need to make special handling for content wiring and non-repeatable streams. - if ($request instanceof EntityEnclosingRequestInterface && $request->getBody() - && (!$request->getBody()->isSeekable() || !$request->getBody()->isReadable()) - ) { - // The body of the request cannot be recalled so logging the body will require us to buffer it - $request->getParams()->set('request_wire', EntityBody::factory()); - } - if (!$request->getResponseBody()->isRepeatable()) { - // The body of the response cannot be recalled so logging the body will require us to buffer it - $request->getParams()->set('response_wire', EntityBody::factory()); - } - } - } - - /** - * Triggers the actual log write when a request completes - * - * @param Event $event - */ - public function onRequestSent(Event $event) - { - $request = $event['request']; - $response = $event['response']; - $handle = $event['handle']; - - if ($wire = $request->getParams()->get('request_wire')) { - $request = clone $request; - $request->setBody($wire); - } - - if ($wire = $request->getParams()->get('response_wire')) { - $response = clone $response; - $response->setBody($wire); - } - - // Send the log message to the adapter, adding a category and host - $priority = $response && $response->isError() ? LOG_ERR : LOG_DEBUG; - $message = $this->formatter->format($request, $response, $handle); - $this->logAdapter->log($message, $priority, array( - 'request' => $request, - 'response' => $response, - 'handle' => $handle - )); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Log/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Log/composer.json deleted file mode 100644 index 130e6da0a..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Log/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "guzzle/plugin-log", - "description": "Guzzle log plugin for over the wire logging", - "homepage": "http://guzzlephp.org/", - "keywords": ["plugin", "log", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version", - "guzzle/log": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Log": "" } - }, - "target-dir": "Guzzle/Plugin/Log", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/CommandContentMd5Plugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/CommandContentMd5Plugin.php deleted file mode 100644 index 851242433..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/CommandContentMd5Plugin.php +++ /dev/null @@ -1,57 +0,0 @@ -contentMd5Param = $contentMd5Param; - $this->validateMd5Param = $validateMd5Param; - } - - public static function getSubscribedEvents() - { - return array('command.before_send' => array('onCommandBeforeSend', -255)); - } - - public function onCommandBeforeSend(Event $event) - { - $command = $event['command']; - $request = $command->getRequest(); - - // Only add an MD5 is there is a MD5 option on the operation and it has a payload - if ($request instanceof EntityEnclosingRequestInterface && $request->getBody() - && $command->getOperation()->hasParam($this->contentMd5Param)) { - // Check if an MD5 checksum value should be passed along to the request - if ($command[$this->contentMd5Param] === true) { - if (false !== ($md5 = $request->getBody()->getContentMd5(true, true))) { - $request->setHeader('Content-MD5', $md5); - } - } - } - - // Check if MD5 validation should be used with the response - if ($command[$this->validateMd5Param] === true) { - $request->addSubscriber(new Md5ValidatorPlugin(true, false)); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/Md5ValidatorPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/Md5ValidatorPlugin.php deleted file mode 100644 index 5d7a3785e..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/Md5ValidatorPlugin.php +++ /dev/null @@ -1,88 +0,0 @@ -contentLengthCutoff = $contentLengthCutoff; - $this->contentEncoded = $contentEncoded; - } - - public static function getSubscribedEvents() - { - return array('request.complete' => array('onRequestComplete', 255)); - } - - /** - * {@inheritdoc} - * @throws UnexpectedValueException - */ - public function onRequestComplete(Event $event) - { - $response = $event['response']; - - if (!$contentMd5 = $response->getContentMd5()) { - return; - } - - $contentEncoding = $response->getContentEncoding(); - if ($contentEncoding && !$this->contentEncoded) { - return false; - } - - // Make sure that the size of the request is under the cutoff size - if ($this->contentLengthCutoff) { - $size = $response->getContentLength() ?: $response->getBody()->getSize(); - if (!$size || $size > $this->contentLengthCutoff) { - return; - } - } - - if (!$contentEncoding) { - $hash = $response->getBody()->getContentMd5(); - } elseif ($contentEncoding == 'gzip') { - $response->getBody()->compress('zlib.deflate'); - $hash = $response->getBody()->getContentMd5(); - $response->getBody()->uncompress(); - } elseif ($contentEncoding == 'compress') { - $response->getBody()->compress('bzip2.compress'); - $hash = $response->getBody()->getContentMd5(); - $response->getBody()->uncompress(); - } else { - return; - } - - if ($contentMd5 !== $hash) { - throw new UnexpectedValueException( - "The response entity body may have been modified over the wire. The Content-MD5 " - . "received ({$contentMd5}) did not match the calculated MD5 hash ({$hash})." - ); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/composer.json deleted file mode 100644 index 0602d0609..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/plugin-md5", - "description": "Guzzle MD5 plugins", - "homepage": "http://guzzlephp.org/", - "keywords": ["plugin", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Md5": "" } - }, - "target-dir": "Guzzle/Plugin/Md5", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Mock/MockPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Mock/MockPlugin.php deleted file mode 100644 index ab7833cee..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Mock/MockPlugin.php +++ /dev/null @@ -1,242 +0,0 @@ -readBodies = $readBodies; - $this->temporary = $temporary; - if ($items) { - foreach ($items as $item) { - if ($item instanceof \Exception) { - $this->addException($item); - } else { - $this->addResponse($item); - } - } - } - } - - public static function getSubscribedEvents() - { - // Use a number lower than the CachePlugin - return array('request.before_send' => array('onRequestBeforeSend', -999)); - } - - public static function getAllEvents() - { - return array('mock.request'); - } - - /** - * Get a mock response from a file - * - * @param string $path File to retrieve a mock response from - * - * @return Response - * @throws InvalidArgumentException if the file is not found - */ - public static function getMockFile($path) - { - if (!file_exists($path)) { - throw new InvalidArgumentException('Unable to open mock file: ' . $path); - } - - return Response::fromMessage(file_get_contents($path)); - } - - /** - * Set whether or not to consume the entity body of a request when a mock - * response is used - * - * @param bool $readBodies Set to true to read and consume entity bodies - * - * @return self - */ - public function readBodies($readBodies) - { - $this->readBodies = $readBodies; - - return $this; - } - - /** - * Returns the number of remaining mock responses - * - * @return int - */ - public function count() - { - return count($this->queue); - } - - /** - * Add a response to the end of the queue - * - * @param string|Response $response Response object or path to response file - * - * @return MockPlugin - * @throws InvalidArgumentException if a string or Response is not passed - */ - public function addResponse($response) - { - if (!($response instanceof Response)) { - if (!is_string($response)) { - throw new InvalidArgumentException('Invalid response'); - } - $response = self::getMockFile($response); - } - - $this->queue[] = $response; - - return $this; - } - - /** - * Add an exception to the end of the queue - * - * @param CurlException $e Exception to throw when the request is executed - * - * @return MockPlugin - */ - public function addException(CurlException $e) - { - $this->queue[] = $e; - - return $this; - } - - /** - * Clear the queue - * - * @return MockPlugin - */ - public function clearQueue() - { - $this->queue = array(); - - return $this; - } - - /** - * Returns an array of mock responses remaining in the queue - * - * @return array - */ - public function getQueue() - { - return $this->queue; - } - - /** - * Check if this is a temporary plugin - * - * @return bool - */ - public function isTemporary() - { - return $this->temporary; - } - - /** - * Get a response from the front of the list and add it to a request - * - * @param RequestInterface $request Request to mock - * - * @return self - * @throws CurlException When request.send is called and an exception is queued - */ - public function dequeue(RequestInterface $request) - { - $this->dispatch('mock.request', array('plugin' => $this, 'request' => $request)); - - $item = array_shift($this->queue); - if ($item instanceof Response) { - if ($this->readBodies && $request instanceof EntityEnclosingRequestInterface) { - $request->getEventDispatcher()->addListener('request.sent', $f = function (Event $event) use (&$f) { - while ($data = $event['request']->getBody()->read(8096)); - // Remove the listener after one-time use - $event['request']->getEventDispatcher()->removeListener('request.sent', $f); - }); - } - $request->setResponse($item); - } elseif ($item instanceof CurlException) { - // Emulates exceptions encountered while transferring requests - $item->setRequest($request); - $state = $request->setState(RequestInterface::STATE_ERROR, array('exception' => $item)); - // Only throw if the exception wasn't handled - if ($state == RequestInterface::STATE_ERROR) { - throw $item; - } - } - - return $this; - } - - /** - * Clear the array of received requests - */ - public function flush() - { - $this->received = array(); - } - - /** - * Get an array of requests that were mocked by this plugin - * - * @return array - */ - public function getReceivedRequests() - { - return $this->received; - } - - /** - * Called when a request is about to be sent - * - * @param Event $event - */ - public function onRequestBeforeSend(Event $event) - { - if ($this->queue) { - $request = $event['request']; - $this->received[] = $request; - // Detach the filter from the client so it's a one-time use - if ($this->temporary && count($this->queue) == 1 && $request->getClient()) { - $request->getClient()->getEventDispatcher()->removeSubscriber($this); - } - $this->dequeue($request); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Mock/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Mock/composer.json deleted file mode 100644 index f8201e31f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Mock/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/plugin-mock", - "description": "Guzzle Mock plugin", - "homepage": "http://guzzlephp.org/", - "keywords": ["mock", "plugin", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Mock": "" } - }, - "target-dir": "Guzzle/Plugin/Mock", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Oauth/OauthPlugin.php b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Oauth/OauthPlugin.php deleted file mode 100644 index 1e1547f65..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Oauth/OauthPlugin.php +++ /dev/null @@ -1,305 +0,0 @@ -config = Collection::fromConfig($config, array( - 'version' => '1.0', - 'request_method' => self::REQUEST_METHOD_HEADER, - 'consumer_key' => 'anonymous', - 'consumer_secret' => 'anonymous', - 'signature_method' => 'HMAC-SHA1', - 'signature_callback' => function($stringToSign, $key) { - return hash_hmac('sha1', $stringToSign, $key, true); - } - ), array( - 'signature_method', 'signature_callback', 'version', - 'consumer_key', 'consumer_secret' - )); - } - - public static function getSubscribedEvents() - { - return array( - 'request.before_send' => array('onRequestBeforeSend', -1000) - ); - } - - /** - * Request before-send event handler - * - * @param Event $event Event received - * @return array - * @throws \InvalidArgumentException - */ - public function onRequestBeforeSend(Event $event) - { - $timestamp = $this->getTimestamp($event); - $request = $event['request']; - $nonce = $this->generateNonce($request); - $authorizationParams = $this->getOauthParams($timestamp, $nonce); - $authorizationParams['oauth_signature'] = $this->getSignature($request, $timestamp, $nonce); - - switch ($this->config['request_method']) { - case self::REQUEST_METHOD_HEADER: - $request->setHeader( - 'Authorization', - $this->buildAuthorizationHeader($authorizationParams) - ); - break; - case self::REQUEST_METHOD_QUERY: - foreach ($authorizationParams as $key => $value) { - $request->getQuery()->set($key, $value); - } - break; - default: - throw new \InvalidArgumentException(sprintf( - 'Invalid consumer method "%s"', - $this->config['request_method'] - )); - } - - return $authorizationParams; - } - - /** - * Builds the Authorization header for a request - * - * @param array $authorizationParams Associative array of authorization parameters - * - * @return string - */ - private function buildAuthorizationHeader($authorizationParams) - { - $authorizationString = 'OAuth '; - foreach ($authorizationParams as $key => $val) { - if ($val) { - $authorizationString .= $key . '="' . urlencode($val) . '", '; - } - } - - return substr($authorizationString, 0, -2); - } - - /** - * Calculate signature for request - * - * @param RequestInterface $request Request to generate a signature for - * @param integer $timestamp Timestamp to use for nonce - * @param string $nonce - * - * @return string - */ - public function getSignature(RequestInterface $request, $timestamp, $nonce) - { - $string = $this->getStringToSign($request, $timestamp, $nonce); - $key = urlencode($this->config['consumer_secret']) . '&' . urlencode($this->config['token_secret']); - - return base64_encode(call_user_func($this->config['signature_callback'], $string, $key)); - } - - /** - * Calculate string to sign - * - * @param RequestInterface $request Request to generate a signature for - * @param int $timestamp Timestamp to use for nonce - * @param string $nonce - * - * @return string - */ - public function getStringToSign(RequestInterface $request, $timestamp, $nonce) - { - $params = $this->getParamsToSign($request, $timestamp, $nonce); - - // Convert booleans to strings. - $params = $this->prepareParameters($params); - - // Build signing string from combined params - $parameterString = new QueryString($params); - - $url = Url::factory($request->getUrl())->setQuery('')->setFragment(null); - - return strtoupper($request->getMethod()) . '&' - . rawurlencode($url) . '&' - . rawurlencode((string) $parameterString); - } - - /** - * Get the oauth parameters as named by the oauth spec - * - * @param $timestamp - * @param $nonce - * @return Collection - */ - protected function getOauthParams($timestamp, $nonce) - { - $params = new Collection(array( - 'oauth_consumer_key' => $this->config['consumer_key'], - 'oauth_nonce' => $nonce, - 'oauth_signature_method' => $this->config['signature_method'], - 'oauth_timestamp' => $timestamp, - )); - - // Optional parameters should not be set if they have not been set in the config as - // the parameter may be considered invalid by the Oauth service. - $optionalParams = array( - 'callback' => 'oauth_callback', - 'token' => 'oauth_token', - 'verifier' => 'oauth_verifier', - 'version' => 'oauth_version' - ); - - foreach ($optionalParams as $optionName => $oauthName) { - if (isset($this->config[$optionName]) == true) { - $params[$oauthName] = $this->config[$optionName]; - } - } - - return $params; - } - - /** - * Get all of the parameters required to sign a request including: - * * The oauth params - * * The request GET params - * * The params passed in the POST body (with a content-type of application/x-www-form-urlencoded) - * - * @param RequestInterface $request Request to generate a signature for - * @param integer $timestamp Timestamp to use for nonce - * @param string $nonce - * - * @return array - */ - public function getParamsToSign(RequestInterface $request, $timestamp, $nonce) - { - $params = $this->getOauthParams($timestamp, $nonce); - - // Add query string parameters - $params->merge($request->getQuery()); - - // Add POST fields to signing string if required - if ($this->shouldPostFieldsBeSigned($request)) - { - $params->merge($request->getPostFields()); - } - - // Sort params - $params = $params->toArray(); - ksort($params); - - return $params; - } - - /** - * Decide whether the post fields should be added to the base string that Oauth signs. - * This implementation is correct. Non-conformant APIs may require that this method be - * overwritten e.g. the Flickr API incorrectly adds the post fields when the Content-Type - * is 'application/x-www-form-urlencoded' - * - * @param $request - * @return bool Whether the post fields should be signed or not - */ - public function shouldPostFieldsBeSigned($request) - { - if (!$this->config->get('disable_post_params') && - $request instanceof EntityEnclosingRequestInterface && - false !== strpos($request->getHeader('Content-Type'), 'application/x-www-form-urlencoded')) - { - return true; - } - - return false; - } - - /** - * Returns a Nonce Based on the unique id and URL. This will allow for multiple requests in parallel with the same - * exact timestamp to use separate nonce's. - * - * @param RequestInterface $request Request to generate a nonce for - * - * @return string - */ - public function generateNonce(RequestInterface $request) - { - return sha1(uniqid('', true) . $request->getUrl()); - } - - /** - * Gets timestamp from event or create new timestamp - * - * @param Event $event Event containing contextual information - * - * @return int - */ - public function getTimestamp(Event $event) - { - return $event['timestamp'] ?: time(); - } - - /** - * Convert booleans to strings, removed unset parameters, and sorts the array - * - * @param array $data Data array - * - * @return array - */ - protected function prepareParameters($data) - { - ksort($data); - foreach ($data as $key => &$value) { - switch (gettype($value)) { - case 'NULL': - unset($data[$key]); - break; - case 'array': - $data[$key] = self::prepareParameters($value); - break; - case 'boolean': - $data[$key] = $value ? 'true' : 'false'; - break; - } - } - - return $data; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Oauth/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/Oauth/composer.json deleted file mode 100644 index c9766ba16..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/Oauth/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "guzzle/plugin-oauth", - "description": "Guzzle OAuth plugin", - "homepage": "http://guzzlephp.org/", - "keywords": ["oauth", "plugin", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin\\Oauth": "" } - }, - "target-dir": "Guzzle/Plugin/Oauth", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Plugin/composer.json b/vendor/guzzle/guzzle/src/Guzzle/Plugin/composer.json deleted file mode 100644 index 2bbe64cc5..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Plugin/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "guzzle/plugin", - "description": "Guzzle plugin component containing all Guzzle HTTP plugins", - "homepage": "http://guzzlephp.org/", - "keywords": ["http", "client", "plugin", "extension", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.3.2", - "guzzle/http": "self.version" - }, - "suggest": { - "guzzle/cache": "self.version", - "guzzle/log": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Plugin": "" } - }, - "target-dir": "Guzzle/Plugin", - "replace": { - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version" - }, - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/AbstractConfigLoader.php b/vendor/guzzle/guzzle/src/Guzzle/Service/AbstractConfigLoader.php deleted file mode 100644 index cd06f5722..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/AbstractConfigLoader.php +++ /dev/null @@ -1,177 +0,0 @@ - 'JSON_ERROR_NONE - No errors', - JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', - JSON_ERROR_STATE_MISMATCH => 'JSON_ERROR_STATE_MISMATCH - Underflow or the modes mismatch', - JSON_ERROR_CTRL_CHAR => 'JSON_ERROR_CTRL_CHAR - Unexpected control character found', - JSON_ERROR_SYNTAX => 'JSON_ERROR_SYNTAX - Syntax error, malformed JSON', - JSON_ERROR_UTF8 => 'JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded' - ); - - public function load($config, array $options = array()) - { - // Reset the array of loaded files because this is a new config - $this->loadedFiles = array(); - - if (is_string($config)) { - $config = $this->loadFile($config); - } elseif (!is_array($config)) { - throw new InvalidArgumentException('Unknown type passed to configuration loader: ' . gettype($config)); - } else { - $this->mergeIncludes($config); - } - - return $this->build($config, $options); - } - - /** - * Add an include alias to the loader - * - * @param string $filename Filename to alias (e.g. _foo) - * @param string $alias Actual file to use (e.g. /path/to/foo.json) - * - * @return self - */ - public function addAlias($filename, $alias) - { - $this->aliases[$filename] = $alias; - - return $this; - } - - /** - * Remove an alias from the loader - * - * @param string $alias Alias to remove - * - * @return self - */ - public function removeAlias($alias) - { - unset($this->aliases[$alias]); - - return $this; - } - - /** - * Perform the parsing of a config file and create the end result - * - * @param array $config Configuration data - * @param array $options Options to use when building - * - * @return mixed - */ - protected abstract function build($config, array $options); - - /** - * Load a configuration file (can load JSON or PHP files that return an array when included) - * - * @param string $filename File to load - * - * @return array - * @throws InvalidArgumentException - * @throws RuntimeException when the JSON cannot be parsed - */ - protected function loadFile($filename) - { - if (isset($this->aliases[$filename])) { - $filename = $this->aliases[$filename]; - } - - switch (pathinfo($filename, PATHINFO_EXTENSION)) { - case 'js': - case 'json': - $level = error_reporting(0); - $json = file_get_contents($filename); - error_reporting($level); - - if ($json === false) { - $err = error_get_last(); - throw new InvalidArgumentException("Unable to open {$filename}: " . $err['message']); - } - - $config = json_decode($json, true); - // Throw an exception if there was an error loading the file - if ($error = json_last_error()) { - $message = isset(self::$jsonErrors[$error]) ? self::$jsonErrors[$error] : 'Unknown error'; - throw new RuntimeException("Error loading JSON data from {$filename}: ({$error}) - {$message}"); - } - break; - case 'php': - if (!is_readable($filename)) { - throw new InvalidArgumentException("Unable to open {$filename} for reading"); - } - $config = require $filename; - if (!is_array($config)) { - throw new InvalidArgumentException('PHP files must return an array of configuration data'); - } - break; - default: - throw new InvalidArgumentException('Unknown file extension: ' . $filename); - } - - // Keep track of this file being loaded to prevent infinite recursion - $this->loadedFiles[$filename] = true; - - // Merge include files into the configuration array - $this->mergeIncludes($config, dirname($filename)); - - return $config; - } - - /** - * Merges in all include files - * - * @param array $config Config data that contains includes - * @param string $basePath Base path to use when a relative path is encountered - * - * @return array Returns the merged and included data - */ - protected function mergeIncludes(&$config, $basePath = null) - { - if (!empty($config['includes'])) { - foreach ($config['includes'] as &$path) { - // Account for relative paths - if ($path[0] != DIRECTORY_SEPARATOR && !isset($this->aliases[$path]) && $basePath) { - $path = "{$basePath}/{$path}"; - } - // Don't load the same files more than once - if (!isset($this->loadedFiles[$path])) { - $this->loadedFiles[$path] = true; - $config = $this->mergeData($this->loadFile($path), $config); - } - } - } - } - - /** - * Default implementation for merging two arrays of data (uses array_merge_recursive) - * - * @param array $a Original data - * @param array $b Data to merge into the original and overwrite existing values - * - * @return array - */ - protected function mergeData(array $a, array $b) - { - return array_merge_recursive($a, $b); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilder.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilder.php deleted file mode 100644 index 38150db4b..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilder.php +++ /dev/null @@ -1,189 +0,0 @@ -load($config, $globalParameters); - } - - /** - * @param array $serviceBuilderConfig Service configuration settings: - * - name: Name of the service - * - class: Client class to instantiate using a factory method - * - params: array of key value pair configuration settings for the builder - */ - public function __construct(array $serviceBuilderConfig = array()) - { - $this->builderConfig = $serviceBuilderConfig; - } - - public static function getAllEvents() - { - return array('service_builder.create_client'); - } - - public function unserialize($serialized) - { - $this->builderConfig = json_decode($serialized, true); - } - - public function serialize() - { - return json_encode($this->builderConfig); - } - - /** - * Attach a plugin to every client created by the builder - * - * @param EventSubscriberInterface $plugin Plugin to attach to each client - * - * @return self - */ - public function addGlobalPlugin(EventSubscriberInterface $plugin) - { - $this->plugins[] = $plugin; - - return $this; - } - - /** - * Get data from the service builder without triggering the building of a service - * - * @param string $name Name of the service to retrieve - * - * @return array|null - */ - public function getData($name) - { - return isset($this->builderConfig[$name]) ? $this->builderConfig[$name] : null; - } - - public function get($name, $throwAway = false) - { - if (!isset($this->builderConfig[$name])) { - - // Check to see if arbitrary data is being referenced - if (isset($this->clients[$name])) { - return $this->clients[$name]; - } - - // Check aliases and return a match if found - foreach ($this->builderConfig as $actualName => $config) { - if (isset($config['alias']) && $config['alias'] == $name) { - return $this->get($actualName, $throwAway); - } - } - throw new ServiceNotFoundException('No service is registered as ' . $name); - } - - if (!$throwAway && isset($this->clients[$name])) { - return $this->clients[$name]; - } - - $builder =& $this->builderConfig[$name]; - - // Convert references to the actual client - foreach ($builder['params'] as &$v) { - if (is_string($v) && substr($v, 0, 1) == '{' && substr($v, -1) == '}') { - $v = $this->get(trim($v, '{} ')); - } - } - - // Get the configured parameters and merge in any parameters provided for throw-away clients - $config = $builder['params']; - if (is_array($throwAway)) { - $config = $throwAway + $config; - } - - $client = $builder['class']::factory($config); - - if (!$throwAway) { - $this->clients[$name] = $client; - } - - if ($client instanceof ClientInterface) { - foreach ($this->plugins as $plugin) { - $client->addSubscriber($plugin); - } - // Dispatch an event letting listeners know a client was created - $this->dispatch('service_builder.create_client', array('client' => $client)); - } - - return $client; - } - - public function set($key, $service) - { - if (is_array($service) && isset($service['class']) && isset($service['params'])) { - $this->builderConfig[$key] = $service; - } else { - $this->clients[$key] = $service; - } - - return $this; - } - - public function offsetSet($offset, $value) - { - $this->set($offset, $value); - } - - public function offsetUnset($offset) - { - unset($this->builderConfig[$offset]); - unset($this->clients[$offset]); - } - - public function offsetExists($offset) - { - return isset($this->builderConfig[$offset]) || isset($this->clients[$offset]); - } - - public function offsetGet($offset) - { - return $this->get($offset); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilderInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilderInterface.php deleted file mode 100644 index 4fc310a47..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilderInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - &$service) { - - $service['params'] = isset($service['params']) ? $service['params'] : array(); - - // Check if this client builder extends another client - if (!empty($service['extends'])) { - - // Make sure that the service it's extending has been defined - if (!isset($services[$service['extends']])) { - throw new ServiceNotFoundException( - "{$name} is trying to extend a non-existent service: {$service['extends']}" - ); - } - - $extended = &$services[$service['extends']]; - - // Use the correct class attribute - if (empty($service['class'])) { - $service['class'] = isset($extended['class']) ? $extended['class'] : ''; - } - if ($extendsParams = isset($extended['params']) ? $extended['params'] : false) { - $service['params'] = $service['params'] + $extendsParams; - } - } - - // Overwrite default values with global parameter values - if (!empty($options)) { - $service['params'] = $options + $service['params']; - } - - $service['class'] = isset($service['class']) ? $service['class'] : ''; - } - - return new $class($services); - } - - protected function mergeData(array $a, array $b) - { - $result = $b + $a; - - // Merge services using a recursive union of arrays - if (isset($a['services']) && $b['services']) { - - // Get a union of the services of the two arrays - $result['services'] = $b['services'] + $a['services']; - - // Merge each service in using a union of the two arrays - foreach ($result['services'] as $name => &$service) { - - // By default, services completely override a previously defined service unless it extends itself - if (isset($a['services'][$name]['extends']) - && isset($b['services'][$name]['extends']) - && $b['services'][$name]['extends'] == $name - ) { - $service += $a['services'][$name]; - // Use the `extends` attribute of the parent - $service['extends'] = $a['services'][$name]['extends']; - // Merge parameters using a union if both have parameters - if (isset($a['services'][$name]['params'])) { - $service['params'] += $a['services'][$name]['params']; - } - } - } - } - - return $result; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/CachingConfigLoader.php b/vendor/guzzle/guzzle/src/Guzzle/Service/CachingConfigLoader.php deleted file mode 100644 index 26f8360cc..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/CachingConfigLoader.php +++ /dev/null @@ -1,46 +0,0 @@ -loader = $loader; - $this->cache = $cache; - } - - public function load($config, array $options = array()) - { - if (!is_string($config)) { - $key = false; - } else { - $key = 'loader_' . crc32($config); - if ($result = $this->cache->fetch($key)) { - return $result; - } - } - - $result = $this->loader->load($config, $options); - if ($key) { - $this->cache->save($key, $result); - } - - return $result; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php deleted file mode 100644 index f4b76be1c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php +++ /dev/null @@ -1,293 +0,0 @@ -getCommand($method, isset($args[0]) ? $args[0] : array())->getResult(); - } - - public function getCommand($name, array $args = array()) - { - // Add global client options to the command - if ($options = $this->getConfig(self::COMMAND_PARAMS)) { - $args += $options; - } - - if (!($command = $this->getCommandFactory()->factory($name, $args))) { - throw new InvalidArgumentException("Command was not found matching {$name}"); - } - - $command->setClient($this); - $this->dispatch('client.command.create', array('client' => $this, 'command' => $command)); - - return $command; - } - - /** - * Set the command factory used to create commands by name - * - * @param CommandFactoryInterface $factory Command factory - * - * @return self - */ - public function setCommandFactory(CommandFactoryInterface $factory) - { - $this->commandFactory = $factory; - - return $this; - } - - /** - * Set the resource iterator factory associated with the client - * - * @param ResourceIteratorFactoryInterface $factory Resource iterator factory - * - * @return self - */ - public function setResourceIteratorFactory(ResourceIteratorFactoryInterface $factory) - { - $this->resourceIteratorFactory = $factory; - - return $this; - } - - public function getIterator($command, array $commandOptions = null, array $iteratorOptions = array()) - { - if (!($command instanceof CommandInterface)) { - $command = $this->getCommand($command, $commandOptions ?: array()); - } - - return $this->getResourceIteratorFactory()->build($command, $iteratorOptions); - } - - public function execute($command) - { - if ($command instanceof CommandInterface) { - $this->send($this->prepareCommand($command)); - $this->dispatch('command.after_send', array('command' => $command)); - return $command->getResult(); - } elseif (is_array($command) || $command instanceof \Traversable) { - return $this->executeMultiple($command); - } else { - throw new InvalidArgumentException('Command must be a command or array of commands'); - } - } - - public function setDescription(ServiceDescriptionInterface $service) - { - $this->serviceDescription = $service; - - // If a baseUrl was set on the description, then update the client - if ($baseUrl = $service->getBaseUrl()) { - $this->setBaseUrl($baseUrl); - } - - return $this; - } - - public function getDescription() - { - return $this->serviceDescription; - } - - /** - * Set the inflector used with the client - * - * @param InflectorInterface $inflector Inflection object - * - * @return self - */ - public function setInflector(InflectorInterface $inflector) - { - $this->inflector = $inflector; - - return $this; - } - - /** - * Get the inflector used with the client - * - * @return self - */ - public function getInflector() - { - if (!$this->inflector) { - $this->inflector = Inflector::getDefault(); - } - - return $this->inflector; - } - - /** - * Prepare a command for sending and get the RequestInterface object created by the command - * - * @param CommandInterface $command Command to prepare - * - * @return RequestInterface - */ - protected function prepareCommand(CommandInterface $command) - { - // Set the client and prepare the command - $request = $command->setClient($this)->prepare(); - // Set the state to new if the command was previously executed - $request->setState(RequestInterface::STATE_NEW); - $this->dispatch('command.before_send', array('command' => $command)); - - return $request; - } - - /** - * Execute multiple commands in parallel - * - * @param array|Traversable $commands Array of CommandInterface objects to execute - * - * @return array Returns an array of the executed commands - * @throws Exception\CommandTransferException - */ - protected function executeMultiple($commands) - { - $requests = array(); - $commandRequests = new \SplObjectStorage(); - - foreach ($commands as $command) { - $request = $this->prepareCommand($command); - $commandRequests[$request] = $command; - $requests[] = $request; - } - - try { - $this->send($requests); - foreach ($commands as $command) { - $this->dispatch('command.after_send', array('command' => $command)); - } - return $commands; - } catch (MultiTransferException $failureException) { - // Throw a CommandTransferException using the successful and failed commands - $e = CommandTransferException::fromMultiTransferException($failureException); - - // Remove failed requests from the successful requests array and add to the failures array - foreach ($failureException->getFailedRequests() as $request) { - if (isset($commandRequests[$request])) { - $e->addFailedCommand($commandRequests[$request]); - unset($commandRequests[$request]); - } - } - - // Always emit the command after_send events for successful commands - foreach ($commandRequests as $success) { - $e->addSuccessfulCommand($commandRequests[$success]); - $this->dispatch('command.after_send', array('command' => $commandRequests[$success])); - } - - throw $e; - } - } - - protected function getResourceIteratorFactory() - { - if (!$this->resourceIteratorFactory) { - // Build the default resource iterator factory if one is not set - $clientClass = get_class($this); - $prefix = substr($clientClass, 0, strrpos($clientClass, '\\')); - $this->resourceIteratorFactory = new ResourceIteratorClassFactory(array( - "{$prefix}\\Iterator", - "{$prefix}\\Model" - )); - } - - return $this->resourceIteratorFactory; - } - - /** - * Get the command factory associated with the client - * - * @return CommandFactoryInterface - */ - protected function getCommandFactory() - { - if (!$this->commandFactory) { - $this->commandFactory = CompositeFactory::getDefaultChain($this); - } - - return $this->commandFactory; - } - - /** - * @deprecated - * @codeCoverageIgnore - */ - public function enableMagicMethods($isEnabled) - { - Version::warn(__METHOD__ . ' is deprecated'); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/ClientInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/ClientInterface.php deleted file mode 100644 index 814154f00..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/ClientInterface.php +++ /dev/null @@ -1,68 +0,0 @@ -operation = $operation ?: $this->createOperation(); - foreach ($this->operation->getParams() as $name => $arg) { - $currentValue = $this[$name]; - $configValue = $arg->getValue($currentValue); - // If default or static values are set, then this should always be updated on the config object - if ($currentValue !== $configValue) { - $this[$name] = $configValue; - } - } - - $headers = $this[self::HEADERS_OPTION]; - if (!$headers instanceof Collection) { - $this[self::HEADERS_OPTION] = new Collection((array) $headers); - } - - // You can set a command.on_complete option in your parameters to set an onComplete callback - if ($onComplete = $this['command.on_complete']) { - unset($this['command.on_complete']); - $this->setOnComplete($onComplete); - } - - // Set the hidden additional parameters - if (!$this[self::HIDDEN_PARAMS]) { - $this[self::HIDDEN_PARAMS] = array( - self::HEADERS_OPTION, - self::RESPONSE_PROCESSING, - self::HIDDEN_PARAMS, - self::REQUEST_OPTIONS - ); - } - - $this->init(); - } - - /** - * Custom clone behavior - */ - public function __clone() - { - $this->request = null; - $this->result = null; - } - - /** - * Execute the command in the same manner as calling a function - * - * @return mixed Returns the result of {@see AbstractCommand::execute} - */ - public function __invoke() - { - return $this->execute(); - } - - public function getName() - { - return $this->operation->getName(); - } - - /** - * Get the API command information about the command - * - * @return OperationInterface - */ - public function getOperation() - { - return $this->operation; - } - - public function setOnComplete($callable) - { - if (!is_callable($callable)) { - throw new InvalidArgumentException('The onComplete function must be callable'); - } - - $this->onComplete = $callable; - - return $this; - } - - public function execute() - { - if (!$this->client) { - throw new CommandException('A client must be associated with the command before it can be executed.'); - } - - return $this->client->execute($this); - } - - public function getClient() - { - return $this->client; - } - - public function setClient(ClientInterface $client) - { - $this->client = $client; - - return $this; - } - - public function getRequest() - { - if (!$this->request) { - throw new CommandException('The command must be prepared before retrieving the request'); - } - - return $this->request; - } - - public function getResponse() - { - if (!$this->isExecuted()) { - $this->execute(); - } - - return $this->request->getResponse(); - } - - public function getResult() - { - if (!$this->isExecuted()) { - $this->execute(); - } - - if (null === $this->result) { - $this->process(); - // Call the onComplete method if one is set - if ($this->onComplete) { - call_user_func($this->onComplete, $this); - } - } - - return $this->result; - } - - public function setResult($result) - { - $this->result = $result; - - return $this; - } - - public function isPrepared() - { - return $this->request !== null; - } - - public function isExecuted() - { - return $this->request !== null && $this->request->getState() == 'complete'; - } - - public function prepare() - { - if (!$this->isPrepared()) { - if (!$this->client) { - throw new CommandException('A client must be associated with the command before it can be prepared.'); - } - - // If no response processing value was specified, then attempt to use the highest level of processing - if (!isset($this[self::RESPONSE_PROCESSING])) { - $this[self::RESPONSE_PROCESSING] = self::TYPE_MODEL; - } - - // Notify subscribers of the client that the command is being prepared - $this->client->dispatch('command.before_prepare', array('command' => $this)); - - // Fail on missing required arguments, and change parameters via filters - $this->validate(); - // Delegate to the subclass that implements the build method - $this->build(); - - // Add custom request headers set on the command - if ($headers = $this[self::HEADERS_OPTION]) { - foreach ($headers as $key => $value) { - $this->request->setHeader($key, $value); - } - } - - // Add any curl options to the request - if ($options = $this[Client::CURL_OPTIONS]) { - $this->request->getCurlOptions()->overwriteWith(CurlHandle::parseCurlConfig($options)); - } - - // Set a custom response body - if ($responseBody = $this[self::RESPONSE_BODY]) { - $this->request->setResponseBody($responseBody); - } - - $this->client->dispatch('command.after_prepare', array('command' => $this)); - } - - return $this->request; - } - - /** - * Set the validator used to validate and prepare command parameters and nested JSON schemas. If no validator is - * set, then the command will validate using the default {@see SchemaValidator}. - * - * @param ValidatorInterface $validator Validator used to prepare and validate properties against a JSON schema - * - * @return self - */ - public function setValidator(ValidatorInterface $validator) - { - $this->validator = $validator; - - return $this; - } - - public function getRequestHeaders() - { - return $this[self::HEADERS_OPTION]; - } - - /** - * Initialize the command (hook that can be implemented in subclasses) - */ - protected function init() {} - - /** - * Create the request object that will carry out the command - */ - abstract protected function build(); - - /** - * Hook used to create an operation for concrete commands that are not associated with a service description - * - * @return OperationInterface - */ - protected function createOperation() - { - return new Operation(array('name' => get_class($this))); - } - - /** - * Create the result of the command after the request has been completed. - * Override this method in subclasses to customize this behavior - */ - protected function process() - { - $this->result = $this[self::RESPONSE_PROCESSING] != self::TYPE_RAW - ? DefaultResponseParser::getInstance()->parse($this) - : $this->request->getResponse(); - } - - /** - * Validate and prepare the command based on the schema and rules defined by the command's Operation object - * - * @throws ValidationException when validation errors occur - */ - protected function validate() - { - // Do not perform request validation/transformation if it is disable - if ($this[self::DISABLE_VALIDATION]) { - return; - } - - $errors = array(); - $validator = $this->getValidator(); - foreach ($this->operation->getParams() as $name => $schema) { - $value = $this[$name]; - if (!$validator->validate($schema, $value)) { - $errors = array_merge($errors, $validator->getErrors()); - } elseif ($value !== $this[$name]) { - // Update the config value if it changed and no validation errors were encountered - $this->data[$name] = $value; - } - } - - // Validate additional parameters - $hidden = $this[self::HIDDEN_PARAMS]; - - if ($properties = $this->operation->getAdditionalParameters()) { - foreach ($this->toArray() as $name => $value) { - // It's only additional if it isn't defined in the schema - if (!$this->operation->hasParam($name) && !in_array($name, $hidden)) { - // Always set the name so that error messages are useful - $properties->setName($name); - if (!$validator->validate($properties, $value)) { - $errors = array_merge($errors, $validator->getErrors()); - } elseif ($value !== $this[$name]) { - $this->data[$name] = $value; - } - } - } - } - - if (!empty($errors)) { - $e = new ValidationException('Validation errors: ' . implode("\n", $errors)); - $e->setErrors($errors); - throw $e; - } - } - - /** - * Get the validator used to prepare and validate properties. If no validator has been set on the command, then - * the default {@see SchemaValidator} will be used. - * - * @return ValidatorInterface - */ - protected function getValidator() - { - if (!$this->validator) { - $this->validator = SchemaValidator::getInstance(); - } - - return $this->validator; - } - - /** - * Get array of any validation errors - * If no validator has been set then return false - */ - public function getValidationErrors() - { - if (!$this->validator) { - return false; - } - - return $this->validator->getErrors(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/ClosureCommand.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/ClosureCommand.php deleted file mode 100644 index cb6ac40ce..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/ClosureCommand.php +++ /dev/null @@ -1,41 +0,0 @@ -request = $closure($this, $this->operation); - - if (!$this->request || !$this->request instanceof RequestInterface) { - throw new UnexpectedValueException('Closure command did not return a RequestInterface object'); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/CommandInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/CommandInterface.php deleted file mode 100644 index fbb61d2ff..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/CommandInterface.php +++ /dev/null @@ -1,128 +0,0 @@ -stopPropagation(); - } - - /** - * Get the created object - * - * @return mixed - */ - public function getResult() - { - return $this['result']; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/DefaultRequestSerializer.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/DefaultRequestSerializer.php deleted file mode 100644 index 2dc4acd37..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/DefaultRequestSerializer.php +++ /dev/null @@ -1,169 +0,0 @@ -factory = $factory; - } - - /** - * Add a location visitor to the serializer - * - * @param string $location Location to associate with the visitor - * @param RequestVisitorInterface $visitor Visitor to attach - * - * @return self - */ - public function addVisitor($location, RequestVisitorInterface $visitor) - { - $this->factory->addRequestVisitor($location, $visitor); - - return $this; - } - - public function prepare(CommandInterface $command) - { - $request = $this->createRequest($command); - // Keep an array of visitors found in the operation - $foundVisitors = array(); - $operation = $command->getOperation(); - - // Add arguments to the request using the location attribute - foreach ($operation->getParams() as $name => $arg) { - /** @var $arg \Guzzle\Service\Description\Parameter */ - $location = $arg->getLocation(); - // Skip 'uri' locations because they've already been processed - if ($location && $location != 'uri') { - // Instantiate visitors as they are detected in the properties - if (!isset($foundVisitors[$location])) { - $foundVisitors[$location] = $this->factory->getRequestVisitor($location); - } - // Ensure that a value has been set for this parameter - $value = $command[$name]; - if ($value !== null) { - // Apply the parameter value with the location visitor - $foundVisitors[$location]->visit($command, $request, $arg, $value); - } - } - } - - // Serialize additional parameters - if ($additional = $operation->getAdditionalParameters()) { - if ($visitor = $this->prepareAdditionalParameters($operation, $command, $request, $additional)) { - $foundVisitors[$additional->getLocation()] = $visitor; - } - } - - // Call the after method on each visitor found in the operation - foreach ($foundVisitors as $visitor) { - $visitor->after($command, $request); - } - - return $request; - } - - /** - * Serialize additional parameters - * - * @param OperationInterface $operation Operation that owns the command - * @param CommandInterface $command Command to prepare - * @param RequestInterface $request Request to serialize - * @param Parameter $additional Additional parameters - * - * @return null|RequestVisitorInterface - */ - protected function prepareAdditionalParameters( - OperationInterface $operation, - CommandInterface $command, - RequestInterface $request, - Parameter $additional - ) { - if (!($location = $additional->getLocation())) { - return; - } - - $visitor = $this->factory->getRequestVisitor($location); - $hidden = $command[$command::HIDDEN_PARAMS]; - - foreach ($command->toArray() as $key => $value) { - // Ignore values that are null or built-in command options - if ($value !== null - && !in_array($key, $hidden) - && !$operation->hasParam($key) - ) { - $additional->setName($key); - $visitor->visit($command, $request, $additional, $value); - } - } - - return $visitor; - } - - /** - * Create a request for the command and operation - * - * @param CommandInterface $command Command to create a request for - * - * @return RequestInterface - */ - protected function createRequest(CommandInterface $command) - { - $operation = $command->getOperation(); - $client = $command->getClient(); - $options = $command[AbstractCommand::REQUEST_OPTIONS] ?: array(); - - // If the command does not specify a template, then assume the base URL of the client - if (!($uri = $operation->getUri())) { - return $client->createRequest($operation->getHttpMethod(), $client->getBaseUrl(), null, null, $options); - } - - // Get the path values and use the client config settings - $variables = array(); - foreach ($operation->getParams() as $name => $arg) { - if ($arg->getLocation() == 'uri') { - if (isset($command[$name])) { - $variables[$name] = $arg->filter($command[$name]); - if (!is_array($variables[$name])) { - $variables[$name] = (string) $variables[$name]; - } - } - } - } - - return $client->createRequest($operation->getHttpMethod(), array($uri, $variables), null, null, $options); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/DefaultResponseParser.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/DefaultResponseParser.php deleted file mode 100644 index 4fe380376..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/DefaultResponseParser.php +++ /dev/null @@ -1,55 +0,0 @@ -getRequest()->getResponse(); - - // Account for hard coded content-type values specified in service descriptions - if ($contentType = $command['command.expects']) { - $response->setHeader('Content-Type', $contentType); - } else { - $contentType = (string) $response->getHeader('Content-Type'); - } - - return $this->handleParsing($command, $response, $contentType); - } - - protected function handleParsing(CommandInterface $command, Response $response, $contentType) - { - $result = $response; - if ($result->getBody()) { - if (stripos($contentType, 'json') !== false) { - $result = $result->json(); - } elseif (stripos($contentType, 'xml') !== false) { - $result = $result->xml(); - } - } - - return $result; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/AliasFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/AliasFactory.php deleted file mode 100644 index 1c5ce0741..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/AliasFactory.php +++ /dev/null @@ -1,39 +0,0 @@ -client = $client; - $this->aliases = $aliases; - } - - public function factory($name, array $args = array()) - { - if (isset($this->aliases[$name])) { - try { - return $this->client->getCommand($this->aliases[$name], $args); - } catch (InvalidArgumentException $e) { - return null; - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/CompositeFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/CompositeFactory.php deleted file mode 100644 index 8c46983d6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/CompositeFactory.php +++ /dev/null @@ -1,154 +0,0 @@ -getDescription()) { - $factories[] = new ServiceDescriptionFactory($description); - } - $factories[] = new ConcreteClassFactory($client); - - return new self($factories); - } - - /** - * @param array $factories Array of command factories - */ - public function __construct(array $factories = array()) - { - $this->factories = $factories; - } - - /** - * Add a command factory to the chain - * - * @param FactoryInterface $factory Factory to add - * @param string|FactoryInterface $before Insert the new command factory before a command factory class or object - * matching a class name. - * @return CompositeFactory - */ - public function add(FactoryInterface $factory, $before = null) - { - $pos = null; - - if ($before) { - foreach ($this->factories as $i => $f) { - if ($before instanceof FactoryInterface) { - if ($f === $before) { - $pos = $i; - break; - } - } elseif (is_string($before)) { - if ($f instanceof $before) { - $pos = $i; - break; - } - } - } - } - - if ($pos === null) { - $this->factories[] = $factory; - } else { - array_splice($this->factories, $i, 0, array($factory)); - } - - return $this; - } - - /** - * Check if the chain contains a specific command factory - * - * @param FactoryInterface|string $factory Factory to check - * - * @return bool - */ - public function has($factory) - { - return (bool) $this->find($factory); - } - - /** - * Remove a specific command factory from the chain - * - * @param string|FactoryInterface $factory Factory to remove by name or instance - * - * @return CompositeFactory - */ - public function remove($factory = null) - { - if (!($factory instanceof FactoryInterface)) { - $factory = $this->find($factory); - } - - $this->factories = array_values(array_filter($this->factories, function($f) use ($factory) { - return $f !== $factory; - })); - - return $this; - } - - /** - * Get a command factory by class name - * - * @param string|FactoryInterface $factory Command factory class or instance - * - * @return null|FactoryInterface - */ - public function find($factory) - { - foreach ($this->factories as $f) { - if ($factory === $f || (is_string($factory) && $f instanceof $factory)) { - return $f; - } - } - } - - /** - * Create a command using the associated command factories - * - * @param string $name Name of the command - * @param array $args Command arguments - * - * @return CommandInterface - */ - public function factory($name, array $args = array()) - { - foreach ($this->factories as $factory) { - $command = $factory->factory($name, $args); - if ($command) { - return $command; - } - } - } - - public function count() - { - return count($this->factories); - } - - public function getIterator() - { - return new \ArrayIterator($this->factories); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ConcreteClassFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ConcreteClassFactory.php deleted file mode 100644 index 0e93deaa0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ConcreteClassFactory.php +++ /dev/null @@ -1,47 +0,0 @@ -client = $client; - $this->inflector = $inflector ?: Inflector::getDefault(); - } - - public function factory($name, array $args = array()) - { - // Determine the class to instantiate based on the namespace of the current client and the default directory - $prefix = $this->client->getConfig('command.prefix'); - if (!$prefix) { - // The prefix can be specified in a factory method and is cached - $prefix = implode('\\', array_slice(explode('\\', get_class($this->client)), 0, -1)) . '\\Command\\'; - $this->client->getConfig()->set('command.prefix', $prefix); - } - - $class = $prefix . str_replace(' ', '\\', ucwords(str_replace('.', ' ', $this->inflector->camel($name)))); - - // Create the concrete command if it exists - if (class_exists($class)) { - return new $class($args); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/FactoryInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/FactoryInterface.php deleted file mode 100644 index 35c299d9d..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/FactoryInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -map = $map; - } - - public function factory($name, array $args = array()) - { - if (isset($this->map[$name])) { - $class = $this->map[$name]; - - return new $class($args); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ServiceDescriptionFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ServiceDescriptionFactory.php deleted file mode 100644 index b943a5b50..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ServiceDescriptionFactory.php +++ /dev/null @@ -1,71 +0,0 @@ -setServiceDescription($description); - $this->inflector = $inflector; - } - - /** - * Change the service description used with the factory - * - * @param ServiceDescriptionInterface $description Service description to use - * - * @return FactoryInterface - */ - public function setServiceDescription(ServiceDescriptionInterface $description) - { - $this->description = $description; - - return $this; - } - - /** - * Returns the service description - * - * @return ServiceDescriptionInterface - */ - public function getServiceDescription() - { - return $this->description; - } - - public function factory($name, array $args = array()) - { - $command = $this->description->getOperation($name); - - // If a command wasn't found, then try to uppercase the first letter and try again - if (!$command) { - $command = $this->description->getOperation(ucfirst($name)); - // If an inflector was passed, then attempt to get the command using snake_case inflection - if (!$command && $this->inflector) { - $command = $this->description->getOperation($this->inflector->snake($name)); - } - } - - if ($command) { - $class = $command->getClass(); - return new $class($args, $command, $this->description); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/AbstractRequestVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/AbstractRequestVisitor.php deleted file mode 100644 index adcfca1ba..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/AbstractRequestVisitor.php +++ /dev/null @@ -1,69 +0,0 @@ -resolveRecursively($value, $param) - : $param->filter($value); - } - - /** - * Map nested parameters into the location_key based parameters - * - * @param array $value Value to map - * @param Parameter $param Parameter that holds information about the current key - * - * @return array Returns the mapped array - */ - protected function resolveRecursively(array $value, Parameter $param) - { - foreach ($value as $name => &$v) { - switch ($param->getType()) { - case 'object': - if ($subParam = $param->getProperty($name)) { - $key = $subParam->getWireName(); - $value[$key] = $this->prepareValue($v, $subParam); - if ($name != $key) { - unset($value[$name]); - } - } elseif ($param->getAdditionalProperties() instanceof Parameter) { - $v = $this->prepareValue($v, $param->getAdditionalProperties()); - } - break; - case 'array': - if ($items = $param->getItems()) { - $v = $this->prepareValue($v, $items); - } - break; - } - } - - return $param->filter($value); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/BodyVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/BodyVisitor.php deleted file mode 100644 index 168d7806f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/BodyVisitor.php +++ /dev/null @@ -1,58 +0,0 @@ -filter($value); - $entityBody = EntityBody::factory($value); - $request->setBody($entityBody); - $this->addExpectHeader($request, $entityBody, $param->getData('expect_header')); - // Add the Content-Encoding header if one is set on the EntityBody - if ($encoding = $entityBody->getContentEncoding()) { - $request->setHeader('Content-Encoding', $encoding); - } - } - - /** - * Add the appropriate expect header to a request - * - * @param EntityEnclosingRequestInterface $request Request to update - * @param EntityBodyInterface $body Entity body of the request - * @param string|int $expect Expect header setting - */ - protected function addExpectHeader(EntityEnclosingRequestInterface $request, EntityBodyInterface $body, $expect) - { - // Allow the `expect` data parameter to be set to remove the Expect header from the request - if ($expect === false) { - $request->removeHeader('Expect'); - } elseif ($expect !== true) { - // Default to using a MB as the point in which to start using the expect header - $expect = $expect ?: 1048576; - // If the expect_header value is numeric then only add if the size is greater than the cutoff - if (is_numeric($expect) && $body->getSize()) { - if ($body->getSize() < $expect) { - $request->removeHeader('Expect'); - } else { - $request->setHeader('Expect', '100-Continue'); - } - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/HeaderVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/HeaderVisitor.php deleted file mode 100644 index 2a537542c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/HeaderVisitor.php +++ /dev/null @@ -1,44 +0,0 @@ -filter($value); - if ($param->getType() == 'object' && $param->getAdditionalProperties() instanceof Parameter) { - $this->addPrefixedHeaders($request, $param, $value); - } else { - $request->setHeader($param->getWireName(), $value); - } - } - - /** - * Add a prefixed array of headers to the request - * - * @param RequestInterface $request Request to update - * @param Parameter $param Parameter object - * @param array $value Header array to add - * - * @throws InvalidArgumentException - */ - protected function addPrefixedHeaders(RequestInterface $request, Parameter $param, $value) - { - if (!is_array($value)) { - throw new InvalidArgumentException('An array of mapped headers expected, but received a single value'); - } - $prefix = $param->getSentAs(); - foreach ($value as $headerName => $headerValue) { - $request->setHeader($prefix . $headerName, $headerValue); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php deleted file mode 100644 index 757e1c520..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php +++ /dev/null @@ -1,63 +0,0 @@ -data = new \SplObjectStorage(); - } - - /** - * Set the Content-Type header to add to the request if JSON is added to the body. This visitor does not add a - * Content-Type header unless you specify one here. - * - * @param string $header Header to set when JSON is added (e.g. application/json) - * - * @return self - */ - public function setContentTypeHeader($header = 'application/json') - { - $this->jsonContentType = $header; - - return $this; - } - - public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value) - { - if (isset($this->data[$command])) { - $json = $this->data[$command]; - } else { - $json = array(); - } - $json[$param->getWireName()] = $this->prepareValue($value, $param); - $this->data[$command] = $json; - } - - public function after(CommandInterface $command, RequestInterface $request) - { - if (isset($this->data[$command])) { - // Don't overwrite the Content-Type if one is set - if ($this->jsonContentType && !$request->hasHeader('Content-Type')) { - $request->setHeader('Content-Type', $this->jsonContentType); - } - - $request->setBody(json_encode($this->data[$command])); - unset($this->data[$command]); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFieldVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFieldVisitor.php deleted file mode 100644 index 975850b74..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFieldVisitor.php +++ /dev/null @@ -1,18 +0,0 @@ -setPostField($param->getWireName(), $this->prepareValue($value, $param)); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFileVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFileVisitor.php deleted file mode 100644 index 0853ebe62..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFileVisitor.php +++ /dev/null @@ -1,24 +0,0 @@ -filter($value); - if ($value instanceof PostFileInterface) { - $request->addPostFile($value); - } else { - $request->addPostFile($param->getWireName(), $value); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/QueryVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/QueryVisitor.php deleted file mode 100644 index 315877aa0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/QueryVisitor.php +++ /dev/null @@ -1,18 +0,0 @@ -getQuery()->set($param->getWireName(), $this->prepareValue($value, $param)); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/RequestVisitorInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/RequestVisitorInterface.php deleted file mode 100644 index 14e0b2d2b..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/RequestVisitorInterface.php +++ /dev/null @@ -1,31 +0,0 @@ -setResponseBody($value); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/XmlVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/XmlVisitor.php deleted file mode 100644 index 5b7148787..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/XmlVisitor.php +++ /dev/null @@ -1,252 +0,0 @@ -data = new \SplObjectStorage(); - } - - /** - * Change the content-type header that is added when XML is found - * - * @param string $header Header to set when XML is found - * - * @return self - */ - public function setContentTypeHeader($header) - { - $this->contentType = $header; - - return $this; - } - - public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value) - { - $xml = isset($this->data[$command]) - ? $this->data[$command] - : $this->createRootElement($param->getParent()); - $this->addXml($xml, $param, $value); - - $this->data[$command] = $xml; - } - - public function after(CommandInterface $command, RequestInterface $request) - { - $xml = null; - - // If data was found that needs to be serialized, then do so - if (isset($this->data[$command])) { - $xml = $this->finishDocument($this->data[$command]); - unset($this->data[$command]); - } else { - // Check if XML should always be sent for the command - $operation = $command->getOperation(); - if ($operation->getData('xmlAllowEmpty')) { - $xmlWriter = $this->createRootElement($operation); - $xml = $this->finishDocument($xmlWriter); - } - } - - if ($xml) { - // Don't overwrite the Content-Type if one is set - if ($this->contentType && !$request->hasHeader('Content-Type')) { - $request->setHeader('Content-Type', $this->contentType); - } - $request->setBody($xml); - } - } - - /** - * Create the root XML element to use with a request - * - * @param Operation $operation Operation object - * - * @return \XMLWriter - */ - protected function createRootElement(Operation $operation) - { - static $defaultRoot = array('name' => 'Request'); - // If no root element was specified, then just wrap the XML in 'Request' - $root = $operation->getData('xmlRoot') ?: $defaultRoot; - // Allow the XML declaration to be customized with xmlEncoding - $encoding = $operation->getData('xmlEncoding'); - - $xmlWriter = $this->startDocument($encoding); - - $xmlWriter->startElement($root['name']); - // Create the wrapping element with no namespaces if no namespaces were present - if (!empty($root['namespaces'])) { - // Create the wrapping element with an array of one or more namespaces - foreach ((array) $root['namespaces'] as $prefix => $uri) { - $nsLabel = 'xmlns'; - if (!is_numeric($prefix)) { - $nsLabel .= ':'.$prefix; - } - $xmlWriter->writeAttribute($nsLabel, $uri); - } - } - return $xmlWriter; - } - - /** - * Recursively build the XML body - * - * @param \XMLWriter $xmlWriter XML to modify - * @param Parameter $param API Parameter - * @param mixed $value Value to add - */ - protected function addXml(\XMLWriter $xmlWriter, Parameter $param, $value) - { - if ($value === null) { - return; - } - - $value = $param->filter($value); - $type = $param->getType(); - $name = $param->getWireName(); - $prefix = null; - $namespace = $param->getData('xmlNamespace'); - if (false !== strpos($name, ':')) { - list($prefix, $name) = explode(':', $name, 2); - } - - if ($type == 'object' || $type == 'array') { - if (!$param->getData('xmlFlattened')) { - $xmlWriter->startElementNS(null, $name, $namespace); - } - if ($param->getType() == 'array') { - $this->addXmlArray($xmlWriter, $param, $value); - } elseif ($param->getType() == 'object') { - $this->addXmlObject($xmlWriter, $param, $value); - } - if (!$param->getData('xmlFlattened')) { - $xmlWriter->endElement(); - } - return; - } - if ($param->getData('xmlAttribute')) { - $this->writeAttribute($xmlWriter, $prefix, $name, $namespace, $value); - } else { - $this->writeElement($xmlWriter, $prefix, $name, $namespace, $value); - } - } - - /** - * Write an attribute with namespace if used - * - * @param \XMLWriter $xmlWriter XMLWriter instance - * @param string $prefix Namespace prefix if any - * @param string $name Attribute name - * @param string $namespace The uri of the namespace - * @param string $value The attribute content - */ - protected function writeAttribute($xmlWriter, $prefix, $name, $namespace, $value) - { - if (empty($namespace)) { - $xmlWriter->writeAttribute($name, $value); - } else { - $xmlWriter->writeAttributeNS($prefix, $name, $namespace, $value); - } - } - - /** - * Write an element with namespace if used - * - * @param \XMLWriter $xmlWriter XML writer resource - * @param string $prefix Namespace prefix if any - * @param string $name Element name - * @param string $namespace The uri of the namespace - * @param string $value The element content - */ - protected function writeElement(\XMLWriter $xmlWriter, $prefix, $name, $namespace, $value) - { - $xmlWriter->startElementNS($prefix, $name, $namespace); - if (strpbrk($value, '<>&')) { - $xmlWriter->writeCData($value); - } else { - $xmlWriter->writeRaw($value); - } - $xmlWriter->endElement(); - } - - /** - * Create a new xml writer and start a document - * - * @param string $encoding document encoding - * - * @return \XMLWriter the writer resource - */ - protected function startDocument($encoding) - { - $xmlWriter = new \XMLWriter(); - $xmlWriter->openMemory(); - $xmlWriter->startDocument('1.0', $encoding); - - return $xmlWriter; - } - - /** - * End the document and return the output - * - * @param \XMLWriter $xmlWriter - * - * @return \string the writer resource - */ - protected function finishDocument($xmlWriter) - { - $xmlWriter->endDocument(); - - return $xmlWriter->outputMemory(); - } - - /** - * Add an array to the XML - */ - protected function addXmlArray(\XMLWriter $xmlWriter, Parameter $param, &$value) - { - if ($items = $param->getItems()) { - foreach ($value as $v) { - $this->addXml($xmlWriter, $items, $v); - } - } - } - - /** - * Add an object to the XML - */ - protected function addXmlObject(\XMLWriter $xmlWriter, Parameter $param, &$value) - { - $noAttributes = array(); - // add values which have attributes - foreach ($value as $name => $v) { - if ($property = $param->getProperty($name)) { - if ($property->getData('xmlAttribute')) { - $this->addXml($xmlWriter, $property, $v); - } else { - $noAttributes[] = array('value' => $v, 'property' => $property); - } - } - } - // now add values with no attributes - foreach ($noAttributes as $element) { - $this->addXml($xmlWriter, $element['property'], $element['value']); - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/AbstractResponseVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/AbstractResponseVisitor.php deleted file mode 100644 index d87eeb945..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/AbstractResponseVisitor.php +++ /dev/null @@ -1,26 +0,0 @@ -getName()] = $param->filter($response->getBody()); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/HeaderVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/HeaderVisitor.php deleted file mode 100644 index 0f8737cbd..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/HeaderVisitor.php +++ /dev/null @@ -1,50 +0,0 @@ -getType() == 'object' && $param->getAdditionalProperties() instanceof Parameter) { - $this->processPrefixedHeaders($response, $param, $value); - } else { - $value[$param->getName()] = $param->filter((string) $response->getHeader($param->getWireName())); - } - } - - /** - * Process a prefixed header array - * - * @param Response $response Response that contains the headers - * @param Parameter $param Parameter object - * @param array $value Value response array to modify - */ - protected function processPrefixedHeaders(Response $response, Parameter $param, &$value) - { - // Grab prefixed headers that should be placed into an array with the prefix stripped - if ($prefix = $param->getSentAs()) { - $container = $param->getName(); - $len = strlen($prefix); - // Find all matching headers and place them into the containing element - foreach ($response->getHeaders()->toArray() as $key => $header) { - if (stripos($key, $prefix) === 0) { - // Account for multi-value headers - $value[$container][substr($key, $len)] = count($header) == 1 ? end($header) : $header; - } - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php deleted file mode 100644 index a609ebd8c..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php +++ /dev/null @@ -1,93 +0,0 @@ -getResponse()->json(); - } - - public function visit( - CommandInterface $command, - Response $response, - Parameter $param, - &$value, - $context = null - ) { - $name = $param->getName(); - $key = $param->getWireName(); - if (isset($value[$key])) { - $this->recursiveProcess($param, $value[$key]); - if ($key != $name) { - $value[$name] = $value[$key]; - unset($value[$key]); - } - } - } - - /** - * Recursively process a parameter while applying filters - * - * @param Parameter $param API parameter being validated - * @param mixed $value Value to validate and process. The value may change during this process. - */ - protected function recursiveProcess(Parameter $param, &$value) - { - if ($value === null) { - return; - } - - if (is_array($value)) { - $type = $param->getType(); - if ($type == 'array') { - foreach ($value as &$item) { - $this->recursiveProcess($param->getItems(), $item); - } - } elseif ($type == 'object' && !isset($value[0])) { - // On the above line, we ensure that the array is associative and not numerically indexed - $knownProperties = array(); - if ($properties = $param->getProperties()) { - foreach ($properties as $property) { - $name = $property->getName(); - $key = $property->getWireName(); - $knownProperties[$name] = 1; - if (isset($value[$key])) { - $this->recursiveProcess($property, $value[$key]); - if ($key != $name) { - $value[$name] = $value[$key]; - unset($value[$key]); - } - } - } - } - - // Remove any unknown and potentially unsafe properties - if ($param->getAdditionalProperties() === false) { - $value = array_intersect_key($value, $knownProperties); - } elseif (($additional = $param->getAdditionalProperties()) !== true) { - // Validate and filter additional properties - foreach ($value as &$v) { - $this->recursiveProcess($additional, $v); - } - } - } - } - - $value = $param->filter($value); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ReasonPhraseVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ReasonPhraseVisitor.php deleted file mode 100644 index 1b10ebce7..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ReasonPhraseVisitor.php +++ /dev/null @@ -1,23 +0,0 @@ -getName()] = $response->getReasonPhrase(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php deleted file mode 100644 index 033f40c3f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php +++ /dev/null @@ -1,46 +0,0 @@ -getName()] = $response->getStatusCode(); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/XmlVisitor.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/XmlVisitor.php deleted file mode 100644 index 64affbc34..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/XmlVisitor.php +++ /dev/null @@ -1,149 +0,0 @@ -getResponse()->xml()), true); - } - - public function visit( - CommandInterface $command, - Response $response, - Parameter $param, - &$value, - $context = null - ) { - $sentAs = $param->getWireName(); - $name = $param->getName(); - if (isset($value[$sentAs])) { - $this->recursiveProcess($param, $value[$sentAs]); - if ($name != $sentAs) { - $value[$name] = $value[$sentAs]; - unset($value[$sentAs]); - } - } - } - - /** - * Recursively process a parameter while applying filters - * - * @param Parameter $param API parameter being processed - * @param mixed $value Value to validate and process. The value may change during this process. - */ - protected function recursiveProcess(Parameter $param, &$value) - { - $type = $param->getType(); - - if (!is_array($value)) { - if ($type == 'array') { - // Cast to an array if the value was a string, but should be an array - $this->recursiveProcess($param->getItems(), $value); - $value = array($value); - } - } elseif ($type == 'object') { - $this->processObject($param, $value); - } elseif ($type == 'array') { - $this->processArray($param, $value); - } - - if ($value !== null) { - $value = $param->filter($value); - } - } - - /** - * Process an array - * - * @param Parameter $param API parameter being parsed - * @param mixed $value Value to process - */ - protected function processArray(Parameter $param, &$value) - { - // Convert the node if it was meant to be an array - if (!isset($value[0])) { - // Collections fo nodes are sometimes wrapped in an additional array. For example: - // 12 should become: - // array('Items' => array(array('a' => 1), array('a' => 2)) - // Some nodes are not wrapped. For example: 12 - // should become array('Foo' => array(array('a' => 1), array('a' => 2)) - if ($param->getItems() && isset($value[$param->getItems()->getWireName()])) { - // Account for the case of a collection wrapping wrapped nodes: Items => Item[] - $value = $value[$param->getItems()->getWireName()]; - // If the wrapped node only had one value, then make it an array of nodes - if (!isset($value[0]) || !is_array($value)) { - $value = array($value); - } - } elseif (!empty($value)) { - // Account for repeated nodes that must be an array: Foo => Baz, Foo => Baz, but only if the - // value is set and not empty - $value = array($value); - } - } - - foreach ($value as &$item) { - $this->recursiveProcess($param->getItems(), $item); - } - } - - /** - * Process an object - * - * @param Parameter $param API parameter being parsed - * @param mixed $value Value to process - */ - protected function processObject(Parameter $param, &$value) - { - // Ensure that the array is associative and not numerically indexed - if (!isset($value[0]) && ($properties = $param->getProperties())) { - $knownProperties = array(); - foreach ($properties as $property) { - $name = $property->getName(); - $sentAs = $property->getWireName(); - $knownProperties[$name] = 1; - if ($property->getData('xmlAttribute')) { - $this->processXmlAttribute($property, $value); - } elseif (isset($value[$sentAs])) { - $this->recursiveProcess($property, $value[$sentAs]); - if ($name != $sentAs) { - $value[$name] = $value[$sentAs]; - unset($value[$sentAs]); - } - } - } - - // Remove any unknown and potentially unsafe properties - if ($param->getAdditionalProperties() === false) { - $value = array_intersect_key($value, $knownProperties); - } - } - } - - /** - * Process an XML attribute property - * - * @param Parameter $property Property to process - * @param array $value Value to process and update - */ - protected function processXmlAttribute(Parameter $property, array &$value) - { - $sentAs = $property->getWireName(); - if (isset($value['@attributes'][$sentAs])) { - $value[$property->getName()] = $value['@attributes'][$sentAs]; - unset($value['@attributes'][$sentAs]); - if (empty($value['@attributes'])) { - unset($value['@attributes']); - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/VisitorFlyweight.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/VisitorFlyweight.php deleted file mode 100644 index 74cb62813..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/VisitorFlyweight.php +++ /dev/null @@ -1,138 +0,0 @@ - 'Guzzle\Service\Command\LocationVisitor\Request\BodyVisitor', - 'request.header' => 'Guzzle\Service\Command\LocationVisitor\Request\HeaderVisitor', - 'request.json' => 'Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor', - 'request.postField' => 'Guzzle\Service\Command\LocationVisitor\Request\PostFieldVisitor', - 'request.postFile' => 'Guzzle\Service\Command\LocationVisitor\Request\PostFileVisitor', - 'request.query' => 'Guzzle\Service\Command\LocationVisitor\Request\QueryVisitor', - 'request.response_body' => 'Guzzle\Service\Command\LocationVisitor\Request\ResponseBodyVisitor', - 'request.responseBody' => 'Guzzle\Service\Command\LocationVisitor\Request\ResponseBodyVisitor', - 'request.xml' => 'Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor', - 'response.body' => 'Guzzle\Service\Command\LocationVisitor\Response\BodyVisitor', - 'response.header' => 'Guzzle\Service\Command\LocationVisitor\Response\HeaderVisitor', - 'response.json' => 'Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor', - 'response.reasonPhrase' => 'Guzzle\Service\Command\LocationVisitor\Response\ReasonPhraseVisitor', - 'response.statusCode' => 'Guzzle\Service\Command\LocationVisitor\Response\StatusCodeVisitor', - 'response.xml' => 'Guzzle\Service\Command\LocationVisitor\Response\XmlVisitor' - ); - - /** @var array Array of mappings of location names to classes */ - protected $mappings; - - /** @var array Cache of instantiated visitors */ - protected $cache = array(); - - /** - * @return self - * @codeCoverageIgnore - */ - public static function getInstance() - { - if (!self::$instance) { - self::$instance = new self(); - } - - return self::$instance; - } - - /** - * @param array $mappings Array mapping request.name and response.name to location visitor classes. Leave null to - * use the default values. - */ - public function __construct(array $mappings = null) - { - $this->mappings = $mappings === null ? self::$defaultMappings : $mappings; - } - - /** - * Get an instance of a request visitor by location name - * - * @param string $visitor Visitor name - * - * @return RequestVisitorInterface - */ - public function getRequestVisitor($visitor) - { - return $this->getKey('request.' . $visitor); - } - - /** - * Get an instance of a response visitor by location name - * - * @param string $visitor Visitor name - * - * @return ResponseVisitorInterface - */ - public function getResponseVisitor($visitor) - { - return $this->getKey('response.' . $visitor); - } - - /** - * Add a response visitor to the factory by name - * - * @param string $name Name of the visitor - * @param RequestVisitorInterface $visitor Visitor to add - * - * @return self - */ - public function addRequestVisitor($name, RequestVisitorInterface $visitor) - { - $this->cache['request.' . $name] = $visitor; - - return $this; - } - - /** - * Add a response visitor to the factory by name - * - * @param string $name Name of the visitor - * @param ResponseVisitorInterface $visitor Visitor to add - * - * @return self - */ - public function addResponseVisitor($name, ResponseVisitorInterface $visitor) - { - $this->cache['response.' . $name] = $visitor; - - return $this; - } - - /** - * Get a visitor by key value name - * - * @param string $key Key name to retrieve - * - * @return mixed - * @throws InvalidArgumentException - */ - private function getKey($key) - { - if (!isset($this->cache[$key])) { - if (!isset($this->mappings[$key])) { - list($type, $name) = explode('.', $key); - throw new InvalidArgumentException("No {$type} visitor has been mapped for {$name}"); - } - $this->cache[$key] = new $this->mappings[$key]; - } - - return $this->cache[$key]; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/OperationCommand.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/OperationCommand.php deleted file mode 100644 index 0748b5af0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/OperationCommand.php +++ /dev/null @@ -1,89 +0,0 @@ -responseParser = $parser; - - return $this; - } - - /** - * Set the request serializer used with the command - * - * @param RequestSerializerInterface $serializer Request serializer - * - * @return self - */ - public function setRequestSerializer(RequestSerializerInterface $serializer) - { - $this->requestSerializer = $serializer; - - return $this; - } - - /** - * Get the request serializer used with the command - * - * @return RequestSerializerInterface - */ - public function getRequestSerializer() - { - if (!$this->requestSerializer) { - // Use the default request serializer if none was found - $this->requestSerializer = DefaultRequestSerializer::getInstance(); - } - - return $this->requestSerializer; - } - - /** - * Get the response parser used for the operation - * - * @return ResponseParserInterface - */ - public function getResponseParser() - { - if (!$this->responseParser) { - // Use the default response parser if none was found - $this->responseParser = OperationResponseParser::getInstance(); - } - - return $this->responseParser; - } - - protected function build() - { - // Prepare and serialize the request - $this->request = $this->getRequestSerializer()->prepare($this); - } - - protected function process() - { - // Do not process the response if 'command.response_processing' is set to 'raw' - $this->result = $this[self::RESPONSE_PROCESSING] == self::TYPE_RAW - ? $this->request->getResponse() - : $this->getResponseParser()->parse($this); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/OperationResponseParser.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/OperationResponseParser.php deleted file mode 100644 index ca00bc062..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/OperationResponseParser.php +++ /dev/null @@ -1,195 +0,0 @@ -factory = $factory; - $this->schemaInModels = $schemaInModels; - } - - /** - * Add a location visitor to the command - * - * @param string $location Location to associate with the visitor - * @param ResponseVisitorInterface $visitor Visitor to attach - * - * @return self - */ - public function addVisitor($location, ResponseVisitorInterface $visitor) - { - $this->factory->addResponseVisitor($location, $visitor); - - return $this; - } - - protected function handleParsing(CommandInterface $command, Response $response, $contentType) - { - $operation = $command->getOperation(); - $type = $operation->getResponseType(); - $model = null; - - if ($type == OperationInterface::TYPE_MODEL) { - $model = $operation->getServiceDescription()->getModel($operation->getResponseClass()); - } elseif ($type == OperationInterface::TYPE_CLASS) { - return $this->parseClass($command); - } - - if (!$model) { - // Return basic processing if the responseType is not model or the model cannot be found - return parent::handleParsing($command, $response, $contentType); - } elseif ($command[AbstractCommand::RESPONSE_PROCESSING] != AbstractCommand::TYPE_MODEL) { - // Returns a model with no visiting if the command response processing is not model - return new Model(parent::handleParsing($command, $response, $contentType)); - } else { - // Only inject the schema into the model if "schemaInModel" is true - return new Model($this->visitResult($model, $command, $response), $this->schemaInModels ? $model : null); - } - } - - /** - * Parse a class object - * - * @param CommandInterface $command Command to parse into an object - * - * @return mixed - * @throws ResponseClassException - */ - protected function parseClass(CommandInterface $command) - { - // Emit the operation.parse_class event. If a listener injects a 'result' property, then that will be the result - $event = new CreateResponseClassEvent(array('command' => $command)); - $command->getClient()->getEventDispatcher()->dispatch('command.parse_response', $event); - if ($result = $event->getResult()) { - return $result; - } - - $className = $command->getOperation()->getResponseClass(); - if (!method_exists($className, 'fromCommand')) { - throw new ResponseClassException("{$className} must exist and implement a static fromCommand() method"); - } - - return $className::fromCommand($command); - } - - /** - * Perform transformations on the result array - * - * @param Parameter $model Model that defines the structure - * @param CommandInterface $command Command that performed the operation - * @param Response $response Response received - * - * @return array Returns the array of result data - */ - protected function visitResult(Parameter $model, CommandInterface $command, Response $response) - { - $foundVisitors = $result = $knownProps = array(); - $props = $model->getProperties(); - - foreach ($props as $schema) { - if ($location = $schema->getLocation()) { - // Trigger the before method on the first found visitor of this type - if (!isset($foundVisitors[$location])) { - $foundVisitors[$location] = $this->factory->getResponseVisitor($location); - $foundVisitors[$location]->before($command, $result); - } - } - } - - // Visit additional properties when it is an actual schema - if (($additional = $model->getAdditionalProperties()) instanceof Parameter) { - $this->visitAdditionalProperties($model, $command, $response, $additional, $result, $foundVisitors); - } - - // Apply the parameter value with the location visitor - foreach ($props as $schema) { - $knownProps[$schema->getName()] = 1; - if ($location = $schema->getLocation()) { - $foundVisitors[$location]->visit($command, $response, $schema, $result); - } - } - - // Remove any unknown and potentially unsafe top-level properties - if ($additional === false) { - $result = array_intersect_key($result, $knownProps); - } - - // Call the after() method of each found visitor - foreach ($foundVisitors as $visitor) { - $visitor->after($command); - } - - return $result; - } - - protected function visitAdditionalProperties( - Parameter $model, - CommandInterface $command, - Response $response, - Parameter $additional, - &$result, - array &$foundVisitors - ) { - // Only visit when a location is specified - if ($location = $additional->getLocation()) { - if (!isset($foundVisitors[$location])) { - $foundVisitors[$location] = $this->factory->getResponseVisitor($location); - $foundVisitors[$location]->before($command, $result); - } - // Only traverse if an array was parsed from the before() visitors - if (is_array($result)) { - // Find each additional property - foreach (array_keys($result) as $key) { - // Check if the model actually knows this property. If so, then it is not additional - if (!$model->getProperty($key)) { - // Set the name to the key so that we can parse it with each visitor - $additional->setName($key); - $foundVisitors[$location]->visit($command, $response, $additional, $result); - } - } - // Reset the additionalProperties name to null - $additional->setName(null); - } - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/RequestSerializerInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Command/RequestSerializerInterface.php deleted file mode 100644 index 60b9334d4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Command/RequestSerializerInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - true, 'httpMethod' => true, 'uri' => true, 'class' => true, 'responseClass' => true, - 'responseType' => true, 'responseNotes' => true, 'notes' => true, 'summary' => true, 'documentationUrl' => true, - 'deprecated' => true, 'data' => true, 'parameters' => true, 'additionalParameters' => true, - 'errorResponses' => true - ); - - /** @var array Parameters */ - protected $parameters = array(); - - /** @var Parameter Additional parameters schema */ - protected $additionalParameters; - - /** @var string Name of the command */ - protected $name; - - /** @var string HTTP method */ - protected $httpMethod; - - /** @var string This is a short summary of what the operation does */ - protected $summary; - - /** @var string A longer text field to explain the behavior of the operation. */ - protected $notes; - - /** @var string Reference URL providing more information about the operation */ - protected $documentationUrl; - - /** @var string HTTP URI of the command */ - protected $uri; - - /** @var string Class of the command object */ - protected $class; - - /** @var string This is what is returned from the method */ - protected $responseClass; - - /** @var string Type information about the response */ - protected $responseType; - - /** @var string Information about the response returned by the operation */ - protected $responseNotes; - - /** @var bool Whether or not the command is deprecated */ - protected $deprecated; - - /** @var array Array of errors that could occur when running the command */ - protected $errorResponses; - - /** @var ServiceDescriptionInterface */ - protected $description; - - /** @var array Extra operation information */ - protected $data; - - /** - * Builds an Operation object using an array of configuration data: - * - name: (string) Name of the command - * - httpMethod: (string) HTTP method of the operation - * - uri: (string) URI template that can create a relative or absolute URL - * - class: (string) Concrete class that implements this command - * - parameters: (array) Associative array of parameters for the command. {@see Parameter} for information. - * - summary: (string) This is a short summary of what the operation does - * - notes: (string) A longer text field to explain the behavior of the operation. - * - documentationUrl: (string) Reference URL providing more information about the operation - * - responseClass: (string) This is what is returned from the method. Can be a primitive, PSR-0 compliant - * class name, or model. - * - responseNotes: (string) Information about the response returned by the operation - * - responseType: (string) 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 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 - * 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 - * - additionalParameters: (null|array) Parameter schema to use when an option is passed to the operation that is - * not in the schema - * - * @param array $config Array of configuration data - * @param ServiceDescriptionInterface $description Service description used to resolve models if $ref tags are found - */ - public function __construct(array $config = array(), ServiceDescriptionInterface $description = null) - { - $this->description = $description; - - // Get the intersection of the available properties and properties set on the operation - foreach (array_intersect_key($config, self::$properties) as $key => $value) { - $this->{$key} = $value; - } - - $this->class = $this->class ?: self::DEFAULT_COMMAND_CLASS; - $this->deprecated = (bool) $this->deprecated; - $this->errorResponses = $this->errorResponses ?: array(); - $this->data = $this->data ?: array(); - - if (!$this->responseClass) { - $this->responseClass = 'array'; - $this->responseType = 'primitive'; - } elseif ($this->responseType) { - // Set the response type to perform validation - $this->setResponseType($this->responseType); - } else { - // A response class was set and no response type was set, so guess what the type is - $this->inferResponseType(); - } - - // Parameters need special handling when adding - if ($this->parameters) { - foreach ($this->parameters as $name => $param) { - if ($param instanceof Parameter) { - $param->setName($name)->setParent($this); - } elseif (is_array($param)) { - $param['name'] = $name; - $this->addParam(new Parameter($param, $this->description)); - } - } - } - - if ($this->additionalParameters) { - if ($this->additionalParameters instanceof Parameter) { - $this->additionalParameters->setParent($this); - } elseif (is_array($this->additionalParameters)) { - $this->setadditionalParameters(new Parameter($this->additionalParameters, $this->description)); - } - } - } - - public function toArray() - { - $result = array(); - // Grab valid properties and filter out values that weren't set - foreach (array_keys(self::$properties) as $check) { - if ($value = $this->{$check}) { - $result[$check] = $value; - } - } - // Remove the name property - unset($result['name']); - // Parameters need to be converted to arrays - $result['parameters'] = array(); - foreach ($this->parameters as $key => $param) { - $result['parameters'][$key] = $param->toArray(); - } - // Additional parameters need to be cast to an array - if ($this->additionalParameters instanceof Parameter) { - $result['additionalParameters'] = $this->additionalParameters->toArray(); - } - - return $result; - } - - public function getServiceDescription() - { - return $this->description; - } - - public function setServiceDescription(ServiceDescriptionInterface $description) - { - $this->description = $description; - - return $this; - } - - public function getParams() - { - return $this->parameters; - } - - public function getParamNames() - { - return array_keys($this->parameters); - } - - public function hasParam($name) - { - return isset($this->parameters[$name]); - } - - public function getParam($param) - { - return isset($this->parameters[$param]) ? $this->parameters[$param] : null; - } - - /** - * Add a parameter to the command - * - * @param Parameter $param Parameter to add - * - * @return self - */ - public function addParam(Parameter $param) - { - $this->parameters[$param->getName()] = $param; - $param->setParent($this); - - return $this; - } - - /** - * Remove a parameter from the command - * - * @param string $name Name of the parameter to remove - * - * @return self - */ - public function removeParam($name) - { - unset($this->parameters[$name]); - - return $this; - } - - public function getHttpMethod() - { - return $this->httpMethod; - } - - /** - * Set the HTTP method of the command - * - * @param string $httpMethod Method to set - * - * @return self - */ - public function setHttpMethod($httpMethod) - { - $this->httpMethod = $httpMethod; - - return $this; - } - - public function getClass() - { - return $this->class; - } - - /** - * Set the concrete class of the command - * - * @param string $className Concrete class name - * - * @return self - */ - public function setClass($className) - { - $this->class = $className; - - return $this; - } - - public function getName() - { - return $this->name; - } - - /** - * Set the name of the command - * - * @param string $name Name of the command - * - * @return self - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - public function getSummary() - { - return $this->summary; - } - - /** - * Set a short summary of what the operation does - * - * @param string $summary Short summary of the operation - * - * @return self - */ - public function setSummary($summary) - { - $this->summary = $summary; - - return $this; - } - - public function getNotes() - { - return $this->notes; - } - - /** - * Set a longer text field to explain the behavior of the operation. - * - * @param string $notes Notes on the operation - * - * @return self - */ - public function setNotes($notes) - { - $this->notes = $notes; - - return $this; - } - - public function getDocumentationUrl() - { - return $this->documentationUrl; - } - - /** - * Set the URL pointing to additional documentation on the command - * - * @param string $docUrl Documentation URL - * - * @return self - */ - public function setDocumentationUrl($docUrl) - { - $this->documentationUrl = $docUrl; - - return $this; - } - - public function getResponseClass() - { - return $this->responseClass; - } - - /** - * Set what is returned from the method. Can be a primitive, class name, or model. For example: 'array', - * 'Guzzle\\Foo\\Baz', or 'MyModelName' (to reference a model by ID). - * - * @param string $responseClass Type of response - * - * @return self - */ - public function setResponseClass($responseClass) - { - $this->responseClass = $responseClass; - $this->inferResponseType(); - - return $this; - } - - public function getResponseType() - { - return $this->responseType; - } - - /** - * Set qualifying information about the responseClass. One of 'primitive', 'class', 'model', or 'documentation' - * - * @param string $responseType Response type information - * - * @return self - * @throws InvalidArgumentException - */ - public function setResponseType($responseType) - { - static $types = array( - self::TYPE_PRIMITIVE => true, - self::TYPE_CLASS => true, - self::TYPE_MODEL => true, - self::TYPE_DOCUMENTATION => true - ); - if (!isset($types[$responseType])) { - throw new InvalidArgumentException('responseType must be one of ' . implode(', ', array_keys($types))); - } - - $this->responseType = $responseType; - - return $this; - } - - public function getResponseNotes() - { - return $this->responseNotes; - } - - /** - * Set notes about the response of the operation - * - * @param string $notes Response notes - * - * @return self - */ - public function setResponseNotes($notes) - { - $this->responseNotes = $notes; - - return $this; - } - - public function getDeprecated() - { - return $this->deprecated; - } - - /** - * Set whether or not the command is deprecated - * - * @param bool $isDeprecated Set to true to mark as deprecated - * - * @return self - */ - public function setDeprecated($isDeprecated) - { - $this->deprecated = $isDeprecated; - - return $this; - } - - public function getUri() - { - return $this->uri; - } - - /** - * Set the URI template of the command - * - * @param string $uri URI template to set - * - * @return self - */ - public function setUri($uri) - { - $this->uri = $uri; - - return $this; - } - - public function getErrorResponses() - { - return $this->errorResponses; - } - - /** - * Add an error to the command - * - * @param string $code HTTP response code - * @param string $reason HTTP response reason phrase or information about the error - * @param string $class Exception class associated with the error - * - * @return self - */ - public function addErrorResponse($code, $reason, $class) - { - $this->errorResponses[] = array('code' => $code, 'reason' => $reason, 'class' => $class); - - return $this; - } - - /** - * Set all of the error responses of the operation - * - * @param array $errorResponses Hash of error name to a hash containing a code, reason, class - * - * @return self - */ - public function setErrorResponses(array $errorResponses) - { - $this->errorResponses = $errorResponses; - - return $this; - } - - public function getData($name) - { - return isset($this->data[$name]) ? $this->data[$name] : null; - } - - /** - * Set a particular data point on the operation - * - * @param string $name Name of the data value - * @param mixed $value Value to set - * - * @return self - */ - public function setData($name, $value) - { - $this->data[$name] = $value; - - return $this; - } - - /** - * Get the additionalParameters of the operation - * - * @return Parameter|null - */ - public function getAdditionalParameters() - { - return $this->additionalParameters; - } - - /** - * Set the additionalParameters of the operation - * - * @param Parameter|null $parameter Parameter to set - * - * @return self - */ - public function setAdditionalParameters($parameter) - { - if ($this->additionalParameters = $parameter) { - $this->additionalParameters->setParent($this); - } - - return $this; - } - - /** - * Infer the response type from the responseClass value - */ - protected function inferResponseType() - { - static $primitives = array('array' => 1, 'boolean' => 1, 'string' => 1, 'integer' => 1, '' => 1); - if (isset($primitives[$this->responseClass])) { - $this->responseType = self::TYPE_PRIMITIVE; - } elseif ($this->description && $this->description->hasModel($this->responseClass)) { - $this->responseType = self::TYPE_MODEL; - } else { - $this->responseType = self::TYPE_CLASS; - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/OperationInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Description/OperationInterface.php deleted file mode 100644 index 4de41bd67..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/OperationInterface.php +++ /dev/null @@ -1,159 +0,0 @@ -getModel($data['$ref'])) { - $data = $model->toArray() + $data; - } - } elseif (isset($data['extends'])) { - // If this parameter extends from another parameter then start with the actual data - // union in the parent's data (e.g. actual supersedes parent) - if ($extends = $description->getModel($data['extends'])) { - $data += $extends->toArray(); - } - } - } - - // Pull configuration data into the parameter - foreach ($data as $key => $value) { - $this->{$key} = $value; - } - - $this->serviceDescription = $description; - $this->required = (bool) $this->required; - $this->data = (array) $this->data; - - if ($this->filters) { - $this->setFilters((array) $this->filters); - } - - if ($this->type == 'object' && $this->additionalProperties === null) { - $this->additionalProperties = true; - } - } - - /** - * Convert the object to an array - * - * @return array - */ - public function toArray() - { - static $checks = array('required', 'description', 'static', 'type', 'format', 'instanceOf', 'location', 'sentAs', - 'pattern', 'minimum', 'maximum', 'minItems', 'maxItems', 'minLength', 'maxLength', 'data', 'enum', - 'filters'); - - $result = array(); - - // Anything that is in the `Items` attribute of an array *must* include it's name if available - if ($this->parent instanceof self && $this->parent->getType() == 'array' && isset($this->name)) { - $result['name'] = $this->name; - } - - foreach ($checks as $c) { - if ($value = $this->{$c}) { - $result[$c] = $value; - } - } - - if ($this->default !== null) { - $result['default'] = $this->default; - } - - if ($this->items !== null) { - $result['items'] = $this->getItems()->toArray(); - } - - if ($this->additionalProperties !== null) { - $result['additionalProperties'] = $this->getAdditionalProperties(); - if ($result['additionalProperties'] instanceof self) { - $result['additionalProperties'] = $result['additionalProperties']->toArray(); - } - } - - if ($this->type == 'object' && $this->properties) { - $result['properties'] = array(); - foreach ($this->getProperties() as $name => $property) { - $result['properties'][$name] = $property->toArray(); - } - } - - return $result; - } - - /** - * Get the default or static value of the command based on a value - * - * @param string $value Value that is currently set - * - * @return mixed Returns the value, a static value if one is present, or a default value - */ - public function getValue($value) - { - if ($this->static || ($this->default !== null && $value === null)) { - return $this->default; - } - - return $value; - } - - /** - * Run a value through the filters OR format attribute associated with the parameter - * - * @param mixed $value Value to filter - * - * @return mixed Returns the filtered value - */ - public function filter($value) - { - // Formats are applied exclusively and supersed filters - if ($this->format) { - return SchemaFormatter::format($this->format, $value); - } - - // Convert Boolean values - if ($this->type == 'boolean' && !is_bool($value)) { - $value = filter_var($value, FILTER_VALIDATE_BOOLEAN); - } - - // Apply filters to the value - if ($this->filters) { - foreach ($this->filters as $filter) { - if (is_array($filter)) { - // Convert complex filters that hold value place holders - foreach ($filter['args'] as &$data) { - if ($data == '@value') { - $data = $value; - } elseif ($data == '@api') { - $data = $this; - } - } - $value = call_user_func_array($filter['method'], $filter['args']); - } else { - $value = call_user_func($filter, $value); - } - } - } - - return $value; - } - - /** - * Get the name of the parameter - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Get the key of the parameter, where sentAs will supersede name if it is set - * - * @return string - */ - public function getWireName() - { - return $this->sentAs ?: $this->name; - } - - /** - * Set the name of the parameter - * - * @param string $name Name to set - * - * @return self - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * Get the type(s) of the parameter - * - * @return string|array - */ - public function getType() - { - return $this->type; - } - - /** - * Set the type(s) of the parameter - * - * @param string|array $type Type of parameter or array of simple types used in a union - * - * @return self - */ - public function setType($type) - { - $this->type = $type; - - return $this; - } - - /** - * Get if the parameter is required - * - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Set if the parameter is required - * - * @param bool $isRequired Whether or not the parameter is required - * - * @return self - */ - public function setRequired($isRequired) - { - $this->required = (bool) $isRequired; - - return $this; - } - - /** - * Get the default value of the parameter - * - * @return string|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Set the default value of the parameter - * - * @param string|null $default Default value to set - * - * @return self - */ - public function setDefault($default) - { - $this->default = $default; - - return $this; - } - - /** - * Get the description of the parameter - * - * @return string|null - */ - public function getDescription() - { - return $this->description; - } - - /** - * Set the description of the parameter - * - * @param string $description Description - * - * @return self - */ - public function setDescription($description) - { - $this->description = $description; - - return $this; - } - - /** - * Get the minimum acceptable value for an integer - * - * @return int|null - */ - public function getMinimum() - { - return $this->minimum; - } - - /** - * Set the minimum acceptable value for an integer - * - * @param int|null $min Minimum - * - * @return self - */ - public function setMinimum($min) - { - $this->minimum = $min; - - return $this; - } - - /** - * Get the maximum acceptable value for an integer - * - * @return int|null - */ - public function getMaximum() - { - return $this->maximum; - } - - /** - * Set the maximum acceptable value for an integer - * - * @param int $max Maximum - * - * @return self - */ - public function setMaximum($max) - { - $this->maximum = $max; - - return $this; - } - - /** - * Get the minimum allowed length of a string value - * - * @return int - */ - public function getMinLength() - { - return $this->minLength; - } - - /** - * Set the minimum allowed length of a string value - * - * @param int|null $min Minimum - * - * @return self - */ - public function setMinLength($min) - { - $this->minLength = $min; - - return $this; - } - - /** - * Get the maximum allowed length of a string value - * - * @return int|null - */ - public function getMaxLength() - { - return $this->maxLength; - } - - /** - * Set the maximum allowed length of a string value - * - * @param int $max Maximum length - * - * @return self - */ - public function setMaxLength($max) - { - $this->maxLength = $max; - - return $this; - } - - /** - * Get the maximum allowed number of items in an array value - * - * @return int|null - */ - public function getMaxItems() - { - return $this->maxItems; - } - - /** - * Set the maximum allowed number of items in an array value - * - * @param int $max Maximum - * - * @return self - */ - public function setMaxItems($max) - { - $this->maxItems = $max; - - return $this; - } - - /** - * Get the minimum allowed number of items in an array value - * - * @return int - */ - public function getMinItems() - { - return $this->minItems; - } - - /** - * Set the minimum allowed number of items in an array value - * - * @param int|null $min Minimum - * - * @return self - */ - public function setMinItems($min) - { - $this->minItems = $min; - - return $this; - } - - /** - * Get the location of the parameter - * - * @return string|null - */ - public function getLocation() - { - return $this->location; - } - - /** - * Set the location of the parameter - * - * @param string|null $location Location of the parameter - * - * @return self - */ - public function setLocation($location) - { - $this->location = $location; - - return $this; - } - - /** - * Get the sentAs attribute of the parameter that used with locations to sentAs an attribute when it is being - * applied to a location. - * - * @return string|null - */ - public function getSentAs() - { - return $this->sentAs; - } - - /** - * Set the sentAs attribute - * - * @param string|null $name Name of the value as it is sent over the wire - * - * @return self - */ - public function setSentAs($name) - { - $this->sentAs = $name; - - return $this; - } - - /** - * Retrieve a known property from the parameter by name or a data property by name. When not specific name value - * is specified, all data properties will be returned. - * - * @param string|null $name Specify a particular property name to retrieve - * - * @return array|mixed|null - */ - public function getData($name = null) - { - if (!$name) { - return $this->data; - } - - if (isset($this->data[$name])) { - return $this->data[$name]; - } elseif (isset($this->{$name})) { - return $this->{$name}; - } - - return null; - } - - /** - * Set the extra data properties of the parameter or set a specific extra property - * - * @param string|array|null $nameOrData The name of a specific extra to set or an array of extras to set - * @param mixed|null $data When setting a specific extra property, specify the data to set for it - * - * @return self - */ - public function setData($nameOrData, $data = null) - { - if (is_array($nameOrData)) { - $this->data = $nameOrData; - } else { - $this->data[$nameOrData] = $data; - } - - return $this; - } - - /** - * Get whether or not the default value can be changed - * - * @return mixed|null - */ - public function getStatic() - { - return $this->static; - } - - /** - * Set to true if the default value cannot be changed - * - * @param bool $static True or false - * - * @return self - */ - public function setStatic($static) - { - $this->static = (bool) $static; - - return $this; - } - - /** - * Get an array of filters used by the parameter - * - * @return array - */ - public function getFilters() - { - return $this->filters ?: array(); - } - - /** - * Set the array of filters used by the parameter - * - * @param array $filters Array of functions to use as filters - * - * @return self - */ - public function setFilters(array $filters) - { - $this->filters = array(); - foreach ($filters as $filter) { - $this->addFilter($filter); - } - - return $this; - } - - /** - * Add a filter to the parameter - * - * @param string|array $filter Method to filter the value through - * - * @return self - * @throws InvalidArgumentException - */ - public function addFilter($filter) - { - if (is_array($filter)) { - if (!isset($filter['method'])) { - throw new InvalidArgumentException('A [method] value must be specified for each complex filter'); - } - } - - if (!$this->filters) { - $this->filters = array($filter); - } else { - $this->filters[] = $filter; - } - - return $this; - } - - /** - * Get the parent object (an {@see OperationInterface} or {@see Parameter} - * - * @return OperationInterface|Parameter|null - */ - public function getParent() - { - return $this->parent; - } - - /** - * Set the parent object of the parameter - * - * @param OperationInterface|Parameter|null $parent Parent container of the parameter - * - * @return self - */ - public function setParent($parent) - { - $this->parent = $parent; - - return $this; - } - - /** - * Get the properties of the parameter - * - * @return array - */ - public function getProperties() - { - if (!$this->propertiesCache) { - $this->propertiesCache = array(); - foreach (array_keys($this->properties) as $name) { - $this->propertiesCache[$name] = $this->getProperty($name); - } - } - - return $this->propertiesCache; - } - - /** - * Get a specific property from the parameter - * - * @param string $name Name of the property to retrieve - * - * @return null|Parameter - */ - public function getProperty($name) - { - if (!isset($this->properties[$name])) { - return null; - } - - if (!($this->properties[$name] instanceof self)) { - $this->properties[$name]['name'] = $name; - $this->properties[$name] = new static($this->properties[$name], $this->serviceDescription); - $this->properties[$name]->setParent($this); - } - - return $this->properties[$name]; - } - - /** - * Remove a property from the parameter - * - * @param string $name Name of the property to remove - * - * @return self - */ - public function removeProperty($name) - { - unset($this->properties[$name]); - $this->propertiesCache = null; - - return $this; - } - - /** - * Add a property to the parameter - * - * @param Parameter $property Properties to set - * - * @return self - */ - public function addProperty(Parameter $property) - { - $this->properties[$property->getName()] = $property; - $property->setParent($this); - $this->propertiesCache = null; - - return $this; - } - - /** - * Get the additionalProperties value of the parameter - * - * @return bool|Parameter|null - */ - public function getAdditionalProperties() - { - if (is_array($this->additionalProperties)) { - $this->additionalProperties = new static($this->additionalProperties, $this->serviceDescription); - $this->additionalProperties->setParent($this); - } - - return $this->additionalProperties; - } - - /** - * Set the additionalProperties value of the parameter - * - * @param bool|Parameter|null $additional Boolean to allow any, an Parameter to specify a schema, or false to disallow - * - * @return self - */ - public function setAdditionalProperties($additional) - { - $this->additionalProperties = $additional; - - return $this; - } - - /** - * Set the items data of the parameter - * - * @param Parameter|null $items Items to set - * - * @return self - */ - public function setItems(Parameter $items = null) - { - if ($this->items = $items) { - $this->items->setParent($this); - } - - return $this; - } - - /** - * Get the item data of the parameter - * - * @return Parameter|null - */ - public function getItems() - { - if (is_array($this->items)) { - $this->items = new static($this->items, $this->serviceDescription); - $this->items->setParent($this); - } - - return $this->items; - } - - /** - * Get the class that the parameter must implement - * - * @return null|string - */ - public function getInstanceOf() - { - return $this->instanceOf; - } - - /** - * Set the class that the parameter must be an instance of - * - * @param string|null $instanceOf Class or interface name - * - * @return self - */ - public function setInstanceOf($instanceOf) - { - $this->instanceOf = $instanceOf; - - return $this; - } - - /** - * Get the enum of strings that are valid for the parameter - * - * @return array|null - */ - public function getEnum() - { - return $this->enum; - } - - /** - * Set the enum of strings that are valid for the parameter - * - * @param array|null $enum Array of strings or null - * - * @return self - */ - public function setEnum(array $enum = null) - { - $this->enum = $enum; - - return $this; - } - - /** - * Get the regex pattern that must match a value when the value is a string - * - * @return string - */ - public function getPattern() - { - return $this->pattern; - } - - /** - * Set the regex pattern that must match a value when the value is a string - * - * @param string $pattern Regex pattern - * - * @return self - */ - public function setPattern($pattern) - { - $this->pattern = $pattern; - - return $this; - } - - /** - * Get the format attribute of the schema - * - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Set the format attribute of the schema - * - * @param string $format Format to set (e.g. date, date-time, timestamp, time, date-time-http) - * - * @return self - */ - public function setFormat($format) - { - $this->format = $format; - - return $this; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/SchemaFormatter.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Description/SchemaFormatter.php deleted file mode 100644 index 7f47fc9d7..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/SchemaFormatter.php +++ /dev/null @@ -1,156 +0,0 @@ -setTimezone(self::getUtcTimeZone())->format($format); - } - - throw new InvalidArgumentException('Date/Time values must be either a string, integer, or DateTime object'); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/SchemaValidator.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Description/SchemaValidator.php deleted file mode 100644 index 13b99cdf2..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/SchemaValidator.php +++ /dev/null @@ -1,290 +0,0 @@ -castIntegerToStringType = $castIntegerToStringType; - } - - public function validate(Parameter $param, &$value) - { - $this->errors = array(); - $this->recursiveProcess($param, $value); - - if (empty($this->errors)) { - return true; - } else { - sort($this->errors); - return false; - } - } - - /** - * Get the errors encountered while validating - * - * @return array - */ - public function getErrors() - { - return $this->errors ?: array(); - } - - /** - * Recursively validate a parameter - * - * @param Parameter $param API parameter being validated - * @param mixed $value Value to validate and validate. The value may change during this validate. - * @param string $path Current validation path (used for error reporting) - * @param int $depth Current depth in the validation validate - * - * @return bool Returns true if valid, or false if invalid - */ - protected function recursiveProcess(Parameter $param, &$value, $path = '', $depth = 0) - { - // Update the value by adding default or static values - $value = $param->getValue($value); - - $required = $param->getRequired(); - // if the value is null and the parameter is not required or is static, then skip any further recursion - if ((null === $value && !$required) || $param->getStatic()) { - return true; - } - - $type = $param->getType(); - // Attempt to limit the number of times is_array is called by tracking if the value is an array - $valueIsArray = is_array($value); - // If a name is set then update the path so that validation messages are more helpful - if ($name = $param->getName()) { - $path .= "[{$name}]"; - } - - if ($type == 'object') { - - // Objects are either associative arrays, ToArrayInterface, or some other object - if ($param->getInstanceOf()) { - $instance = $param->getInstanceOf(); - if (!($value instanceof $instance)) { - $this->errors[] = "{$path} must be an instance of {$instance}"; - return false; - } - } - - // Determine whether or not this "value" has properties and should be traversed - $traverse = $temporaryValue = false; - - // Convert the value to an array - if (!$valueIsArray && $value instanceof ToArrayInterface) { - $value = $value->toArray(); - } - - if ($valueIsArray) { - // Ensure that the array is associative and not numerically indexed - if (isset($value[0])) { - $this->errors[] = "{$path} must be an array of properties. Got a numerically indexed array."; - return false; - } - $traverse = true; - } elseif ($value === null) { - // Attempt to let the contents be built up by default values if possible - $value = array(); - $temporaryValue = $valueIsArray = $traverse = true; - } - - if ($traverse) { - - if ($properties = $param->getProperties()) { - // if properties were found, the validate each property of the value - foreach ($properties as $property) { - $name = $property->getName(); - if (isset($value[$name])) { - $this->recursiveProcess($property, $value[$name], $path, $depth + 1); - } else { - $current = null; - $this->recursiveProcess($property, $current, $path, $depth + 1); - // Only set the value if it was populated with something - if (null !== $current) { - $value[$name] = $current; - } - } - } - } - - $additional = $param->getAdditionalProperties(); - if ($additional !== true) { - // If additional properties were found, then validate each against the additionalProperties attr. - $keys = array_keys($value); - // Determine the keys that were specified that were not listed in the properties of the schema - $diff = array_diff($keys, array_keys($properties)); - if (!empty($diff)) { - // Determine which keys are not in the properties - if ($additional instanceOf Parameter) { - foreach ($diff as $key) { - $this->recursiveProcess($additional, $value[$key], "{$path}[{$key}]", $depth); - } - } else { - // if additionalProperties is set to false and there are additionalProperties in the values, then fail - $keys = array_keys($value); - $this->errors[] = sprintf('%s[%s] is not an allowed property', $path, reset($keys)); - } - } - } - - // A temporary value will be used to traverse elements that have no corresponding input value. - // This allows nested required parameters with default values to bubble up into the input. - // Here we check if we used a temp value and nothing bubbled up, then we need to remote the value. - if ($temporaryValue && empty($value)) { - $value = null; - $valueIsArray = false; - } - } - - } elseif ($type == 'array' && $valueIsArray && $param->getItems()) { - foreach ($value as $i => &$item) { - // Validate each item in an array against the items attribute of the schema - $this->recursiveProcess($param->getItems(), $item, $path . "[{$i}]", $depth + 1); - } - } - - // If the value is required and the type is not null, then there is an error if the value is not set - if ($required && $value === null && $type != 'null') { - $message = "{$path} is " . ($param->getType() ? ('a required ' . implode(' or ', (array) $param->getType())) : 'required'); - if ($param->getDescription()) { - $message .= ': ' . $param->getDescription(); - } - $this->errors[] = $message; - return false; - } - - // Validate that the type is correct. If the type is string but an integer was passed, the class can be - // instructed to cast the integer to a string to pass validation. This is the default behavior. - if ($type && (!$type = $this->determineType($type, $value))) { - if ($this->castIntegerToStringType && $param->getType() == 'string' && is_integer($value)) { - $value = (string) $value; - } else { - $this->errors[] = "{$path} must be of type " . implode(' or ', (array) $param->getType()); - } - } - - // Perform type specific validation for strings, arrays, and integers - if ($type == 'string') { - - // Strings can have enums which are a list of predefined values - if (($enum = $param->getEnum()) && !in_array($value, $enum)) { - $this->errors[] = "{$path} must be one of " . implode(' or ', array_map(function ($s) { - return '"' . addslashes($s) . '"'; - }, $enum)); - } - // Strings can have a regex pattern that the value must match - if (($pattern = $param->getPattern()) && !preg_match($pattern, $value)) { - $this->errors[] = "{$path} must match the following regular expression: {$pattern}"; - } - - $strLen = null; - if ($min = $param->getMinLength()) { - $strLen = strlen($value); - if ($strLen < $min) { - $this->errors[] = "{$path} length must be greater than or equal to {$min}"; - } - } - if ($max = $param->getMaxLength()) { - if (($strLen ?: strlen($value)) > $max) { - $this->errors[] = "{$path} length must be less than or equal to {$max}"; - } - } - - } elseif ($type == 'array') { - - $size = null; - if ($min = $param->getMinItems()) { - $size = count($value); - if ($size < $min) { - $this->errors[] = "{$path} must contain {$min} or more elements"; - } - } - if ($max = $param->getMaxItems()) { - if (($size ?: count($value)) > $max) { - $this->errors[] = "{$path} must contain {$max} or fewer elements"; - } - } - - } elseif ($type == 'integer' || $type == 'number' || $type == 'numeric') { - if (($min = $param->getMinimum()) && $value < $min) { - $this->errors[] = "{$path} must be greater than or equal to {$min}"; - } - if (($max = $param->getMaximum()) && $value > $max) { - $this->errors[] = "{$path} must be less than or equal to {$max}"; - } - } - - return empty($this->errors); - } - - /** - * From the allowable types, determine the type that the variable matches - * - * @param string $type Parameter type - * @param mixed $value Value to determine the type - * - * @return string|bool Returns the matching type on - */ - protected function determineType($type, $value) - { - foreach ((array) $type as $t) { - if ($t == 'string' && (is_string($value) || (is_object($value) && method_exists($value, '__toString')))) { - return 'string'; - } elseif ($t == 'object' && (is_array($value) || is_object($value))) { - return 'object'; - } elseif ($t == 'array' && is_array($value)) { - return 'array'; - } elseif ($t == 'integer' && is_integer($value)) { - return 'integer'; - } elseif ($t == 'boolean' && is_bool($value)) { - return 'boolean'; - } elseif ($t == 'number' && is_numeric($value)) { - return 'number'; - } elseif ($t == 'numeric' && is_numeric($value)) { - return 'numeric'; - } elseif ($t == 'null' && !$value) { - return 'null'; - } elseif ($t == 'any') { - return 'any'; - } - } - - return false; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescription.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescription.php deleted file mode 100644 index 286e65eec..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescription.php +++ /dev/null @@ -1,271 +0,0 @@ -load($config, $options); - } - - /** - * @param array $config Array of configuration data - */ - public function __construct(array $config = array()) - { - $this->fromArray($config); - } - - public function serialize() - { - return json_encode($this->toArray()); - } - - public function unserialize($json) - { - $this->operations = array(); - $this->fromArray(json_decode($json, true)); - } - - public function toArray() - { - $result = array( - 'name' => $this->name, - 'apiVersion' => $this->apiVersion, - 'baseUrl' => $this->baseUrl, - 'description' => $this->description - ) + $this->extraData; - $result['operations'] = array(); - foreach ($this->getOperations() as $name => $operation) { - $result['operations'][$operation->getName() ?: $name] = $operation->toArray(); - } - if (!empty($this->models)) { - $result['models'] = array(); - foreach ($this->models as $id => $model) { - $result['models'][$id] = $model instanceof Parameter ? $model->toArray(): $model; - } - } - - return array_filter($result); - } - - public function getBaseUrl() - { - return $this->baseUrl; - } - - /** - * Set the baseUrl of the description - * - * @param string $baseUrl Base URL of each operation - * - * @return self - */ - public function setBaseUrl($baseUrl) - { - $this->baseUrl = $baseUrl; - - return $this; - } - - public function getOperations() - { - foreach (array_keys($this->operations) as $name) { - $this->getOperation($name); - } - - return $this->operations; - } - - public function hasOperation($name) - { - return isset($this->operations[$name]); - } - - public function getOperation($name) - { - // Lazily retrieve and build operations - if (!isset($this->operations[$name])) { - return null; - } - - if (!($this->operations[$name] instanceof Operation)) { - $this->operations[$name] = new Operation($this->operations[$name], $this); - } - - return $this->operations[$name]; - } - - /** - * Add a operation to the service description - * - * @param OperationInterface $operation Operation to add - * - * @return self - */ - public function addOperation(OperationInterface $operation) - { - $this->operations[$operation->getName()] = $operation->setServiceDescription($this); - - return $this; - } - - public function getModel($id) - { - if (!isset($this->models[$id])) { - return null; - } - - if (!($this->models[$id] instanceof Parameter)) { - $this->models[$id] = new Parameter($this->models[$id] + array('name' => $id), $this); - } - - return $this->models[$id]; - } - - public function getModels() - { - // Ensure all models are converted into parameter objects - foreach (array_keys($this->models) as $id) { - $this->getModel($id); - } - - return $this->models; - } - - public function hasModel($id) - { - return isset($this->models[$id]); - } - - /** - * Add a model to the service description - * - * @param Parameter $model Model to add - * - * @return self - */ - public function addModel(Parameter $model) - { - $this->models[$model->getName()] = $model; - - return $this; - } - - public function getApiVersion() - { - return $this->apiVersion; - } - - public function getName() - { - return $this->name; - } - - public function getDescription() - { - return $this->description; - } - - public function getData($key) - { - return isset($this->extraData[$key]) ? $this->extraData[$key] : null; - } - - public function setData($key, $value) - { - $this->extraData[$key] = $value; - - return $this; - } - - /** - * Initialize the state from an array - * - * @param array $config Configuration data - * @throws InvalidArgumentException - */ - protected function fromArray(array $config) - { - // Keep a list of default keys used in service descriptions that is later used to determine extra data keys - static $defaultKeys = array('name', 'models', 'apiVersion', 'baseUrl', 'description'); - // Pull in the default configuration values - foreach ($defaultKeys as $key) { - if (isset($config[$key])) { - $this->{$key} = $config[$key]; - } - } - - // Account for the Swagger name for Guzzle's baseUrl - if (isset($config['basePath'])) { - $this->baseUrl = $config['basePath']; - } - - // Ensure that the models and operations properties are always arrays - $this->models = (array) $this->models; - $this->operations = (array) $this->operations; - - // We want to add operations differently than adding the other properties - $defaultKeys[] = 'operations'; - - // Create operations for each operation - if (isset($config['operations'])) { - foreach ($config['operations'] as $name => $operation) { - if (!($operation instanceof Operation) && !is_array($operation)) { - throw new InvalidArgumentException('Invalid operation in service description: ' - . gettype($operation)); - } - $this->operations[$name] = $operation; - } - } - - // Get all of the additional properties of the service description and store them in a data array - foreach (array_diff(array_keys($config), $defaultKeys) as $key) { - $this->extraData[$key] = $config[$key]; - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescriptionInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescriptionInterface.php deleted file mode 100644 index 5983e586b..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescriptionInterface.php +++ /dev/null @@ -1,106 +0,0 @@ - $op) { - $name = $op['name'] = isset($op['name']) ? $op['name'] : $name; - // Extend other operations - if (!empty($op['extends'])) { - $this->resolveExtension($name, $op, $operations); - } - $op['parameters'] = isset($op['parameters']) ? $op['parameters'] : array(); - $operations[$name] = $op; - } - } - - return new ServiceDescription(array( - 'apiVersion' => isset($config['apiVersion']) ? $config['apiVersion'] : null, - 'baseUrl' => isset($config['baseUrl']) ? $config['baseUrl'] : null, - 'description' => isset($config['description']) ? $config['description'] : null, - 'operations' => $operations, - 'models' => isset($config['models']) ? $config['models'] : null - ) + $config); - } - - /** - * @param string $name Name of the operation - * @param array $op Operation value array - * @param array $operations Currently loaded operations - * @throws DescriptionBuilderException when extending a non-existent operation - */ - protected function resolveExtension($name, array &$op, array &$operations) - { - $resolved = array(); - $original = empty($op['parameters']) ? false: $op['parameters']; - $hasClass = !empty($op['class']); - foreach ((array) $op['extends'] as $extendedCommand) { - if (empty($operations[$extendedCommand])) { - throw new DescriptionBuilderException("{$name} extends missing operation {$extendedCommand}"); - } - $toArray = $operations[$extendedCommand]; - $resolved = empty($resolved) - ? $toArray['parameters'] - : array_merge($resolved, $toArray['parameters']); - - $op = $op + $toArray; - if (!$hasClass && isset($toArray['class'])) { - $op['class'] = $toArray['class']; - } - } - $op['parameters'] = $original ? array_merge($resolved, $original) : $resolved; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ValidatorInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ValidatorInterface.php deleted file mode 100644 index 94ca77da4..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Description/ValidatorInterface.php +++ /dev/null @@ -1,28 +0,0 @@ -getMessage(), $e->getCode(), $e->getPrevious()); - $ce->setSuccessfulRequests($e->getSuccessfulRequests()); - - $alreadyAddedExceptions = array(); - foreach ($e->getFailedRequests() as $request) { - if ($re = $e->getExceptionForFailedRequest($request)) { - $alreadyAddedExceptions[] = $re; - $ce->addFailedRequestWithException($request, $re); - } else { - $ce->addFailedRequest($request); - } - } - - // Add any exceptions that did not map to a request - if (count($alreadyAddedExceptions) < count($e)) { - foreach ($e as $ex) { - if (!in_array($ex, $alreadyAddedExceptions)) { - $ce->add($ex); - } - } - } - - return $ce; - } - - /** - * Get all of the commands in the transfer - * - * @return array - */ - public function getAllCommands() - { - return array_merge($this->successfulCommands, $this->failedCommands); - } - - /** - * Add to the array of successful commands - * - * @param CommandInterface $command Successful command - * - * @return self - */ - public function addSuccessfulCommand(CommandInterface $command) - { - $this->successfulCommands[] = $command; - - return $this; - } - - /** - * Add to the array of failed commands - * - * @param CommandInterface $command Failed command - * - * @return self - */ - public function addFailedCommand(CommandInterface $command) - { - $this->failedCommands[] = $command; - - return $this; - } - - /** - * Get an array of successful commands - * - * @return array - */ - public function getSuccessfulCommands() - { - return $this->successfulCommands; - } - - /** - * Get an array of failed commands - * - * @return array - */ - public function getFailedCommands() - { - return $this->failedCommands; - } - - /** - * Get the Exception that caused the given $command to fail - * - * @param CommandInterface $command Failed command - * - * @return \Exception|null - */ - public function getExceptionForFailedCommand(CommandInterface $command) - { - return $this->getExceptionForFailedRequest($command->getRequest()); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/DescriptionBuilderException.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/DescriptionBuilderException.php deleted file mode 100644 index 1407e5687..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/DescriptionBuilderException.php +++ /dev/null @@ -1,7 +0,0 @@ -invalidCommands = $commands; - parent::__construct( - 'Encountered commands in a batch transfer that use inconsistent clients. The batching ' . - 'strategy you use with a command transfer must divide command batches by client.' - ); - } - - /** - * Get the invalid commands - * - * @return array - */ - public function getCommands() - { - return $this->invalidCommands; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/ResponseClassException.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/ResponseClassException.php deleted file mode 100644 index d59ff2185..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/ResponseClassException.php +++ /dev/null @@ -1,9 +0,0 @@ -errors = $errors; - } - - /** - * Get any validation errors - * - * @return array - */ - public function getErrors() - { - return $this->errors; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php deleted file mode 100644 index 21140e772..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php +++ /dev/null @@ -1,37 +0,0 @@ -canBuild($command)) { - throw new InvalidArgumentException('Iterator was not found for ' . $command->getName()); - } - - $className = $this->getClassName($command); - - return new $className($command, $options); - } - - public function canBuild(CommandInterface $command) - { - return (bool) $this->getClassName($command); - } - - /** - * Get the name of the class to instantiate for the command - * - * @param CommandInterface $command Command that is associated with the iterator - * - * @return string - */ - abstract protected function getClassName(CommandInterface $command); -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php deleted file mode 100644 index 2efc133c6..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php +++ /dev/null @@ -1,67 +0,0 @@ -factories = $factories; - } - - public function build(CommandInterface $command, array $options = array()) - { - if (!($factory = $this->getFactory($command))) { - throw new InvalidArgumentException('Iterator was not found for ' . $command->getName()); - } - - return $factory->build($command, $options); - } - - public function canBuild(CommandInterface $command) - { - return $this->getFactory($command) !== false; - } - - /** - * Add a factory to the composite factory - * - * @param ResourceIteratorFactoryInterface $factory Factory to add - * - * @return self - */ - public function addFactory(ResourceIteratorFactoryInterface $factory) - { - $this->factories[] = $factory; - - return $this; - } - - /** - * Get the factory that matches the command object - * - * @param CommandInterface $command Command retrieving the iterator for - * - * @return ResourceIteratorFactoryInterface|bool - */ - protected function getFactory(CommandInterface $command) - { - foreach ($this->factories as $factory) { - if ($factory->canBuild($command)) { - return $factory; - } - } - - return false; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php deleted file mode 100644 index c71ca9d85..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php +++ /dev/null @@ -1,34 +0,0 @@ -map = $map; - } - - public function getClassName(CommandInterface $command) - { - $className = $command->getName(); - - if (isset($this->map[$className])) { - return $this->map[$className]; - } elseif (isset($this->map['*'])) { - // If a wildcard was added, then always use that - return $this->map['*']; - } - - return null; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php deleted file mode 100644 index 2322434a5..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php +++ /dev/null @@ -1,64 +0,0 @@ -data = $data; - $this->structure = $structure; - } - - /** - * Get the structure of the model - * - * @return Parameter - */ - public function getStructure() - { - return $this->structure ?: new Parameter(); - } - - /** - * Provides debug information about the model object - * - * @return string - */ - public function __toString() - { - $output = 'Debug output of '; - if ($this->structure) { - $output .= $this->structure->getName() . ' '; - } - $output .= 'model'; - $output = str_repeat('=', strlen($output)) . "\n" . $output . "\n" . str_repeat('=', strlen($output)) . "\n\n"; - $output .= "Model data\n-----------\n\n"; - $output .= "This data can be retrieved from the model object using the get() method of the model " - . "(e.g. \$model->get(\$key)) or accessing the model like an associative array (e.g. \$model['key']).\n\n"; - $lines = array_slice(explode("\n", trim(print_r($this->toArray(), true))), 2, -1); - $output .= implode("\n", $lines); - - if ($this->structure) { - $output .= "\n\nModel structure\n---------------\n\n"; - $output .= "The following JSON document defines how the model was parsed from an HTTP response into the " - . "associative array structure you see above.\n\n"; - $output .= ' ' . json_encode($this->structure->toArray()) . "\n\n"; - } - - return $output . "\n"; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php deleted file mode 100644 index e14152432..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php +++ /dev/null @@ -1,254 +0,0 @@ -originalCommand = $command; - - // Parse options from the array of options - $this->data = $data; - $this->limit = array_key_exists('limit', $data) ? $data['limit'] : 0; - $this->pageSize = array_key_exists('page_size', $data) ? $data['page_size'] : false; - } - - /** - * Get all of the resources as an array (Warning: this could issue a large number of requests) - * - * @return array - */ - public function toArray() - { - return iterator_to_array($this, false); - } - - public function setLimit($limit) - { - $this->limit = $limit; - $this->resetState(); - - return $this; - } - - public function setPageSize($pageSize) - { - $this->pageSize = $pageSize; - $this->resetState(); - - return $this; - } - - /** - * Get an option from the iterator - * - * @param string $key Key of the option to retrieve - * - * @return mixed|null Returns NULL if not set or the value if set - */ - public function get($key) - { - return array_key_exists($key, $this->data) ? $this->data[$key] : null; - } - - /** - * Set an option on the iterator - * - * @param string $key Key of the option to set - * @param mixed $value Value to set for the option - * - * @return ResourceIterator - */ - public function set($key, $value) - { - $this->data[$key] = $value; - - return $this; - } - - public function current() - { - return $this->resources ? current($this->resources) : false; - } - - public function key() - { - return max(0, $this->iteratedCount - 1); - } - - public function count() - { - return $this->retrievedCount; - } - - /** - * Get the total number of requests sent - * - * @return int - */ - public function getRequestCount() - { - return $this->requestCount; - } - - /** - * Rewind the Iterator to the first element and send the original command - */ - public function rewind() - { - // Use the original command - $this->command = clone $this->originalCommand; - $this->resetState(); - $this->next(); - } - - public function valid() - { - return !$this->invalid && (!$this->resources || $this->current() || $this->nextToken) - && (!$this->limit || $this->iteratedCount < $this->limit + 1); - } - - public function next() - { - $this->iteratedCount++; - - // Check if a new set of resources needs to be retrieved - $sendRequest = false; - if (!$this->resources) { - $sendRequest = true; - } else { - // iterate over the internal array - $current = next($this->resources); - $sendRequest = $current === false && $this->nextToken && (!$this->limit || $this->iteratedCount < $this->limit + 1); - } - - if ($sendRequest) { - - $this->dispatch('resource_iterator.before_send', array( - 'iterator' => $this, - 'resources' => $this->resources - )); - - // Get a new command object from the original command - $this->command = clone $this->originalCommand; - // Send a request and retrieve the newly loaded resources - $this->resources = $this->sendRequest(); - $this->requestCount++; - - // If no resources were found, then the last request was not needed - // and iteration must stop - if (empty($this->resources)) { - $this->invalid = true; - } else { - // Add to the number of retrieved resources - $this->retrievedCount += count($this->resources); - // Ensure that we rewind to the beginning of the array - reset($this->resources); - } - - $this->dispatch('resource_iterator.after_send', array( - 'iterator' => $this, - 'resources' => $this->resources - )); - } - } - - /** - * Retrieve the NextToken that can be used in other iterators. - * - * @return string Returns a NextToken - */ - public function getNextToken() - { - return $this->nextToken; - } - - /** - * Returns the value that should be specified for the page size for a request that will maintain any hard limits, - * but still honor the specified pageSize if the number of items retrieved + pageSize < hard limit - * - * @return int Returns the page size of the next request. - */ - protected function calculatePageSize() - { - if ($this->limit && $this->iteratedCount + $this->pageSize > $this->limit) { - return 1 + ($this->limit - $this->iteratedCount); - } - - return (int) $this->pageSize; - } - - /** - * Reset the internal state of the iterator without triggering a rewind() - */ - protected function resetState() - { - $this->iteratedCount = 0; - $this->retrievedCount = 0; - $this->nextToken = false; - $this->resources = null; - $this->invalid = false; - } - - /** - * Send a request to retrieve the next page of results. Hook for subclasses to implement. - * - * @return array Returns the newly loaded resources - */ - abstract protected function sendRequest(); -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php deleted file mode 100644 index 6aa36153f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php +++ /dev/null @@ -1,111 +0,0 @@ -iterator = $iterator; - $this->callback = $callback; - Version::warn(__CLASS__ . ' is deprecated'); - } - - /** - * Apply the callback to the contents of the resource iterator - * - * @param int $perBatch The number of records to group per batch transfer - * - * @return int Returns the number of iterated resources - */ - public function apply($perBatch = 50) - { - $this->iterated = $this->batches = $batches = 0; - $that = $this; - $it = $this->iterator; - $callback = $this->callback; - - $batch = BatchBuilder::factory() - ->createBatchesWith(new BatchSizeDivisor($perBatch)) - ->transferWith(new BatchClosureTransfer(function (array $batch) use ($that, $callback, &$batches, $it) { - $batches++; - $that->dispatch('iterator_batch.before_batch', array('iterator' => $it, 'batch' => $batch)); - call_user_func_array($callback, array($it, $batch)); - $that->dispatch('iterator_batch.after_batch', array('iterator' => $it, 'batch' => $batch)); - })) - ->autoFlushAt($perBatch) - ->build(); - - $this->dispatch('iterator_batch.created_batch', array('batch' => $batch)); - - foreach ($this->iterator as $resource) { - $this->iterated++; - $batch->add($resource); - } - - $batch->flush(); - $this->batches = $batches; - - return $this->iterated; - } - - /** - * Get the total number of batches sent - * - * @return int - */ - public function getBatchCount() - { - return $this->batches; - } - - /** - * Get the total number of iterated resources - * - * @return int - */ - public function getIteratedCount() - { - return $this->iterated; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php deleted file mode 100644 index 2fd998071..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php +++ /dev/null @@ -1,60 +0,0 @@ - AbcFoo). - */ -class ResourceIteratorClassFactory extends AbstractResourceIteratorFactory -{ - /** @var array List of namespaces used to look for classes */ - protected $namespaces; - - /** @var InflectorInterface Inflector used to determine class names */ - protected $inflector; - - /** - * @param string|array $namespaces List of namespaces for iterator objects - * @param InflectorInterface $inflector Inflector used to resolve class names - */ - public function __construct($namespaces = array(), InflectorInterface $inflector = null) - { - $this->namespaces = (array) $namespaces; - $this->inflector = $inflector ?: Inflector::getDefault(); - } - - /** - * Registers a namespace to check for Iterators - * - * @param string $namespace Namespace which contains Iterator classes - * - * @return self - */ - public function registerNamespace($namespace) - { - array_unshift($this->namespaces, $namespace); - - return $this; - } - - protected function getClassName(CommandInterface $command) - { - $iteratorName = $this->inflector->camel($command->getName()) . 'Iterator'; - - // Determine the name of the class to load - foreach ($this->namespaces as $namespace) { - $potentialClassName = $namespace . '\\' . $iteratorName; - if (class_exists($potentialClassName)) { - return $potentialClassName; - } - } - - return false; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php deleted file mode 100644 index 8b4e8dbe0..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -=5.3.2", - "guzzle/cache": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version" - }, - "autoload": { - "psr-0": { "Guzzle\\Service": "" } - }, - "target-dir": "Guzzle/Service", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php b/vendor/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php deleted file mode 100644 index 9949e456f..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php +++ /dev/null @@ -1,276 +0,0 @@ -contextOptions = stream_context_get_options($context); - $this->context = $context; - } elseif (is_array($context) || !$context) { - $this->contextOptions = $context; - $this->createContext($params); - } elseif ($context) { - throw new InvalidArgumentException('$context must be an array or resource'); - } - - // Dispatch the before send event - $request->dispatch('request.before_send', array( - 'request' => $request, - 'context' => $this->context, - 'context_options' => $this->contextOptions - )); - - $this->setUrl($request); - $this->addDefaultContextOptions($request); - $this->addSslOptions($request); - $this->addBodyOptions($request); - $this->addProxyOptions($request); - - // Create the file handle but silence errors - return $this->createStream($params) - ->setCustomData('request', $request) - ->setCustomData('response_headers', $this->getLastResponseHeaders()); - } - - /** - * Set an option on the context and the internal options array - * - * @param string $wrapper Stream wrapper name of http - * @param string $name Context name - * @param mixed $value Context value - * @param bool $overwrite Set to true to overwrite an existing value - */ - protected function setContextValue($wrapper, $name, $value, $overwrite = false) - { - if (!isset($this->contextOptions[$wrapper])) { - $this->contextOptions[$wrapper] = array($name => $value); - } elseif (!$overwrite && isset($this->contextOptions[$wrapper][$name])) { - return; - } - $this->contextOptions[$wrapper][$name] = $value; - stream_context_set_option($this->context, $wrapper, $name, $value); - } - - /** - * Create a stream context - * - * @param array $params Parameter array - */ - protected function createContext(array $params) - { - $options = $this->contextOptions; - $this->context = $this->createResource(function () use ($params, $options) { - return stream_context_create($options, $params); - }); - } - - /** - * Get the last response headers received by the HTTP request - * - * @return array - */ - public function getLastResponseHeaders() - { - return $this->lastResponseHeaders; - } - - /** - * Adds the default context options to the stream context options - * - * @param RequestInterface $request Request - */ - protected function addDefaultContextOptions(RequestInterface $request) - { - $this->setContextValue('http', 'method', $request->getMethod()); - $headers = $request->getHeaderLines(); - - // "Connection: close" is required to get streams to work in HTTP 1.1 - if (!$request->hasHeader('Connection')) { - $headers[] = 'Connection: close'; - } - - $this->setContextValue('http', 'header', $headers); - $this->setContextValue('http', 'protocol_version', $request->getProtocolVersion()); - $this->setContextValue('http', 'ignore_errors', true); - } - - /** - * Set the URL to use with the factory - * - * @param RequestInterface $request Request that owns the URL - */ - protected function setUrl(RequestInterface $request) - { - $this->url = $request->getUrl(true); - - // Check for basic Auth username - if ($request->getUsername()) { - $this->url->setUsername($request->getUsername()); - } - - // Check for basic Auth password - if ($request->getPassword()) { - $this->url->setPassword($request->getPassword()); - } - } - - /** - * Add SSL options to the stream context - * - * @param RequestInterface $request Request - */ - protected function addSslOptions(RequestInterface $request) - { - if ($request->getCurlOptions()->get(CURLOPT_SSL_VERIFYPEER)) { - $this->setContextValue('ssl', 'verify_peer', true, true); - if ($cafile = $request->getCurlOptions()->get(CURLOPT_CAINFO)) { - $this->setContextValue('ssl', 'cafile', $cafile, true); - } - } else { - $this->setContextValue('ssl', 'verify_peer', false, true); - } - } - - /** - * Add body (content) specific options to the context options - * - * @param RequestInterface $request - */ - protected function addBodyOptions(RequestInterface $request) - { - // Add the content for the request if needed - if (!($request instanceof EntityEnclosingRequestInterface)) { - return; - } - - if (count($request->getPostFields())) { - $this->setContextValue('http', 'content', (string) $request->getPostFields(), true); - } elseif ($request->getBody()) { - $this->setContextValue('http', 'content', (string) $request->getBody(), true); - } - - // Always ensure a content-length header is sent - if (isset($this->contextOptions['http']['content'])) { - $headers = isset($this->contextOptions['http']['header']) ? $this->contextOptions['http']['header'] : array(); - $headers[] = 'Content-Length: ' . strlen($this->contextOptions['http']['content']); - $this->setContextValue('http', 'header', $headers, true); - } - } - - /** - * Add proxy parameters to the context if needed - * - * @param RequestInterface $request Request - */ - protected function addProxyOptions(RequestInterface $request) - { - if ($proxy = $request->getCurlOptions()->get(CURLOPT_PROXY)) { - $this->setContextValue('http', 'proxy', $proxy); - } - } - - /** - * Create the stream for the request with the context options - * - * @param array $params Parameters of the stream - * - * @return StreamInterface - */ - protected function createStream(array $params) - { - $http_response_header = null; - $url = $this->url; - $context = $this->context; - $fp = $this->createResource(function () use ($context, $url, &$http_response_header) { - return fopen((string) $url, 'r', false, $context); - }); - - // Determine the class to instantiate - $className = isset($params['stream_class']) ? $params['stream_class'] : __NAMESPACE__ . '\\Stream'; - - /** @var $stream StreamInterface */ - $stream = new $className($fp); - - // Track the response headers of the request - if (isset($http_response_header)) { - $this->lastResponseHeaders = $http_response_header; - $this->processResponseHeaders($stream); - } - - return $stream; - } - - /** - * Process response headers - * - * @param StreamInterface $stream - */ - protected function processResponseHeaders(StreamInterface $stream) - { - // Set the size on the stream if it was returned in the response - foreach ($this->lastResponseHeaders as $header) { - if ((stripos($header, 'Content-Length:')) === 0) { - $stream->setSize(trim(substr($header, 15))); - } - } - } - - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Closure to invoke that must return a valid resource - * - * @return resource - * @throws RuntimeException on error - */ - protected function createResource($callback) - { - // Turn off error reporting while we try to initiate the request - $level = error_reporting(0); - $resource = call_user_func($callback); - error_reporting($level); - - // If the resource could not be created, then grab the last error and throw an exception - if (false === $resource) { - $message = 'Error creating resource. '; - foreach (error_get_last() as $key => $value) { - $message .= "[{$key}] {$value} "; - } - throw new RuntimeException(trim($message)); - } - - return $resource; - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Stream/Stream.php b/vendor/guzzle/guzzle/src/Guzzle/Stream/Stream.php deleted file mode 100644 index de7e9528a..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Stream/Stream.php +++ /dev/null @@ -1,289 +0,0 @@ - array( - 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, - 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, 'c+b' => true, - 'rt' => true, 'w+t' => true, 'r+t' => true, 'x+t' => true, 'c+t' => true, 'a+' => true - ), - 'write' => array( - 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, 'c+' => true, - 'wb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, 'c+b' => true, - 'w+t' => true, 'r+t' => true, 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true - ) - ); - - /** - * @param resource $stream Stream resource to wrap - * @param int $size Size of the stream in bytes. Only pass if the size cannot be obtained from the stream. - * - * @throws InvalidArgumentException if the stream is not a stream resource - */ - public function __construct($stream, $size = null) - { - $this->setStream($stream, $size); - } - - /** - * Closes the stream when the helper is destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString() - { - if (!$this->isReadable() || (!$this->isSeekable() && $this->isConsumed())) { - return ''; - } - - $originalPos = $this->ftell(); - $body = stream_get_contents($this->stream, -1, 0); - $this->seek($originalPos); - - return $body; - } - - public function close() - { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->cache[self::IS_READABLE] = false; - $this->cache[self::IS_WRITABLE] = false; - } - - /** - * Calculate a hash of a Stream - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return bool|string Returns false on failure or a hash string on success - */ - public static function getHash(StreamInterface $stream, $algo, $rawOutput = false) - { - $pos = $stream->ftell(); - if (!$stream->seek(0)) { - return false; - } - - $ctx = hash_init($algo); - while ($data = $stream->read(8192)) { - hash_update($ctx, $data); - } - - $out = hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - - return $out; - } - - public function getMetaData($key = null) - { - $meta = stream_get_meta_data($this->stream); - - return !$key ? $meta : (array_key_exists($key, $meta) ? $meta[$key] : null); - } - - public function getStream() - { - return $this->stream; - } - - public function setStream($stream, $size = null) - { - if (!is_resource($stream)) { - throw new InvalidArgumentException('Stream must be a resource'); - } - - $this->size = $size; - $this->stream = $stream; - $this->rebuildCache(); - - return $this; - } - - public function detachStream() - { - $this->stream = null; - - return $this; - } - - public function getWrapper() - { - return $this->cache[self::WRAPPER_TYPE]; - } - - public function getWrapperData() - { - return $this->getMetaData('wrapper_data') ?: array(); - } - - public function getStreamType() - { - return $this->cache[self::STREAM_TYPE]; - } - - public function getUri() - { - return $this->cache['uri']; - } - - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - - // If the stream is a file based stream and local, then use fstat - clearstatcache(true, $this->cache['uri']); - $stats = fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } elseif ($this->cache[self::IS_READABLE] && $this->cache[self::SEEKABLE]) { - // Only get the size based on the content if the the stream is readable and seekable - $pos = $this->ftell(); - $this->size = strlen((string) $this); - $this->seek($pos); - return $this->size; - } - - return false; - } - - public function isReadable() - { - return $this->cache[self::IS_READABLE]; - } - - public function isRepeatable() - { - return $this->cache[self::IS_READABLE] && $this->cache[self::SEEKABLE]; - } - - public function isWritable() - { - return $this->cache[self::IS_WRITABLE]; - } - - public function isConsumed() - { - return feof($this->stream); - } - - public function feof() - { - return $this->isConsumed(); - } - - public function isLocal() - { - return $this->cache[self::IS_LOCAL]; - } - - public function isSeekable() - { - return $this->cache[self::SEEKABLE]; - } - - public function setSize($size) - { - $this->size = $size; - - return $this; - } - - public function seek($offset, $whence = SEEK_SET) - { - return $this->cache[self::SEEKABLE] ? fseek($this->stream, $offset, $whence) === 0 : false; - } - - public function read($length) - { - return fread($this->stream, $length); - } - - public function write($string) - { - // We can't know the size after writing anything - $this->size = null; - - return fwrite($this->stream, $string); - } - - public function ftell() - { - return ftell($this->stream); - } - - public function rewind() - { - return $this->seek(0); - } - - public function readLine($maxLength = null) - { - if (!$this->cache[self::IS_READABLE]) { - return false; - } else { - return $maxLength ? fgets($this->getStream(), $maxLength) : fgets($this->getStream()); - } - } - - public function setCustomData($key, $value) - { - $this->customData[$key] = $value; - - return $this; - } - - public function getCustomData($key) - { - return isset($this->customData[$key]) ? $this->customData[$key] : null; - } - - /** - * Reprocess stream metadata - */ - protected function rebuildCache() - { - $this->cache = stream_get_meta_data($this->stream); - $this->cache[self::IS_LOCAL] = stream_is_local($this->stream); - $this->cache[self::IS_READABLE] = isset(self::$readWriteHash['read'][$this->cache['mode']]); - $this->cache[self::IS_WRITABLE] = isset(self::$readWriteHash['write'][$this->cache['mode']]); - } -} diff --git a/vendor/guzzle/guzzle/src/Guzzle/Stream/StreamInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Stream/StreamInterface.php deleted file mode 100644 index 6d7dc3761..000000000 --- a/vendor/guzzle/guzzle/src/Guzzle/Stream/StreamInterface.php +++ /dev/null @@ -1,218 +0,0 @@ -=5.3.2", - "guzzle/common": "self.version" - }, - "suggest": { - "guzzle/http": "To convert Guzzle request objects to PHP streams" - }, - "autoload": { - "psr-0": { "Guzzle\\Stream": "" } - }, - "target-dir": "Guzzle/Stream", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/AbstractBatchDecoratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/AbstractBatchDecoratorTest.php deleted file mode 100644 index 951738d2a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/AbstractBatchDecoratorTest.php +++ /dev/null @@ -1,33 +0,0 @@ -getMock('Guzzle\Batch\BatchTransferInterface'), - $this->getMock('Guzzle\Batch\BatchDivisorInterface') - ); - - $decoratorA = $this->getMockBuilder('Guzzle\Batch\AbstractBatchDecorator') - ->setConstructorArgs(array($batch)) - ->getMockForAbstractClass(); - - $decoratorB = $this->getMockBuilder('Guzzle\Batch\AbstractBatchDecorator') - ->setConstructorArgs(array($decoratorA)) - ->getMockForAbstractClass(); - - $decoratorA->add('foo'); - $this->assertFalse($decoratorB->isEmpty()); - $this->assertFalse($batch->isEmpty()); - $this->assertEquals(array($decoratorB, $decoratorA), $decoratorB->getDecorators()); - $this->assertEquals(array(), $decoratorB->flush()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchBuilderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchBuilderTest.php deleted file mode 100644 index 4da09d30e..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchBuilderTest.php +++ /dev/null @@ -1,86 +0,0 @@ -getMock('Guzzle\Batch\BatchTransferInterface'); - } - - private function getMockDivisor() - { - return $this->getMock('Guzzle\Batch\BatchDivisorInterface'); - } - - private function getMockBatchBuilder() - { - return BatchBuilder::factory() - ->transferWith($this->getMockTransfer()) - ->createBatchesWith($this->getMockDivisor()); - } - - public function testFactoryCreatesInstance() - { - $builder = BatchBuilder::factory(); - $this->assertInstanceOf('Guzzle\Batch\BatchBuilder', $builder); - } - - public function testAddsAutoFlush() - { - $batch = $this->getMockBatchBuilder()->autoFlushAt(10)->build(); - $this->assertInstanceOf('Guzzle\Batch\FlushingBatch', $batch); - } - - public function testAddsExceptionBuffering() - { - $batch = $this->getMockBatchBuilder()->bufferExceptions()->build(); - $this->assertInstanceOf('Guzzle\Batch\ExceptionBufferingBatch', $batch); - } - - public function testAddHistory() - { - $batch = $this->getMockBatchBuilder()->keepHistory()->build(); - $this->assertInstanceOf('Guzzle\Batch\HistoryBatch', $batch); - } - - public function testAddsNotify() - { - $batch = $this->getMockBatchBuilder()->notify(function() {})->build(); - $this->assertInstanceOf('Guzzle\Batch\NotifyingBatch', $batch); - } - - /** - * @expectedException Guzzle\Common\Exception\RuntimeException - */ - public function testTransferStrategyMustBeSet() - { - $batch = BatchBuilder::factory()->createBatchesWith($this->getMockDivisor())->build(); - } - - /** - * @expectedException Guzzle\Common\Exception\RuntimeException - */ - public function testDivisorStrategyMustBeSet() - { - $batch = BatchBuilder::factory()->transferWith($this->getMockTransfer())->build(); - } - - public function testTransfersRequests() - { - $batch = BatchBuilder::factory()->transferRequests(10)->build(); - $this->assertInstanceOf('Guzzle\Batch\BatchRequestTransfer', $this->readAttribute($batch, 'transferStrategy')); - } - - public function testTransfersCommands() - { - $batch = BatchBuilder::factory()->transferCommands(10)->build(); - $this->assertInstanceOf('Guzzle\Batch\BatchCommandTransfer', $this->readAttribute($batch, 'transferStrategy')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureDivisorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureDivisorTest.php deleted file mode 100644 index 753db7dab..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureDivisorTest.php +++ /dev/null @@ -1,36 +0,0 @@ -createBatches($queue); - $this->assertEquals(array(array('foo'), array('baz')), $batches); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureTransferTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureTransferTest.php deleted file mode 100644 index 6ba7ae052..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureTransferTest.php +++ /dev/null @@ -1,52 +0,0 @@ -itemsTransferred = null; - $itemsTransferred =& $this->itemsTransferred; - - $this->transferStrategy = new BatchClosureTransfer(function (array $batch) use (&$itemsTransferred) { - $itemsTransferred = $batch; - return; - }); - } - - public function testTransfersBatch() - { - $batchedItems = array('foo', 'bar', 'baz'); - $this->transferStrategy->transfer($batchedItems); - - $this->assertEquals($batchedItems, $this->itemsTransferred); - } - - public function testTransferBailsOnEmptyBatch() - { - $batchedItems = array(); - $this->transferStrategy->transfer($batchedItems); - - $this->assertNull($this->itemsTransferred); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testEnsuresCallableIsCallable() - { - $foo = new BatchClosureTransfer('uh oh!'); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchCommandTransferTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchCommandTransferTest.php deleted file mode 100644 index a04efabbb..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchCommandTransferTest.php +++ /dev/null @@ -1,83 +0,0 @@ - $command) { - if ($i % 2) { - $command->setClient($client1); - } else { - $command->setClient($client2); - } - $queue[] = $command; - } - - $batch = new BatchCommandTransfer(2); - $this->assertEquals(array( - array($commands[0], $commands[2]), - array($commands[4]), - array($commands[1], $commands[3]) - ), $batch->createBatches($queue)); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testEnsuresAllItemsAreCommands() - { - $queue = new \SplQueue(); - $queue[] = 'foo'; - $batch = new BatchCommandTransfer(2); - $batch->createBatches($queue); - } - - public function testTransfersBatches() - { - $client = $this->getMockBuilder('Guzzle\Service\Client') - ->setMethods(array('send')) - ->getMock(); - $client->expects($this->once()) - ->method('send'); - $command = new Mc(); - $command->setClient($client); - $batch = new BatchCommandTransfer(2); - $batch->transfer(array($command)); - } - - public function testDoesNotTransfersEmptyBatches() - { - $batch = new BatchCommandTransfer(2); - $batch->transfer(array()); - } - - /** - * @expectedException Guzzle\Service\Exception\InconsistentClientTransferException - */ - public function testEnsuresAllCommandsUseTheSameClient() - { - $batch = new BatchCommandTransfer(2); - $client1 = new Client('http://www.example.com'); - $client2 = new Client('http://www.example.com'); - $command1 = new Mc(); - $command1->setClient($client1); - $command2 = new Mc(); - $command2->setClient($client2); - $batch->transfer(array($command1, $command2)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchRequestTransferTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchRequestTransferTest.php deleted file mode 100644 index d929ef039..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchRequestTransferTest.php +++ /dev/null @@ -1,80 +0,0 @@ -setCurlMulti(new CurlMulti()); - - $client2 = new Client('http://www.example.com'); - $client2->setCurlMulti(new CurlMulti()); - - $request1 = $client1->get(); - $request2 = $client2->get(); - $request3 = $client1->get(); - $request4 = $client2->get(); - $request5 = $client1->get(); - - $queue = new \SplQueue(); - $queue[] = $request1; - $queue[] = $request2; - $queue[] = $request3; - $queue[] = $request4; - $queue[] = $request5; - - $batch = new BatchRequestTransfer(2); - $this->assertEquals(array( - array($request1, $request3), - array($request3), - array($request2, $request4) - ), $batch->createBatches($queue)); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testEnsuresAllItemsAreRequests() - { - $queue = new \SplQueue(); - $queue[] = 'foo'; - $batch = new BatchRequestTransfer(2); - $batch->createBatches($queue); - } - - public function testTransfersBatches() - { - $client = new Client('http://localhost:123'); - $request = $client->get(); - // For some reason... PHP unit clones the request, which emits a request.clone event. This causes the - // 'sorted' property of the event dispatcher to contain an array in the cloned request that is not present in - // the original. - $request->dispatch('request.clone'); - - $multi = $this->getMock('Guzzle\Http\Curl\CurlMultiInterface'); - $client->setCurlMulti($multi); - $multi->expects($this->once()) - ->method('add') - ->with($request); - $multi->expects($this->once()) - ->method('send'); - - $batch = new BatchRequestTransfer(2); - $batch->transfer(array($request)); - } - - public function testDoesNotTransfersEmptyBatches() - { - $batch = new BatchRequestTransfer(2); - $batch->transfer(array()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchSizeDivisorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchSizeDivisorTest.php deleted file mode 100644 index 5542228fd..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchSizeDivisorTest.php +++ /dev/null @@ -1,24 +0,0 @@ -assertEquals(3, $d->getSize()); - $d->setSize(2); - $batches = $d->createBatches($queue); - $this->assertEquals(array(array('foo', 'baz'), array('bar')), $batches); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchTest.php deleted file mode 100644 index 296f57aef..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchTest.php +++ /dev/null @@ -1,91 +0,0 @@ -getMock('Guzzle\Batch\BatchTransferInterface'); - } - - private function getMockDivisor() - { - return $this->getMock('Guzzle\Batch\BatchDivisorInterface'); - } - - public function testAddsItemsToQueue() - { - $batch = new Batch($this->getMockTransfer(), $this->getMockDivisor()); - $this->assertSame($batch, $batch->add('foo')); - $this->assertEquals(1, count($batch)); - } - - public function testFlushReturnsItems() - { - $transfer = $this->getMockTransfer(); - $transfer->expects($this->exactly(2)) - ->method('transfer'); - - $divisor = $this->getMockDivisor(); - $divisor->expects($this->once()) - ->method('createBatches') - ->will($this->returnValue(array(array('foo', 'baz'), array('bar')))); - - $batch = new Batch($transfer, $divisor); - - $batch->add('foo')->add('baz')->add('bar'); - $items = $batch->flush(); - - $this->assertEquals(array('foo', 'baz', 'bar'), $items); - } - - public function testThrowsExceptionContainingTheFailedBatch() - { - $called = 0; - $originalException = new \Exception('Foo!'); - - $transfer = $this->getMockTransfer(); - $transfer->expects($this->exactly(2)) - ->method('transfer') - ->will($this->returnCallback(function () use (&$called, $originalException) { - if (++$called == 2) { - throw $originalException; - } - })); - - $divisor = $this->getMockDivisor(); - $batch = new Batch($transfer, $divisor); - - // PHPunit clones objects before passing them to a callback. - // Horrible hack to get around this! - $queue = $this->readAttribute($batch, 'queue'); - - $divisor->expects($this->once()) - ->method('createBatches') - ->will($this->returnCallback(function ($batch) use ($queue) { - foreach ($queue as $item) { - $items[] = $item; - } - return array_chunk($items, 2); - })); - - $batch->add('foo')->add('baz')->add('bar')->add('bee')->add('boo'); - $this->assertFalse($batch->isEmpty()); - - try { - $items = $batch->flush(); - $this->fail('Expected exception'); - } catch (BatchTransferException $e) { - $this->assertEquals($originalException, $e->getPrevious()); - $this->assertEquals(array('bar', 'bee'), array_values($e->getBatch())); - $this->assertEquals(1, count($batch)); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/ExceptionBufferingBatchTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/ExceptionBufferingBatchTest.php deleted file mode 100644 index fd810b11f..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/ExceptionBufferingBatchTest.php +++ /dev/null @@ -1,45 +0,0 @@ -getMockBuilder('Guzzle\Batch\BatchTransferInterface') - ->setMethods(array('transfer')) - ->getMock(); - - $d = new BatchSizeDivisor(1); - $batch = new Batch($t, $d); - - $called = 0; - $t->expects($this->exactly(3)) - ->method('transfer') - ->will($this->returnCallback(function ($batch) use (&$called) { - if (++$called === 2) { - throw new \Exception('Foo'); - } - })); - - $decorator = new ExceptionBufferingBatch($batch); - $decorator->add('foo')->add('baz')->add('bar'); - $result = $decorator->flush(); - - $e = $decorator->getExceptions(); - $this->assertEquals(1, count($e)); - $this->assertEquals(array('baz'), $e[0]->getBatch()); - - $decorator->clearExceptions(); - $this->assertEquals(0, count($decorator->getExceptions())); - - $this->assertEquals(array('foo', 'bar'), $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/FlushingBatchTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/FlushingBatchTest.php deleted file mode 100644 index 9b37a485f..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/FlushingBatchTest.php +++ /dev/null @@ -1,40 +0,0 @@ -getMock('Guzzle\Batch\BatchTransferInterface', array('transfer')); - $d = $this->getMock('Guzzle\Batch\BatchDivisorInterface', array('createBatches')); - - $batch = new Batch($t, $d); - $queue = $this->readAttribute($batch, 'queue'); - - $d->expects($this->exactly(2)) - ->method('createBatches') - ->will($this->returnCallback(function () use ($queue) { - $items = array(); - foreach ($queue as $item) { - $items[] = $item; - } - return array($items); - })); - - $t->expects($this->exactly(2)) - ->method('transfer'); - - $flush = new FlushingBatch($batch, 3); - $this->assertEquals(3, $flush->getThreshold()); - $flush->setThreshold(2); - $flush->add('foo')->add('baz')->add('bar')->add('bee')->add('boo'); - $this->assertEquals(1, count($flush)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php deleted file mode 100644 index 60d6f951a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php +++ /dev/null @@ -1,26 +0,0 @@ -getMock('Guzzle\Batch\BatchTransferInterface'), - $this->getMock('Guzzle\Batch\BatchDivisorInterface') - ); - - $history = new HistoryBatch($batch); - $history->add('foo')->add('baz'); - $this->assertEquals(array('foo', 'baz'), $history->getHistory()); - $history->clearHistory(); - $this->assertEquals(array(), $history->getHistory()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/NotifyingBatchTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/NotifyingBatchTest.php deleted file mode 100644 index 69a89007a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/NotifyingBatchTest.php +++ /dev/null @@ -1,45 +0,0 @@ -getMock('Guzzle\Batch\Batch', array('flush'), array( - $this->getMock('Guzzle\Batch\BatchTransferInterface'), - $this->getMock('Guzzle\Batch\BatchDivisorInterface') - )); - - $batch->expects($this->once()) - ->method('flush') - ->will($this->returnValue(array('foo', 'baz'))); - - $data = array(); - $decorator = new NotifyingBatch($batch, function ($batch) use (&$data) { - $data[] = $batch; - }); - - $decorator->add('foo')->add('baz'); - $decorator->flush(); - $this->assertEquals(array(array('foo', 'baz')), $data); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testEnsuresCallableIsValid() - { - $batch = new Batch( - $this->getMock('Guzzle\Batch\BatchTransferInterface'), - $this->getMock('Guzzle\Batch\BatchDivisorInterface') - ); - $decorator = new NotifyingBatch($batch, 'foo'); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php deleted file mode 100644 index c4140a91d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php +++ /dev/null @@ -1,64 +0,0 @@ -cache = new ArrayCache(); - $this->adapter = new DoctrineCacheAdapter($this->cache); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testEnsuresConfigIsObject() - { - CacheAdapterFactory::fromCache(array()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testEnsuresKnownType() - { - CacheAdapterFactory::fromCache(new \stdClass()); - } - - public function cacheProvider() - { - return array( - array(new DoctrineCacheAdapter(new ArrayCache()), 'Guzzle\Cache\DoctrineCacheAdapter'), - array(new ArrayCache(), 'Guzzle\Cache\DoctrineCacheAdapter'), - array(StorageFactory::factory(array('adapter' => 'memory')), 'Guzzle\Cache\Zf2CacheAdapter'), - ); - } - - /** - * @dataProvider cacheProvider - */ - public function testCreatesNullCacheAdapterByDefault($cache, $type) - { - $adapter = CacheAdapterFactory::fromCache($cache); - $this->assertInstanceOf($type, $adapter); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterTest.php deleted file mode 100644 index 3e30dddc5..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterTest.php +++ /dev/null @@ -1,68 +0,0 @@ -cache = new ArrayCache(); - $this->adapter = new DoctrineCacheAdapter($this->cache); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown() - { - $this->adapter = null; - $this->cache = null; - parent::tearDown(); - } - - public function testGetCacheObject() - { - $this->assertEquals($this->cache, $this->adapter->getCacheObject()); - } - - public function testSave() - { - $this->assertTrue($this->adapter->save('test', 'data', 1000)); - } - - public function testFetch() - { - $this->assertTrue($this->adapter->save('test', 'data', 1000)); - $this->assertEquals('data', $this->adapter->fetch('test')); - } - - public function testContains() - { - $this->assertTrue($this->adapter->save('test', 'data', 1000)); - $this->assertTrue($this->adapter->contains('test')); - } - - public function testDelete() - { - $this->assertTrue($this->adapter->save('test', 'data', 1000)); - $this->assertTrue($this->adapter->delete('test')); - $this->assertFalse($this->adapter->contains('test')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/ClosureCacheAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/ClosureCacheAdapterTest.php deleted file mode 100644 index 12de65b5a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/ClosureCacheAdapterTest.php +++ /dev/null @@ -1,94 +0,0 @@ -callables = array( - 'contains' => function($id, $options = array()) use ($that) { - return array_key_exists($id, $that->data); - }, - 'delete' => function($id, $options = array()) use ($that) { - unset($that->data[$id]); - return true; - }, - 'fetch' => function($id, $options = array()) use ($that) { - return array_key_exists($id, $that->data) ? $that->data[$id] : null; - }, - 'save' => function($id, $data, $lifeTime, $options = array()) use ($that) { - $that->data[$id] = $data; - return true; - } - ); - - $this->adapter = new ClosureCacheAdapter($this->callables); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown() - { - $this->cache = null; - $this->callables = null; - parent::tearDown(); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testEnsuresCallablesArePresent() - { - $callables = $this->callables; - unset($callables['delete']); - $cache = new ClosureCacheAdapter($callables); - } - - public function testAllCallablesMustBePresent() - { - $cache = new ClosureCacheAdapter($this->callables); - } - - public function testCachesDataUsingCallables() - { - $this->assertTrue($this->adapter->save('test', 'data', 1000)); - $this->assertEquals('data', $this->adapter->fetch('test')); - } - - public function testChecksIfCacheContainsKeys() - { - $this->adapter->save('test', 'data', 1000); - $this->assertTrue($this->adapter->contains('test')); - $this->assertFalse($this->adapter->contains('foo')); - } - - public function testDeletesFromCacheByKey() - { - $this->adapter->save('test', 'data', 1000); - $this->assertTrue($this->adapter->contains('test')); - $this->adapter->delete('test'); - $this->assertFalse($this->adapter->contains('test')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/NullCacheAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/NullCacheAdapterTest.php deleted file mode 100644 index e05df3f78..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/NullCacheAdapterTest.php +++ /dev/null @@ -1,20 +0,0 @@ -assertEquals(false, $c->contains('foo')); - $this->assertEquals(true, $c->delete('foo')); - $this->assertEquals(false, $c->fetch('foo')); - $this->assertEquals(true, $c->save('foo', 'bar')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php deleted file mode 100644 index 9077c12d3..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php +++ /dev/null @@ -1,58 +0,0 @@ -cache = StorageFactory::factory(array( - 'adapter' => 'memory' - )); - $this->adapter = new Zf2CacheAdapter($this->cache); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown() - { - $this->adapter = null; - $this->cache = null; - parent::tearDown(); - } - - public function testCachesDataUsingCallables() - { - $this->assertTrue($this->adapter->save('test', 'data', 1000)); - $this->assertEquals('data', $this->adapter->fetch('test')); - } - - public function testChecksIfCacheContainsKeys() - { - $this->adapter->save('test', 'data', 1000); - $this->assertTrue($this->adapter->contains('test')); - $this->assertFalse($this->adapter->contains('foo')); - } - - public function testDeletesFromCacheByKey() - { - $this->adapter->save('test', 'data', 1000); - $this->assertTrue($this->adapter->contains('test')); - $this->adapter->delete('test'); - $this->assertFalse($this->adapter->contains('test')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/AbstractHasDispatcherTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/AbstractHasDispatcherTest.php deleted file mode 100644 index 19d12e6f6..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/AbstractHasDispatcherTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertEquals(array(), AbstractHasDispatcher::getAllEvents()); - } - - public function testAllowsDispatcherToBeInjected() - { - $d = new EventDispatcher(); - $mock = $this->getMockForAbstractClass('Guzzle\Common\AbstractHasDispatcher'); - $this->assertSame($mock, $mock->setEventDispatcher($d)); - $this->assertSame($d, $mock->getEventDispatcher()); - } - - public function testCreatesDefaultEventDispatcherIfNeeded() - { - $mock = $this->getMockForAbstractClass('Guzzle\Common\AbstractHasDispatcher'); - $this->assertInstanceOf('Symfony\Component\EventDispatcher\EventDispatcher', $mock->getEventDispatcher()); - } - - public function testHelperDispatchesEvents() - { - $data = array(); - $mock = $this->getMockForAbstractClass('Guzzle\Common\AbstractHasDispatcher'); - $mock->getEventDispatcher()->addListener('test', function(Event $e) use (&$data) { - $data = $e->getIterator()->getArrayCopy(); - }); - $mock->dispatch('test', array( - 'param' => 'abc' - )); - $this->assertEquals(array( - 'param' => 'abc', - ), $data); - } - - public function testHelperAttachesSubscribers() - { - $mock = $this->getMockForAbstractClass('Guzzle\Common\AbstractHasDispatcher'); - $subscriber = $this->getMockForAbstractClass('Symfony\Component\EventDispatcher\EventSubscriberInterface'); - - $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcher') - ->setMethods(array('addSubscriber')) - ->getMock(); - - $dispatcher->expects($this->once()) - ->method('addSubscriber'); - - $mock->setEventDispatcher($dispatcher); - $mock->addSubscriber($subscriber); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/CollectionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/CollectionTest.php deleted file mode 100644 index 0648a02b8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/CollectionTest.php +++ /dev/null @@ -1,529 +0,0 @@ -coll = new Collection(); - } - - public function testConstructorCanBeCalledWithNoParams() - { - $this->coll = new Collection(); - $p = $this->coll->getAll(); - $this->assertEmpty($p, '-> Collection must be empty when no data is passed'); - } - - public function testConstructorCanBeCalledWithParams() - { - $testData = array( - 'test' => 'value', - 'test_2' => 'value2' - ); - $this->coll = new Collection($testData); - $this->assertEquals($this->coll->getAll(), $testData, '-> getAll() must return the data passed in the constructor'); - $this->assertEquals($this->coll->getAll(), $this->coll->toArray()); - } - - public function testImplementsIteratorAggregate() - { - $this->coll->set('key', 'value'); - $this->assertInstanceOf('ArrayIterator', $this->coll->getIterator()); - $this->assertEquals(1, count($this->coll)); - $total = 0; - foreach ($this->coll as $key => $value) { - $this->assertEquals('key', $key); - $this->assertEquals('value', $value); - $total++; - } - $this->assertEquals(1, $total); - } - - public function testCanAddValuesToExistingKeysByUsingArray() - { - $this->coll->add('test', 'value1'); - $this->assertEquals($this->coll->getAll(), array('test' => 'value1')); - $this->coll->add('test', 'value2'); - $this->assertEquals($this->coll->getAll(), array('test' => array('value1', 'value2'))); - $this->coll->add('test', 'value3'); - $this->assertEquals($this->coll->getAll(), array('test' => array('value1', 'value2', 'value3'))); - } - - public function testHandlesMergingInDisparateDataSources() - { - $params = array( - 'test' => 'value1', - 'test2' => 'value2', - 'test3' => array('value3', 'value4') - ); - $this->coll->merge($params); - $this->assertEquals($this->coll->getAll(), $params); - - // Pass the same object to itself - $this->assertEquals($this->coll->merge($this->coll), $this->coll); - } - - public function testCanClearAllDataOrSpecificKeys() - { - $this->coll->merge(array( - 'test' => 'value1', - 'test2' => 'value2' - )); - - // Clear a specific parameter by name - $this->coll->remove('test'); - - $this->assertEquals($this->coll->getAll(), array( - 'test2' => 'value2' - )); - - // Clear all parameters - $this->coll->clear(); - - $this->assertEquals($this->coll->getAll(), array()); - } - - public function testGetsValuesByKey() - { - $this->assertNull($this->coll->get('test')); - $this->coll->add('test', 'value'); - $this->assertEquals('value', $this->coll->get('test')); - $this->coll->set('test2', 'v2'); - $this->coll->set('test3', 'v3'); - $this->assertEquals(array( - 'test' => 'value', - 'test2' => 'v2' - ), $this->coll->getAll(array('test', 'test2'))); - } - - public function testProvidesKeys() - { - $this->assertEquals(array(), $this->coll->getKeys()); - $this->coll->merge(array( - 'test1' => 'value1', - 'test2' => 'value2' - )); - $this->assertEquals(array('test1', 'test2'), $this->coll->getKeys()); - // Returns the cached array previously returned - $this->assertEquals(array('test1', 'test2'), $this->coll->getKeys()); - $this->coll->remove('test1'); - $this->assertEquals(array('test2'), $this->coll->getKeys()); - $this->coll->add('test3', 'value3'); - $this->assertEquals(array('test2', 'test3'), $this->coll->getKeys()); - } - - public function testChecksIfHasKey() - { - $this->assertFalse($this->coll->hasKey('test')); - $this->coll->add('test', 'value'); - $this->assertEquals(true, $this->coll->hasKey('test')); - $this->coll->add('test2', 'value2'); - $this->assertEquals(true, $this->coll->hasKey('test')); - $this->assertEquals(true, $this->coll->hasKey('test2')); - $this->assertFalse($this->coll->hasKey('testing')); - $this->assertEquals(false, $this->coll->hasKey('AB-C', 'junk')); - } - - public function testChecksIfHasValue() - { - $this->assertFalse($this->coll->hasValue('value')); - $this->coll->add('test', 'value'); - $this->assertEquals('test', $this->coll->hasValue('value')); - $this->coll->add('test2', 'value2'); - $this->assertEquals('test', $this->coll->hasValue('value')); - $this->assertEquals('test2', $this->coll->hasValue('value2')); - $this->assertFalse($this->coll->hasValue('val')); - } - - public function testCanGetAllValuesByArray() - { - $this->coll->add('foo', 'bar'); - $this->coll->add('tEsT', 'value'); - $this->coll->add('tesTing', 'v2'); - $this->coll->add('key', 'v3'); - $this->assertNull($this->coll->get('test')); - $this->assertEquals(array( - 'foo' => 'bar', - 'tEsT' => 'value', - 'tesTing' => 'v2' - ), $this->coll->getAll(array( - 'foo', 'tesTing', 'tEsT' - ))); - } - - public function testImplementsCount() - { - $data = new Collection(); - $this->assertEquals(0, $data->count()); - $data->add('key', 'value'); - $this->assertEquals(1, count($data)); - $data->add('key', 'value2'); - $this->assertEquals(1, count($data)); - $data->add('key_2', 'value3'); - $this->assertEquals(2, count($data)); - } - - public function testAddParamsByMerging() - { - $params = array( - 'test' => 'value1', - 'test2' => 'value2', - 'test3' => array('value3', 'value4') - ); - - // Add some parameters - $this->coll->merge($params); - - // Add more parameters by merging them in - $this->coll->merge(array( - 'test' => 'another', - 'different_key' => 'new value' - )); - - $this->assertEquals(array( - 'test' => array('value1', 'another'), - 'test2' => 'value2', - 'test3' => array('value3', 'value4'), - 'different_key' => 'new value' - ), $this->coll->getAll()); - } - - public function testAllowsFunctionalFilter() - { - $this->coll->merge(array( - 'fruit' => 'apple', - 'number' => 'ten', - 'prepositions' => array('about', 'above', 'across', 'after'), - 'same_number' => 'ten' - )); - - $filtered = $this->coll->filter(function($key, $value) { - return $value == 'ten'; - }); - - $this->assertNotEquals($filtered, $this->coll); - - $this->assertEquals(array( - 'number' => 'ten', - 'same_number' => 'ten' - ), $filtered->getAll()); - } - - public function testAllowsFunctionalMapping() - { - $this->coll->merge(array( - 'number_1' => 1, - 'number_2' => 2, - 'number_3' => 3 - )); - - $mapped = $this->coll->map(function($key, $value) { - return $value * $value; - }); - - $this->assertNotEquals($mapped, $this->coll); - - $this->assertEquals(array( - 'number_1' => 1, - 'number_2' => 4, - 'number_3' => 9 - ), $mapped->getAll()); - } - - public function testImplementsArrayAccess() - { - $this->coll->merge(array( - 'k1' => 'v1', - 'k2' => 'v2' - )); - - $this->assertTrue($this->coll->offsetExists('k1')); - $this->assertFalse($this->coll->offsetExists('Krull')); - - $this->coll->offsetSet('k3', 'v3'); - $this->assertEquals('v3', $this->coll->offsetGet('k3')); - $this->assertEquals('v3', $this->coll->get('k3')); - - $this->coll->offsetUnset('k1'); - $this->assertFalse($this->coll->offsetExists('k1')); - } - - public function testUsesStaticWhenCreatingNew() - { - $qs = new QueryString(array( - 'a' => 'b', - 'c' => 'd' - )); - - $this->assertInstanceOf('Guzzle\\Http\\QueryString', $qs->map(function($a, $b) {})); - $this->assertInstanceOf('Guzzle\\Common\\Collection', $qs->map(function($a, $b) {}, array(), false)); - - $this->assertInstanceOf('Guzzle\\Http\\QueryString', $qs->filter(function($a, $b) {})); - $this->assertInstanceOf('Guzzle\\Common\\Collection', $qs->filter(function($a, $b) {}, false)); - } - - public function testCanReplaceAllData() - { - $this->assertSame($this->coll, $this->coll->replace(array( - 'a' => '123' - ))); - - $this->assertEquals(array( - 'a' => '123' - ), $this->coll->getAll()); - } - - public function dataProvider() - { - return array( - array('this_is_a_test', '{a}_is_a_{b}', array( - 'a' => 'this', - 'b' => 'test' - )), - array('this_is_a_test', '{abc}_is_a_{0}', array( - 'abc' => 'this', - 0 => 'test' - )), - array('this_is_a_test', '{abc}_is_a_{0}', array( - 'abc' => 'this', - 0 => 'test' - )), - array('this_is_a_test', 'this_is_a_test', array( - 'abc' => 'this' - )), - array('{abc}_is_{not_found}a_{0}', '{abc}_is_{not_found}a_{0}', array()) - ); - } - - /** - * @dataProvider dataProvider - */ - public function testInjectsConfigData($output, $input, $config) - { - $collection = new Collection($config); - $this->assertEquals($output, $collection->inject($input)); - } - - public function testCanSearchByKey() - { - $collection = new Collection(array( - 'foo' => 'bar', - 'BaZ' => 'pho' - )); - - $this->assertEquals('foo', $collection->keySearch('FOO')); - $this->assertEquals('BaZ', $collection->keySearch('baz')); - $this->assertEquals(false, $collection->keySearch('Bar')); - } - - public function testPreparesFromConfig() - { - $c = Collection::fromConfig(array( - 'a' => '123', - 'base_url' => 'http://www.test.com/' - ), array( - 'a' => 'xyz', - 'b' => 'lol' - ), array('a')); - - $this->assertInstanceOf('Guzzle\Common\Collection', $c); - $this->assertEquals(array( - 'a' => '123', - 'b' => 'lol', - 'base_url' => 'http://www.test.com/' - ), $c->getAll()); - - try { - $c = Collection::fromConfig(array(), array(), array('a')); - $this->fail('Exception not throw when missing config'); - } catch (InvalidArgumentException $e) { - } - } - - function falseyDataProvider() - { - return array( - array(false, false), - array(null, null), - array('', ''), - array(array(), array()), - array(0, 0), - ); - } - - /** - * @dataProvider falseyDataProvider - */ - public function testReturnsCorrectData($a, $b) - { - $c = new Collection(array('value' => $a)); - $this->assertSame($b, $c->get('value')); - } - - public function testRetrievesNestedKeysUsingPath() - { - $data = array( - 'foo' => 'bar', - 'baz' => array( - 'mesa' => array( - 'jar' => 'jar' - ) - ) - ); - $collection = new Collection($data); - $this->assertEquals('bar', $collection->getPath('foo')); - $this->assertEquals('jar', $collection->getPath('baz/mesa/jar')); - $this->assertNull($collection->getPath('wewewf')); - $this->assertNull($collection->getPath('baz/mesa/jar/jar')); - } - - public function testFalseyKeysStillDescend() - { - $collection = new Collection(array( - '0' => array( - 'a' => 'jar' - ), - 1 => 'other' - )); - $this->assertEquals('jar', $collection->getPath('0/a')); - $this->assertEquals('other', $collection->getPath('1')); - } - - public function getPathProvider() - { - $data = array( - 'foo' => 'bar', - 'baz' => array( - 'mesa' => array( - 'jar' => 'jar', - 'array' => array('a', 'b', 'c') - ), - 'bar' => array( - 'baz' => 'bam', - 'array' => array('d', 'e', 'f') - ) - ), - 'bam' => array( - array('foo' => 1), - array('foo' => 2), - array('array' => array('h', 'i')) - ) - ); - $c = new Collection($data); - - return array( - // Simple path selectors - array($c, 'foo', 'bar'), - array($c, 'baz', $data['baz']), - array($c, 'bam', $data['bam']), - array($c, 'baz/mesa', $data['baz']['mesa']), - array($c, 'baz/mesa/jar', 'jar'), - // Merge everything two levels under baz - array($c, 'baz/*', array( - 'jar' => 'jar', - 'array' => array_merge($data['baz']['mesa']['array'], $data['baz']['bar']['array']), - 'baz' => 'bam' - )), - // Does not barf on missing keys - array($c, 'fefwfw', null), - // Does not barf when a wildcard does not resolve correctly - array($c, '*/*/*/*/*/wefwfe', array()), - // Allows custom separator - array($c, '*|mesa', $data['baz']['mesa'], '|'), - // Merge all 'array' keys two levels under baz (the trailing * does not hurt the results) - array($c, 'baz/*/array/*', array_merge($data['baz']['mesa']['array'], $data['baz']['bar']['array'])), - // Merge all 'array' keys two levels under baz - array($c, 'baz/*/array', array_merge($data['baz']['mesa']['array'], $data['baz']['bar']['array'])), - array($c, 'baz/mesa/array', $data['baz']['mesa']['array']), - // Having a trailing * does not hurt the results - array($c, 'baz/mesa/array/*', $data['baz']['mesa']['array']), - // Merge of anything one level deep - array($c, '*', array_merge(array('bar'), $data['baz'], $data['bam'])), - // Funky merge of anything two levels deep - array($c, '*/*', array( - 'jar' => 'jar', - 'array' => array('a', 'b', 'c', 'd', 'e', 'f', 'h', 'i'), - 'baz' => 'bam', - 'foo' => array(1, 2) - )), - // Funky merge of all 'array' keys that are two levels deep - array($c, '*/*/array', array('a', 'b', 'c', 'd', 'e', 'f', 'h', 'i')) - ); - } - - /** - * @dataProvider getPathProvider - */ - public function testGetPath(Collection $c, $path, $expected, $separator = '/') - { - $this->assertEquals($expected, $c->getPath($path, $separator)); - } - - public function testOverridesSettings() - { - $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3)); - $c->overwriteWith(array('foo' => 10, 'bar' => 300)); - $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->getAll()); - } - - public function testOverwriteWithCollection() - { - $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3)); - $b = new Collection(array('foo' => 10, 'bar' => 300)); - $c->overwriteWith($b); - $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->getAll()); - } - - public function testOverwriteWithTraversable() - { - $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3)); - $b = new Collection(array('foo' => 10, 'bar' => 300)); - $c->overwriteWith($b->getIterator()); - $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->getAll()); - } - - public function testCanSetNestedPathValueThatDoesNotExist() - { - $c = new Collection(array()); - $c->setPath('foo/bar/baz/123', 'hi'); - $this->assertEquals('hi', $c['foo']['bar']['baz']['123']); - } - - public function testCanSetNestedPathValueThatExists() - { - $c = new Collection(array('foo' => array('bar' => 'test'))); - $c->setPath('foo/bar', 'hi'); - $this->assertEquals('hi', $c['foo']['bar']); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - */ - public function testVerifiesNestedPathIsValidAtExactLevel() - { - $c = new Collection(array('foo' => 'bar')); - $c->setPath('foo/bar', 'hi'); - $this->assertEquals('hi', $c['foo']['bar']); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - */ - public function testVerifiesThatNestedPathIsValidAtAnyLevel() - { - $c = new Collection(array('foo' => 'bar')); - $c->setPath('foo/bar/baz', 'test'); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/EventTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/EventTest.php deleted file mode 100644 index 5484e1446..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/EventTest.php +++ /dev/null @@ -1,62 +0,0 @@ - '123', - 'other' => '456', - 'event' => 'test.notify' - )); - } - - public function testAllowsParameterInjection() - { - $event = new Event(array( - 'test' => '123' - )); - $this->assertEquals('123', $event['test']); - } - - public function testImplementsArrayAccess() - { - $event = $this->getEvent(); - $this->assertEquals('123', $event['test']); - $this->assertNull($event['foobar']); - - $this->assertTrue($event->offsetExists('test')); - $this->assertFalse($event->offsetExists('foobar')); - - unset($event['test']); - $this->assertFalse($event->offsetExists('test')); - - $event['test'] = 'new'; - $this->assertEquals('new', $event['test']); - } - - public function testImplementsIteratorAggregate() - { - $event = $this->getEvent(); - $this->assertInstanceOf('ArrayIterator', $event->getIterator()); - } - - public function testConvertsToArray() - { - $this->assertEquals(array( - 'test' => '123', - 'other' => '456', - 'event' => 'test.notify' - ), $this->getEvent()->toArray()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php deleted file mode 100644 index c72a2a637..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php +++ /dev/null @@ -1,21 +0,0 @@ -getMock('Guzzle\Batch\BatchTransferInterface'); - $d = $this->getMock('Guzzle\Batch\BatchDivisorInterface'); - $transferException = new BatchTransferException(array('foo'), array(1, 2), $e, $t, $d); - $this->assertEquals(array('foo'), $transferException->getBatch()); - $this->assertSame($t, $transferException->getTransferStrategy()); - $this->assertSame($d, $transferException->getDivisorStrategy()); - $this->assertSame($e, $transferException->getPrevious()); - $this->assertEquals(array(1, 2), $transferException->getTransferredItems()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php deleted file mode 100644 index 2aecf2a06..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php +++ /dev/null @@ -1,66 +0,0 @@ -getExceptions(); - $e->add($exceptions[0]); - $e->add($exceptions[1]); - $this->assertContains("(Exception) ./tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php line ", $e->getMessage()); - $this->assertContains(" Test\n\n #0 ./", $e->getMessage()); - $this->assertSame($exceptions[0], $e->getFirst()); - } - - public function testCanSetExceptions() - { - $ex = new \Exception('foo'); - $e = new ExceptionCollection(); - $e->setExceptions(array($ex)); - $this->assertSame($ex, $e->getFirst()); - } - - public function testActsAsArray() - { - $e = new ExceptionCollection(); - $exceptions = $this->getExceptions(); - $e->add($exceptions[0]); - $e->add($exceptions[1]); - $this->assertEquals(2, count($e)); - $this->assertEquals($exceptions, $e->getIterator()->getArrayCopy()); - } - - public function testCanAddSelf() - { - $e1 = new ExceptionCollection(); - $e1->add(new \Exception("Test")); - $e2 = new ExceptionCollection('Meta description!'); - $e2->add(new \Exception("Test 2")); - $e3 = new ExceptionCollection(); - $e3->add(new \Exception('Baz')); - $e2->add($e3); - $e1->add($e2); - $message = $e1->getMessage(); - $this->assertContains("(Exception) ./tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php line ", $message); - $this->assertContains("\n Test\n\n #0 ", $message); - $this->assertContains("\n\n(Guzzle\\Common\\Exception\\ExceptionCollection) ./tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php line ", $message); - $this->assertContains("\n\n Meta description!\n\n", $message); - $this->assertContains(" (Exception) ./tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php line ", $message); - $this->assertContains("\n Test 2\n\n #0 ", $message); - $this->assertContains(" (Exception) ./tests/Guzzle/Tests/Common/Exception/ExceptionCollectionTest.php line ", $message); - $this->assertContains(" Baz\n\n #0", $message); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/VersionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/VersionTest.php deleted file mode 100644 index c3a81d1e4..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/VersionTest.php +++ /dev/null @@ -1,27 +0,0 @@ -isRunning()) { - self::$server->flush(); - } else { - self::$server->start(); - } - } - - return self::$server; - } - - /** - * Set the service builder to use for tests - * - * @param ServiceBuilderInterface $builder Service builder - */ - public static function setServiceBuilder(ServiceBuilderInterface $builder) - { - self::$serviceBuilder = $builder; - } - - /** - * Get a service builder object that can be used throughout the service tests - * - * @return ServiceBuilder - */ - public static function getServiceBuilder() - { - if (!self::$serviceBuilder) { - throw new RuntimeException('No service builder has been set via setServiceBuilder()'); - } - - return self::$serviceBuilder; - } - - /** - * Check if an event dispatcher has a subscriber - * - * @param HasDispatcherInterface $dispatcher - * @param EventSubscriberInterface $subscriber - * - * @return bool - */ - protected function hasSubscriber(HasDispatcherInterface $dispatcher, EventSubscriberInterface $subscriber) - { - $class = get_class($subscriber); - $all = array_keys(call_user_func(array($class, 'getSubscribedEvents'))); - - foreach ($all as $i => $event) { - foreach ($dispatcher->getEventDispatcher()->getListeners($event) as $e) { - if ($e[0] === $subscriber) { - unset($all[$i]); - break; - } - } - } - - return count($all) == 0; - } - - /** - * Get a wildcard observer for an event dispatcher - * - * @param HasDispatcherInterface $hasEvent - * - * @return MockObserver - */ - public function getWildcardObserver(HasDispatcherInterface $hasDispatcher) - { - $class = get_class($hasDispatcher); - $o = new MockObserver(); - $events = call_user_func(array($class, 'getAllEvents')); - foreach ($events as $event) { - $hasDispatcher->getEventDispatcher()->addListener($event, array($o, 'update')); - } - - return $o; - } - - /** - * Set the mock response base path - * - * @param string $path Path to mock response folder - * - * @return GuzzleTestCase - */ - public static function setMockBasePath($path) - { - self::$mockBasePath = $path; - } - - /** - * Mark a request as being mocked - * - * @param RequestInterface $request - * - * @return self - */ - public function addMockedRequest(RequestInterface $request) - { - $this->requests[] = $request; - - return $this; - } - - /** - * Get all of the mocked requests - * - * @return array - */ - public function getMockedRequests() - { - return $this->requests; - } - - /** - * Get a mock response for a client by mock file name - * - * @param string $path Relative path to the mock response file - * - * @return Response - */ - public function getMockResponse($path) - { - return $path instanceof Response - ? $path - : MockPlugin::getMockFile(self::$mockBasePath . DIRECTORY_SEPARATOR . $path); - } - - /** - * Set a mock response from a mock file on the next client request. - * - * This method assumes that mock response files are located under the - * Command/Mock/ directory of the Service being tested - * (e.g. Unfuddle/Command/Mock/). A mock response is added to the next - * request sent by the client. - * - * @param Client $client Client object to modify - * @param string $paths Path to files within the Mock folder of the service - * - * @return MockPlugin returns the created mock plugin - */ - public function setMockResponse(Client $client, $paths) - { - $this->requests = array(); - $that = $this; - $mock = new MockPlugin(null, true); - $client->getEventDispatcher()->removeSubscriber($mock); - $mock->getEventDispatcher()->addListener('mock.request', function(Event $event) use ($that) { - $that->addMockedRequest($event['request']); - }); - - if ($paths instanceof Response) { - // A single response instance has been specified, create an array with that instance - // as the only element for the following loop to work as expected - $paths = array($paths); - } - - foreach ((array) $paths as $path) { - $mock->addResponse($this->getMockResponse($path)); - } - - $client->getEventDispatcher()->addSubscriber($mock); - - return $mock; - } - - /** - * Compare HTTP headers and use special markup to filter values - * A header prefixed with '!' means it must not exist - * A header prefixed with '_' means it must be ignored - * A header value of '*' means anything after the * will be ignored - * - * @param array $filteredHeaders Array of special headers - * @param array $actualHeaders Array of headers to check against - * - * @return array|bool Returns an array of the differences or FALSE if none - */ - public function compareHeaders($filteredHeaders, $actualHeaders) - { - $comparison = new HeaderComparison(); - - return $comparison->compare($filteredHeaders, $actualHeaders); - } - - /** - * Case insensitive assertContains - * - * @param string $needle Search string - * @param string $haystack Search this - * @param string $message Optional failure message - */ - public function assertContainsIns($needle, $haystack, $message = null) - { - $this->assertContains(strtolower($needle), strtolower($haystack), $message); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/AbstractEntityBodyDecoratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/AbstractEntityBodyDecoratorTest.php deleted file mode 100644 index 20feaa875..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/AbstractEntityBodyDecoratorTest.php +++ /dev/null @@ -1,34 +0,0 @@ -getMockForAbstractClass('Guzzle\Http\AbstractEntityBodyDecorator', array($e)); - - $this->assertSame($e->getStream(), $mock->getStream()); - $this->assertSame($e->getContentLength(), $mock->getContentLength()); - $this->assertSame($e->getSize(), $mock->getSize()); - $this->assertSame($e->getContentMd5(), $mock->getContentMd5()); - $this->assertSame($e->getContentType(), $mock->getContentType()); - $this->assertSame($e->__toString(), $mock->__toString()); - $this->assertSame($e->getUri(), $mock->getUri()); - $this->assertSame($e->getStreamType(), $mock->getStreamType()); - $this->assertSame($e->getWrapper(), $mock->getWrapper()); - $this->assertSame($e->getWrapperData(), $mock->getWrapperData()); - $this->assertSame($e->isReadable(), $mock->isReadable()); - $this->assertSame($e->isWritable(), $mock->isWritable()); - $this->assertSame($e->isConsumed(), $mock->isConsumed()); - $this->assertSame($e->isLocal(), $mock->isLocal()); - $this->assertSame($e->isSeekable(), $mock->isSeekable()); - $this->assertSame($e->getContentEncoding(), $mock->getContentEncoding()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/CachingEntityBodyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/CachingEntityBodyTest.php deleted file mode 100644 index e6e6cdbf5..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/CachingEntityBodyTest.php +++ /dev/null @@ -1,249 +0,0 @@ -decorated = EntityBody::factory('testing'); - $this->body = new CachingEntityBody($this->decorated); - } - - public function testUsesRemoteSizeIfPossible() - { - $body = EntityBody::factory('test'); - $caching = new CachingEntityBody($body); - $this->assertEquals(4, $caching->getSize()); - $this->assertEquals(4, $caching->getContentLength()); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - * @expectedExceptionMessage does not support custom stream rewind - */ - public function testDoesNotAllowRewindFunction() - { - $this->body->setRewindFunction(true); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - * @expectedExceptionMessage Cannot seek to byte 10 - */ - public function testCannotSeekPastWhatHasBeenRead() - { - $this->body->seek(10); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - * @expectedExceptionMessage supports only SEEK_SET and SEEK_CUR - */ - public function testCannotUseSeekEnd() - { - $this->body->seek(2, SEEK_END); - } - - public function testChangingUnderlyingStreamUpdatesSizeAndStream() - { - $size = filesize(__FILE__); - $s = fopen(__FILE__, 'r'); - $this->body->setStream($s, $size); - $this->assertEquals($size, $this->body->getSize()); - $this->assertEquals($size, $this->decorated->getSize()); - $this->assertSame($s, $this->body->getStream()); - $this->assertSame($s, $this->decorated->getStream()); - } - - public function testRewindUsesSeek() - { - $a = EntityBody::factory('foo'); - $d = $this->getMockBuilder('Guzzle\Http\CachingEntityBody') - ->setMethods(array('seek')) - ->setConstructorArgs(array($a)) - ->getMock(); - $d->expects($this->once()) - ->method('seek') - ->with(0) - ->will($this->returnValue(true)); - $d->rewind(); - } - - public function testCanSeekToReadBytes() - { - $this->assertEquals('te', $this->body->read(2)); - $this->body->seek(0); - $this->assertEquals('test', $this->body->read(4)); - $this->assertEquals(4, $this->body->ftell()); - $this->body->seek(2); - $this->assertEquals(2, $this->body->ftell()); - $this->body->seek(2, SEEK_CUR); - $this->assertEquals(4, $this->body->ftell()); - $this->assertEquals('ing', $this->body->read(3)); - } - - public function testWritesToBufferStream() - { - $this->body->read(2); - $this->body->write('hi'); - $this->body->rewind(); - $this->assertEquals('tehiing', (string) $this->body); - } - - public function testReadLinesFromBothStreams() - { - $this->body->seek($this->body->ftell()); - $this->body->write("test\n123\nhello\n1234567890\n"); - $this->body->rewind(); - $this->assertEquals("test\n", $this->body->readLine(7)); - $this->assertEquals("123\n", $this->body->readLine(7)); - $this->assertEquals("hello\n", $this->body->readLine(7)); - $this->assertEquals("123456", $this->body->readLine(7)); - $this->assertEquals("7890\n", $this->body->readLine(7)); - // We overwrote the decorated stream, so no more data - $this->assertEquals('', $this->body->readLine(7)); - } - - public function testSkipsOverwrittenBytes() - { - $decorated = EntityBody::factory( - implode("\n", array_map(function ($n) { - return str_pad($n, 4, '0', STR_PAD_LEFT); - }, range(0, 25))) - ); - - $body = new CachingEntityBody($decorated); - - $this->assertEquals("0000\n", $body->readLine()); - $this->assertEquals("0001\n", $body->readLine()); - // Write over part of the body yet to be read, so skip some bytes - $this->assertEquals(5, $body->write("TEST\n")); - $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes')); - // Read, which skips bytes, then reads - $this->assertEquals("0003\n", $body->readLine()); - $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes')); - $this->assertEquals("0004\n", $body->readLine()); - $this->assertEquals("0005\n", $body->readLine()); - - // Overwrite part of the cached body (so don't skip any bytes) - $body->seek(5); - $this->assertEquals(5, $body->write("ABCD\n")); - $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes')); - $this->assertEquals("TEST\n", $body->readLine()); - $this->assertEquals("0003\n", $body->readLine()); - $this->assertEquals("0004\n", $body->readLine()); - $this->assertEquals("0005\n", $body->readLine()); - $this->assertEquals("0006\n", $body->readLine()); - $this->assertEquals(5, $body->write("1234\n")); - $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes')); - - // Seek to 0 and ensure the overwritten bit is replaced - $body->rewind(); - $this->assertEquals("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", $body->read(50)); - - // Ensure that casting it to a string does not include the bit that was overwritten - $this->assertContains("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", (string) $body); - } - - public function testWrapsContentType() - { - $a = $this->getMockBuilder('Guzzle\Http\EntityBody') - ->setMethods(array('getContentType')) - ->setConstructorArgs(array(fopen(__FILE__, 'r'))) - ->getMock(); - $a->expects($this->once()) - ->method('getContentType') - ->will($this->returnValue('foo')); - $d = new CachingEntityBody($a); - $this->assertEquals('foo', $d->getContentType()); - } - - public function testWrapsContentEncoding() - { - $a = $this->getMockBuilder('Guzzle\Http\EntityBody') - ->setMethods(array('getContentEncoding')) - ->setConstructorArgs(array(fopen(__FILE__, 'r'))) - ->getMock(); - $a->expects($this->once()) - ->method('getContentEncoding') - ->will($this->returnValue('foo')); - $d = new CachingEntityBody($a); - $this->assertEquals('foo', $d->getContentEncoding()); - } - - public function testWrapsMetadata() - { - $a = $this->getMockBuilder('Guzzle\Http\EntityBody') - ->setMethods(array('getMetadata', 'getWrapper', 'getWrapperData', 'getStreamType', 'getUri')) - ->setConstructorArgs(array(fopen(__FILE__, 'r'))) - ->getMock(); - - $a->expects($this->once()) - ->method('getMetadata') - ->will($this->returnValue(array())); - // Called twice for getWrapper and getWrapperData - $a->expects($this->exactly(1)) - ->method('getWrapper') - ->will($this->returnValue('wrapper')); - $a->expects($this->once()) - ->method('getWrapperData') - ->will($this->returnValue(array())); - $a->expects($this->once()) - ->method('getStreamType') - ->will($this->returnValue('baz')); - $a->expects($this->once()) - ->method('getUri') - ->will($this->returnValue('path/to/foo')); - - $d = new CachingEntityBody($a); - $this->assertEquals(array(), $d->getMetaData()); - $this->assertEquals('wrapper', $d->getWrapper()); - $this->assertEquals(array(), $d->getWrapperData()); - $this->assertEquals('baz', $d->getStreamType()); - $this->assertEquals('path/to/foo', $d->getUri()); - } - - public function testWrapsCustomData() - { - $a = $this->getMockBuilder('Guzzle\Http\EntityBody') - ->setMethods(array('getCustomData', 'setCustomData')) - ->setConstructorArgs(array(fopen(__FILE__, 'r'))) - ->getMock(); - - $a->expects($this->exactly(1)) - ->method('getCustomData') - ->with('foo') - ->will($this->returnValue('bar')); - - $a->expects($this->exactly(1)) - ->method('setCustomData') - ->with('foo', 'bar') - ->will($this->returnSelf()); - - $d = new CachingEntityBody($a); - $this->assertSame($d, $d->setCustomData('foo', 'bar')); - $this->assertEquals('bar', $d->getCustomData('foo')); - } - - public function testClosesBothStreams() - { - $s = fopen('php://temp', 'r'); - $a = EntityBody::factory($s); - $d = new CachingEntityBody($a); - $d->close(); - $this->assertFalse(is_resource($s)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/ClientTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/ClientTest.php deleted file mode 100644 index 6814cacec..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/ClientTest.php +++ /dev/null @@ -1,592 +0,0 @@ -assertEquals('http://www.google.com/', $client->getBaseUrl()); - $this->assertSame($client, $client->setConfig(array( - 'test' => '123' - ))); - $this->assertEquals(array('test' => '123'), $client->getConfig()->getAll()); - $this->assertEquals('123', $client->getConfig('test')); - $this->assertSame($client, $client->setBaseUrl('http://www.test.com/{test}')); - $this->assertEquals('http://www.test.com/123', $client->getBaseUrl()); - $this->assertEquals('http://www.test.com/{test}', $client->getBaseUrl(false)); - - try { - $client->setConfig(false); - } catch (\InvalidArgumentException $e) { - } - } - - public function testDescribesEvents() - { - $this->assertEquals(array('client.create_request'), Client::getAllEvents()); - } - - public function testConstructorCanAcceptConfig() - { - $client = new Client('http://www.test.com/', array( - 'data' => '123' - )); - $this->assertEquals('123', $client->getConfig('data')); - } - - public function testCanUseCollectionAsConfig() - { - $client = new Client('http://www.google.com/'); - $client->setConfig(new Collection(array( - 'api' => 'v1', - 'key' => 'value', - 'base_url' => 'http://www.google.com/' - ))); - $this->assertEquals('v1', $client->getConfig('api')); - } - - public function testExpandsUriTemplatesUsingConfig() - { - $client = new Client('http://www.google.com/'); - $client->setConfig(array('api' => 'v1', 'key' => 'value', 'foo' => 'bar')); - $ref = new \ReflectionMethod($client, 'expandTemplate'); - $ref->setAccessible(true); - $this->assertEquals('Testing...api/v1/key/value', $ref->invoke($client, 'Testing...api/{api}/key/{key}')); - } - - public function testClientAttachersObserversToRequests() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - - $client = new Client($this->getServer()->getUrl()); - $logPlugin = $this->getLogPlugin(); - $client->getEventDispatcher()->addSubscriber($logPlugin); - - // Get a request from the client and ensure the the observer was - // attached to the new request - $request = $client->createRequest(); - $this->assertTrue($this->hasSubscriber($request, $logPlugin)); - } - - public function testClientReturnsValidBaseUrls() - { - $client = new Client('http://www.{foo}.{data}/', array( - 'data' => '123', - 'foo' => 'bar' - )); - $this->assertEquals('http://www.bar.123/', $client->getBaseUrl()); - $client->setBaseUrl('http://www.google.com/'); - $this->assertEquals('http://www.google.com/', $client->getBaseUrl()); - } - - public function testClientAddsCurlOptionsToRequests() - { - $client = new Client('http://www.test.com/', array( - 'api' => 'v1', - // Adds the option using the curl values - 'curl.options' => array( - 'CURLOPT_HTTPAUTH' => 'CURLAUTH_DIGEST', - 'abc' => 'foo', - 'blacklist' => 'abc', - 'debug' => true - ) - )); - - $request = $client->createRequest(); - $options = $request->getCurlOptions(); - $this->assertEquals(CURLAUTH_DIGEST, $options->get(CURLOPT_HTTPAUTH)); - $this->assertEquals('foo', $options->get('abc')); - $this->assertEquals('abc', $options->get('blacklist')); - } - - public function testClientAllowsFineGrainedSslControlButIsSecureByDefault() - { - $client = new Client('https://www.secure.com/'); - - // secure by default - $request = $client->createRequest(); - $options = $request->getCurlOptions(); - $this->assertTrue($options->get(CURLOPT_SSL_VERIFYPEER)); - - // set a capath if you prefer - $client = new Client('https://www.secure.com/'); - $client->setSslVerification(__DIR__); - $request = $client->createRequest(); - $options = $request->getCurlOptions(); - $this->assertSame(__DIR__, $options->get(CURLOPT_CAPATH)); - } - - public function testConfigSettingsControlSslConfiguration() - { - // Use the default ca certs on the system - $client = new Client('https://www.secure.com/', array('ssl.certificate_authority' => 'system')); - $this->assertNull($client->getConfig('curl.options')); - // Can set the cacert value as well - $client = new Client('https://www.secure.com/', array('ssl.certificate_authority' => false)); - $options = $client->getConfig('curl.options'); - $this->assertArrayNotHasKey(CURLOPT_CAINFO, $options); - $this->assertSame(false, $options[CURLOPT_SSL_VERIFYPEER]); - $this->assertSame(0, $options[CURLOPT_SSL_VERIFYHOST]); - } - - public function testClientAllowsUnsafeOperationIfRequested() - { - // be really unsafe if you insist - $client = new Client('https://www.secure.com/', array( - 'api' => 'v1' - )); - - $client->setSslVerification(false); - $request = $client->createRequest(); - $options = $request->getCurlOptions(); - $this->assertFalse($options->get(CURLOPT_SSL_VERIFYPEER)); - $this->assertNull($options->get(CURLOPT_CAINFO)); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - */ - public function testThrowsExceptionForInvalidCertificate() - { - $client = new Client('https://www.secure.com/'); - $client->setSslVerification('/path/to/missing/file'); - } - - public function testClientAllowsSettingSpecificSslCaInfo() - { - // set a file other than the provided cacert.pem - $client = new Client('https://www.secure.com/', array( - 'api' => 'v1' - )); - - $client->setSslVerification(__FILE__); - $request = $client->createRequest(); - $options = $request->getCurlOptions(); - $this->assertSame(__FILE__, $options->get(CURLOPT_CAINFO)); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testClientPreventsInadvertentInsecureVerifyHostSetting() - { - // set a file other than the provided cacert.pem - $client = new Client('https://www.secure.com/', array( - 'api' => 'v1' - )); - $client->setSslVerification(__FILE__, true, true); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testClientPreventsInvalidVerifyPeerSetting() - { - // set a file other than the provided cacert.pem - $client = new Client('https://www.secure.com/', array( - 'api' => 'v1' - )); - $client->setSslVerification(__FILE__, 'yes'); - } - - public function testClientAddsParamsToRequests() - { - Version::$emitWarnings = false; - $client = new Client('http://www.example.com', array( - 'api' => 'v1', - 'request.params' => array( - 'foo' => 'bar', - 'baz' => 'jar' - ) - )); - $request = $client->createRequest(); - $this->assertEquals('bar', $request->getParams()->get('foo')); - $this->assertEquals('jar', $request->getParams()->get('baz')); - Version::$emitWarnings = true; - } - - public function urlProvider() - { - $u = $this->getServer()->getUrl() . 'base/'; - $u2 = $this->getServer()->getUrl() . 'base?z=1'; - return array( - array($u, '', $u), - array($u, 'relative/path/to/resource', $u . 'relative/path/to/resource'), - array($u, 'relative/path/to/resource?a=b&c=d', $u . 'relative/path/to/resource?a=b&c=d'), - array($u, '/absolute/path/to/resource', $this->getServer()->getUrl() . 'absolute/path/to/resource'), - array($u, '/absolute/path/to/resource?a=b&c=d', $this->getServer()->getUrl() . 'absolute/path/to/resource?a=b&c=d'), - array($u2, '/absolute/path/to/resource?a=b&c=d', $this->getServer()->getUrl() . 'absolute/path/to/resource?a=b&c=d&z=1'), - array($u2, 'relative/path/to/resource', $this->getServer()->getUrl() . 'base/relative/path/to/resource?z=1'), - array($u2, 'relative/path/to/resource?another=query', $this->getServer()->getUrl() . 'base/relative/path/to/resource?another=query&z=1') - ); - } - - /** - * @dataProvider urlProvider - */ - public function testBuildsRelativeUrls($baseUrl, $url, $result) - { - $client = new Client($baseUrl); - $this->assertEquals($result, $client->get($url)->getUrl()); - } - - public function testAllowsConfigsToBeChangedAndInjectedInBaseUrl() - { - $client = new Client('http://{a}/{b}'); - $this->assertEquals('http:///', $client->getBaseUrl()); - $this->assertEquals('http://{a}/{b}', $client->getBaseUrl(false)); - $client->setConfig(array( - 'a' => 'test.com', - 'b' => 'index.html' - )); - $this->assertEquals('http://test.com/index.html', $client->getBaseUrl()); - } - - public function testCreatesRequestsWithDefaultValues() - { - $client = new Client($this->getServer()->getUrl() . 'base'); - - // Create a GET request - $request = $client->createRequest(); - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals($client->getBaseUrl(), $request->getUrl()); - - // Create a DELETE request - $request = $client->createRequest('DELETE'); - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals($client->getBaseUrl(), $request->getUrl()); - - // Create a HEAD request with custom headers - $request = $client->createRequest('HEAD', 'http://www.test.com/'); - $this->assertEquals('HEAD', $request->getMethod()); - $this->assertEquals('http://www.test.com/', $request->getUrl()); - - // Create a PUT request - $request = $client->createRequest('PUT'); - $this->assertEquals('PUT', $request->getMethod()); - - // Create a PUT request with injected config - $client->getConfig()->set('a', 1)->set('b', 2); - $request = $client->createRequest('PUT', '/path/{a}?q={b}'); - $this->assertEquals($request->getUrl(), $this->getServer()->getUrl() . 'path/1?q=2'); - } - - public function testClientHasHelperMethodsForCreatingRequests() - { - $url = $this->getServer()->getUrl(); - $client = new Client($url . 'base'); - $this->assertEquals('GET', $client->get()->getMethod()); - $this->assertEquals('PUT', $client->put()->getMethod()); - $this->assertEquals('POST', $client->post()->getMethod()); - $this->assertEquals('HEAD', $client->head()->getMethod()); - $this->assertEquals('DELETE', $client->delete()->getMethod()); - $this->assertEquals('OPTIONS', $client->options()->getMethod()); - $this->assertEquals('PATCH', $client->patch()->getMethod()); - $this->assertEquals($url . 'base/abc', $client->get('abc')->getUrl()); - $this->assertEquals($url . 'zxy', $client->put('/zxy')->getUrl()); - $this->assertEquals($url . 'zxy?a=b', $client->post('/zxy?a=b')->getUrl()); - $this->assertEquals($url . 'base?a=b', $client->head('?a=b')->getUrl()); - $this->assertEquals($url . 'base?a=b', $client->delete('/base?a=b')->getUrl()); - } - - public function testClientInjectsConfigsIntoUrls() - { - $client = new Client('http://www.test.com/api/v1', array( - 'test' => '123' - )); - $request = $client->get('relative/{test}'); - $this->assertEquals('http://www.test.com/api/v1/relative/123', $request->getUrl()); - } - - public function testAllowsEmptyBaseUrl() - { - $client = new Client(); - $request = $client->get('http://www.google.com/'); - $this->assertEquals('http://www.google.com/', $request->getUrl()); - $request->setResponse(new Response(200), true); - $request->send(); - } - - public function testAllowsCustomCurlMultiObjects() - { - $mock = $this->getMock('Guzzle\\Http\\Curl\\CurlMulti', array('add', 'send')); - $mock->expects($this->once()) - ->method('add') - ->will($this->returnSelf()); - $mock->expects($this->once()) - ->method('send') - ->will($this->returnSelf()); - - $client = new Client(); - $client->setCurlMulti($mock); - - $request = $client->get(); - $request->setResponse(new Response(200), true); - $client->send($request); - } - - public function testClientSendsMultipleRequests() - { - $client = new Client($this->getServer()->getUrl()); - $mock = new MockPlugin(); - - $responses = array( - new Response(200), - new Response(201), - new Response(202) - ); - - $mock->addResponse($responses[0]); - $mock->addResponse($responses[1]); - $mock->addResponse($responses[2]); - - $client->getEventDispatcher()->addSubscriber($mock); - - $requests = array( - $client->get(), - $client->head(), - $client->put('/', null, 'test') - ); - - $this->assertEquals(array( - $responses[0], - $responses[1], - $responses[2] - ), $client->send($requests)); - } - - public function testClientSendsSingleRequest() - { - $client = new Client($this->getServer()->getUrl()); - $mock = new MockPlugin(); - $response = new Response(200); - $mock->addResponse($response); - $client->getEventDispatcher()->addSubscriber($mock); - $this->assertEquals($response, $client->send($client->get())); - } - - /** - * @expectedException \Guzzle\Http\Exception\BadResponseException - */ - public function testClientThrowsExceptionForSingleRequest() - { - $client = new Client($this->getServer()->getUrl()); - $mock = new MockPlugin(); - $response = new Response(404); - $mock->addResponse($response); - $client->getEventDispatcher()->addSubscriber($mock); - $client->send($client->get()); - } - - /** - * @expectedException \Guzzle\Common\Exception\ExceptionCollection - */ - public function testClientThrowsExceptionForMultipleRequests() - { - $client = new Client($this->getServer()->getUrl()); - $mock = new MockPlugin(); - $mock->addResponse(new Response(200)); - $mock->addResponse(new Response(404)); - $client->getEventDispatcher()->addSubscriber($mock); - $client->send(array($client->get(), $client->head())); - } - - public function testQueryStringsAreNotDoubleEncoded() - { - $client = new Client('http://test.com', array( - 'path' => array('foo', 'bar'), - 'query' => 'hi there', - 'data' => array( - 'test' => 'a&b' - ) - )); - - $request = $client->get('{/path*}{?query,data*}'); - $this->assertEquals('http://test.com/foo/bar?query=hi%20there&test=a%26b', $request->getUrl()); - $this->assertEquals('hi there', $request->getQuery()->get('query')); - $this->assertEquals('a&b', $request->getQuery()->get('test')); - } - - public function testQueryStringsAreNotDoubleEncodedUsingAbsolutePaths() - { - $client = new Client('http://test.com', array( - 'path' => array('foo', 'bar'), - 'query' => 'hi there', - )); - $request = $client->get('http://test.com{?query}'); - $this->assertEquals('http://test.com?query=hi%20there', $request->getUrl()); - $this->assertEquals('hi there', $request->getQuery()->get('query')); - } - - public function testAllowsUriTemplateInjection() - { - $client = new Client('http://test.com'); - $ref = new \ReflectionMethod($client, 'getUriTemplate'); - $ref->setAccessible(true); - $a = $ref->invoke($client); - $this->assertSame($a, $ref->invoke($client)); - $client->setUriTemplate(new UriTemplate()); - $this->assertNotSame($a, $ref->invoke($client)); - } - - public function testAllowsCustomVariablesWhenExpandingTemplates() - { - $client = new Client('http://test.com', array('test' => 'hi')); - $ref = new \ReflectionMethod($client, 'expandTemplate'); - $ref->setAccessible(true); - $uri = $ref->invoke($client, 'http://{test}{?query*}', array('query' => array('han' => 'solo'))); - $this->assertEquals('http://hi?han=solo', $uri); - } - - public function testUriArrayAllowsCustomTemplateVariables() - { - $client = new Client(); - $vars = array( - 'var' => 'hi' - ); - $this->assertEquals('/hi', (string) $client->createRequest('GET', array('/{var}', $vars))->getUrl()); - $this->assertEquals('/hi', (string) $client->get(array('/{var}', $vars))->getUrl()); - $this->assertEquals('/hi', (string) $client->put(array('/{var}', $vars))->getUrl()); - $this->assertEquals('/hi', (string) $client->post(array('/{var}', $vars))->getUrl()); - $this->assertEquals('/hi', (string) $client->head(array('/{var}', $vars))->getUrl()); - $this->assertEquals('/hi', (string) $client->options(array('/{var}', $vars))->getUrl()); - } - - public function testAllowsDefaultHeaders() - { - Version::$emitWarnings = false; - $default = array('X-Test' => 'Hi!'); - $other = array('X-Other' => 'Foo'); - - $client = new Client(); - $client->setDefaultHeaders($default); - $this->assertEquals($default, $client->getDefaultHeaders()->getAll()); - $client->setDefaultHeaders(new Collection($default)); - $this->assertEquals($default, $client->getDefaultHeaders()->getAll()); - - $request = $client->createRequest('GET', null, $other); - $this->assertEquals('Hi!', $request->getHeader('X-Test')); - $this->assertEquals('Foo', $request->getHeader('X-Other')); - - $request = $client->createRequest('GET', null, new Collection($other)); - $this->assertEquals('Hi!', $request->getHeader('X-Test')); - $this->assertEquals('Foo', $request->getHeader('X-Other')); - - $request = $client->createRequest('GET'); - $this->assertEquals('Hi!', $request->getHeader('X-Test')); - Version::$emitWarnings = true; - } - - public function testDontReuseCurlMulti() - { - $client1 = new Client(); - $client2 = new Client(); - $this->assertNotSame($client1->getCurlMulti(), $client2->getCurlMulti()); - } - - public function testGetDefaultUserAgent() - { - $client = new Client(); - $agent = $this->readAttribute($client, 'userAgent'); - $version = curl_version(); - $testAgent = sprintf('Guzzle/%s curl/%s PHP/%s', Version::VERSION, $version['version'], PHP_VERSION); - $this->assertEquals($agent, $testAgent); - - $client->setUserAgent('foo'); - $this->assertEquals('foo', $this->readAttribute($client, 'userAgent')); - } - - public function testOverwritesUserAgent() - { - $client = new Client(); - $request = $client->createRequest('GET', 'http://www.foo.com', array('User-agent' => 'foo')); - $this->assertEquals('foo', (string) $request->getHeader('User-Agent')); - } - - public function testUsesDefaultUserAgent() - { - $client = new Client(); - $request = $client->createRequest('GET', 'http://www.foo.com'); - $this->assertContains('Guzzle/', (string) $request->getHeader('User-Agent')); - } - - public function testCanSetDefaultRequestOptions() - { - $client = new Client(); - $client->getConfig()->set('request.options', array( - 'query' => array('test' => '123', 'other' => 'abc'), - 'headers' => array('Foo' => 'Bar', 'Baz' => 'Bam') - )); - $request = $client->createRequest('GET', 'http://www.foo.com?test=hello', array('Foo' => 'Test')); - // Explicit options on a request should overrule default options - $this->assertEquals('Test', (string) $request->getHeader('Foo')); - $this->assertEquals('hello', $request->getQuery()->get('test')); - // Default options should still be set - $this->assertEquals('abc', $request->getQuery()->get('other')); - $this->assertEquals('Bam', (string) $request->getHeader('Baz')); - } - - public function testCanSetSetOptionsOnRequests() - { - $client = new Client(); - $request = $client->createRequest('GET', 'http://www.foo.com?test=hello', array('Foo' => 'Test'), null, array( - 'cookies' => array('michael' => 'test') - )); - $this->assertEquals('test', $request->getCookie('michael')); - } - - public function testHasDefaultOptionsHelperMethods() - { - $client = new Client(); - // With path - $client->setDefaultOption('headers/foo', 'bar'); - $this->assertEquals('bar', $client->getDefaultOption('headers/foo')); - // With simple key - $client->setDefaultOption('allow_redirects', false); - $this->assertFalse($client->getDefaultOption('allow_redirects')); - - $this->assertEquals(array( - 'headers' => array('foo' => 'bar'), - 'allow_redirects' => false - ), $client->getConfig('request.options')); - - $request = $client->get('/'); - $this->assertEquals('bar', $request->getHeader('foo')); - } - - public function testHeadCanUseOptions() - { - $client = new Client(); - $head = $client->head('http://www.foo.com', array(), array('query' => array('foo' => 'bar'))); - $this->assertEquals('bar', $head->getQuery()->get('foo')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlHandleTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlHandleTest.php deleted file mode 100644 index e9eab1d85..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlHandleTest.php +++ /dev/null @@ -1,945 +0,0 @@ -getEventDispatcher()->addListener('request.sent', function (Event $e) use ($that) { - $that->requestHandle = $e['handle']; - }); - - return $request; - } - - public function setUp() - { - $this->requestHandle = null; - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testConstructorExpectsCurlResource() - { - $h = new CurlHandle(false, array()); - } - - public function testConstructorExpectsProperOptions() - { - $h = curl_init($this->getServer()->getUrl()); - try { - $ha = new CurlHandle($h, false); - $this->fail('Expected InvalidArgumentException'); - } catch (\InvalidArgumentException $e) { - } - - $ha = new CurlHandle($h, array( - CURLOPT_URL => $this->getServer()->getUrl() - )); - $this->assertEquals($this->getServer()->getUrl(), $ha->getOptions()->get(CURLOPT_URL)); - - $ha = new CurlHandle($h, new Collection(array( - CURLOPT_URL => $this->getServer()->getUrl() - ))); - $this->assertEquals($this->getServer()->getUrl(), $ha->getOptions()->get(CURLOPT_URL)); - } - - public function testConstructorInitializesObject() - { - $handle = curl_init($this->getServer()->getUrl()); - $h = new CurlHandle($handle, array( - CURLOPT_URL => $this->getServer()->getUrl() - )); - $this->assertSame($handle, $h->getHandle()); - $this->assertInstanceOf('Guzzle\\Http\\Url', $h->getUrl()); - $this->assertEquals($this->getServer()->getUrl(), (string) $h->getUrl()); - $this->assertEquals($this->getServer()->getUrl(), $h->getOptions()->get(CURLOPT_URL)); - } - - public function testStoresStdErr() - { - $request = RequestFactory::getInstance()->create('GET', 'http://test.com'); - $request->getCurlOptions()->set('debug', true); - $h = CurlHandle::factory($request); - $this->assertEquals($h->getStderr(true), $h->getOptions()->get(CURLOPT_STDERR)); - $this->assertInternalType('resource', $h->getStderr(true)); - $this->assertInternalType('string', $h->getStderr(false)); - $r = $h->getStderr(true); - fwrite($r, 'test'); - $this->assertEquals('test', $h->getStderr(false)); - } - - public function testStoresCurlErrorNumber() - { - $h = new CurlHandle(curl_init('http://test.com'), array(CURLOPT_URL => 'http://test.com')); - $this->assertEquals(CURLE_OK, $h->getErrorNo()); - $h->setErrorNo(CURLE_OPERATION_TIMEOUTED); - $this->assertEquals(CURLE_OPERATION_TIMEOUTED, $h->getErrorNo()); - } - - public function testAccountsForMissingStdErr() - { - $handle = curl_init('http://www.test.com/'); - $h = new CurlHandle($handle, array( - CURLOPT_URL => 'http://www.test.com/' - )); - $this->assertNull($h->getStderr(false)); - } - - public function testDeterminesIfResourceIsAvailable() - { - $handle = curl_init($this->getServer()->getUrl()); - $h = new CurlHandle($handle, array()); - $this->assertTrue($h->isAvailable()); - - // Mess it up by closing the handle - curl_close($handle); - $this->assertFalse($h->isAvailable()); - - // Mess it up by unsetting the handle - $handle = null; - $this->assertFalse($h->isAvailable()); - } - - public function testWrapsErrorsAndInfo() - { - if (!defined('CURLOPT_TIMEOUT_MS')) { - $this->markTestSkipped('Update curl'); - } - - $settings = array( - CURLOPT_PORT => 123, - CURLOPT_CONNECTTIMEOUT_MS => 1, - CURLOPT_TIMEOUT_MS => 1 - ); - - $handle = curl_init($this->getServer()->getUrl()); - curl_setopt_array($handle, $settings); - $h = new CurlHandle($handle, $settings); - @curl_exec($handle); - - $errors = array( - "couldn't connect to host", - 'timeout was reached', - 'connection time-out', - 'connect() timed out!' - ); - $this->assertTrue(in_array(strtolower($h->getError()), $errors), $h->getError() . ' was not the error'); - - $this->assertTrue($h->getErrorNo() > 0); - - $this->assertEquals($this->getServer()->getUrl(), $h->getInfo(CURLINFO_EFFECTIVE_URL)); - $this->assertInternalType('array', $h->getInfo()); - - curl_close($handle); - $this->assertEquals(null, $h->getInfo('url')); - } - - public function testGetInfoWithoutDebugMode() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $request = $client->get($this->getServer()->getUrl()); - $response = $request->send(); - - $info = $response->getInfo(); - $this->assertFalse(empty($info)); - $this->assertEquals($this->getServer()->getUrl(), $info['url']); - } - - public function testWrapsCurlOptions() - { - $handle = curl_init($this->getServer()->getUrl()); - $h = new CurlHandle($handle, array( - CURLOPT_AUTOREFERER => true, - CURLOPT_BUFFERSIZE => 1024 - )); - - $this->assertEquals(true, $h->getOptions()->get(CURLOPT_AUTOREFERER)); - $this->assertEquals(1024, $h->getOptions()->get(CURLOPT_BUFFERSIZE)); - } - - /** - * Data provider for factory tests - * - * @return array - */ - public function dataProvider() - { - $testFile = __DIR__ . '/../../../../../phpunit.xml.dist'; - - $postBody = new QueryString(array('file' => '@' . $testFile)); - $qs = new QueryString(array( - 'x' => 'y', - 'z' => 'a' - )); - - $client = new Client(); - $userAgent = $client->getDefaultUserAgent(); - $auth = base64_encode('michael:123'); - $testFileSize = filesize($testFile); - - $tests = array( - // Send a regular GET - array('GET', 'http://www.google.com/', null, null, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_HTTPHEADER => array('Accept:', 'Host: www.google.com', 'User-Agent: ' . $userAgent), - )), - // Test that custom request methods can be used - array('TRACE', 'http://www.google.com/', null, null, array( - CURLOPT_CUSTOMREQUEST => 'TRACE' - )), - // Send a GET using a port - array('GET', 'http://127.0.0.1:8080', null, null, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_PORT => 8080, - CURLOPT_HTTPHEADER => array('Accept:', 'Host: 127.0.0.1:8080', 'User-Agent: ' . $userAgent), - )), - // Send a HEAD request - array('HEAD', 'http://www.google.com/', null, null, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_HTTPHEADER => array('Accept:', 'Host: www.google.com', 'User-Agent: ' . $userAgent), - CURLOPT_NOBODY => 1 - )), - // Send a GET using basic auth - array('GET', 'https://michael:123@localhost/index.html?q=2', null, null, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_HTTPHEADER => array( - 'Accept:', - 'Host: localhost', - 'Authorization: Basic ' . $auth, - 'User-Agent: ' . $userAgent - ), - CURLOPT_PORT => 443 - )), - // Send a GET request with custom headers - array('GET', 'http://localhost:8124/', array( - 'x-test-data' => 'Guzzle' - ), null, array( - CURLOPT_PORT => 8124, - CURLOPT_HTTPHEADER => array( - 'Accept:', - 'Host: localhost:8124', - 'x-test-data: Guzzle', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'x-test-data' => 'Guzzle' - )), - // Send a POST using a query string - array('POST', 'http://localhost:8124/post.php', null, $qs, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_POSTFIELDS => 'x=y&z=a', - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'Content-Type: application/x-www-form-urlencoded; charset=utf-8', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Length' => '7', - '!Expect' => null, - 'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8', - '!Transfer-Encoding' => null - )), - // Send a PUT using raw data - array('PUT', 'http://localhost:8124/put.php', null, EntityBody::factory(fopen($testFile, 'r+')), array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_READFUNCTION => 'callback', - CURLOPT_INFILESIZE => filesize($testFile), - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - '!Expect' => null, - 'Content-Length' => $testFileSize, - '!Transfer-Encoding' => null - )), - // Send a POST request using an array of fields - array('POST', 'http://localhost:8124/post.php', null, array( - 'x' => 'y', - 'a' => 'b' - ), array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_POST => 1, - CURLOPT_POSTFIELDS => 'x=y&a=b', - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'Content-Type: application/x-www-form-urlencoded; charset=utf-8', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Length' => '7', - '!Expect' => null, - 'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8', - '!Transfer-Encoding' => null - )), - // Send a POST request with raw POST data and a custom content-type - array('POST', 'http://localhost:8124/post.php', array( - 'Content-Type' => 'application/json' - ), '{"hi":"there"}', array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_UPLOAD => true, - CURLOPT_INFILESIZE => 14, - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'Content-Type: application/json', - 'User-Agent: ' . $userAgent - ), - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Type' => 'application/json', - '!Expect' => null, - 'Content-Length' => '14', - '!Transfer-Encoding' => null - )), - // Send a POST request with raw POST data, a custom content-type, and use chunked encoding - array('POST', 'http://localhost:8124/post.php', array( - 'Content-Type' => 'application/json', - 'Transfer-Encoding' => 'chunked' - ), '{"hi":"there"}', array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_UPLOAD => true, - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'Transfer-Encoding: chunked', - 'Content-Type: application/json', - 'User-Agent: ' . $userAgent - ), - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Type' => 'application/json', - '!Expect' => null, - 'Transfer-Encoding' => 'chunked', - '!Content-Length' => '' - )), - // Send a POST request with no body - array('POST', 'http://localhost:8124/post.php', null, '', array( - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Length' => '0', - '!Transfer-Encoding' => null - )), - // Send a POST request with empty post fields - array('POST', 'http://localhost:8124/post.php', null, array(), array( - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Length' => '0', - '!Transfer-Encoding' => null - )), - // Send a PATCH request - array('PATCH', 'http://localhost:8124/patch.php', null, 'body', array( - CURLOPT_INFILESIZE => 4, - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'User-Agent: ' . $userAgent - ) - )), - // Send a DELETE request with a body - array('DELETE', 'http://localhost:8124/delete.php', null, 'body', array( - CURLOPT_CUSTOMREQUEST => 'DELETE', - CURLOPT_INFILESIZE => 4, - CURLOPT_HTTPHEADER => array ( - 'Expect:', - 'Accept:', - 'Host: localhost:8124', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Length' => '4', - '!Expect' => null, - '!Transfer-Encoding' => null - )), - - /** - * Send a request with empty path and a fragment - the fragment must be - * stripped out before sending it to curl - * - * @issue 453 - * @link https://github.com/guzzle/guzzle/issues/453 - */ - array('GET', 'http://www.google.com#head', null, null, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_HTTPHEADER => array('Accept:', 'Host: www.google.com', 'User-Agent: ' . $userAgent), - )), - ); - - $postTest = array('POST', 'http://localhost:8124/post.php', null, $postBody, array( - CURLOPT_RETURNTRANSFER => 0, - CURLOPT_HEADER => 0, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_WRITEFUNCTION => 'callback', - CURLOPT_HEADERFUNCTION => 'callback', - CURLOPT_POST => 1, - CURLOPT_POSTFIELDS => array( - 'file' => '@' . $testFile . ';filename=phpunit.xml.dist;type=application/octet-stream' - ), - CURLOPT_HTTPHEADER => array ( - 'Accept:', - 'Host: localhost:8124', - 'Content-Type: multipart/form-data', - 'Expect: 100-Continue', - 'User-Agent: ' . $userAgent - ) - ), array( - 'Host' => '*', - 'User-Agent' => '*', - 'Content-Length' => '*', - 'Expect' => '100-Continue', - 'Content-Type' => 'multipart/form-data; boundary=*', - '!Transfer-Encoding' => null - )); - - if (version_compare(phpversion(), '5.5.0', '>=')) { - $postTest[4][CURLOPT_POSTFIELDS] = array( - 'file' => new \CurlFile($testFile, 'application/octet-stream', 'phpunit.xml.dist') - ); - } - - $tests[] = $postTest; - - return $tests; - } - - /** - * @dataProvider dataProvider - */ - public function testFactoryCreatesCurlBasedOnRequest($method, $url, $headers, $body, $options, $expectedHeaders = null) - { - $client = new Client(); - $request = $client->createRequest($method, $url, $headers, $body); - $request->getCurlOptions()->set('debug', true); - - $originalRequest = clone $request; - $curlTest = clone $request; - $handle = CurlHandle::factory($curlTest); - - $this->assertInstanceOf('Guzzle\\Http\\Curl\\CurlHandle', $handle); - $o = $handle->getOptions()->getAll(); - - // Headers are case-insensitive - if (isset($o[CURLOPT_HTTPHEADER])) { - $o[CURLOPT_HTTPHEADER] = array_map('strtolower', $o[CURLOPT_HTTPHEADER]); - } - if (isset($options[CURLOPT_HTTPHEADER])) { - $options[CURLOPT_HTTPHEADER] = array_map('strtolower', $options[CURLOPT_HTTPHEADER]); - } - - $check = 0; - foreach ($options as $key => $value) { - $check++; - $this->assertArrayHasKey($key, $o, '-> Check number ' . $check); - if ($key != CURLOPT_HTTPHEADER && $key != CURLOPT_POSTFIELDS && (is_array($o[$key])) || $o[$key] instanceof \Closure) { - $this->assertEquals('callback', $value, '-> Check number ' . $check); - } else { - $this->assertTrue($value == $o[$key], '-> Check number ' . $check . ' - ' . var_export($value, true) . ' != ' . var_export($o[$key], true)); - } - } - - // If we are testing the actual sent headers - if ($expectedHeaders) { - - // Send the request to the test server - $client = new Client($this->getServer()->getUrl()); - $request->setClient($client); - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request->send(); - - // Get the request that was sent and create a request that we expected - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals($method, $requests[0]->getMethod()); - - $test = $this->compareHeaders($expectedHeaders, $requests[0]->getHeaders()); - $this->assertFalse($test, $test . "\nSent: \n" . $request . "\n\n" . $requests[0]); - - // Ensure only one Content-Length header is sent - if ($request->getHeader('Content-Length')) { - $this->assertEquals((string) $request->getHeader('Content-Length'), (string) $requests[0]->getHeader('Content-Length')); - } - } - } - - public function testFactoryUsesSpecifiedProtocol() - { - $request = RequestFactory::getInstance()->create('GET', 'http://localhost:8124/'); - $request->setProtocolVersion('1.1'); - $handle = CurlHandle::factory($request); - $options = $handle->getOptions(); - $this->assertEquals(CURL_HTTP_VERSION_1_1, $options[CURLOPT_HTTP_VERSION]); - } - - public function testUploadsPutData() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/'); - $request->getCurlOptions()->set('debug', true); - $request->setBody(EntityBody::factory('test'), 'text/plain', false); - $request->getCurlOptions()->set('progress', true); - - $o = $this->getWildcardObserver($request); - $request->send(); - - // Make sure that the events were dispatched - $this->assertTrue($o->has('curl.callback.progress')); - - // Ensure that the request was received exactly as intended - $r = $this->getServer()->getReceivedRequests(true); - $this->assertFalse($r[0]->hasHeader('Transfer-Encoding')); - $this->assertEquals(4, (string) $r[0]->getHeader('Content-Length')); - $sent = strtolower($r[0]); - $this->assertContains('put / http/1.1', $sent); - $this->assertContains('host: 127.0.0.1', $sent); - $this->assertContains('user-agent:', $sent); - $this->assertContains('content-type: text/plain', $sent); - } - - public function testUploadsPutDataUsingChunkedEncodingWhenLengthCannotBeDetermined() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi" - )); - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/'); - $request->setBody(EntityBody::factory(fopen($this->getServer()->getUrl(), 'r')), 'text/plain'); - $request->send(); - - $r = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('chunked', $r[1]->getHeader('Transfer-Encoding')); - $this->assertFalse($r[1]->hasHeader('Content-Length')); - } - - public function testUploadsPutDataUsingChunkedEncodingWhenForced() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/', array('Transfer-Encoding' => 'chunked'), 'hi!'); - $request->send(); - - $r = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('chunked', $r[0]->getHeader('Transfer-Encoding')); - $this->assertFalse($r[0]->hasHeader('Content-Length')); - $this->assertEquals('hi!', $r[0]->getBody(true)); - } - - public function testSendsPostRequestsWithFields() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - - $request = RequestFactory::getInstance()->create('POST', $this->getServer()->getUrl()); - $request->getCurlOptions()->set('debug', true); - $request->setClient(new Client()); - $request->addPostFields(array( - 'a' => 'b', - 'c' => 'ay! ~This is a test, isn\'t it?' - )); - $request->send(); - - // Make sure that the request was sent correctly - $r = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('a=b&c=ay%21%20~This%20is%20a%20test%2C%20isn%27t%20it%3F', (string) $r[0]->getBody()); - $this->assertFalse($r[0]->hasHeader('Transfer-Encoding')); - $this->assertEquals(56, (string) $r[0]->getHeader('Content-Length')); - $sent = strtolower($r[0]); - $this->assertContains('post / http/1.1', $sent); - $this->assertContains('content-type: application/x-www-form-urlencoded; charset=utf-8', $sent); - } - - public function testSendsPostRequestsWithFiles() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - - $request = RequestFactory::getInstance()->create('POST', $this->getServer()->getUrl()); - $request->getCurlOptions()->set('debug', true); - $request->setClient(new Client()); - $request->addPostFiles(array( - 'foo' => __FILE__, - )); - $request->addPostFields(array( - 'bar' => 'baz', - 'arr' => array('a' => 1, 'b' => 2), - )); - $this->updateForHandle($request); - $request->send(); - - // Ensure the CURLOPT_POSTFIELDS option was set properly - $options = $this->requestHandle->getOptions()->getAll(); - if (version_compare(phpversion(), '5.5.0', '<')) { - $this->assertContains('@' . __FILE__ . ';filename=CurlHandleTest.php;type=text/x-', $options[CURLOPT_POSTFIELDS]['foo']); - } else{ - $this->assertInstanceOf('CURLFile', $options[CURLOPT_POSTFIELDS]['foo']); - } - $this->assertEquals('baz', $options[CURLOPT_POSTFIELDS]['bar']); - $this->assertEquals('1', $options[CURLOPT_POSTFIELDS]['arr[a]']); - $this->assertEquals('2', $options[CURLOPT_POSTFIELDS]['arr[b]']); - // Ensure that a Content-Length header was sent by cURL - $this->assertTrue($request->hasHeader('Content-Length')); - } - - public function testCurlConfigurationOptionsAreSet() - { - $request = RequestFactory::getInstance()->create('PUT', $this->getServer()->getUrl()); - $request->setClient(new Client('http://www.example.com')); - $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT, 99); - $request->getCurlOptions()->set('curl.fake_opt', 99); - $request->getCurlOptions()->set(CURLOPT_PORT, 8181); - $handle = CurlHandle::factory($request); - $this->assertEquals(99, $handle->getOptions()->get(CURLOPT_CONNECTTIMEOUT)); - $this->assertEquals(8181, $handle->getOptions()->get(CURLOPT_PORT)); - $this->assertNull($handle->getOptions()->get('curl.fake_opt')); - $this->assertNull($handle->getOptions()->get('fake_opt')); - } - - public function testEnsuresRequestsHaveResponsesWhenUpdatingFromTransfer() - { - $request = RequestFactory::getInstance()->create('PUT', $this->getServer()->getUrl()); - $handle = CurlHandle::factory($request); - $handle->updateRequestFromTransfer($request); - } - - public function testCanSendBodyAsString() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/', null, 'foo'); - $request->getCurlOptions()->set('body_as_string', true); - $request->send(); - $requests = $this->getServer()->getReceivedRequests(false); - $this->assertContains('PUT /', $requests[0]); - $this->assertContains("\nfoo", $requests[0]); - $this->assertContains('content-length: 3', $requests[0]); - $this->assertNotContains('content-type', $requests[0]); - } - - public function testCanSendPostBodyAsString() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $request = $client->post('/', null, 'foo'); - $request->getCurlOptions()->set('body_as_string', true); - $request->send(); - $requests = $this->getServer()->getReceivedRequests(false); - $this->assertContains('POST /', $requests[0]); - $this->assertContains("\nfoo", $requests[0]); - $this->assertContains('content-length: 3', $requests[0]); - $this->assertNotContains('content-type', $requests[0]); - } - - public function testAllowsWireTransferInfoToBeEnabled() - { - $request = RequestFactory::getInstance()->create('PUT', $this->getServer()->getUrl()); - $request->getCurlOptions()->set('debug', true); - $handle = CurlHandle::factory($request); - $this->assertNotNull($handle->getOptions()->get(CURLOPT_STDERR)); - $this->assertNotNull($handle->getOptions()->get(CURLOPT_VERBOSE)); - } - - public function testAddsCustomCurlOptions() - { - $request = RequestFactory::getInstance()->create('PUT', $this->getServer()->getUrl()); - $request->getCurlOptions()->set(CURLOPT_TIMEOUT, 200); - $handle = CurlHandle::factory($request); - $this->assertEquals(200, $handle->getOptions()->get(CURLOPT_TIMEOUT)); - } - - public function testSendsPostUploadsWithContentDispositionHeaders() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\n\r\nContent-Length: 0\r\n\r\n"); - - $fileToUpload = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'TestData' . DIRECTORY_SEPARATOR . 'test_service.json'; - - $client = new Client($this->getServer()->getUrl()); - $request = $client->post(); - $request->addPostFile('foo', $fileToUpload, 'application/json'); - $request->addPostFile('foo', __FILE__); - - $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $body = (string) $requests[0]->getBody(); - - $this->assertContains('Content-Disposition: form-data; name="foo[0]"; filename="', $body); - $this->assertContains('Content-Type: application/json', $body); - $this->assertContains('Content-Type: text/x-', $body); - $this->assertContains('Content-Disposition: form-data; name="foo[1]"; filename="', $body); - } - - public function requestMethodProvider() - { - return array(array('POST'), array('PUT'), array('PATCH')); - } - - /** - * @dataProvider requestMethodProvider - */ - public function testSendsRequestsWithNoBodyUsingContentLengthZero($method) - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $client->createRequest($method)->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertFalse($requests[0]->hasHeader('Transfer-Encoding')); - $this->assertTrue($requests[0]->hasHeader('Content-Length')); - $this->assertEquals('0', (string) $requests[0]->getHeader('Content-Length')); - } - - /** - * @dataProvider provideCurlConfig - */ - public function testParseCurlConfigConvertsStringKeysToConstantKeys($options, $expected) - { - $actual = CurlHandle::parseCurlConfig($options); - $this->assertEquals($expected, $actual); - } - - /** - * Data provider for curl configurations - * - * @return array - */ - public function provideCurlConfig() - { - return array( - // Conversion of option name to constant value - array( - array( - 'CURLOPT_PORT' => 10, - 'CURLOPT_TIMEOUT' => 99 - ), - array( - CURLOPT_PORT => 10, - CURLOPT_TIMEOUT => 99 - ) - ), - // Keeps non constant options - array( - array('debug' => true), - array('debug' => true) - ), - // Conversion of constant names to constant values - array( - array('debug' => 'CURLPROXY_HTTP'), - array('debug' => CURLPROXY_HTTP) - ) - ); - } - - public function testSeeksToBeginningOfStreamWhenSending() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/', null, 'test'); - $request->send(); - $request->send(); - - $received = $this->getServer()->getReceivedRequests(true); - $this->assertEquals(2, count($received)); - $this->assertEquals('test', (string) $received[0]->getBody()); - $this->assertEquals('test', (string) $received[1]->getBody()); - } - - public function testAllowsCurloptEncodingToBeSet() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->get('/', null); - $request->getCurlOptions()->set(CURLOPT_ENCODING, ''); - $this->updateForHandle($request); - $request->send(); - $options = $this->requestHandle->getOptions()->getAll(); - $this->assertSame('', $options[CURLOPT_ENCODING]); - $received = $this->getServer()->getReceivedRequests(false); - $this->assertContainsIns('accept: */*', $received[0]); - $this->assertContainsIns('accept-encoding: ', $received[0]); - } - - public function testSendsExpectHeaderWhenSizeIsGreaterThanCutoff() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/', null, 'test'); - // Start sending the expect header to 2 bytes - $this->updateForHandle($request); - $request->setExpectHeaderCutoff(2)->send(); - $options = $this->requestHandle->getOptions()->getAll(); - $this->assertContains('Expect: 100-Continue', $options[CURLOPT_HTTPHEADER]); - $received = $this->getServer()->getReceivedRequests(false); - $this->assertContainsIns('expect: 100-continue', $received[0]); - } - - public function testSetsCurloptEncodingWhenAcceptEncodingHeaderIsSet() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata"); - $client = new Client($this->getServer()->getUrl()); - $request = $client->get('/', array( - 'Accept' => 'application/json', - 'Accept-Encoding' => 'gzip, deflate', - )); - $this->updateForHandle($request); - $request->send(); - $options = $this->requestHandle->getOptions()->getAll(); - $this->assertSame('gzip, deflate', $options[CURLOPT_ENCODING]); - $received = $this->getServer()->getReceivedRequests(false); - $this->assertContainsIns('accept: application/json', $received[0]); - $this->assertContainsIns('accept-encoding: gzip, deflate', $received[0]); - } - - public function testSendsPostFieldsForNonPostRequests() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\n\r\nContent-Length: 0\r\n\r\n"); - - $client = new Client(); - $request = $client->put($this->getServer()->getUrl(), null, array( - 'foo' => 'baz', - 'baz' => 'bar' - )); - - $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('PUT', $requests[0]->getMethod()); - $this->assertEquals( - 'application/x-www-form-urlencoded; charset=utf-8', - (string) $requests[0]->getHeader('Content-Type') - ); - $this->assertEquals(15, (string) $requests[0]->getHeader('Content-Length')); - $this->assertEquals('foo=baz&baz=bar', (string) $requests[0]->getBody()); - } - - public function testSendsPostFilesForNonPostRequests() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\n\r\nContent-Length: 0\r\n\r\n"); - - $client = new Client(); - $request = $client->put($this->getServer()->getUrl(), null, array( - 'foo' => '@' . __FILE__ - )); - - $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('PUT', $requests[0]->getMethod()); - $this->assertContains('multipart/form-data', (string) $requests[0]->getHeader('Content-Type')); - $this->assertContains('testSendsPostFilesForNonPostRequests', (string) $requests[0]->getBody()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiProxyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiProxyTest.php deleted file mode 100644 index 060cd59de..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiProxyTest.php +++ /dev/null @@ -1,100 +0,0 @@ -multi = new CurlMultiProxy(); - } - - public function tearDown() - { - unset($this->multi); - } - - public function testConstructorSetsMaxHandles() - { - $m = new CurlMultiProxy(2); - $this->assertEquals(2, $this->readAttribute($m, 'maxHandles')); - } - - public function testAddingRequestsAddsToQueue() - { - $r = new Request('GET', 'http://www.foo.com'); - $this->assertSame($this->multi, $this->multi->add($r)); - $this->assertEquals(1, count($this->multi)); - $this->assertEquals(array($r), $this->multi->all()); - - $this->assertTrue($this->multi->remove($r)); - $this->assertFalse($this->multi->remove($r)); - $this->assertEquals(0, count($this->multi)); - } - - public function testResetClearsState() - { - $r = new Request('GET', 'http://www.foo.com'); - $this->multi->add($r); - $this->multi->reset(); - $this->assertEquals(0, count($this->multi)); - } - - public function testSendWillSendQueuedRequestsFirst() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - $client = new Client($this->getServer()->getUrl()); - $events = array(); - $client->getCurlMulti()->getEventDispatcher()->addListener( - CurlMultiProxy::ADD_REQUEST, - function ($e) use (&$events) { - $events[] = $e; - } - ); - $request = $client->get(); - $request->getEventDispatcher()->addListener('request.complete', function () use ($client) { - $client->get('/foo')->send(); - }); - $request->send(); - $received = $this->getServer()->getReceivedRequests(true); - $this->assertEquals(2, count($received)); - $this->assertEquals($this->getServer()->getUrl(), $received[0]->getUrl()); - $this->assertEquals($this->getServer()->getUrl() . 'foo', $received[1]->getUrl()); - $this->assertEquals(2, count($events)); - } - - public function testTrimsDownMaxHandleCount() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 307 OK\r\nLocation: /foo\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 307 OK\r\nLocation: /foo\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 307 OK\r\nLocation: /foo\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 307 OK\r\nLocation: /foo\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - $client = new Client($this->getServer()->getUrl()); - $client->setCurlMulti(new CurlMultiProxy(2)); - $request = $client->get(); - $request->send(); - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - $handles = $this->readAttribute($client->getCurlMulti(), 'handles'); - $this->assertEquals(2, count($handles)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiTest.php deleted file mode 100644 index a21f73b5d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiTest.php +++ /dev/null @@ -1,455 +0,0 @@ -multi = new MockMulti(); - } - - public function tearDown() - { - unset($this->multi); - } - - public function testConstructorCreateMultiHandle() - { - $this->assertInternalType('resource', $this->multi->getHandle()); - $this->assertEquals('curl_multi', get_resource_type($this->multi->getHandle())); - } - - public function testDestructorClosesMultiHandle() - { - $handle = $this->multi->getHandle(); - $this->multi->__destruct(); - $this->assertFalse(is_resource($handle)); - } - - public function testRequestsCanBeAddedAndCounted() - { - $multi = new CurlMulti(); - $request1 = new Request('GET', 'http://www.google.com/'); - $multi->add($request1); - $this->assertEquals(array($request1), $multi->all()); - $request2 = new Request('POST', 'http://www.google.com/'); - $multi->add($request2); - $this->assertEquals(array($request1, $request2), $multi->all()); - $this->assertEquals(2, count($multi)); - } - - public function testRequestsCanBeRemoved() - { - $request1 = new Request('GET', 'http://www.google.com/'); - $this->multi->add($request1); - $request2 = new Request('PUT', 'http://www.google.com/'); - $this->multi->add($request2); - $this->assertEquals(array($request1, $request2), $this->multi->all()); - $this->assertTrue($this->multi->remove($request1)); - $this->assertFalse($this->multi->remove($request1)); - $this->assertEquals(array($request2), $this->multi->all()); - } - - public function testsResetRemovesRequestsAndResetsState() - { - $this->multi->add(new Request('GET', 'http://www.google.com/')); - $this->multi->reset(); - $this->assertEquals(array(), $this->multi->all()); - } - - public function testSendsRequestsThroughCurl() - { - $this->getServer()->enqueue(array( - "HTTP/1.1 204 No content\r\n" . - "Content-Length: 0\r\n" . - "Server: Jetty(6.1.3)\r\n\r\n", - "HTTP/1.1 200 OK\r\n" . - "Content-Type: text/html; charset=utf-8\r\n" . - "Content-Length: 4\r\n" . - "Server: Jetty(6.1.3)\r\n\r\n" . - "data" - )); - - $request1 = new Request('GET', $this->getServer()->getUrl()); - $request2 = new Request('GET', $this->getServer()->getUrl()); - $this->multi->add($request1); - $this->multi->add($request2); - $this->multi->send(); - - $response1 = $request1->getResponse(); - $response2 = $request2->getResponse(); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response1); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response2); - - $this->assertTrue($response1->getBody(true) == 'data' || $response2->getBody(true) == 'data'); - $this->assertTrue($response1->getBody(true) == '' || $response2->getBody(true) == ''); - $this->assertTrue($response1->getStatusCode() == '204' || $response2->getStatusCode() == '204'); - $this->assertNotEquals((string) $response1, (string) $response2); - } - - public function testSendsThroughCurlAndAggregatesRequestExceptions() - { - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\n" . - "Content-Type: text/html; charset=utf-8\r\n" . - "Content-Length: 4\r\n" . - "Server: Jetty(6.1.3)\r\n" . - "\r\n" . - "data", - "HTTP/1.1 204 No content\r\n" . - "Content-Length: 0\r\n" . - "Server: Jetty(6.1.3)\r\n" . - "\r\n", - "HTTP/1.1 404 Not Found\r\n" . - "Content-Length: 0\r\n" . - "\r\n" - )); - - $request1 = new Request('GET', $this->getServer()->getUrl()); - $request2 = new Request('HEAD', $this->getServer()->getUrl()); - $request3 = new Request('GET', $this->getServer()->getUrl()); - $this->multi->add($request1); - $this->multi->add($request2); - $this->multi->add($request3); - - try { - $this->multi->send(); - $this->fail('MultiTransferException not thrown when aggregating request exceptions'); - } catch (MultiTransferException $e) { - - $this->assertTrue($e->containsRequest($request1)); - $this->assertTrue($e->containsRequest($request2)); - $this->assertTrue($e->containsRequest($request3)); - $this->assertInstanceOf('ArrayIterator', $e->getIterator()); - $this->assertEquals(1, count($e)); - $exceptions = $e->getIterator(); - - $response1 = $request1->getResponse(); - $response2 = $request2->getResponse(); - $response3 = $request3->getResponse(); - - $this->assertNotEquals((string) $response1, (string) $response2); - $this->assertNotEquals((string) $response3, (string) $response1); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response1); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response2); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response3); - - $failed = $exceptions[0]->getResponse(); - $this->assertEquals(404, $failed->getStatusCode()); - $this->assertEquals(1, count($e)); - - // Test the IteratorAggregate functionality - foreach ($e as $except) { - $this->assertEquals($failed, $except->getResponse()); - } - - $this->assertEquals(1, count($e->getFailedRequests())); - $this->assertEquals(2, count($e->getSuccessfulRequests())); - $this->assertEquals(3, count($e->getAllRequests())); - } - } - - public function testCurlErrorsAreCaught() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - try { - $request = RequestFactory::getInstance()->create('GET', 'http://127.0.0.1:9876/'); - $request->setClient(new Client()); - $request->getCurlOptions()->set(CURLOPT_FRESH_CONNECT, true); - $request->getCurlOptions()->set(CURLOPT_FORBID_REUSE, true); - $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT_MS, 5); - $request->send(); - $this->fail('CurlException not thrown'); - } catch (CurlException $e) { - $m = $e->getMessage(); - $this->assertContains('[curl] ', $m); - $this->assertContains('[url] http://127.0.0.1:9876/', $m); - $this->assertInternalType('array', $e->getCurlInfo()); - } - } - - public function testRemovesQueuedRequests() - { - $request = RequestFactory::getInstance()->create('GET', 'http://127.0.0.1:9876/'); - $r = new Response(200); - $request->setClient(new Client()); - $request->setResponse($r, true); - $this->multi->add($request); - $this->multi->send(); - $this->assertSame($r, $request->getResponse()); - } - - public function testRemovesQueuedRequestsAddedInTransit() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); - $client = new Client($this->getServer()->getUrl()); - $r = $client->get(); - $r->getEventDispatcher()->addListener('request.receive.status_line', function (Event $event) use ($client) { - // Create a request using a queued response - $request = $client->get()->setResponse(new Response(200), true); - $request->send(); - }); - $r->send(); - $this->assertEquals(1, count($this->getServer()->getReceivedRequests(false))); - } - - public function testCatchesExceptionsBeforeSendingSingleRequest() - { - $client = new Client($this->getServer()->getUrl()); - $multi = new CurlMulti(); - $client->setCurlMulti($multi); - $request = $client->get(); - $request->getEventDispatcher()->addListener('request.before_send', function() { - throw new \RuntimeException('Testing!'); - }); - try { - $request->send(); - $this->fail('Did not throw'); - } catch (\RuntimeException $e) { - // Ensure it was removed - $this->assertEquals(0, count($multi)); - } - } - - /** - * @expectedException \Guzzle\Common\Exception\ExceptionCollection - * @expectedExceptionMessage Thrown before sending! - */ - public function testCatchesExceptionsBeforeSendingMultipleRequests() - { - $client = new Client($this->getServer()->getUrl()); - $request = $client->get(); - $request->getEventDispatcher()->addListener('request.before_send', function() { - throw new \RuntimeException('Thrown before sending!'); - }); - $client->send(array($request)); - } - - public function testCatchesExceptionsWhenRemovingQueuedRequests() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $r = $client->get(); - $r->getEventDispatcher()->addListener('request.sent', function() use ($client) { - // Create a request using a queued response - $client->get()->setResponse(new Response(404), true)->send(); - }); - try { - $r->send(); - $this->fail('Did not throw'); - } catch (BadResponseException $e) { - $this->assertCount(0, $client->getCurlMulti()); - } - } - - public function testCatchesExceptionsWhenRemovingQueuedRequestsBeforeSending() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $client = new Client($this->getServer()->getUrl()); - $r = $client->get(); - $r->getEventDispatcher()->addListener('request.before_send', function() use ($client) { - // Create a request using a queued response - $client->get()->setResponse(new Response(404), true)->send(); - }); - try { - $r->send(); - $this->fail('Did not throw'); - } catch (BadResponseException $e) { - $this->assertCount(0, $client->getCurlMulti()); - } - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage test - */ - public function testDoesNotCatchRandomExceptionsThrownDuringPerform() - { - $client = new Client($this->getServer()->getUrl()); - $multi = $this->getMock('Guzzle\\Http\\Curl\\CurlMulti', array('perform')); - $multi->expects($this->once()) - ->method('perform') - ->will($this->throwException(new \RuntimeException('test'))); - $multi->add($client->get()); - $multi->send(); - } - - public function testDoesNotSendRequestsDecliningToBeSent() - { - if (!defined('CURLOPT_TIMEOUT_MS')) { - $this->markTestSkipped('Update curl'); - } - - // Create a client that is bound to fail connecting - $client = new Client('http://localhost:123', array( - 'curl.CURLOPT_PORT' => 123, - 'curl.CURLOPT_CONNECTTIMEOUT_MS' => 1, - )); - - $request = $client->get(); - $multi = new CurlMulti(); - $multi->add($request); - - // Listen for request exceptions, and when they occur, first change the - // state of the request back to transferring, and then just allow it to - // exception out - $request->getEventDispatcher()->addListener('request.exception', function(Event $event) use ($multi) { - $retries = $event['request']->getParams()->get('retries'); - // Allow the first failure to retry - if ($retries == 0) { - $event['request']->setState('transfer'); - $event['request']->getParams()->set('retries', 1); - // Remove the request to try again - $multi->remove($event['request']); - $multi->add($event['request']); - } - }); - - try { - $multi->send(); - $this->fail('Did not throw an exception at all!?!'); - } catch (\Exception $e) { - $this->assertEquals(1, $request->getParams()->get('retries')); - } - } - - public function testDoesNotThrowExceptionsWhenRequestsRecoverWithRetry() - { - $this->getServer()->flush(); - $client = new Client($this->getServer()->getUrl()); - $request = $client->get(); - $request->getEventDispatcher()->addListener('request.before_send', function(Event $event) { - $event['request']->setResponse(new Response(200)); - }); - - $multi = new CurlMulti(); - $multi->add($request); - $multi->send(); - $this->assertEquals(0, count($this->getServer()->getReceivedRequests(false))); - } - - public function testDoesNotThrowExceptionsWhenRequestsRecoverWithSuccess() - { - // Attempt a port that 99.9% is not listening - $client = new Client('http://localhost:123'); - $request = $client->get(); - // Ensure it times out quickly if needed - $request->getCurlOptions()->set(CURLOPT_TIMEOUT_MS, 1)->set(CURLOPT_CONNECTTIMEOUT_MS, 1); - - $request->getEventDispatcher()->addListener('request.exception', function(Event $event) use (&$count) { - $event['request']->setResponse(new Response(200)); - }); - - $multi = new CurlMulti(); - $multi->add($request); - $multi->send(); - - // Ensure that the exception was caught, and the response was set manually - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - } - - public function testHardResetReopensMultiHandle() - { - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - - $stream = fopen('php://temp', 'w+'); - $client = new Client($this->getServer()->getUrl()); - $client->getConfig()->set('curl.CURLOPT_VERBOSE', true)->set('curl.CURLOPT_STDERR', $stream); - - $request = $client->get(); - $multi = new CurlMulti(); - $multi->add($request); - $multi->send(); - $multi->reset(true); - $multi->add($request); - $multi->send(); - - rewind($stream); - $this->assertNotContains('Re-using existing connection', stream_get_contents($stream)); - } - - public function testThrowsMeaningfulExceptionsForCurlMultiErrors() - { - $multi = new CurlMulti(); - - // Set the state of the multi object to sending to trigger the exception - $reflector = new \ReflectionMethod('Guzzle\Http\Curl\CurlMulti', 'checkCurlResult'); - $reflector->setAccessible(true); - - // Successful - $reflector->invoke($multi, 0); - - // Known error - try { - $reflector->invoke($multi, CURLM_BAD_HANDLE); - $this->fail('Expected an exception here'); - } catch (CurlException $e) { - $this->assertContains('The passed-in handle is not a valid CURLM handle.', $e->getMessage()); - $this->assertContains('CURLM_BAD_HANDLE', $e->getMessage()); - $this->assertContains(strval(CURLM_BAD_HANDLE), $e->getMessage()); - } - - // Unknown error - try { - $reflector->invoke($multi, 255); - $this->fail('Expected an exception here'); - } catch (CurlException $e) { - $this->assertEquals('Unexpected cURL error: 255', $e->getMessage()); - } - } - - public function testRequestBeforeSendIncludesContentLengthHeaderIfEmptyBody() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request = new Request('PUT', $this->getServer()->getUrl()); - $that = $this; - $request->getEventDispatcher()->addListener('request.before_send', function ($event) use ($that) { - $that->assertEquals(0, $event['request']->getHeader('Content-Length')); - }); - $this->multi->add($request); - $this->multi->send(); - } - - public function testRemovesConflictingTransferEncodingHeader() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - $client = new Client($this->getServer()->getUrl()); - $request = $client->put('/', null, fopen($this->getServer()->getUrl(), 'r')); - $request->setHeader('Content-Length', 4); - $request->send(); - $received = $this->getServer()->getReceivedRequests(true); - $this->assertFalse($received[1]->hasHeader('Transfer-Encoding')); - $this->assertEquals(4, (string) $received[1]->getHeader('Content-Length')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlVersionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlVersionTest.php deleted file mode 100644 index c7b5ee6e9..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlVersionTest.php +++ /dev/null @@ -1,39 +0,0 @@ -getProperty('version'); - $refProperty->setAccessible(true); - $refProperty->setValue($instance, array()); - - $this->assertEquals($info, $instance->getAll()); - $this->assertEquals($info, $instance->getAll()); - - $this->assertEquals($info['version'], $instance->get('version')); - $this->assertFalse($instance->get('foo')); - } - - public function testIsSingleton() - { - $refObject = new \ReflectionClass('Guzzle\Http\Curl\CurlVersion'); - $refProperty = $refObject->getProperty('instance'); - $refProperty->setAccessible(true); - $refProperty->setValue(null, null); - - $this->assertInstanceOf('Guzzle\Http\Curl\CurlVersion', CurlVersion::getInstance()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/RequestMediatorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/RequestMediatorTest.php deleted file mode 100644 index c69e0c904..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/RequestMediatorTest.php +++ /dev/null @@ -1,67 +0,0 @@ -events[] = $event; - } - - public function testEmitsEvents() - { - $request = new EntityEnclosingRequest('PUT', 'http://www.example.com'); - $request->setBody('foo'); - $request->setResponse(new Response(200)); - - // Ensure that IO events are emitted - $request->getCurlOptions()->set('emit_io', true); - - // Attach listeners for each event type - $request->getEventDispatcher()->addListener('curl.callback.progress', array($this, 'event')); - $request->getEventDispatcher()->addListener('curl.callback.read', array($this, 'event')); - $request->getEventDispatcher()->addListener('curl.callback.write', array($this, 'event')); - - $mediator = new RequestMediator($request, true); - - $mediator->progress('a', 'b', 'c', 'd'); - $this->assertEquals(1, count($this->events)); - $this->assertEquals('curl.callback.progress', $this->events[0]->getName()); - - $this->assertEquals(3, $mediator->writeResponseBody('foo', 'bar')); - $this->assertEquals(2, count($this->events)); - $this->assertEquals('curl.callback.write', $this->events[1]->getName()); - $this->assertEquals('bar', $this->events[1]['write']); - $this->assertSame($request, $this->events[1]['request']); - - $this->assertEquals('foo', $mediator->readRequestBody('a', 'b', 3)); - $this->assertEquals(3, count($this->events)); - $this->assertEquals('curl.callback.read', $this->events[2]->getName()); - $this->assertEquals('foo', $this->events[2]['read']); - $this->assertSame($request, $this->events[2]['request']); - } - - public function testDoesNotUseRequestResponseBodyWhenNotCustom() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 307 Foo\r\nLocation: /foo\r\nContent-Length: 2\r\n\r\nHI", - "HTTP/1.1 301 Foo\r\nLocation: /foo\r\nContent-Length: 2\r\n\r\nFI", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest", - )); - $client = new Client($this->getServer()->getUrl()); - $response = $client->get()->send(); - $this->assertEquals('test', $response->getBody(true)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/EntityBodyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/EntityBodyTest.php deleted file mode 100644 index 124a44da6..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/EntityBodyTest.php +++ /dev/null @@ -1,182 +0,0 @@ -assertEquals('data', (string) $body); - $this->assertEquals(4, $body->getContentLength()); - $this->assertEquals('PHP', $body->getWrapper()); - $this->assertEquals('TEMP', $body->getStreamType()); - - $handle = fopen(__DIR__ . '/../../../../phpunit.xml.dist', 'r'); - if (!$handle) { - $this->fail('Could not open test file'); - } - $body = EntityBody::factory($handle); - $this->assertEquals(__DIR__ . '/../../../../phpunit.xml.dist', $body->getUri()); - $this->assertTrue($body->isLocal()); - $this->assertEquals(__DIR__ . '/../../../../phpunit.xml.dist', $body->getUri()); - $this->assertEquals(filesize(__DIR__ . '/../../../../phpunit.xml.dist'), $body->getContentLength()); - - // make sure that a body will return as the same object - $this->assertTrue($body === EntityBody::factory($body)); - } - - public function testFactoryCreatesTempStreamByDefault() - { - $body = EntityBody::factory(''); - $this->assertEquals('PHP', $body->getWrapper()); - $this->assertEquals('TEMP', $body->getStreamType()); - $body = EntityBody::factory(); - $this->assertEquals('PHP', $body->getWrapper()); - $this->assertEquals('TEMP', $body->getStreamType()); - } - - public function testFactoryCanCreateFromObject() - { - $body = EntityBody::factory(new QueryString(array('foo' => 'bar'))); - $this->assertEquals('foo=bar', (string) $body); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testFactoryEnsuresObjectsHaveToStringMethod() - { - EntityBody::factory(new \stdClass('a')); - } - - public function testHandlesCompression() - { - $body = EntityBody::factory('testing 123...testing 123'); - $this->assertFalse($body->getContentEncoding(), '-> getContentEncoding() must initially return FALSE'); - $size = $body->getContentLength(); - $body->compress(); - $this->assertEquals('gzip', $body->getContentEncoding(), '-> getContentEncoding() must return the correct encoding after compressing'); - $this->assertEquals(gzdeflate('testing 123...testing 123'), (string) $body); - $this->assertTrue($body->getContentLength() < $size); - $this->assertTrue($body->uncompress()); - $this->assertEquals('testing 123...testing 123', (string) $body); - $this->assertFalse($body->getContentEncoding(), '-> getContentEncoding() must reset to FALSE'); - - if (in_array('bzip2.*', stream_get_filters())) { - $this->assertTrue($body->compress('bzip2.compress')); - $this->assertEquals('compress', $body->getContentEncoding(), '-> compress() must set \'compress\' as the Content-Encoding'); - } - - $this->assertFalse($body->compress('non-existent'), '-> compress() must return false when a non-existent stream filter is used'); - - // Release the body - unset($body); - - // Use gzip compression on the initial content. This will include a - // gzip header which will need to be stripped when deflating the stream - $body = EntityBody::factory(gzencode('test')); - $this->assertSame($body, $body->setStreamFilterContentEncoding('zlib.deflate')); - $this->assertTrue($body->uncompress('zlib.inflate')); - $this->assertEquals('test', (string) $body); - unset($body); - - // Test using a very long string - $largeString = ''; - for ($i = 0; $i < 25000; $i++) { - $largeString .= chr(rand(33, 126)); - } - $body = EntityBody::factory($largeString); - $this->assertEquals($largeString, (string) $body); - $this->assertTrue($body->compress()); - $this->assertNotEquals($largeString, (string) $body); - $compressed = (string) $body; - $this->assertTrue($body->uncompress()); - $this->assertEquals($largeString, (string) $body); - $this->assertEquals($compressed, gzdeflate($largeString)); - - $body = EntityBody::factory(fopen(__DIR__ . '/../TestData/compress_test', 'w')); - $this->assertFalse($body->compress()); - unset($body); - - unlink(__DIR__ . '/../TestData/compress_test'); - } - - public function testDeterminesContentType() - { - // Test using a string/temp stream - $body = EntityBody::factory('testing 123...testing 123'); - $this->assertNull($body->getContentType()); - - // Use a local file - $body = EntityBody::factory(fopen(__FILE__, 'r')); - $this->assertContains('text/x-', $body->getContentType()); - } - - public function testCreatesMd5Checksum() - { - $body = EntityBody::factory('testing 123...testing 123'); - $this->assertEquals(md5('testing 123...testing 123'), $body->getContentMd5()); - - $server = $this->getServer()->enqueue( - "HTTP/1.1 200 OK" . "\r\n" . - "Content-Length: 3" . "\r\n\r\n" . - "abc" - ); - - $body = EntityBody::factory(fopen($this->getServer()->getUrl(), 'r')); - $this->assertFalse($body->getContentMd5()); - } - - public function testSeeksToOriginalPosAfterMd5() - { - $body = EntityBody::factory('testing 123'); - $body->seek(4); - $this->assertEquals(md5('testing 123'), $body->getContentMd5()); - $this->assertEquals(4, $body->ftell()); - $this->assertEquals('ing 123', $body->read(1000)); - } - - public function testGetTypeFormBodyFactoring() - { - $body = EntityBody::factory(array('key1' => 'val1', 'key2' => 'val2')); - $this->assertEquals('key1=val1&key2=val2', (string) $body); - } - - public function testAllowsCustomRewind() - { - $body = EntityBody::factory('foo'); - $rewound = false; - $body->setRewindFunction(function ($body) use (&$rewound) { - $rewound = true; - return $body->seek(0); - }); - $body->seek(2); - $this->assertTrue($body->rewind()); - $this->assertTrue($rewound); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testCustomRewindFunctionMustBeCallable() - { - $body = EntityBody::factory(); - $body->setRewindFunction('foo'); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/CurlExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/CurlExceptionTest.php deleted file mode 100644 index df3e4b791..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/CurlExceptionTest.php +++ /dev/null @@ -1,27 +0,0 @@ -assertNull($e->getError()); - $this->assertNull($e->getErrorNo()); - $this->assertSame($e, $e->setError('test', 12)); - $this->assertEquals('test', $e->getError()); - $this->assertEquals(12, $e->getErrorNo()); - - $handle = new CurlHandle(curl_init(), array()); - $e->setCurlHandle($handle); - $this->assertSame($handle, $e->getCurlHandle()); - $handle->close(); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/ExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/ExceptionTest.php deleted file mode 100644 index 12cfd369e..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/ExceptionTest.php +++ /dev/null @@ -1,66 +0,0 @@ -setRequest($request); - $this->assertEquals($request, $e->getRequest()); - } - - /** - * @covers Guzzle\Http\Exception\BadResponseException - */ - public function testBadResponseException() - { - $e = new BadResponseException('Message'); - $response = new Response(200); - $e->setResponse($response); - $this->assertEquals($response, $e->getResponse()); - } - - /** - * @covers Guzzle\Http\Exception\BadResponseException::factory - */ - public function testCreatesGenericErrorExceptionOnError() - { - $request = new Request('GET', 'http://www.example.com'); - $response = new Response(307); - $e = BadResponseException::factory($request, $response); - $this->assertInstanceOf('Guzzle\Http\Exception\BadResponseException', $e); - } - - /** - * @covers Guzzle\Http\Exception\BadResponseException::factory - */ - public function testCreatesClientErrorExceptionOnClientError() - { - $request = new Request('GET', 'http://www.example.com'); - $response = new Response(404); - $e = BadResponseException::factory($request, $response); - $this->assertInstanceOf('Guzzle\Http\Exception\ClientErrorResponseException', $e); - } - - /** - * @covers Guzzle\Http\Exception\BadResponseException::factory - */ - public function testCreatesServerErrorExceptionOnServerError() - { - $request = new Request('GET', 'http://www.example.com'); - $response = new Response(503); - $e = BadResponseException::factory($request, $response); - $this->assertInstanceOf('Guzzle\Http\Exception\ServerErrorResponseException', $e); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/MultiTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/MultiTransferExceptionTest.php deleted file mode 100644 index fa4ec2626..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/MultiTransferExceptionTest.php +++ /dev/null @@ -1,51 +0,0 @@ -addSuccessfulRequest($r1); - $e->addFailedRequest($r2); - $this->assertEquals(array($r1), $e->getSuccessfulRequests()); - $this->assertEquals(array($r2), $e->getSuccessfulRequests()); - $this->assertEquals(array($r1, $r2), $e->getAllRequests()); - $this->assertTrue($e->containsRequest($r1)); - $this->assertTrue($e->containsRequest($r2)); - $this->assertFalse($e->containsRequest(new Request('POST', '/foo'))); - } - - public function testCanSetRequests() - { - $s = array($r1 = new Request('GET', 'http://www.foo.com')); - $f = array($r2 = new Request('GET', 'http://www.foo.com')); - $e = new MultiTransferException(); - $e->setSuccessfulRequests($s); - $e->setFailedRequests($f); - $this->assertEquals(array($r1), $e->getSuccessfulRequests()); - $this->assertEquals(array($r2), $e->getSuccessfulRequests()); - } - - public function testAssociatesExceptionsWithRequests() - { - $r1 = new Request('GET', 'http://www.foo.com'); - $re1 = new \Exception('foo'); - $re2 = new \Exception('bar'); - $e = new MultiTransferException(); - $e->add($re2); - $e->addFailedRequestWithException($r1, $re1); - $this->assertSame($re1, $e->getExceptionForFailedRequest($r1)); - $this->assertNull($e->getExceptionForFailedRequest(new Request('POST', '/foo'))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/IoEmittingEntityBodyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/IoEmittingEntityBodyTest.php deleted file mode 100644 index cd6355f3b..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/IoEmittingEntityBodyTest.php +++ /dev/null @@ -1,47 +0,0 @@ -decorated = EntityBody::factory('hello'); - $this->body = new IoEmittingEntityBody($this->decorated); - } - - public function testEmitsReadEvents() - { - $e = null; - $this->body->getEventDispatcher()->addListener('body.read', function ($event) use (&$e) { - $e = $event; - }); - $this->assertEquals('hel', $this->body->read(3)); - $this->assertEquals('hel', $e['read']); - $this->assertEquals(3, $e['length']); - $this->assertSame($this->body, $e['body']); - } - - public function testEmitsWriteEvents() - { - $e = null; - $this->body->getEventDispatcher()->addListener('body.write', function ($event) use (&$e) { - $e = $event; - }); - $this->body->seek(0, SEEK_END); - $this->assertEquals(5, $this->body->write('there')); - $this->assertEquals('there', $e['write']); - $this->assertEquals(5, $e['result']); - $this->assertSame($this->body, $e['body']); - $this->assertEquals('hellothere', (string) $this->body); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/AbstractMessageTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/AbstractMessageTest.php deleted file mode 100644 index 9447d8c5d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/AbstractMessageTest.php +++ /dev/null @@ -1,136 +0,0 @@ -mock = $this->getMockForAbstractClass('Guzzle\Http\Message\AbstractMessage'); - } - - public function tearDown() - { - $this->mock = $this->request = null; - } - - public function testGetParams() - { - $request = new Request('GET', 'http://example.com'); - $this->assertInstanceOf('Guzzle\\Common\\Collection', $request->getParams()); - } - - public function testAddHeaders() - { - $this->mock->setHeader('A', 'B'); - - $this->assertEquals($this->mock, $this->mock->addHeaders(array( - 'X-Data' => '123' - ))); - - $this->assertTrue($this->mock->hasHeader('X-Data') !== false); - $this->assertTrue($this->mock->hasHeader('A') !== false); - } - - public function testAllowsHeaderToSetAsHeader() - { - $h = new Header('A', 'B'); - $this->mock->setHeader('A', $h); - $this->assertSame($h, $this->mock->getHeader('A')); - } - - public function testGetHeader() - { - $this->mock->setHeader('Test', '123'); - $this->assertEquals('123', $this->mock->getHeader('Test')); - } - - public function testGetHeaders() - { - $this->assertSame($this->mock, $this->mock->setHeaders(array('a' => 'b', 'c' => 'd'))); - $h = $this->mock->getHeaders(); - $this->assertArrayHasKey('a', $h->toArray()); - $this->assertArrayHasKey('c', $h->toArray()); - $this->assertInstanceOf('Guzzle\Http\Message\Header\HeaderInterface', $h->get('a')); - $this->assertInstanceOf('Guzzle\Http\Message\Header\HeaderInterface', $h->get('c')); - } - - public function testGetHeaderLinesUsesGlue() - { - $this->mock->setHeaders(array('a' => 'b', 'c' => 'd')); - $this->mock->addHeader('a', 'e'); - $this->mock->getHeader('a')->setGlue('!'); - $this->assertEquals(array( - 'a: b! e', - 'c: d' - ), $this->mock->getHeaderLines()); - } - - public function testHasHeader() - { - $this->assertFalse($this->mock->hasHeader('Foo')); - $this->mock->setHeader('Foo', 'Bar'); - $this->assertEquals(true, $this->mock->hasHeader('Foo')); - $this->mock->setHeader('foo', 'yoo'); - $this->assertEquals(true, $this->mock->hasHeader('Foo')); - $this->assertEquals(true, $this->mock->hasHeader('foo')); - $this->assertEquals(false, $this->mock->hasHeader('bar')); - } - - public function testRemoveHeader() - { - $this->mock->setHeader('Foo', 'Bar'); - $this->assertEquals(true, $this->mock->hasHeader('Foo')); - $this->mock->removeHeader('Foo'); - $this->assertFalse($this->mock->hasHeader('Foo')); - } - - public function testReturnsNullWhenHeaderIsNotFound() - { - $this->assertNull($this->mock->getHeader('foo')); - } - - public function testAddingHeadersPreservesOriginalHeaderCase() - { - $this->mock->addHeaders(array( - 'test' => '123', - 'Test' => 'abc' - )); - $this->mock->addHeader('test', '456'); - $this->mock->addHeader('test', '789'); - - $header = $this->mock->getHeader('test'); - $this->assertContains('123', $header->toArray()); - $this->assertContains('456', $header->toArray()); - $this->assertContains('789', $header->toArray()); - $this->assertContains('abc', $header->toArray()); - } - - public function testCanStoreEmptyHeaders() - { - $this->mock->setHeader('Content-Length', 0); - $this->assertTrue($this->mock->hasHeader('Content-Length')); - $this->assertEquals(0, (string) $this->mock->getHeader('Content-Length')); - } - - public function testCanSetCustomHeaderFactory() - { - $f = new Header\HeaderFactory(); - $this->mock->setHeaderFactory($f); - $this->assertSame($f, $this->readAttribute($this->mock, 'headerFactory')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/EntityEnclosingRequestTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/EntityEnclosingRequestTest.php deleted file mode 100644 index 191b02223..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/EntityEnclosingRequestTest.php +++ /dev/null @@ -1,434 +0,0 @@ -client = new Client(); - } - - public function tearDown() - { - $this->client = null; - } - - public function testConstructorConfiguresRequest() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com', array( - 'X-Test' => '123' - )); - $request->setBody('Test'); - $this->assertEquals('123', $request->getHeader('X-Test')); - $this->assertNull($request->getHeader('Expect')); - } - - public function testCanSetBodyWithoutOverridingContentType() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com', array('Content-Type' => 'foooooo')); - $request->setBody('{"a":"b"}'); - $this->assertEquals('foooooo', $request->getHeader('Content-Type')); - } - - public function testRequestIncludesBodyInMessage() - { - - $request = RequestFactory::getInstance()->create('PUT', 'http://www.guzzle-project.com/', null, 'data'); - $this->assertEquals("PUT / HTTP/1.1\r\n" - . "Host: www.guzzle-project.com\r\n" - . "Content-Length: 4\r\n\r\n" - . "data", (string) $request); - } - - public function testRequestIncludesPostBodyInMessageOnlyWhenNoPostFiles() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/', null, array( - 'foo' => 'bar' - )); - $this->assertEquals("POST / HTTP/1.1\r\n" - . "Host: www.guzzle-project.com\r\n" - . "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n\r\n" - . "foo=bar", (string) $request); - - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/', null, array( - 'foo' => '@' . __FILE__ - )); - $this->assertEquals("POST / HTTP/1.1\r\n" - . "Host: www.guzzle-project.com\r\n" - . "Content-Type: multipart/form-data\r\n" - . "Expect: 100-Continue\r\n\r\n", (string) $request); - } - - public function testAddsPostFieldsAndSetsContentLength() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/', null, array( - 'data' => '123' - )); - $this->assertEquals("POST / HTTP/1.1\r\n" - . "Host: www.guzzle-project.com\r\n" - . "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n\r\n" - . "data=123", (string) $request); - } - - public function testAddsPostFilesAndSetsContentType() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.test.com/') - ->addPostFiles(array( - 'file' => __FILE__ - ))->addPostFields(array( - 'a' => 'b' - )); - $message = (string) $request; - $this->assertEquals('multipart/form-data', $request->getHeader('Content-Type')); - $this->assertEquals('100-Continue', $request->getHeader('Expect')); - } - - public function testRequestBodyContainsPostFiles() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.test.com/'); - $request->addPostFields(array( - 'test' => '123' - )); - $this->assertContains("\r\n\r\ntest=123", (string) $request); - } - - public function testRequestBodyAddsContentLength() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://www.test.com/'); - $request->setBody(EntityBody::factory('test')); - $this->assertEquals(4, (string) $request->getHeader('Content-Length')); - $this->assertFalse($request->hasHeader('Transfer-Encoding')); - } - - public function testRequestBodyDoesNotUseContentLengthWhenChunked() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://www.test.com/', array( - 'Transfer-Encoding' => 'chunked' - ), 'test'); - $this->assertNull($request->getHeader('Content-Length')); - $this->assertTrue($request->hasHeader('Transfer-Encoding')); - } - - public function testRequestHasMutableBody() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://www.guzzle-project.com/', null, 'data'); - $body = $request->getBody(); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $body); - $this->assertSame($body, $request->getBody()); - - $newBody = EntityBody::factory('foobar'); - $request->setBody($newBody); - $this->assertEquals('foobar', (string) $request->getBody()); - $this->assertSame($newBody, $request->getBody()); - } - - public function testSetPostFields() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/'); - $this->assertInstanceOf('Guzzle\\Http\\QueryString', $request->getPostFields()); - - $fields = new QueryString(array( - 'a' => 'b' - )); - $request->addPostFields($fields); - $this->assertEquals($fields->getAll(), $request->getPostFields()->getAll()); - $this->assertEquals(array(), $request->getPostFiles()); - } - - public function testSetPostFiles() - { - $request = RequestFactory::getInstance()->create('POST', $this->getServer()->getUrl()) - ->setClient(new Client()) - ->addPostFiles(array(__FILE__)) - ->addPostFields(array( - 'test' => 'abc' - )); - - $request->getCurlOptions()->set('debug', true); - - $this->assertEquals(array( - 'test' => 'abc' - ), $request->getPostFields()->getAll()); - - $files = $request->getPostFiles(); - $post = $files['file'][0]; - $this->assertEquals('file', $post->getFieldName()); - $this->assertContains('text/x-', $post->getContentType()); - $this->assertEquals(__FILE__, $post->getFilename()); - - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request->send(); - - $this->assertNotNull($request->getHeader('Content-Length')); - $this->assertContains('multipart/form-data; boundary=', (string) $request->getHeader('Content-Type'), '-> cURL must add the boundary'); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testSetPostFilesThrowsExceptionWhenFileIsNotFound() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/') - ->addPostFiles(array( - 'file' => 'filenotfound.ini' - )); - } - - /** - * @expectedException Guzzle\Http\Exception\RequestException - */ - public function testThrowsExceptionWhenNonStringsAreAddedToPost() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/') - ->addPostFile('foo', new \stdClass()); - } - - public function testAllowsContentTypeInPostUploads() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/') - ->addPostFile('foo', __FILE__, 'text/plain'); - - $this->assertEquals(array( - new PostFile('foo', __FILE__, 'text/plain') - ), $request->getPostFile('foo')); - } - - public function testGuessesContentTypeOfPostUpload() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/') - ->addPostFile('foo', __FILE__); - $file = $request->getPostFile('foo'); - $this->assertContains('text/x-', $file[0]->getContentType()); - } - - public function testAllowsContentDispositionFieldsInPostUploadsWhenSettingInBulk() - { - $postFile = new PostFile('foo', __FILE__, 'text/x-php'); - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/') - ->addPostFiles(array('foo' => $postFile)); - - $this->assertEquals(array($postFile), $request->getPostFile('foo')); - } - - public function testPostRequestsUseApplicationXwwwForUrlEncodedForArrays() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/'); - $request->setPostField('a', 'b'); - $this->assertContains("\r\n\r\na=b", (string) $request); - $this->assertEquals('application/x-www-form-urlencoded; charset=utf-8', $request->getHeader('Content-Type')); - } - - public function testProcessMethodAddsContentType() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/'); - $request->setPostField('a', 'b'); - $this->assertEquals('application/x-www-form-urlencoded; charset=utf-8', $request->getHeader('Content-Type')); - } - - public function testPostRequestsUseMultipartFormDataWithFiles() - { - $request = RequestFactory::getInstance()->create('POST', 'http://www.guzzle-project.com/'); - $request->addPostFiles(array('file' => __FILE__)); - $this->assertEquals('multipart/form-data', $request->getHeader('Content-Type')); - } - - public function testCanSendMultipleRequestsUsingASingleRequestObject() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 201 Created\r\nContent-Length: 0\r\n\r\n", - )); - - // Send the first request - $request = RequestFactory::getInstance()->create('PUT', $this->getServer()->getUrl()) - ->setBody('test') - ->setClient(new Client()); - $request->send(); - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - - // Send the second request - $request->setBody('abcdefg', 'application/json', false); - $request->send(); - $this->assertEquals(201, $request->getResponse()->getStatusCode()); - - // Ensure that the same request was sent twice with different bodies - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals(2, count($requests)); - $this->assertEquals(4, (string) $requests[0]->getHeader('Content-Length')); - $this->assertEquals(7, (string) $requests[1]->getHeader('Content-Length')); - } - - public function testRemovingPostFieldRebuildsPostFields() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com'); - $request->setPostField('test', 'value'); - $request->removePostField('test'); - $this->assertNull($request->getPostField('test')); - } - - public function testUsesChunkedTransferWhenBodyLengthCannotBeDetermined() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request = new EntityEnclosingRequest('PUT', 'http://test.com/'); - $request->setBody(fopen($this->getServer()->getUrl(), 'r')); - $this->assertEquals('chunked', $request->getHeader('Transfer-Encoding')); - $this->assertFalse($request->hasHeader('Content-Length')); - } - - /** - * @expectedException \Guzzle\Http\Exception\RequestException - */ - public function testThrowsExceptionWhenContentLengthCannotBeDeterminedAndUsingHttp1() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com/'); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request->setProtocolVersion('1.0'); - $request->setBody(fopen($this->getServer()->getUrl(), 'r')); - } - - public function testAllowsNestedPostData() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->addPostFields(array( - 'a' => array('b', 'c') - )); - $this->assertEquals(array( - 'a' => array('b', 'c') - ), $request->getPostFields()->getAll()); - } - - public function testAllowsEmptyFields() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->addPostFields(array( - 'a' => '' - )); - $this->assertEquals(array( - 'a' => '' - ), $request->getPostFields()->getAll()); - } - - /** - * @expectedException \Guzzle\Http\Exception\RequestException - */ - public function testFailsOnInvalidFiles() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->addPostFiles(array( - 'a' => new \stdClass() - )); - } - - public function testHandlesEmptyStrings() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->addPostFields(array( - 'a' => '', - 'b' => null, - 'c' => 'Foo' - )); - $this->assertEquals(array( - 'a' => '', - 'b' => null, - 'c' => 'Foo' - ), $request->getPostFields()->getAll()); - } - - public function testHoldsPostFiles() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->addPostFile('foo', __FILE__); - $request->addPostFile(new PostFile('foo', __FILE__)); - - $this->assertArrayHasKey('foo', $request->getPostFiles()); - $foo = $request->getPostFile('foo'); - $this->assertEquals(2, count($foo)); - $this->assertEquals(__FILE__, $foo[0]->getFilename()); - $this->assertEquals(__FILE__, $foo[1]->getFilename()); - - $request->removePostFile('foo'); - $this->assertEquals(array(), $request->getPostFiles()); - } - - public function testAllowsAtPrefixWhenAddingPostFiles() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->addPostFiles(array( - 'foo' => '@' . __FILE__ - )); - $foo = $request->getPostFile('foo'); - $this->assertEquals(__FILE__, $foo[0]->getFilename()); - } - - public function testSetStateToTransferWithEmptyBodySetsContentLengthToZero() - { - $request = new EntityEnclosingRequest('POST', 'http://test.com/'); - $request->setState($request::STATE_TRANSFER); - $this->assertEquals('0', (string) $request->getHeader('Content-Length')); - } - - public function testSettingExpectHeaderCutoffChangesRequest() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com/'); - $request->setHeader('Expect', '100-Continue'); - $request->setExpectHeaderCutoff(false); - $this->assertNull($request->getHeader('Expect')); - // There is not body, so remove the expect header - $request->setHeader('Expect', '100-Continue'); - $request->setExpectHeaderCutoff(10); - $this->assertNull($request->getHeader('Expect')); - // The size is less than the cutoff - $request->setBody('foo'); - $this->assertNull($request->getHeader('Expect')); - // The size is greater than the cutoff - $request->setBody('foobazbarbamboo'); - $this->assertNotNull($request->getHeader('Expect')); - } - - public function testStrictRedirectsCanBeSpecifiedOnEntityEnclosingRequests() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com/'); - $request->configureRedirects(true); - $this->assertTrue($request->getParams()->get(RedirectPlugin::STRICT_REDIRECTS)); - } - - public function testCanDisableRedirects() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com/'); - $request->configureRedirects(false, false); - $this->assertTrue($request->getParams()->get(RedirectPlugin::DISABLE)); - } - - public function testSetsContentTypeWhenSettingBodyByGuessingFromEntityBody() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com/foo'); - $request->setBody(EntityBody::factory(fopen(__FILE__, 'r'))); - $this->assertEquals('text/x-php', (string) $request->getHeader('Content-Type')); - } - - public function testDoesNotCloneBody() - { - $request = new EntityEnclosingRequest('PUT', 'http://test.com/foo'); - $request->setBody('test'); - $newRequest = clone $request; - $newRequest->setBody('foo'); - $this->assertInternalType('string', (string) $request->getBody()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/HeaderFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/HeaderFactoryTest.php deleted file mode 100644 index 62ca5559d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/HeaderFactoryTest.php +++ /dev/null @@ -1,29 +0,0 @@ -createHeader('Foo', 'Bar'); - $this->assertInstanceOf('Guzzle\Http\Message\Header', $h); - $this->assertEquals('Foo', $h->getName()); - $this->assertEquals('Bar', (string) $h); - } - - public function testCreatesSpecificHeaders() - { - $f = new HeaderFactory(); - $h = $f->createHeader('Link', '; rel="test"'); - $this->assertInstanceOf('Guzzle\Http\Message\Header\Link', $h); - $this->assertEquals('Link', $h->getName()); - $this->assertEquals('; rel="test"', (string) $h); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/LinkTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/LinkTest.php deleted file mode 100644 index c834d1016..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/LinkTest.php +++ /dev/null @@ -1,63 +0,0 @@ -; rel=front; type="image/jpeg", ; rel=back; type="image/jpeg", ; rel=side; type="image/jpeg"'); - $links = $link->getLinks(); - $this->assertEquals(array( - array( - 'rel' => 'front', - 'type' => 'image/jpeg', - 'url' => 'http:/.../front.jpeg', - ), - array( - 'rel' => 'back', - 'type' => 'image/jpeg', - 'url' => 'http://.../back.jpeg', - ), - array( - 'rel' => 'side', - 'type' => 'image/jpeg', - 'url' => 'http://.../side.jpeg?test=1' - ) - ), $links); - - $this->assertEquals(array( - 'rel' => 'back', - 'type' => 'image/jpeg', - 'url' => 'http://.../back.jpeg', - ), $link->getLink('back')); - - $this->assertTrue($link->hasLink('front')); - $this->assertFalse($link->hasLink('foo')); - } - - public function testCanAddLink() - { - $link = new Link('Link', '; rel=a; type="image/jpeg"'); - $link->addLink('http://test.com', 'test', array('foo' => 'bar')); - $this->assertEquals( - '; rel=a; type="image/jpeg", ; rel="test"; foo="bar"', - (string) $link - ); - } - - public function testCanParseLinksWithCommas() - { - $link = new Link('Link', '; rel="previous"; title="start, index"'); - $this->assertEquals(array( - array( - 'rel' => 'previous', - 'title' => 'start, index', - 'url' => 'http://example.com/TheBook/chapter1', - ) - ), $link->getLinks()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparison.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparison.php deleted file mode 100644 index a3f511bfc..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparison.php +++ /dev/null @@ -1,135 +0,0 @@ -toArray(); - } - - foreach ($filteredHeaders as $k => $v) { - if ($k[0] == '_') { - // This header should be ignored - $ignore[] = str_replace('_', '', $k); - } elseif ($k[0] == '!') { - // This header must not be present - $absent[] = str_replace('!', '', $k); - } else { - $expected[$k] = $v; - } - } - - return $this->compareArray($expected, $actualHeaders, $ignore, $absent); - } - - /** - * Check if an array of HTTP headers matches another array of HTTP headers while taking * into account as a wildcard - * - * @param array $expected Expected HTTP headers (allows wildcard values) - * @param array|Collection $actual Actual HTTP header array - * @param array $ignore Headers to ignore from the comparison - * @param array $absent Array of headers that must not be present - * - * @return array|bool Returns an array of the differences or FALSE if none - */ - public function compareArray(array $expected, $actual, array $ignore = array(), array $absent = array()) - { - $differences = array(); - - // Add information about headers that were present but weren't supposed to be - foreach ($absent as $header) { - if ($this->hasKey($header, $actual)) { - $differences["++ {$header}"] = $actual[$header]; - unset($actual[$header]); - } - } - - // Check if expected headers are missing - foreach ($expected as $header => $value) { - if (!$this->hasKey($header, $actual)) { - $differences["- {$header}"] = $value; - } - } - - // Flip the ignore array so it works with the case insensitive helper - $ignore = array_flip($ignore); - // Allow case-insensitive comparisons in wildcards - $expected = array_change_key_case($expected); - - // Compare the expected and actual HTTP headers in no particular order - foreach ($actual as $key => $value) { - - // If this is to be ignored, the skip it - if ($this->hasKey($key, $ignore)) { - continue; - } - - // If the header was not expected - if (!$this->hasKey($key, $expected)) { - $differences["+ {$key}"] = $value; - continue; - } - - // Check values and take wildcards into account - $lkey = strtolower($key); - $pos = is_string($expected[$lkey]) ? strpos($expected[$lkey], '*') : false; - - foreach ((array) $actual[$key] as $v) { - if (($pos === false && $v != $expected[$lkey]) || $pos > 0 && substr($v, 0, $pos) != substr($expected[$lkey], 0, $pos)) { - $differences[$key] = "{$value} != {$expected[$lkey]}"; - } - } - } - - return empty($differences) ? false : $differences; - } - - /** - * Case insensitive check if an array have a key - * - * @param string $key Key to check - * @param array $array Array to check - * - * @return bool - */ - protected function hasKey($key, $array) - { - if ($array instanceof Collection) { - $keys = $array->getKeys(); - } else { - $keys = array_keys($array); - } - - foreach ($keys as $k) { - if (!strcasecmp($k, $key)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparisonTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparisonTest.php deleted file mode 100644 index 86c4fe866..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparisonTest.php +++ /dev/null @@ -1,115 +0,0 @@ - 'Foo' - ), array( - 'Content-Length' => 'Foo' - ), false), - - // Missing header - array(array( - 'X-Foo' => 'Bar' - ), array(), array( - '- X-Foo' => 'Bar' - )), - - // Extra headers is present - array(array( - 'X-Foo' => 'Bar' - ), array( - 'X-Foo' => 'Bar', - 'X-Baz' => 'Jar' - ), array( - '+ X-Baz' => 'Jar' - )), - - // Header is present but must be absent - array(array( - '!X-Foo' => '*' - ), array( - 'X-Foo' => 'Bar' - ), array( - '++ X-Foo' => 'Bar' - )), - - // Different values - array(array( - 'X-Foo' => 'Bar' - ), array( - 'X-Foo' => 'Baz' - ), array( - 'X-Foo' => 'Baz != Bar' - )), - - // Wildcard search passes - array(array( - 'X-Foo' => '*' - ), array( - 'X-Foo' => 'Bar' - ), false), - - // Wildcard search fails - array(array( - 'X-Foo' => '*' - ), array(), array( - '- X-Foo' => '*' - )), - - // Ignore extra header if present - array(array( - 'X-Foo' => '*', - '_X-Bar' => '*', - ), array( - 'X-Foo' => 'Baz', - 'X-Bar' => 'Jar' - ), false), - - // Ignore extra header if present and is not - array(array( - 'X-Foo' => '*', - '_X-Bar' => '*', - ), array( - 'X-Foo' => 'Baz' - ), false), - - // Case insensitive - array(array( - 'X-Foo' => '*', - '_X-Bar' => '*', - ), array( - 'x-foo' => 'Baz', - 'x-BAR' => 'baz' - ), false), - - // Case insensitive with collection - array(array( - 'X-Foo' => '*', - '_X-Bar' => '*', - ), new Collection(array( - 'x-foo' => 'Baz', - 'x-BAR' => 'baz' - )), false), - ); - } - - /** - * @dataProvider filterProvider - */ - public function testComparesHeaders($filters, $headers, $result) - { - $compare = new HeaderComparison(); - $this->assertEquals($result, $compare->compare($filters, $headers)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderTest.php deleted file mode 100644 index c7502349f..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderTest.php +++ /dev/null @@ -1,162 +0,0 @@ - array('foo', 'Foo'), - 'Zoo' => 'bar', - ); - - public function testStoresHeaderName() - { - $i = new Header('Zoo', $this->test); - $this->assertEquals('Zoo', $i->getName()); - } - - public function testConvertsToString() - { - $i = new Header('Zoo', $this->test); - $this->assertEquals('foo, Foo, bar', (string) $i); - $i->setGlue(';'); - $this->assertEquals('foo; Foo; bar', (string) $i); - } - - public function testNormalizesGluedHeaders() - { - $h = new Header('Zoo', array('foo, Faz', 'bar')); - $result = $h->normalize(true)->toArray(); - natsort($result); - $this->assertEquals(array('bar', 'foo', 'Faz'), $result); - } - - public function testCanSearchForValues() - { - $h = new Header('Zoo', $this->test); - $this->assertTrue($h->hasValue('foo')); - $this->assertTrue($h->hasValue('Foo')); - $this->assertTrue($h->hasValue('bar')); - $this->assertFalse($h->hasValue('moo')); - $this->assertFalse($h->hasValue('FoO')); - } - - public function testIsCountable() - { - $h = new Header('Zoo', $this->test); - $this->assertEquals(3, count($h)); - } - - public function testCanBeIterated() - { - $h = new Header('Zoo', $this->test); - $results = array(); - foreach ($h as $key => $value) { - $results[$key] = $value; - } - $this->assertEquals(array( - 'foo', 'Foo', 'bar' - ), $results); - } - - public function testAllowsFalseyValues() - { - // Allows 0 - $h = new Header('Foo', 0, ';'); - $this->assertEquals('0', (string) $h); - $this->assertEquals(1, count($h)); - $this->assertEquals(';', $h->getGlue()); - - // Does not add a null header by default - $h = new Header('Foo'); - $this->assertEquals('', (string) $h); - $this->assertEquals(0, count($h)); - - // Allows null array for a single null header - $h = new Header('Foo', array(null)); - $this->assertEquals('', (string) $h); - - // Allows empty string - $h = new Header('Foo', ''); - $this->assertEquals('', (string) $h); - $this->assertEquals(1, count($h)); - $this->assertEquals(1, count($h->normalize()->toArray())); - } - - public function testCanRemoveValues() - { - $h = new Header('Foo', array('Foo', 'baz', 'bar')); - $h->removeValue('bar'); - $this->assertTrue($h->hasValue('Foo')); - $this->assertFalse($h->hasValue('bar')); - $this->assertTrue($h->hasValue('baz')); - } - - public function testAllowsArrayInConstructor() - { - $h = new Header('Foo', array('Testing', '123', 'Foo=baz')); - $this->assertEquals(array('Testing', '123', 'Foo=baz'), $h->toArray()); - } - - public function parseParamsProvider() - { - $res1 = array( - array( - '' => '', - 'rel' => 'front', - 'type' => 'image/jpeg', - ), - array( - '' => '', - 'rel' => 'back', - 'type' => 'image/jpeg', - ), - ); - - return array( - array( - '; rel="front"; type="image/jpeg", ; rel=back; type="image/jpeg"', - $res1 - ), - array( - '; rel="front"; type="image/jpeg",; rel=back; type="image/jpeg"', - $res1 - ), - array( - 'foo="baz"; bar=123, boo, test="123", foobar="foo;bar"', - array( - array('foo' => 'baz', 'bar' => '123'), - array('boo' => ''), - array('test' => '123'), - array('foobar' => 'foo;bar') - ) - ), - array( - '; rel="side"; type="image/jpeg",; rel=side; type="image/jpeg"', - array( - array('' => '', 'rel' => 'side', 'type' => 'image/jpeg'), - array('' => '', 'rel' => 'side', 'type' => 'image/jpeg') - ) - ), - array( - '', - array() - ) - ); - } - - /** - * @dataProvider parseParamsProvider - */ - public function testParseParams($header, $result) - { - $response = new Response(200, array('Link' => $header)); - $this->assertEquals($result, $response->getHeader('Link')->parseParams()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/PostFileTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/PostFileTest.php deleted file mode 100644 index be048cb95..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/PostFileTest.php +++ /dev/null @@ -1,88 +0,0 @@ -assertEquals('foo', $file->getFieldName()); - $this->assertEquals(__FILE__, $file->getFilename()); - $this->assertEquals('boo', $file->getPostName()); - $this->assertEquals('x-foo', $file->getContentType()); - } - - public function testRemovesLeadingAtSymbolFromPath() - { - $file = new PostFile('foo', '@' . __FILE__); - $this->assertEquals(__FILE__, $file->getFilename()); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testEnsuresFileIsReadable() - { - $file = new PostFile('foo', '/foo/baz/bar'); - } - - public function testCanChangeContentType() - { - $file = new PostFile('foo', '@' . __FILE__); - $file->setContentType('Boo'); - $this->assertEquals('Boo', $file->getContentType()); - } - - public function testCanChangeFieldName() - { - $file = new PostFile('foo', '@' . __FILE__); - $file->setFieldName('Boo'); - $this->assertEquals('Boo', $file->getFieldName()); - } - - public function testReturnsCurlValueString() - { - $file = new PostFile('foo', __FILE__); - if (version_compare(phpversion(), '5.5.0', '<')) { - $this->assertContains('@' . __FILE__ . ';filename=PostFileTest.php;type=text/x-', $file->getCurlValue()); - } else { - $c = $file->getCurlValue(); - $this->assertEquals(__FILE__, $c->getFilename()); - $this->assertEquals('PostFileTest.php', $c->getPostFilename()); - $this->assertContains('text/x-', $c->getMimeType()); - } - } - - public function testReturnsCurlValueStringAndPostname() - { - $file = new PostFile('foo', __FILE__, null, 'NewPostFileTest.php'); - if (version_compare(phpversion(), '5.5.0', '<')) { - $this->assertContains('@' . __FILE__ . ';filename=NewPostFileTest.php;type=text/x-', $file->getCurlValue()); - } else { - $c = $file->getCurlValue(); - $this->assertEquals(__FILE__, $c->getFilename()); - $this->assertEquals('NewPostFileTest.php', $c->getPostFilename()); - $this->assertContains('text/x-', $c->getMimeType()); - } - } - - public function testContentDispositionFilePathIsStripped() - { - $this->getServer()->flush(); - $client = new Client($this->getServer()->getUrl()); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request = $client->post()->addPostFile('file', __FILE__); - $request->send(); - $requests = $this->getServer()->getReceivedRequests(false); - $this->assertContains('POST / HTTP/1.1', $requests[0]); - $this->assertContains('Content-Disposition: form-data; name="file"; filename="PostFileTest.php"', $requests[0]); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestFactoryTest.php deleted file mode 100644 index d43e0899c..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestFactoryTest.php +++ /dev/null @@ -1,613 +0,0 @@ -assertSame($factory, RequestFactory::getInstance()); - } - - public function testCreatesNewGetRequests() - { - $request = RequestFactory::getInstance()->create('GET', 'http://www.google.com/'); - $this->assertInstanceOf('Guzzle\\Http\\Message\\MessageInterface', $request); - $this->assertInstanceOf('Guzzle\\Http\\Message\\RequestInterface', $request); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Request', $request); - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('http', $request->getScheme()); - $this->assertEquals('http://www.google.com/', $request->getUrl()); - $this->assertEquals('www.google.com', $request->getHost()); - $this->assertEquals('/', $request->getPath()); - $this->assertEquals('/', $request->getResource()); - - // Create a GET request with a custom receiving body - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $b = EntityBody::factory(); - $request = RequestFactory::getInstance()->create('GET', $this->getServer()->getUrl(), null, $b); - $request->setClient(new Client()); - $response = $request->send(); - $this->assertSame($b, $response->getBody()); - } - - public function testCreatesPutRequests() - { - // Test using a string - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/path?q=1&v=2', null, 'Data'); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals('http', $request->getScheme()); - $this->assertEquals('http://www.google.com/path?q=1&v=2', $request->getUrl()); - $this->assertEquals('www.google.com', $request->getHost()); - $this->assertEquals('/path', $request->getPath()); - $this->assertEquals('/path?q=1&v=2', $request->getResource()); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $request->getBody()); - $this->assertEquals('Data', (string) $request->getBody()); - unset($request); - - // Test using an EntityBody - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/path?q=1&v=2', null, EntityBody::factory('Data')); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('Data', (string) $request->getBody()); - - // Test using a resource - $resource = fopen('php://temp', 'w+'); - fwrite($resource, 'Data'); - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/path?q=1&v=2', null, $resource); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('Data', (string) $request->getBody()); - - // Test using an object that can be cast as a string - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/path?q=1&v=2', null, Url::factory('http://www.example.com/')); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('http://www.example.com/', (string) $request->getBody()); - } - - public function testCreatesHeadAndDeleteRequests() - { - $request = RequestFactory::getInstance()->create('DELETE', 'http://www.test.com/'); - $this->assertEquals('DELETE', $request->getMethod()); - $request = RequestFactory::getInstance()->create('HEAD', 'http://www.test.com/'); - $this->assertEquals('HEAD', $request->getMethod()); - } - - public function testCreatesOptionsRequests() - { - $request = RequestFactory::getInstance()->create('OPTIONS', 'http://www.example.com/'); - $this->assertEquals('OPTIONS', $request->getMethod()); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Request', $request); - } - - public function testCreatesNewPutRequestWithBody() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/path?q=1&v=2', null, 'Data'); - $this->assertEquals('Data', (string) $request->getBody()); - } - - public function testCreatesNewPostRequestWithFields() - { - // Use an array - $request = RequestFactory::getInstance()->create('POST', 'http://www.google.com/path?q=1&v=2', null, array( - 'a' => 'b' - )); - $this->assertEquals(array('a' => 'b'), $request->getPostFields()->getAll()); - unset($request); - - // Use a collection - $request = RequestFactory::getInstance()->create('POST', 'http://www.google.com/path?q=1&v=2', null, new Collection(array( - 'a' => 'b' - ))); - $this->assertEquals(array('a' => 'b'), $request->getPostFields()->getAll()); - - // Use a QueryString - $request = RequestFactory::getInstance()->create('POST', 'http://www.google.com/path?q=1&v=2', null, new QueryString(array( - 'a' => 'b' - ))); - $this->assertEquals(array('a' => 'b'), $request->getPostFields()->getAll()); - - $request = RequestFactory::getInstance()->create('POST', 'http://www.test.com/', null, array( - 'a' => 'b', - 'file' => '@' . __FILE__ - )); - - $this->assertEquals(array( - 'a' => 'b' - ), $request->getPostFields()->getAll()); - - $files = $request->getPostFiles(); - $this->assertInstanceOf('Guzzle\Http\Message\PostFile', $files['file'][0]); - } - - public function testCreatesFromParts() - { - $parts = parse_url('http://michael:123@www.google.com:8080/path?q=1&v=2'); - - $request = RequestFactory::getInstance()->fromParts('PUT', $parts, null, 'Data'); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals('http', $request->getScheme()); - $this->assertEquals('http://www.google.com:8080/path?q=1&v=2', $request->getUrl()); - $this->assertEquals('www.google.com', $request->getHost()); - $this->assertEquals('www.google.com:8080', $request->getHeader('Host')); - $this->assertEquals('/path', $request->getPath()); - $this->assertEquals('/path?q=1&v=2', $request->getResource()); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $request->getBody()); - $this->assertEquals('Data', (string) $request->getBody()); - $this->assertEquals('michael', $request->getUsername()); - $this->assertEquals('123', $request->getPassword()); - $this->assertEquals('8080', $request->getPort()); - $this->assertEquals(array( - 'scheme' => 'http', - 'host' => 'www.google.com', - 'port' => 8080, - 'path' => '/path', - 'query' => 'q=1&v=2', - ), parse_url($request->getUrl())); - } - - public function testCreatesFromMessage() - { - $auth = base64_encode('michael:123'); - $message = "PUT /path?q=1&v=2 HTTP/1.1\r\nHost: www.google.com:8080\r\nContent-Length: 4\r\nAuthorization: Basic {$auth}\r\n\r\nData"; - $request = RequestFactory::getInstance()->fromMessage($message); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals('http', $request->getScheme()); - $this->assertEquals('http://www.google.com:8080/path?q=1&v=2', $request->getUrl()); - $this->assertEquals('www.google.com', $request->getHost()); - $this->assertEquals('www.google.com:8080', $request->getHeader('Host')); - $this->assertEquals('/path', $request->getPath()); - $this->assertEquals('/path?q=1&v=2', $request->getResource()); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $request->getBody()); - $this->assertEquals('Data', (string) $request->getBody()); - $this->assertEquals("Basic {$auth}", (string) $request->getHeader('Authorization')); - $this->assertEquals('8080', $request->getPort()); - - // Test passing a blank message returns false - $this->assertFalse($request = RequestFactory::getInstance()->fromMessage('')); - - // Test passing a url with no port - $message = "PUT /path?q=1&v=2 HTTP/1.1\r\nHost: www.google.com\r\nContent-Length: 4\r\nAuthorization: Basic {$auth}\r\n\r\nData"; - $request = RequestFactory::getInstance()->fromMessage($message); - $this->assertInstanceOf('Guzzle\\Http\\Message\\EntityEnclosingRequest', $request); - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals('http', $request->getScheme()); - $this->assertEquals('http://www.google.com/path?q=1&v=2', $request->getUrl()); - $this->assertEquals('www.google.com', $request->getHost()); - $this->assertEquals('/path', $request->getPath()); - $this->assertEquals('/path?q=1&v=2', $request->getResource()); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $request->getBody()); - $this->assertEquals('Data', (string) $request->getBody()); - $this->assertEquals("Basic {$auth}", (string) $request->getHeader('Authorization')); - $this->assertEquals(80, $request->getPort()); - } - - public function testCreatesNewTraceRequest() - { - $request = RequestFactory::getInstance()->create('TRACE', 'http://www.google.com/'); - $this->assertFalse($request instanceof \Guzzle\Http\Message\EntityEnclosingRequest); - $this->assertEquals('TRACE', $request->getMethod()); - } - - public function testCreatesProperTransferEncodingRequests() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/', array( - 'Transfer-Encoding' => 'chunked' - ), 'hello'); - $this->assertEquals('chunked', $request->getHeader('Transfer-Encoding')); - $this->assertFalse($request->hasHeader('Content-Length')); - } - - public function testProperlyDealsWithDuplicateHeaders() - { - $parser = new MessageParser(); - - $message = "POST / http/1.1\r\n" - . "DATE:Mon, 09 Sep 2011 23:36:00 GMT\r\n" - . "host:host.foo.com\r\n" - . "ZOO:abc\r\n" - . "ZOO:123\r\n" - . "ZOO:HI\r\n" - . "zoo:456\r\n\r\n"; - - $parts = $parser->parseRequest($message); - $this->assertEquals(array ( - 'DATE' => 'Mon, 09 Sep 2011 23:36:00 GMT', - 'host' => 'host.foo.com', - 'ZOO' => array('abc', '123', 'HI'), - 'zoo' => '456', - ), $parts['headers']); - - $request = RequestFactory::getInstance()->fromMessage($message); - - $this->assertEquals(array( - 'abc', '123', 'HI', '456' - ), $request->getHeader('zoo')->toArray()); - } - - public function testCreatesHttpMessagesWithBodiesAndNormalizesLineEndings() - { - $message = "POST / http/1.1\r\n" - . "Content-Type:application/x-www-form-urlencoded; charset=utf8\r\n" - . "Date:Mon, 09 Sep 2011 23:36:00 GMT\r\n" - . "Host:host.foo.com\r\n\r\n" - . "foo=bar"; - - $request = RequestFactory::getInstance()->fromMessage($message); - $this->assertEquals('application/x-www-form-urlencoded; charset=utf8', (string) $request->getHeader('Content-Type')); - $this->assertEquals('foo=bar', (string) $request->getBody()); - - $message = "POST / http/1.1\n" - . "Content-Type:application/x-www-form-urlencoded; charset=utf8\n" - . "Date:Mon, 09 Sep 2011 23:36:00 GMT\n" - . "Host:host.foo.com\n\n" - . "foo=bar"; - $request = RequestFactory::getInstance()->fromMessage($message); - $this->assertEquals('foo=bar', (string) $request->getBody()); - - $message = "PUT / HTTP/1.1\r\nContent-Length: 0\r\n\r\n"; - $request = RequestFactory::getInstance()->fromMessage($message); - $this->assertTrue($request->hasHeader('Content-Length')); - $this->assertEquals(0, (string) $request->getHeader('Content-Length')); - } - - public function testBugPathIncorrectlyHandled() - { - $message = "POST /foo\r\n\r\nBODY"; - $request = RequestFactory::getInstance()->fromMessage($message); - $this->assertSame('POST', $request->getMethod()); - $this->assertSame('/foo', $request->getPath()); - $this->assertSame('BODY', (string) $request->getBody()); - } - - public function testHandlesChunkedTransferEncoding() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://www.foo.com/', array( - 'Transfer-Encoding' => 'chunked' - ), 'Test'); - $this->assertFalse($request->hasHeader('Content-Length')); - $this->assertEquals('chunked', $request->getHeader('Transfer-Encoding')); - - $request = RequestFactory::getInstance()->create('POST', 'http://www.foo.com/', array( - 'transfer-encoding' => 'chunked' - ), array( - 'foo' => 'bar' - )); - - $this->assertFalse($request->hasHeader('Content-Length')); - $this->assertEquals('chunked', $request->getHeader('Transfer-Encoding')); - } - - public function testClonesRequestsWithMethodWithoutClient() - { - $f = RequestFactory::getInstance(); - $request = $f->create('GET', 'http://www.test.com', array('X-Foo' => 'Bar')); - $request->getParams()->replace(array('test' => '123')); - $request->getCurlOptions()->set('foo', 'bar'); - $cloned = $f->cloneRequestWithMethod($request, 'PUT'); - $this->assertEquals('PUT', $cloned->getMethod()); - $this->assertEquals('Bar', (string) $cloned->getHeader('X-Foo')); - $this->assertEquals('http://www.test.com', $cloned->getUrl()); - // Ensure params are cloned and cleaned up - $this->assertEquals(1, count($cloned->getParams()->getAll())); - $this->assertEquals('123', $cloned->getParams()->get('test')); - // Ensure curl options are cloned - $this->assertEquals('bar', $cloned->getCurlOptions()->get('foo')); - // Ensure event dispatcher is cloned - $this->assertNotSame($request->getEventDispatcher(), $cloned->getEventDispatcher()); - } - - public function testClonesRequestsWithMethodWithClient() - { - $f = RequestFactory::getInstance(); - $client = new Client(); - $request = $client->put('http://www.test.com', array('Content-Length' => 4), 'test'); - $cloned = $f->cloneRequestWithMethod($request, 'GET'); - $this->assertEquals('GET', $cloned->getMethod()); - $this->assertNull($cloned->getHeader('Content-Length')); - $this->assertEquals('http://www.test.com', $cloned->getUrl()); - $this->assertSame($request->getClient(), $cloned->getClient()); - } - - public function testClonesRequestsWithMethodWithClientWithEntityEnclosingChange() - { - $f = RequestFactory::getInstance(); - $client = new Client(); - $request = $client->put('http://www.test.com', array('Content-Length' => 4), 'test'); - $cloned = $f->cloneRequestWithMethod($request, 'POST'); - $this->assertEquals('POST', $cloned->getMethod()); - $this->assertEquals('test', (string) $cloned->getBody()); - } - - public function testCanDisableRedirects() - { - $this->getServer()->enqueue(array( - "HTTP/1.1 307\r\nLocation: " . $this->getServer()->getUrl() . "\r\nContent-Length: 0\r\n\r\n" - )); - $client = new Client($this->getServer()->getUrl()); - $response = $client->get('/', array(), array('allow_redirects' => false))->send(); - $this->assertEquals(307, $response->getStatusCode()); - } - - public function testCanAddCookies() - { - $client = new Client($this->getServer()->getUrl()); - $request = $client->get('/', array(), array('cookies' => array('Foo' => 'Bar'))); - $this->assertEquals('Bar', $request->getCookie('Foo')); - } - - public function testCanAddQueryString() - { - $request = RequestFactory::getInstance()->create('GET', 'http://foo.com', array(), null, array( - 'query' => array('Foo' => 'Bar') - )); - $this->assertEquals('Bar', $request->getQuery()->get('Foo')); - } - - public function testCanSetDefaultQueryString() - { - $request = new Request('GET', 'http://www.foo.com?test=abc'); - RequestFactory::getInstance()->applyOptions($request, array( - 'query' => array('test' => '123', 'other' => 't123') - ), RequestFactory::OPTIONS_AS_DEFAULTS); - $this->assertEquals('abc', $request->getQuery()->get('test')); - $this->assertEquals('t123', $request->getQuery()->get('other')); - } - - public function testCanAddBasicAuth() - { - $request = RequestFactory::getInstance()->create('GET', 'http://foo.com', array(), null, array( - 'auth' => array('michael', 'test') - )); - $this->assertEquals('michael', $request->getUsername()); - $this->assertEquals('test', $request->getPassword()); - } - - public function testCanAddDigestAuth() - { - $request = RequestFactory::getInstance()->create('GET', 'http://foo.com', array(), null, array( - 'auth' => array('michael', 'test', 'digest') - )); - $this->assertEquals(CURLAUTH_DIGEST, $request->getCurlOptions()->get(CURLOPT_HTTPAUTH)); - $this->assertEquals('michael', $request->getUsername()); - $this->assertEquals('test', $request->getPassword()); - } - - public function testCanAddEvents() - { - $foo = null; - $client = new Client(); - $client->addSubscriber(new MockPlugin(array(new Response(200)))); - $request = $client->get($this->getServer()->getUrl(), array(), array( - 'events' => array( - 'request.before_send' => function () use (&$foo) { $foo = true; } - ) - )); - $request->send(); - $this->assertTrue($foo); - } - - public function testCanAddEventsWithPriority() - { - $foo = null; - $client = new Client(); - $client->addSubscriber(new MockPlugin(array(new Response(200)))); - $request = $client->get($this->getServer()->getUrl(), array(), array( - 'events' => array( - 'request.before_send' => array(function () use (&$foo) { $foo = true; }, 100) - ) - )); - $request->send(); - $this->assertTrue($foo); - } - - public function testCanAddPlugins() - { - $mock = new MockPlugin(array(new Response(200))); - $client = new Client(); - $client->addSubscriber($mock); - $request = $client->get('/', array(), array( - 'plugins' => array($mock) - )); - $request->send(); - } - - public function testCanDisableExceptions() - { - $client = new Client(); - $request = $client->get('/', array(), array( - 'plugins' => array(new MockPlugin(array(new Response(500)))), - 'exceptions' => false - )); - $this->assertEquals(500, $request->send()->getStatusCode()); - } - - public function testCanDisableExceptionsWithErrorListener() - { - $client = new Client(); - $client->getEventDispatcher()->addListener('request.error', function () {}); - $request = $client->get('/', array(), array( - 'plugins' => array(new MockPlugin(array(new Response(500)))), - 'exceptions' => false - )); - $this->assertEquals(500, $request->send()->getStatusCode()); - } - - public function testCanChangeSaveToLocation() - { - $r = EntityBody::factory(); - $client = new Client(); - $request = $client->get('/', array(), array( - 'plugins' => array(new MockPlugin(array(new Response(200, array(), 'testing')))), - 'save_to' => $r - )); - $request->send(); - $this->assertEquals('testing', (string) $r); - } - - public function testCanSetProxy() - { - $client = new Client(); - $request = $client->get('/', array(), array('proxy' => '192.168.16.121')); - $this->assertEquals('192.168.16.121', $request->getCurlOptions()->get(CURLOPT_PROXY)); - } - - public function testCanSetHeadersOption() - { - $client = new Client(); - $request = $client->get('/', array(), array('headers' => array('Foo' => 'Bar'))); - $this->assertEquals('Bar', (string) $request->getHeader('Foo')); - } - - public function testCanSetDefaultHeadersOptions() - { - $request = new Request('GET', 'http://www.foo.com', array('Foo' => 'Bar')); - RequestFactory::getInstance()->applyOptions($request, array( - 'headers' => array('Foo' => 'Baz', 'Bam' => 't123') - ), RequestFactory::OPTIONS_AS_DEFAULTS); - $this->assertEquals('Bar', (string) $request->getHeader('Foo')); - $this->assertEquals('t123', (string) $request->getHeader('Bam')); - } - - public function testCanSetBodyOption() - { - $client = new Client(); - $request = $client->put('/', array(), null, array('body' => 'test')); - $this->assertEquals('test', (string) $request->getBody()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesBodyOption() - { - $client = new Client(); - $client->get('/', array(), array('body' => 'test')); - } - - public function testCanSetTimeoutOption() - { - $client = new Client(); - $request = $client->get('/', array(), array('timeout' => 1.5)); - $this->assertEquals(1500, $request->getCurlOptions()->get(CURLOPT_TIMEOUT_MS)); - } - - public function testCanSetConnectTimeoutOption() - { - $client = new Client(); - $request = $client->get('/', array(), array('connect_timeout' => 1.5)); - $this->assertEquals(1500, $request->getCurlOptions()->get(CURLOPT_CONNECTTIMEOUT_MS)); - } - - public function testCanSetDebug() - { - $client = new Client(); - $request = $client->get('/', array(), array('debug' => true)); - $this->assertTrue($request->getCurlOptions()->get(CURLOPT_VERBOSE)); - } - - public function testCanSetVerifyToOff() - { - $client = new Client(); - $request = $client->get('/', array(), array('verify' => false)); - $this->assertNull($request->getCurlOptions()->get(CURLOPT_CAINFO)); - $this->assertSame(0, $request->getCurlOptions()->get(CURLOPT_SSL_VERIFYHOST)); - $this->assertFalse($request->getCurlOptions()->get(CURLOPT_SSL_VERIFYPEER)); - } - - public function testCanSetVerifyToOn() - { - $client = new Client(); - $request = $client->get('/', array(), array('verify' => true)); - $this->assertNotNull($request->getCurlOptions()->get(CURLOPT_CAINFO)); - $this->assertSame(2, $request->getCurlOptions()->get(CURLOPT_SSL_VERIFYHOST)); - $this->assertTrue($request->getCurlOptions()->get(CURLOPT_SSL_VERIFYPEER)); - } - - public function testCanSetVerifyToPath() - { - $client = new Client(); - $request = $client->get('/', array(), array('verify' => '/foo.pem')); - $this->assertEquals('/foo.pem', $request->getCurlOptions()->get(CURLOPT_CAINFO)); - $this->assertSame(2, $request->getCurlOptions()->get(CURLOPT_SSL_VERIFYHOST)); - $this->assertTrue($request->getCurlOptions()->get(CURLOPT_SSL_VERIFYPEER)); - } - - public function inputValidation() - { - return array_map(function ($option) { return array($option); }, array( - 'headers', 'query', 'cookies', 'auth', 'events', 'plugins', 'params' - )); - } - - /** - * @dataProvider inputValidation - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testValidatesInput($option) - { - $client = new Client(); - $client->get('/', array(), array($option => 'foo')); - } - - public function testCanAddRequestParams() - { - $client = new Client(); - $request = $client->put('/', array(), null, array('params' => array('foo' => 'test'))); - $this->assertEquals('test', $request->getParams()->get('foo')); - } - - public function testCanAddSslKey() - { - $client = new Client(); - $request = $client->get('/', array(), array('ssl_key' => '/foo.pem')); - $this->assertEquals('/foo.pem', $request->getCurlOptions()->get(CURLOPT_SSLKEY)); - } - - public function testCanAddSslKeyPassword() - { - $client = new Client(); - $request = $client->get('/', array(), array('ssl_key' => array('/foo.pem', 'bar'))); - $this->assertEquals('/foo.pem', $request->getCurlOptions()->get(CURLOPT_SSLKEY)); - $this->assertEquals('bar', $request->getCurlOptions()->get(CURLOPT_SSLKEYPASSWD)); - } - - public function testCanAddSslCert() - { - $client = new Client(); - $request = $client->get('/', array(), array('cert' => '/foo.pem')); - $this->assertEquals('/foo.pem', $request->getCurlOptions()->get(CURLOPT_SSLCERT)); - } - - public function testCanAddSslCertPassword() - { - $client = new Client(); - $request = $client->get('/', array(), array('cert' => array('/foo.pem', 'bar'))); - $this->assertEquals('/foo.pem', $request->getCurlOptions()->get(CURLOPT_SSLCERT)); - $this->assertEquals('bar', $request->getCurlOptions()->get(CURLOPT_SSLCERTPASSWD)); - } - - public function testCreatesBodyWithoutZeroString() - { - $request = RequestFactory::getInstance()->create('PUT', 'http://test.com', array(), '0'); - $this->assertSame('0', (string) $request->getBody()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestTest.php deleted file mode 100644 index 5f4d8a789..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestTest.php +++ /dev/null @@ -1,625 +0,0 @@ -client = new Client($this->getServer()->getUrl()); - $this->request = $this->client->get(); - } - - public function tearDown() - { - unset($this->request); - unset($this->client); - } - - public function testConstructorBuildsRequestWithArrayHeaders() - { - // Test passing an array of headers - $request = new Request('GET', 'http://www.guzzle-project.com/', array( - 'foo' => 'bar' - )); - - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('http://www.guzzle-project.com/', $request->getUrl()); - $this->assertEquals('bar', $request->getHeader('foo')); - } - - public function testDescribesEvents() - { - $this->assertInternalType('array', Request::getAllEvents()); - } - - public function testConstructorBuildsRequestWithCollectionHeaders() - { - $request = new Request('GET', 'http://www.guzzle-project.com/', new Collection(array( - 'foo' => 'bar' - ))); - $this->assertEquals('bar', $request->getHeader('foo')); - } - - public function testConstructorBuildsRequestWithNoHeaders() - { - $request = new Request('GET', 'http://www.guzzle-project.com/', null); - $this->assertFalse($request->hasHeader('foo')); - } - - public function testConstructorHandlesNonBasicAuth() - { - $request = new Request('GET', 'http://www.guzzle-project.com/', array( - 'Authorization' => 'Foo bar' - )); - $this->assertNull($request->getUserName()); - $this->assertNull($request->getPassword()); - $this->assertEquals('Foo bar', (string) $request->getHeader('Authorization')); - } - - public function testRequestsCanBeConvertedToRawMessageStrings() - { - $auth = base64_encode('michael:123'); - $message = "PUT /path?q=1&v=2 HTTP/1.1\r\n" - . "Host: www.google.com\r\n" - . "Authorization: Basic {$auth}\r\n" - . "Content-Length: 4\r\n\r\nData"; - - $request = RequestFactory::getInstance()->create('PUT', 'http://www.google.com/path?q=1&v=2', array( - 'Authorization' => 'Basic ' . $auth - ), 'Data'); - - $this->assertEquals($message, $request->__toString()); - } - - /** - * Add authorization after the fact and see that it was put in the message - */ - public function testRequestStringsIncludeAuth() - { - $auth = base64_encode('michael:123'); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request = RequestFactory::getInstance()->create('PUT', $this->getServer()->getUrl(), null, 'Data') - ->setClient($this->client) - ->setAuth('michael', '123', CURLAUTH_BASIC); - $request->send(); - - $this->assertContains('Authorization: Basic ' . $auth, (string) $request); - } - - public function testGetEventDispatcher() - { - $d = $this->request->getEventDispatcher(); - $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface', $d); - $this->assertEquals($d, $this->request->getEventDispatcher()); - } - - public function testRequestsManageClients() - { - $request = new Request('GET', 'http://test.com'); - $this->assertNull($request->getClient()); - $request->setClient($this->client); - $this->assertSame($this->client, $request->getClient()); - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage A client must be set on the request - */ - public function testRequestsRequireClients() - { - $request = new Request('GET', 'http://test.com'); - $request->send(); - } - - public function testSend() - { - $response = new Response(200, array( - 'Content-Length' => 3 - ), 'abc'); - $this->request->setResponse($response, true); - $r = $this->request->send(); - - $this->assertSame($response, $r); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $this->request->getResponse()); - $this->assertSame($r, $this->request->getResponse()); - $this->assertEquals('complete', $this->request->getState()); - } - - public function testGetResponse() - { - $this->assertNull($this->request->getResponse()); - $response = new Response(200, array('Content-Length' => 3), 'abc'); - - $this->request->setResponse($response); - $this->assertEquals($response, $this->request->getResponse()); - - $client = new Client('http://www.google.com'); - $request = $client->get('http://www.google.com/'); - $request->setResponse($response, true); - $request->send(); - $requestResponse = $request->getResponse(); - $this->assertSame($response, $requestResponse); - - // Try again, making sure it's still the same response - $this->assertSame($requestResponse, $request->getResponse()); - - $response = new Response(204); - $request = $client->get(); - $request->setResponse($response, true); - $request->send(); - $requestResponse = $request->getResponse(); - $this->assertSame($response, $requestResponse); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $response->getBody()); - } - - public function testRequestThrowsExceptionOnBadResponse() - { - try { - $this->request->setResponse(new Response(404, array('Content-Length' => 3), 'abc'), true); - $this->request->send(); - $this->fail('Expected exception not thrown'); - } catch (BadResponseException $e) { - $this->assertInstanceOf('Guzzle\\Http\\Message\\RequestInterface', $e->getRequest()); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $e->getResponse()); - $this->assertContains('Client error response', $e->getMessage()); - } - } - - public function testManagesQuery() - { - $this->assertInstanceOf('Guzzle\\Http\\QueryString', $this->request->getQuery()); - $this->request->getQuery()->set('test', '123'); - $this->assertEquals('test=123', $this->request->getQuery(true)); - } - - public function testRequestHasMethod() - { - $this->assertEquals('GET', $this->request->getMethod()); - } - - public function testRequestHasScheme() - { - $this->assertEquals('http', $this->request->getScheme()); - $this->assertEquals($this->request, $this->request->setScheme('https')); - $this->assertEquals('https', $this->request->getScheme()); - } - - public function testRequestHasHost() - { - $this->assertEquals('127.0.0.1', $this->request->getHost()); - $this->assertEquals('127.0.0.1:8124', (string) $this->request->getHeader('Host')); - - $this->assertSame($this->request, $this->request->setHost('www2.google.com')); - $this->assertEquals('www2.google.com', $this->request->getHost()); - $this->assertEquals('www2.google.com:8124', (string) $this->request->getHeader('Host')); - - $this->assertSame($this->request, $this->request->setHost('www.test.com:8081')); - $this->assertEquals('www.test.com', $this->request->getHost()); - $this->assertEquals(8081, $this->request->getPort()); - } - - public function testRequestHasProtocol() - { - $this->assertEquals('1.1', $this->request->getProtocolVersion()); - $this->assertEquals($this->request, $this->request->setProtocolVersion('1.1')); - $this->assertEquals('1.1', $this->request->getProtocolVersion()); - $this->assertEquals($this->request, $this->request->setProtocolVersion('1.0')); - $this->assertEquals('1.0', $this->request->getProtocolVersion()); - } - - public function testRequestHasPath() - { - $this->assertEquals('/', $this->request->getPath()); - $this->assertEquals($this->request, $this->request->setPath('/index.html')); - $this->assertEquals('/index.html', $this->request->getPath()); - $this->assertEquals($this->request, $this->request->setPath('index.html')); - $this->assertEquals('/index.html', $this->request->getPath()); - } - - public function testPermitsFalsyComponents() - { - $request = new Request('GET', 'http://0/0?0'); - $this->assertSame('0', $request->getHost()); - $this->assertSame('/0', $request->getPath()); - $this->assertSame('0', $request->getQuery(true)); - - $request = new Request('GET', '0'); - $this->assertEquals('/0', $request->getPath()); - } - - public function testRequestHasPort() - { - $this->assertEquals(8124, $this->request->getPort()); - $this->assertEquals('127.0.0.1:8124', $this->request->getHeader('Host')); - - $this->assertEquals($this->request, $this->request->setPort('8080')); - $this->assertEquals('8080', $this->request->getPort()); - $this->assertEquals('127.0.0.1:8080', $this->request->getHeader('Host')); - - $this->request->setPort(80); - $this->assertEquals('127.0.0.1', $this->request->getHeader('Host')); - } - - public function testRequestHandlesAuthorization() - { - // Uninitialized auth - $this->assertEquals(null, $this->request->getUsername()); - $this->assertEquals(null, $this->request->getPassword()); - - // Set an auth - $this->assertSame($this->request, $this->request->setAuth('michael', '123')); - $this->assertEquals('michael', $this->request->getUsername()); - $this->assertEquals('123', $this->request->getPassword()); - - // Set an auth with blank password - $this->assertSame($this->request, $this->request->setAuth('michael', '')); - $this->assertEquals('michael', $this->request->getUsername()); - $this->assertEquals('', $this->request->getPassword()); - - // Remove the auth - $this->request->setAuth(false); - $this->assertEquals(null, $this->request->getUsername()); - $this->assertEquals(null, $this->request->getPassword()); - - // Make sure that the cURL based auth works too - $request = new Request('GET', $this->getServer()->getUrl()); - $request->setAuth('michael', 'password', CURLAUTH_DIGEST); - $this->assertEquals('michael:password', $request->getCurlOptions()->get(CURLOPT_USERPWD)); - $this->assertEquals(CURLAUTH_DIGEST, $request->getCurlOptions()->get(CURLOPT_HTTPAUTH)); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testValidatesAuth() - { - $this->request->setAuth('foo', 'bar', 'bam'); - } - - public function testGetResourceUri() - { - $this->assertEquals('/', $this->request->getResource()); - $this->request->setPath('/index.html'); - $this->assertEquals('/index.html', $this->request->getResource()); - $this->request->getQuery()->add('v', '1'); - $this->assertEquals('/index.html?v=1', $this->request->getResource()); - } - - public function testRequestHasMutableUrl() - { - $url = 'http://www.test.com:8081/path?q=123#fragment'; - $u = Url::factory($url); - $this->assertSame($this->request, $this->request->setUrl($url)); - $this->assertEquals($url, $this->request->getUrl()); - - $this->assertSame($this->request, $this->request->setUrl($u)); - $this->assertEquals($url, $this->request->getUrl()); - } - - public function testRequestHasState() - { - $this->assertEquals(RequestInterface::STATE_NEW, $this->request->getState()); - $this->request->setState(RequestInterface::STATE_TRANSFER); - $this->assertEquals(RequestInterface::STATE_TRANSFER, $this->request->getState()); - } - - public function testSetManualResponse() - { - $response = new Response(200, array( - 'Date' => 'Sat, 16 Oct 2010 17:27:14 GMT', - 'Expires' => '-1', - 'Cache-Control' => 'private, max-age=0', - 'Content-Type' => 'text/html; charset=ISO-8859-1', - ), 'response body'); - - $this->assertSame($this->request, $this->request->setResponse($response), '-> setResponse() must use a fluent interface'); - $this->assertEquals('complete', $this->request->getState(), '-> setResponse() must change the state of the request to complete'); - $this->assertSame($response, $this->request->getResponse(), '-> setResponse() must set the exact same response that was passed in to it'); - } - - public function testRequestCanHaveManuallySetResponseBody() - { - $file = __DIR__ . '/../../TestData/temp.out'; - if (file_exists($file)) { - unlink($file); - } - - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata"); - $request = RequestFactory::getInstance()->create('GET', $this->getServer()->getUrl()); - $request->setClient($this->client); - $entityBody = EntityBody::factory(fopen($file, 'w+')); - $request->setResponseBody($entityBody); - $response = $request->send(); - $this->assertSame($entityBody, $response->getBody()); - - $this->assertTrue(file_exists($file)); - $this->assertEquals('data', file_get_contents($file)); - unlink($file); - - $this->assertEquals('data', $response->getBody(true)); - } - - public function testHoldsCookies() - { - $this->assertNull($this->request->getCookie('test')); - - // Set a cookie - $this->assertSame($this->request, $this->request->addCookie('test', 'abc')); - $this->assertEquals('abc', $this->request->getCookie('test')); - - // Multiple cookies by setting the Cookie header - $this->request->setHeader('Cookie', '__utma=1.638370270.1344367610.1374365610.1944450276.2; __utmz=1.1346368610.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); hl=de; PHPSESSID=ak93pqashi5uubuoq8fjv60897'); - $this->assertEquals('1.638370270.1344367610.1374365610.1944450276.2', $this->request->getCookie('__utma')); - $this->assertEquals('1.1346368610.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)', $this->request->getCookie('__utmz')); - $this->assertEquals('de', $this->request->getCookie('hl')); - $this->assertEquals('ak93pqashi5uubuoq8fjv60897', $this->request->getCookie('PHPSESSID')); - - // Unset the cookies by setting the Cookie header to null - $this->request->setHeader('Cookie', null); - $this->assertNull($this->request->getCookie('test')); - $this->request->removeHeader('Cookie'); - - // Set and remove a cookie - $this->assertSame($this->request, $this->request->addCookie('test', 'abc')); - $this->assertEquals('abc', $this->request->getCookie('test')); - $this->assertSame($this->request, $this->request->removeCookie('test')); - $this->assertNull($this->request->getCookie('test')); - - // Remove the cookie header - $this->assertSame($this->request, $this->request->addCookie('test', 'abc')); - $this->request->removeHeader('Cookie'); - $this->assertEquals('', (string) $this->request->getHeader('Cookie')); - - // Remove a cookie value - $this->request->addCookie('foo', 'bar')->addCookie('baz', 'boo'); - $this->request->removeCookie('foo'); - $this->assertEquals(array( - 'baz' => 'boo' - ), $this->request->getCookies()); - - $this->request->addCookie('foo', 'bar'); - $this->assertEquals('baz=boo; foo=bar', (string) $this->request->getHeader('Cookie')); - } - - /** - * @expectedException \Guzzle\Http\Exception\RequestException - * @expectedExceptionMessage Error completing request - */ - public function testRequestThrowsExceptionWhenSetToCompleteWithNoResponse() - { - $this->request->setState(RequestInterface::STATE_COMPLETE); - } - - public function testClonedRequestsUseNewInternalState() - { - $p = new AsyncPlugin(); - $this->request->getEventDispatcher()->addSubscriber($p); - $h = $this->request->getHeader('Host'); - - $r = clone $this->request; - $this->assertEquals(RequestInterface::STATE_NEW, $r->getState()); - $this->assertNotSame($r->getQuery(), $this->request->getQuery()); - $this->assertNotSame($r->getCurlOptions(), $this->request->getCurlOptions()); - $this->assertNotSame($r->getEventDispatcher(), $this->request->getEventDispatcher()); - $this->assertEquals($r->getHeaders(), $this->request->getHeaders()); - $this->assertNotSame($h, $r->getHeader('Host')); - $this->assertNotSame($r->getParams(), $this->request->getParams()); - $this->assertTrue($this->request->getEventDispatcher()->hasListeners('request.sent')); - } - - public function testRecognizesBasicAuthCredentialsInUrls() - { - $this->request->setUrl('http://michael:test@test.com/'); - $this->assertEquals('michael', $this->request->getUsername()); - $this->assertEquals('test', $this->request->getPassword()); - } - - public function testRequestCanBeSentUsingCurl() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\nExpires: Thu, 01 Dec 1994 16:00:00 GMT\r\nConnection: close\r\n\r\ndata", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\nExpires: Thu, 01 Dec 1994 16:00:00 GMT\r\nConnection: close\r\n\r\ndata", - "HTTP/1.1 404 Not Found\r\nContent-Encoding: application/xml\r\nContent-Length: 48\r\n\r\nFile not found" - )); - - $request = RequestFactory::getInstance()->create('GET', $this->getServer()->getUrl()); - $request->setClient($this->client); - $response = $request->send(); - - $this->assertEquals('data', $response->getBody(true)); - $this->assertEquals(200, (int) $response->getStatusCode()); - $this->assertEquals('OK', $response->getReasonPhrase()); - $this->assertEquals(4, $response->getContentLength()); - $this->assertEquals('Thu, 01 Dec 1994 16:00:00 GMT', $response->getExpires()); - - // Test that the same handle can be sent twice without setting state to new - $response2 = $request->send(); - $this->assertNotSame($response, $response2); - - try { - $request = RequestFactory::getInstance()->create('GET', $this->getServer()->getUrl() . 'index.html'); - $request->setClient($this->client); - $response = $request->send(); - $this->fail('Request did not receive a 404 response'); - } catch (BadResponseException $e) { - } - - $requests = $this->getServer()->getReceivedRequests(true); - $messages = $this->getServer()->getReceivedRequests(false); - $port = $this->getServer()->getPort(); - - $userAgent = $this->client->getDefaultUserAgent(); - - $this->assertEquals('127.0.0.1:' . $port, $requests[0]->getHeader('Host')); - $this->assertEquals('127.0.0.1:' . $port, $requests[1]->getHeader('Host')); - $this->assertEquals('127.0.0.1:' . $port, $requests[2]->getHeader('Host')); - - $this->assertEquals('/', $requests[0]->getPath()); - $this->assertEquals('/', $requests[1]->getPath()); - $this->assertEquals('/index.html', $requests[2]->getPath()); - - $parts = explode("\r\n", $messages[0]); - $this->assertEquals('GET / HTTP/1.1', $parts[0]); - - $parts = explode("\r\n", $messages[1]); - $this->assertEquals('GET / HTTP/1.1', $parts[0]); - - $parts = explode("\r\n", $messages[2]); - $this->assertEquals('GET /index.html HTTP/1.1', $parts[0]); - } - - public function testThrowsExceptionsWhenUnsuccessfulResponseIsReceivedByDefault() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 404 Not found\r\nContent-Length: 0\r\n\r\n"); - - try { - $request = $this->client->get('/index.html'); - $response = $request->send(); - $this->fail('Request did not receive a 404 response'); - } catch (BadResponseException $e) { - $this->assertContains('Client error response', $e->getMessage()); - $this->assertContains('[status code] 404', $e->getMessage()); - $this->assertContains('[reason phrase] Not found', $e->getMessage()); - } - } - - public function testCanShortCircuitErrorHandling() - { - $request = $this->request; - $response = new Response(404); - $request->setResponse($response, true); - $out = ''; - $that = $this; - $request->getEventDispatcher()->addListener('request.error', function($event) use (&$out, $that) { - $out .= $event['request'] . "\n" . $event['response'] . "\n"; - $event->stopPropagation(); - }); - $request->send(); - $this->assertContains((string) $request, $out); - $this->assertContains((string) $request->getResponse(), $out); - $this->assertSame($response, $request->getResponse()); - } - - public function testCanOverrideUnsuccessfulResponses() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 404 NOT FOUND\r\n" . - "Content-Length: 0\r\n" . - "\r\n", - "HTTP/1.1 200 OK\r\n" . - "Content-Length: 0\r\n" . - "\r\n" - )); - - $newResponse = null; - - $request = $this->request; - $request->getEventDispatcher()->addListener('request.error', function($event) use (&$newResponse) { - if ($event['response']->getStatusCode() == 404) { - $newRequest = clone $event['request']; - $newResponse = $newRequest->send(); - // Override the original response and bypass additional response processing - $event['response'] = $newResponse; - // Call $event['request']->setResponse($newResponse); to re-apply events - $event->stopPropagation(); - } - }); - - $request->send(); - - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - $this->assertSame($newResponse, $request->getResponse()); - $this->assertEquals(2, count($this->getServer()->getReceivedRequests())); - } - - public function testCanRetrieveUrlObject() - { - $request = new Request('GET', 'http://www.example.com/foo?abc=d'); - $this->assertInstanceOf('Guzzle\Http\Url', $request->getUrl(true)); - $this->assertEquals('http://www.example.com/foo?abc=d', $request->getUrl()); - $this->assertEquals('http://www.example.com/foo?abc=d', (string) $request->getUrl(true)); - } - - public function testUnresolvedRedirectsReturnResponse() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 303 SEE OTHER\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Foo\r\nLocation: /foo\r\nContent-Length: 0\r\n\r\n" - )); - $request = $this->request; - $this->assertEquals(303, $request->send()->getStatusCode()); - $request->getParams()->set(RedirectPlugin::DISABLE, true); - $this->assertEquals(301, $request->send()->getStatusCode()); - } - - public function testCanSendCustomRequests() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $request = $this->client->createRequest('PROPFIND', $this->getServer()->getUrl(), array( - 'Content-Type' => 'text/plain' - ), 'foo'); - $response = $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('PROPFIND', $requests[0]->getMethod()); - $this->assertEquals(3, (string) $requests[0]->getHeader('Content-Length')); - $this->assertEquals('foo', (string) $requests[0]->getBody()); - } - - /** - * @expectedException \PHPUnit_Framework_Error_Warning - */ - public function testEnsuresFileCanBeCreated() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest"); - $this->client->get('/')->setResponseBody('/wefwefefefefwewefwe/wefwefwefefwe/wefwefewfw.txt')->send(); - } - - public function testAllowsFilenameForDownloadingContent() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest"); - $name = sys_get_temp_dir() . '/foo.txt'; - $this->client->get('/')->setResponseBody($name)->send(); - $this->assertEquals('test', file_get_contents($name)); - unlink($name); - } - - public function testUsesCustomResponseBodyWhenItIsCustom() - { - $en = EntityBody::factory(); - $request = $this->client->get(); - $request->setResponseBody($en); - $request->setResponse(new Response(200, array(), 'foo')); - $this->assertEquals('foo', (string) $en); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/ResponseTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/ResponseTest.php deleted file mode 100644 index 08b4df878..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/ResponseTest.php +++ /dev/null @@ -1,677 +0,0 @@ -response = new Response(200, new Collection(array( - 'Accept-Ranges' => 'bytes', - 'Age' => '12', - 'Allow' => 'GET, HEAD', - 'Cache-Control' => 'no-cache', - 'Content-Encoding' => 'gzip', - 'Content-Language' => 'da', - 'Content-Length' => '348', - 'Content-Location' => '/index.htm', - 'Content-Disposition' => 'attachment; filename=fname.ext', - 'Content-MD5' => 'Q2hlY2sgSW50ZWdyaXR5IQ==', - 'Content-Range' => 'bytes 21010-47021/47022', - 'Content-Type' => 'text/html; charset=utf-8', - 'Date' => 'Tue, 15 Nov 1994 08:12:31 GMT', - 'ETag' => '737060cd8c284d8af7ad3082f209582d', - 'Expires' => 'Thu, 01 Dec 1994 16:00:00 GMT', - 'Last-Modified' => 'Tue, 15 Nov 1994 12:45:26 GMT', - 'Location' => 'http://www.w3.org/pub/WWW/People.html', - 'Pragma' => 'no-cache', - 'Proxy-Authenticate' => 'Basic', - 'Retry-After' => '120', - 'Server' => 'Apache/1.3.27 (Unix) (Red-Hat/Linux)', - 'Set-Cookie' => 'UserID=JohnDoe; Max-Age=3600; Version=1', - 'Trailer' => 'Max-Forwards', - 'Transfer-Encoding' => 'chunked', - 'Vary' => '*', - 'Via' => '1.0 fred, 1.1 nowhere.com (Apache/1.1)', - 'Warning' => '199 Miscellaneous warning', - 'WWW-Authenticate' => 'Basic' - )), 'body'); - } - - public function tearDown() - { - unset($this->response); - } - - public function testConstructor() - { - $params = new Collection(); - $body = EntityBody::factory(''); - $response = new Response(200, $params, $body); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals($body, $response->getBody()); - $this->assertEquals('OK', $response->getReasonPhrase()); - $this->assertEquals("HTTP/1.1 200 OK\r\n\r\n", $response->getRawHeaders()); - - // Make sure Content-Length is set automatically - $response = new Response(200, $params); - $this->assertEquals("HTTP/1.1 200 OK\r\n\r\n", $response->getRawHeaders()); - - // Pass bodies to the response - $response = new Response(200, null, 'data'); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $response->getBody()); - $response = new Response(200, null, EntityBody::factory('data')); - $this->assertInstanceOf('Guzzle\\Http\\EntityBody', $response->getBody()); - $this->assertEquals('data', $response->getBody(true)); - $response = new Response(200, null, '0'); - $this->assertSame('0', $response->getBody(true), 'getBody(true) should return "0" if response body is "0".'); - - // Make sure the proper exception is thrown - try { - //$response = new Response(200, null, array('foo' => 'bar')); - //$this->fail('Response did not throw exception when passing invalid body'); - } catch (HttpException $e) { - } - - // Ensure custom codes can be set - $response = new Response(2); - $this->assertEquals(2, $response->getStatusCode()); - $this->assertEquals('', $response->getReasonPhrase()); - - // Make sure the proper exception is thrown when sending invalid headers - try { - $response = new Response(200, 'adidas'); - $this->fail('Response did not throw exception when passing invalid $headers'); - } catch (BadResponseException $e) { - } - } - - public function test__toString() - { - $response = new Response(200); - $this->assertEquals("HTTP/1.1 200 OK\r\n\r\n", (string) $response); - - // Add another header - $response = new Response(200, array( - 'X-Test' => 'Guzzle' - )); - $this->assertEquals("HTTP/1.1 200 OK\r\nX-Test: Guzzle\r\n\r\n", (string) $response); - - $response = new Response(200, array( - 'Content-Length' => 4 - ), 'test'); - $this->assertEquals("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest", (string) $response); - } - - public function testFactory() - { - $response = Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest"); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('OK', $response->getReasonPhrase()); - $this->assertEquals(4, (string) $response->getContentLength()); - $this->assertEquals('test', $response->getBody(true)); - - // Make sure that automatic Content-Length works - $response = Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest"); - $this->assertEquals(4, (string) $response->getContentLength()); - $this->assertEquals('test', $response->getBody(true)); - } - - public function testFactoryCanCreateHeadResponses() - { - $response = Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\n"); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('OK', $response->getReasonPhrase()); - $this->assertEquals(4, (string) $response->getContentLength()); - $this->assertEquals('', $response->getBody(true)); - } - - public function testFactoryRequiresMessage() - { - $this->assertFalse(Response::fromMessage('')); - } - - public function testGetBody() - { - $body = EntityBody::factory(''); - $response = new Response(403, new Collection(), $body); - $this->assertEquals($body, $response->getBody()); - $response->setBody('foo'); - $this->assertEquals('foo', $response->getBody(true)); - } - - public function testManagesStatusCode() - { - $response = new Response(403); - $this->assertEquals(403, $response->getStatusCode()); - } - - public function testGetMessage() - { - $response = new Response(200, new Collection(array( - 'Content-Length' => 4 - )), 'body'); - - $this->assertEquals("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\nbody", $response->getMessage()); - } - - public function testGetRawHeaders() - { - $response = new Response(200, new Collection(array( - 'Keep-Alive' => 155, - 'User-Agent' => 'Guzzle', - 'Content-Length' => 4 - )), 'body'); - - $this->assertEquals("HTTP/1.1 200 OK\r\nKeep-Alive: 155\r\nUser-Agent: Guzzle\r\nContent-Length: 4\r\n\r\n", $response->getRawHeaders()); - } - - public function testHandlesStatusAndStatusCodes() - { - $response = new Response(200, new Collection(), 'body'); - $this->assertEquals('OK', $response->getReasonPhrase()); - - $this->assertSame($response, $response->setStatus(204)); - $this->assertEquals('No Content', $response->getReasonPhrase()); - $this->assertEquals(204, $response->getStatusCode()); - - $this->assertSame($response, $response->setStatus(204, 'Testing!')); - $this->assertEquals('Testing!', $response->getReasonPhrase()); - $this->assertEquals(204, $response->getStatusCode()); - - $response->setStatus(2000); - $this->assertEquals(2000, $response->getStatusCode()); - $this->assertEquals('', $response->getReasonPhrase()); - - $response->setStatus(200, 'Foo'); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Foo', $response->getReasonPhrase()); - } - - public function testIsClientError() - { - $response = new Response(403); - $this->assertTrue($response->isClientError()); - $response = new Response(200); - $this->assertFalse($response->isClientError()); - } - - public function testIsError() - { - $response = new Response(403); - $this->assertTrue($response->isError()); - $response = new Response(200); - $this->assertFalse($response->isError()); - $response = new Response(500); - $this->assertTrue($response->isError()); - } - - public function testIsInformational() - { - $response = new Response(100); - $this->assertTrue($response->isInformational()); - $response = new Response(200); - $this->assertFalse($response->isInformational()); - } - - public function testIsRedirect() - { - $response = new Response(301); - $this->assertTrue($response->isRedirect()); - $response = new Response(200); - $this->assertFalse($response->isRedirect()); - } - - public function testIsServerError() - { - $response = new Response(500); - $this->assertTrue($response->isServerError()); - $response = new Response(400); - $this->assertFalse($response->isServerError()); - } - - public function testIsSuccessful() - { - $response = new Response(200); - $this->assertTrue($response->isSuccessful()); - $response = new Response(403); - $this->assertFalse($response->isSuccessful()); - } - - public function testGetAcceptRanges() - { - $this->assertEquals('bytes', $this->response->getAcceptRanges()); - } - - public function testCalculatesAge() - { - $this->assertEquals(12, $this->response->calculateAge()); - - $this->response->removeHeader('Age'); - $this->response->removeHeader('Date'); - $this->assertNull($this->response->calculateAge()); - - $this->response->setHeader('Date', gmdate(ClientInterface::HTTP_DATE, strtotime('-1 minute'))); - // If the test runs slowly, still pass with a +5 second allowance - $this->assertTrue($this->response->getAge() - 60 <= 5); - } - - public function testGetAllow() - { - $this->assertEquals('GET, HEAD', $this->response->getAllow()); - } - - public function testGetCacheControl() - { - $this->assertEquals('no-cache', $this->response->getCacheControl()); - } - - public function testGetContentEncoding() - { - $this->assertEquals('gzip', $this->response->getContentEncoding()); - } - - public function testGetContentLanguage() - { - $this->assertEquals('da', $this->response->getContentLanguage()); - } - - public function testGetContentLength() - { - $this->assertEquals('348', $this->response->getContentLength()); - } - - public function testGetContentLocation() - { - $this->assertEquals('/index.htm', $this->response->getContentLocation()); - } - - public function testGetContentDisposition() - { - $this->assertEquals('attachment; filename=fname.ext', $this->response->getContentDisposition()); - } - - public function testGetContentMd5() - { - $this->assertEquals('Q2hlY2sgSW50ZWdyaXR5IQ==', $this->response->getContentMd5()); - } - - public function testGetContentRange() - { - $this->assertEquals('bytes 21010-47021/47022', $this->response->getContentRange()); - } - - public function testGetContentType() - { - $this->assertEquals('text/html; charset=utf-8', $this->response->getContentType()); - } - - public function testGetDate() - { - $this->assertEquals('Tue, 15 Nov 1994 08:12:31 GMT', $this->response->getDate()); - } - - public function testGetEtag() - { - $this->assertEquals('737060cd8c284d8af7ad3082f209582d', $this->response->getEtag()); - } - - public function testGetExpires() - { - $this->assertEquals('Thu, 01 Dec 1994 16:00:00 GMT', $this->response->getExpires()); - } - - public function testGetLastModified() - { - $this->assertEquals('Tue, 15 Nov 1994 12:45:26 GMT', $this->response->getLastModified()); - } - - public function testGetLocation() - { - $this->assertEquals('http://www.w3.org/pub/WWW/People.html', $this->response->getLocation()); - } - - public function testGetPragma() - { - $this->assertEquals('no-cache', $this->response->getPragma()); - } - - public function testGetProxyAuthenticate() - { - $this->assertEquals('Basic', $this->response->getProxyAuthenticate()); - } - - public function testGetServer() - { - $this->assertEquals('Apache/1.3.27 (Unix) (Red-Hat/Linux)', $this->response->getServer()); - } - - public function testGetSetCookie() - { - $this->assertEquals('UserID=JohnDoe; Max-Age=3600; Version=1', $this->response->getSetCookie()); - } - - public function testGetMultipleSetCookie() - { - $this->response->addHeader('Set-Cookie', 'UserID=Mike; Max-Age=200'); - $this->assertEquals(array( - 'UserID=JohnDoe; Max-Age=3600; Version=1', - 'UserID=Mike; Max-Age=200', - ), $this->response->getHeader('Set-Cookie')->toArray()); - } - - public function testGetSetCookieNormalizesHeaders() - { - $this->response->addHeaders(array( - 'Set-Cooke' => 'boo', - 'set-cookie' => 'foo' - )); - - $this->assertEquals(array( - 'UserID=JohnDoe; Max-Age=3600; Version=1', - 'foo' - ), $this->response->getHeader('Set-Cookie')->toArray()); - - $this->response->addHeaders(array( - 'set-cookie' => 'fubu' - )); - $this->assertEquals( - array('UserID=JohnDoe; Max-Age=3600; Version=1', 'foo', 'fubu'), - $this->response->getHeader('Set-Cookie')->toArray() - ); - } - - public function testGetTrailer() - { - $this->assertEquals('Max-Forwards', $this->response->getTrailer()); - } - - public function testGetTransferEncoding() - { - $this->assertEquals('chunked', $this->response->getTransferEncoding()); - } - - public function testGetVary() - { - $this->assertEquals('*', $this->response->getVary()); - } - - public function testReturnsViaHeader() - { - $this->assertEquals('1.0 fred, 1.1 nowhere.com (Apache/1.1)', $this->response->getVia()); - } - public function testGetWarning() - { - $this->assertEquals('199 Miscellaneous warning', $this->response->getWarning()); - } - - public function testReturnsWwwAuthenticateHeader() - { - $this->assertEquals('Basic', $this->response->getWwwAuthenticate()); - } - - public function testReturnsConnectionHeader() - { - $this->assertEquals(null, $this->response->getConnection()); - $this->response->setHeader('Connection', 'close'); - $this->assertEquals('close', $this->response->getConnection()); - } - - public function testReturnsHeaders() - { - $this->assertEquals('Basic', $this->response->getHeader('WWW-Authenticate', null, true)); - $this->assertEquals('chunked', $this->response->getHeader('Transfer-Encoding', null, false)); - } - - public function testHasTransferInfo() - { - $stats = array ( - 'url' => 'http://www.google.com/', - 'content_type' => 'text/html; charset=ISO-8859-1', - 'http_code' => 200, - 'header_size' => 606, - 'request_size' => 53, - 'filetime' => -1, - 'ssl_verify_result' => 0, - 'redirect_count' => 0, - 'total_time' => 0.093284, - 'namelookup_time' => 0.001349, - 'connect_time' => 0.01635, - 'pretransfer_time' => 0.016358, - 'size_upload' => 0, - 'size_download' => 10330, - 'speed_download' => 110737, - 'speed_upload' => 0, - 'download_content_length' => -1, - 'upload_content_length' => 0, - 'starttransfer_time' => 0.07066, - 'redirect_time' => 0, - ); - - // Uninitialized state - $this->assertNull($this->response->getInfo('url')); - $this->assertEquals(array(), $this->response->getInfo()); - - // Set the stats - $this->response->setInfo($stats); - $this->assertEquals($stats, $this->response->getInfo()); - $this->assertEquals(606, $this->response->getInfo('header_size')); - $this->assertNull($this->response->getInfo('does_not_exist')); - } - - /** - * @return Response - */ - private function getResponse($code, array $headers = null, EntityBody $body = null) - { - return new Response($code, $headers, $body); - } - - public function testDeterminesIfItCanBeCached() - { - $this->assertTrue($this->getResponse(200)->canCache()); - $this->assertTrue($this->getResponse(410)->canCache()); - $this->assertFalse($this->getResponse(404)->canCache()); - $this->assertTrue($this->getResponse(200, array( - 'Cache-Control' => 'public' - ))->canCache()); - - // This has the no-store directive - $this->assertFalse($this->getResponse(200, array( - 'Cache-Control' => 'private, no-store' - ))->canCache()); - - // The body cannot be read, so it cannot be cached - $tmp = tempnam('/tmp', 'not-readable'); - $resource = fopen($tmp, 'w'); - $this->assertFalse($this->getResponse(200, array( - 'Transfer-Encoding' => 'chunked' - ), EntityBody::factory($resource, 10))->canCache()); - unlink($tmp); - - // The body is 0 length, cannot be read, so it can be cached - $tmp = tempnam('/tmp', 'not-readable'); - $resource = fopen($tmp, 'w'); - $this->assertTrue($this->getResponse(200, array(array( - 'Content-Length' => 0 - )), EntityBody::factory($resource, 0))->canCache()); - unlink($tmp); - } - - public function testDeterminesResponseMaxAge() - { - $this->assertEquals(null, $this->getResponse(200)->getMaxAge()); - - // Uses the response's s-maxage - $this->assertEquals(140, $this->getResponse(200, array( - 'Cache-Control' => 's-maxage=140' - ))->getMaxAge()); - - // Uses the response's max-age - $this->assertEquals(120, $this->getResponse(200, array( - 'Cache-Control' => 'max-age=120' - ))->getMaxAge()); - - // Uses the response's max-age - $this->assertEquals(120, $this->getResponse(200, array( - 'Cache-Control' => 'max-age=120', - 'Expires' => gmdate(ClientInterface::HTTP_DATE, strtotime('+1 day')) - ))->getMaxAge()); - - // Uses the Expires date - $this->assertGreaterThanOrEqual(82400, $this->getResponse(200, array( - 'Expires' => gmdate(ClientInterface::HTTP_DATE, strtotime('+1 day')) - ))->getMaxAge()); - - // Uses the Expires date - $this->assertGreaterThanOrEqual(82400, $this->getResponse(200, array( - 'Expires' => gmdate(ClientInterface::HTTP_DATE, strtotime('+1 day')) - ))->getMaxAge()); - } - - public function testDeterminesIfItCanValidate() - { - $response = new Response(200); - $this->assertFalse($response->canValidate()); - $response->setHeader('ETag', '123'); - $this->assertTrue($response->canValidate()); - $response->removeHeader('ETag'); - $this->assertFalse($response->canValidate()); - $response->setHeader('Last-Modified', '123'); - $this->assertTrue($response->canValidate()); - } - - public function testCalculatesFreshness() - { - $response = new Response(200); - $this->assertNull($response->isFresh()); - $this->assertNull($response->getFreshness()); - - $response->setHeader('Cache-Control', 'max-age=120'); - $response->setHeader('Age', 100); - $this->assertEquals(20, $response->getFreshness()); - $this->assertTrue($response->isFresh()); - - $response->setHeader('Age', 120); - $this->assertEquals(0, $response->getFreshness()); - $this->assertTrue($response->isFresh()); - - $response->setHeader('Age', 150); - $this->assertEquals(-30, $response->getFreshness()); - $this->assertFalse($response->isFresh()); - } - - public function testHandlesProtocols() - { - $this->assertSame($this->response, $this->response->setProtocol('HTTP', '1.0')); - $this->assertEquals('HTTP', $this->response->getProtocol()); - $this->assertEquals('1.0', $this->response->getProtocolVersion()); - } - - public function testComparesContentType() - { - $response = new Response(200, array( - 'Content-Type' => 'text/html; charset=ISO-8859-4' - )); - - $this->assertTrue($response->isContentType('text/html')); - $this->assertTrue($response->isContentType('TExT/html')); - $this->assertTrue($response->isContentType('charset=ISO-8859-4')); - $this->assertFalse($response->isContentType('application/xml')); - } - - public function testResponseDeterminesIfMethodIsAllowedBaseOnAllowHeader() - { - $response = new Response(200, array( - 'Allow' => 'OPTIONS, POST, deletE,GET' - )); - - $this->assertTrue($response->isMethodAllowed('get')); - $this->assertTrue($response->isMethodAllowed('GET')); - $this->assertTrue($response->isMethodAllowed('options')); - $this->assertTrue($response->isMethodAllowed('post')); - $this->assertTrue($response->isMethodAllowed('Delete')); - $this->assertFalse($response->isMethodAllowed('put')); - $this->assertFalse($response->isMethodAllowed('PUT')); - - $response = new Response(200); - $this->assertFalse($response->isMethodAllowed('get')); - } - - public function testParsesJsonResponses() - { - $response = new Response(200, array(), '{"foo": "bar"}'); - $this->assertEquals(array('foo' => 'bar'), $response->json()); - // Return array when null is a service response - $response = new Response(200); - $this->assertEquals(array(), $response->json()); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - * @expectedExceptionMessage Unable to parse response body into JSON: 4 - */ - public function testThrowsExceptionWhenFailsToParseJsonResponse() - { - $response = new Response(200, array(), '{"foo": "'); - $response->json(); - } - - public function testParsesXmlResponses() - { - $response = new Response(200, array(), 'bar'); - $this->assertEquals('bar', (string) $response->xml()->foo); - // Always return a SimpleXMLElement from the xml method - $response = new Response(200); - $this->assertEmpty((string) $response->xml()->foo); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - * @expectedExceptionMessage Unable to parse response body into XML: String could not be parsed as XML - */ - public function testThrowsExceptionWhenFailsToParseXmlResponse() - { - $response = new Response(200, array(), 'xml(); - } - - public function testResponseIsSerializable() - { - $response = new Response(200, array('Foo' => 'bar'), 'test'); - $r = unserialize(serialize($response)); - $this->assertEquals(200, $r->getStatusCode()); - $this->assertEquals('bar', (string) $r->getHeader('Foo')); - $this->assertEquals('test', (string) $r->getBody()); - } - - public function testPreventsComplexExternalEntities() - { - $xml = ']>&test;'; - $response = new Response(200, array(), $xml); - - $oldCwd = getcwd(); - chdir(__DIR__); - try { - $xml = $response->xml(); - chdir($oldCwd); - $this->markTestIncomplete('Did not throw the expected exception! XML resolved as: ' . $xml->asXML()); - } catch (\Exception $e) { - chdir($oldCwd); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/MimetypesTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/MimetypesTest.php deleted file mode 100644 index 722845340..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/MimetypesTest.php +++ /dev/null @@ -1,31 +0,0 @@ -assertEquals('text/x-php', Mimetypes::getInstance()->fromExtension('php')); - } - - public function testGetsFromFilename() - { - $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(__FILE__)); - } - - public function testGetsFromCaseInsensitiveFilename() - { - $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(strtoupper(__FILE__))); - } - - public function testReturnsNullWhenNoMatchFound() - { - $this->assertNull(Mimetypes::getInstance()->fromExtension('foobar')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/CommaAggregatorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/CommaAggregatorTest.php deleted file mode 100644 index 549d3edd9..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/CommaAggregatorTest.php +++ /dev/null @@ -1,30 +0,0 @@ -aggregate($key, $value, $query); - $this->assertEquals(array('test%20123' => 'foo%20123,baz,bar'), $result); - } - - public function testEncodes() - { - $query = new QueryString(); - $query->useUrlEncoding(false); - $a = new Ag(); - $key = 'test 123'; - $value = array('foo 123', 'baz', 'bar'); - $result = $a->aggregate($key, $value, $query); - $this->assertEquals(array('test 123' => 'foo 123,baz,bar'), $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/DuplicateAggregatorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/DuplicateAggregatorTest.php deleted file mode 100644 index 6a4d9d95b..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/DuplicateAggregatorTest.php +++ /dev/null @@ -1,30 +0,0 @@ -aggregate($key, $value, $query); - $this->assertEquals(array('facet%201' => array('size%20a', 'width%20b')), $result); - } - - public function testEncodes() - { - $query = new QueryString(); - $query->useUrlEncoding(false); - $a = new Ag(); - $key = 'facet 1'; - $value = array('size a', 'width b'); - $result = $a->aggregate($key, $value, $query); - $this->assertEquals(array('facet 1' => array('size a', 'width b')), $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/PhpAggregatorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/PhpAggregatorTest.php deleted file mode 100644 index 1e7f0c27a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/PhpAggregatorTest.php +++ /dev/null @@ -1,32 +0,0 @@ -useUrlEncoding(false); - $a = new Ag(); - $key = 't'; - $value = array( - 'v1' => 'a', - 'v2' => 'b', - 'v3' => array( - 'v4' => 'c', - 'v5' => 'd', - ) - ); - $result = $a->aggregate($key, $value, $query); - $this->assertEquals(array( - 't[v1]' => 'a', - 't[v2]' => 'b', - 't[v3][v4]' => 'c', - 't[v3][v5]' => 'd', - ), $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryStringTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryStringTest.php deleted file mode 100644 index 0513f6224..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryStringTest.php +++ /dev/null @@ -1,232 +0,0 @@ -q = new QueryString(); - } - - public function testGetFieldSeparator() - { - $this->assertEquals('&', $this->q->getFieldSeparator()); - } - - public function testGetValueSeparator() - { - $this->assertEquals('=', $this->q->getValueSeparator()); - } - - public function testIsUrlEncoding() - { - $this->assertEquals('RFC 3986', $this->q->getUrlEncoding()); - $this->assertTrue($this->q->isUrlEncoding()); - $this->assertEquals('foo%20bar', $this->q->encodeValue('foo bar')); - - $this->q->useUrlEncoding(QueryString::FORM_URLENCODED); - $this->assertTrue($this->q->isUrlEncoding()); - $this->assertEquals(QueryString::FORM_URLENCODED, $this->q->getUrlEncoding()); - $this->assertEquals('foo+bar', $this->q->encodeValue('foo bar')); - - $this->assertSame($this->q, $this->q->useUrlEncoding(false)); - $this->assertFalse($this->q->isUrlEncoding()); - $this->assertFalse($this->q->isUrlEncoding()); - } - - public function testSetFieldSeparator() - { - $this->assertEquals($this->q, $this->q->setFieldSeparator('/')); - $this->assertEquals('/', $this->q->getFieldSeparator()); - } - - public function testSetValueSeparator() - { - $this->assertEquals($this->q, $this->q->setValueSeparator('/')); - $this->assertEquals('/', $this->q->getValueSeparator()); - } - - public function testUrlEncode() - { - $params = array( - 'test' => 'value', - 'test 2' => 'this is a test?', - 'test3' => array('v1', 'v2', 'v3'), - 'ሴ' => 'bar' - ); - $encoded = array( - 'test' => 'value', - 'test%202' => rawurlencode('this is a test?'), - 'test3%5B0%5D' => 'v1', - 'test3%5B1%5D' => 'v2', - 'test3%5B2%5D' => 'v3', - '%E1%88%B4' => 'bar' - ); - $this->q->replace($params); - $this->assertEquals($encoded, $this->q->urlEncode()); - - // Disable encoding - $testData = array('test 2' => 'this is a test'); - $this->q->replace($testData); - $this->q->useUrlEncoding(false); - $this->assertEquals($testData, $this->q->urlEncode()); - } - - public function testToString() - { - // Check with no parameters - $this->assertEquals('', $this->q->__toString()); - - $params = array( - 'test' => 'value', - 'test 2' => 'this is a test?', - 'test3' => array('v1', 'v2', 'v3'), - 'test4' => null, - ); - $this->q->replace($params); - $this->assertEquals('test=value&test%202=this%20is%20a%20test%3F&test3%5B0%5D=v1&test3%5B1%5D=v2&test3%5B2%5D=v3&test4=', $this->q->__toString()); - $this->q->useUrlEncoding(false); - $this->assertEquals('test=value&test 2=this is a test?&test3[0]=v1&test3[1]=v2&test3[2]=v3&test4=', $this->q->__toString()); - - // Use an alternative aggregator - $this->q->setAggregator(new CommaAggregator()); - $this->assertEquals('test=value&test 2=this is a test?&test3=v1,v2,v3&test4=', $this->q->__toString()); - } - - public function testAllowsMultipleValuesPerKey() - { - $q = new QueryString(); - $q->add('facet', 'size'); - $q->add('facet', 'width'); - $q->add('facet.field', 'foo'); - // Use the duplicate aggregator - $q->setAggregator(new DuplicateAggregator()); - $this->assertEquals('facet=size&facet=width&facet.field=foo', $q->__toString()); - } - - public function testAllowsNestedQueryData() - { - $this->q->replace(array( - 'test' => 'value', - 't' => array( - 'v1' => 'a', - 'v2' => 'b', - 'v3' => array( - 'v4' => 'c', - 'v5' => 'd', - ) - ) - )); - - $this->q->useUrlEncoding(false); - $this->assertEquals('test=value&t[v1]=a&t[v2]=b&t[v3][v4]=c&t[v3][v5]=d', $this->q->__toString()); - } - - public function parseQueryProvider() - { - return array( - // Ensure that multiple query string values are allowed per value - array('q=a&q=b', array('q' => array('a', 'b'))), - // Ensure that PHP array style query string values are parsed - array('q[]=a&q[]=b', array('q' => array('a', 'b'))), - // Ensure that a single PHP array style query string value is parsed into an array - array('q[]=a', array('q' => array('a'))), - // Ensure that decimals are allowed in query strings - array('q.a=a&q.b=b', array( - 'q.a' => 'a', - 'q.b' => 'b' - )), - // Ensure that query string values are percent decoded - array('q%20a=a%20b', array('q a' => 'a b')), - // Ensure null values can be added - array('q&a', array('q' => QueryString::BLANK, 'a' => QueryString::BLANK)), - ); - } - - /** - * @dataProvider parseQueryProvider - */ - public function testParsesQueryStrings($query, $data) - { - $query = QueryString::fromString($query); - $this->assertEquals($data, $query->getAll()); - } - - public function testProperlyDealsWithDuplicateQueryStringValues() - { - $query = QueryString::fromString('foo=a&foo=b&?µ=c'); - $this->assertEquals(array('a', 'b'), $query->get('foo')); - $this->assertEquals('c', $query->get('?µ')); - } - - public function testAllowsBlankQueryStringValues() - { - $query = QueryString::fromString('foo'); - $this->assertEquals('foo', (string) $query); - $query->set('foo', QueryString::BLANK); - $this->assertEquals('foo', (string) $query); - } - - public function testAllowsFalsyQueryStringValues() - { - $query = QueryString::fromString('0'); - $this->assertEquals('0', (string) $query); - $query->set('0', QueryString::BLANK); - $this->assertSame('0', (string) $query); - } - - public function testFromStringIgnoresQuestionMark() - { - $query = QueryString::fromString('foo=baz&bar=boo'); - $this->assertEquals('foo=baz&bar=boo', (string) $query); - } - - public function testConvertsPlusSymbolsToSpaces() - { - $query = QueryString::fromString('var=foo+bar'); - $this->assertEquals('foo bar', $query->get('var')); - } - - public function testFromStringDoesntMangleZeroes() - { - $query = QueryString::fromString('var=0'); - $this->assertSame('0', $query->get('var')); - } - - public function testAllowsZeroValues() - { - $query = new QueryString(array( - 'foo' => 0, - 'baz' => '0', - 'bar' => null, - 'boo' => false - )); - $this->assertEquals('foo=0&baz=0&bar=&boo=', (string) $query); - } - - public function testFromStringDoesntStripTrailingEquals() - { - $query = QueryString::fromString('data=mF0b3IiLCJUZWFtIERldiJdfX0='); - $this->assertEquals('mF0b3IiLCJUZWFtIERldiJdfX0=', $query->get('data')); - } - - public function testGuessesIfDuplicateAggregatorShouldBeUsed() - { - $query = QueryString::fromString('test=a&test=b'); - $this->assertEquals('test=a&test=b', (string) $query); - } - - public function testGuessesIfDuplicateAggregatorShouldBeUsedAndChecksForPhpStyle() - { - $query = QueryString::fromString('test[]=a&test[]=b'); - $this->assertEquals('test%5B0%5D=a&test%5B1%5D=b', (string) $query); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/ReadLimitEntityBodyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/ReadLimitEntityBodyTest.php deleted file mode 100644 index 6bb3fed18..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/ReadLimitEntityBodyTest.php +++ /dev/null @@ -1,81 +0,0 @@ -decorated = EntityBody::factory(fopen(__FILE__, 'r')); - $this->body = new ReadLimitEntityBody($this->decorated, 10, 3); - } - - public function testReturnsSubsetWhenCastToString() - { - $body = EntityBody::factory('foo_baz_bar'); - $limited = new ReadLimitEntityBody($body, 3, 4); - $this->assertEquals('baz', (string) $limited); - } - - public function testReturnsSubsetOfEmptyBodyWhenCastToString() - { - $body = EntityBody::factory(''); - $limited = new ReadLimitEntityBody($body, 0, 10); - $this->assertEquals('', (string) $limited); - } - - public function testSeeksWhenConstructed() - { - $this->assertEquals(3, $this->body->ftell()); - } - - public function testAllowsBoundedSeek() - { - $this->body->seek(100); - $this->assertEquals(13, $this->body->ftell()); - $this->body->seek(0); - $this->assertEquals(3, $this->body->ftell()); - $this->assertEquals(false, $this->body->seek(1000, SEEK_END)); - } - - public function testReadsOnlySubsetOfData() - { - $data = $this->body->read(100); - $this->assertEquals(10, strlen($data)); - $this->assertFalse($this->body->read(1000)); - - $this->body->setOffset(10); - $newData = $this->body->read(100); - $this->assertEquals(10, strlen($newData)); - $this->assertNotSame($data, $newData); - } - - public function testClaimsConsumedWhenReadLimitIsReached() - { - $this->assertFalse($this->body->isConsumed()); - $this->body->read(1000); - $this->assertTrue($this->body->isConsumed()); - } - - public function testContentLengthIsBounded() - { - $this->assertEquals(10, $this->body->getContentLength()); - } - - public function testContentMd5IsBasedOnSubsection() - { - $this->assertNotSame($this->body->getContentMd5(), $this->decorated->getContentMd5()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/RedirectPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/RedirectPluginTest.php deleted file mode 100755 index 886236ddd..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/RedirectPluginTest.php +++ /dev/null @@ -1,277 +0,0 @@ -getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect2\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - - // Create a client that uses the default redirect behavior - $client = new Client($this->getServer()->getUrl()); - $history = new HistoryPlugin(); - $client->addSubscriber($history); - - $request = $client->get('/foo'); - $response = $request->send(); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertContains('/redirect2', $response->getEffectiveUrl()); - - // Ensure that two requests were sent - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('/foo', $requests[0]->getResource()); - $this->assertEquals('GET', $requests[0]->getMethod()); - $this->assertEquals('/redirect1', $requests[1]->getResource()); - $this->assertEquals('GET', $requests[1]->getMethod()); - $this->assertEquals('/redirect2', $requests[2]->getResource()); - $this->assertEquals('GET', $requests[2]->getMethod()); - - // Ensure that the redirect count was incremented - $this->assertEquals(2, $request->getParams()->get(RedirectPlugin::REDIRECT_COUNT)); - $this->assertCount(3, $history); - $requestHistory = $history->getAll(); - - $this->assertEquals(301, $requestHistory[0]['response']->getStatusCode()); - $this->assertEquals('/redirect1', (string) $requestHistory[0]['response']->getHeader('Location')); - $this->assertEquals(301, $requestHistory[1]['response']->getStatusCode()); - $this->assertEquals('/redirect2', (string) $requestHistory[1]['response']->getHeader('Location')); - $this->assertEquals(200, $requestHistory[2]['response']->getStatusCode()); - } - - public function testCanLimitNumberOfRedirects() - { - // Flush the server and queue up a redirect followed by a successful response - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect2\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect3\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect4\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect5\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect6\r\nContent-Length: 0\r\n\r\n" - )); - - try { - $client = new Client($this->getServer()->getUrl()); - $client->get('/foo')->send(); - $this->fail('Did not throw expected exception'); - } catch (TooManyRedirectsException $e) { - $this->assertContains( - "5 redirects were issued for this request:\nGET /foo HTTP/1.1\r\n", - $e->getMessage() - ); - } - } - - public function testDefaultBehaviorIsToRedirectWithGetForEntityEnclosingRequests() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - - $client = new Client($this->getServer()->getUrl()); - $client->post('/foo', array('X-Baz' => 'bar'), 'testing')->send(); - - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('GET', $requests[1]->getMethod()); - $this->assertEquals('bar', (string) $requests[1]->getHeader('X-Baz')); - $this->assertEquals('GET', $requests[2]->getMethod()); - } - - public function testCanRedirectWithStrictRfcCompliance() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->post('/foo', array('X-Baz' => 'bar'), 'testing'); - $request->getParams()->set(RedirectPlugin::STRICT_REDIRECTS, true); - $request->send(); - - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('POST', $requests[1]->getMethod()); - $this->assertEquals('bar', (string) $requests[1]->getHeader('X-Baz')); - $this->assertEquals('POST', $requests[2]->getMethod()); - } - - public function testRedirect303WithGet() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 303 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->post('/foo'); - $request->send(); - - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('GET', $requests[1]->getMethod()); - } - - public function testRedirect303WithGetWithStrictRfcCompliance() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 303 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->post('/foo'); - $request->getParams()->set(RedirectPlugin::STRICT_REDIRECTS, true); - $request->send(); - - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('GET', $requests[1]->getMethod()); - } - - public function testRewindsStreamWhenRedirectingIfNeeded() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->put(); - $request->configureRedirects(true); - $body = EntityBody::factory('foo'); - $body->read(1); - $request->setBody($body); - $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('foo', (string) $requests[0]->getBody()); - } - - /** - * @expectedException \Guzzle\Http\Exception\CouldNotRewindStreamException - */ - public function testThrowsExceptionWhenStreamCannotBeRewound() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n" - )); - - $client = new Client($this->getServer()->getUrl()); - $request = $client->put(); - $request->configureRedirects(true); - $body = EntityBody::factory(fopen($this->getServer()->getUrl(), 'r')); - $body->read(1); - $request->setBody($body)->send(); - } - - public function testRedirectsCanBeDisabledPerRequest() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array("HTTP/1.1 301 Foo\r\nLocation: /foo\r\nContent-Length: 0\r\n\r\n")); - $client = new Client($this->getServer()->getUrl()); - $request = $client->put(); - $request->configureRedirects(false, 0); - $this->assertEquals(301, $request->send()->getStatusCode()); - } - - public function testCanRedirectWithNoLeadingSlashAndQuery() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: redirect?foo=bar\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - )); - $client = new Client($this->getServer()->getUrl()); - $request = $client->get('?foo=bar'); - $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals($this->getServer()->getUrl() . '?foo=bar', $requests[0]->getUrl()); - $this->assertEquals($this->getServer()->getUrl() . 'redirect?foo=bar', $requests[1]->getUrl()); - // Ensure that the history on the actual request is correct - $this->assertEquals($this->getServer()->getUrl() . '?foo=bar', $request->getUrl()); - } - - public function testRedirectWithStrictRfc386Compliance() - { - // Flush the server and queue up a redirect followed by a successful response - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - $client = new Client($this->getServer()->getUrl()); - $request = $client->get('/foo'); - $request->send(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('/redirect', $requests[1]->getResource()); - } - - public function testResetsHistoryEachSend() - { - // Flush the server and queue up a redirect followed by a successful response - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect2\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - - // Create a client that uses the default redirect behavior - $client = new Client($this->getServer()->getUrl()); - $history = new HistoryPlugin(); - $client->addSubscriber($history); - - $request = $client->get('/foo'); - $response = $request->send(); - $this->assertEquals(3, count($history)); - $this->assertTrue($request->getParams()->hasKey('redirect.count')); - $this->assertContains('/redirect2', $response->getEffectiveUrl()); - - $request->send(); - $this->assertFalse($request->getParams()->hasKey('redirect.count')); - } - - public function testHandlesRedirectsWithSpacesProperly() - { - // Flush the server and queue up a redirect followed by a successful response - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect 1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - )); - $client = new Client($this->getServer()->getUrl()); - $request = $client->get('/foo'); - $request->send(); - $reqs = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('/redirect%201', $reqs[1]->getResource()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Server.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Server.php deleted file mode 100644 index a61caeeeb..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Server.php +++ /dev/null @@ -1,187 +0,0 @@ -port = $port ?: self::DEFAULT_PORT; - $this->client = new Client($this->getUrl()); - register_shutdown_function(array($this, 'stop')); - } - - /** - * Flush the received requests from the server - * @throws RuntimeException - */ - public function flush() - { - $this->client->delete('guzzle-server/requests')->send(); - } - - /** - * Queue an array of responses or a single response on the server. - * - * Any currently queued responses will be overwritten. Subsequent requests - * on the server will return queued responses in FIFO order. - * - * @param array|Response $responses A single or array of Responses to queue - * @throws BadResponseException - */ - public function enqueue($responses) - { - $data = array(); - foreach ((array) $responses as $response) { - - // Create the response object from a string - if (is_string($response)) { - $response = Response::fromMessage($response); - } elseif (!($response instanceof Response)) { - throw new BadResponseException('Responses must be strings or implement Response'); - } - - $data[] = array( - 'statusCode' => $response->getStatusCode(), - 'reasonPhrase' => $response->getReasonPhrase(), - 'headers' => $response->getHeaders()->toArray(), - 'body' => $response->getBody(true) - ); - } - - $request = $this->client->put('guzzle-server/responses', null, json_encode($data)); - $request->send(); - } - - /** - * Check if the server is running - * - * @return bool - */ - public function isRunning() - { - if ($this->running) { - return true; - } - - try { - $this->client->get('guzzle-server/perf', array(), array('timeout' => 5))->send(); - return $this->running = true; - } catch (\Exception $e) { - return false; - } - } - - /** - * Get the URL to the server - * - * @return string - */ - public function getUrl() - { - return 'http://127.0.0.1:' . $this->getPort() . '/'; - } - - /** - * Get the port that the server is listening on - * - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Get all of the received requests - * - * @param bool $hydrate Set to TRUE to turn the messages into - * actual {@see RequestInterface} objects. If $hydrate is FALSE, - * requests will be returned as strings. - * - * @return array - * @throws RuntimeException - */ - public function getReceivedRequests($hydrate = false) - { - $response = $this->client->get('guzzle-server/requests')->send(); - $data = array_filter(explode(self::REQUEST_DELIMITER, $response->getBody(true))); - if ($hydrate) { - $data = array_map(function($message) { - return RequestFactory::getInstance()->fromMessage($message); - }, $data); - } - - return $data; - } - - /** - * Start running the node.js server in the background - */ - public function start() - { - if (!$this->isRunning()) { - exec('node ' . __DIR__ . \DIRECTORY_SEPARATOR . 'server.js ' . $this->port . ' >> /tmp/server.log 2>&1 &'); - // Wait at most 5 seconds for the server the setup before proceeding - $start = time(); - while (!$this->isRunning() && time() - $start < 5); - if (!$this->running) { - throw new RuntimeException( - 'Unable to contact server.js. Have you installed node.js v0.5.0+? node must be in your path.' - ); - } - } - } - - /** - * Stop running the node.js server - */ - public function stop() - { - if (!$this->isRunning()) { - return false; - } - - $this->running = false; - $this->client->delete('guzzle-server')->send(); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/StaticClientTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/StaticClientTest.php deleted file mode 100644 index 091314bb7..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/StaticClientTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertTrue(class_exists('FooBazBar')); - $this->assertSame($client, $this->readAttribute('Guzzle\Http\StaticClient', 'client')); - } - - public function requestProvider() - { - return array_map( - function ($m) { return array($m); }, - array('GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS') - ); - } - - /** - * @dataProvider requestProvider - */ - public function testSendsRequests($method) - { - $mock = new MockPlugin(array(new Response(200))); - call_user_func('Guzzle\Http\StaticClient::' . $method, 'http://foo.com', array( - 'plugins' => array($mock) - )); - $requests = $mock->getReceivedRequests(); - $this->assertCount(1, $requests); - $this->assertEquals($method, $requests[0]->getMethod()); - } - - public function testCanCreateStreamsUsingDefaultFactory() - { - $this->getServer()->enqueue(array("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest")); - $stream = StaticClient::get($this->getServer()->getUrl(), array('stream' => true)); - $this->assertInstanceOf('Guzzle\Stream\StreamInterface', $stream); - $this->assertEquals('test', (string) $stream); - } - - public function testCanCreateStreamsUsingCustomFactory() - { - $stream = $this->getMockBuilder('Guzzle\Stream\StreamRequestFactoryInterface') - ->setMethods(array('fromRequest')) - ->getMockForAbstractClass(); - $resource = new Stream(fopen('php://temp', 'r+')); - $stream->expects($this->once()) - ->method('fromRequest') - ->will($this->returnValue($resource)); - $this->getServer()->enqueue(array("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest")); - $result = StaticClient::get($this->getServer()->getUrl(), array('stream' => $stream)); - $this->assertSame($resource, $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/UrlTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/UrlTest.php deleted file mode 100644 index acba28985..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/UrlTest.php +++ /dev/null @@ -1,298 +0,0 @@ -assertEquals('', (string) $url); - } - - public function testPortIsDeterminedFromScheme() - { - $this->assertEquals(80, Url::factory('http://www.test.com/')->getPort()); - $this->assertEquals(443, Url::factory('https://www.test.com/')->getPort()); - $this->assertEquals(null, Url::factory('ftp://www.test.com/')->getPort()); - $this->assertEquals(8192, Url::factory('http://www.test.com:8192/')->getPort()); - } - - public function testCloneCreatesNewInternalObjects() - { - $u1 = Url::factory('http://www.test.com/'); - $u2 = clone $u1; - $this->assertNotSame($u1->getQuery(), $u2->getQuery()); - } - - public function testValidatesUrlPartsInFactory() - { - $url = Url::factory('/index.php'); - $this->assertEquals('/index.php', (string) $url); - $this->assertFalse($url->isAbsolute()); - - $url = 'http://michael:test@test.com:80/path/123?q=abc#test'; - $u = Url::factory($url); - $this->assertEquals('http://michael:test@test.com/path/123?q=abc#test', (string) $u); - $this->assertTrue($u->isAbsolute()); - } - - public function testAllowsFalsyUrlParts() - { - $url = Url::factory('http://0:50/0?0#0'); - $this->assertSame('0', $url->getHost()); - $this->assertEquals(50, $url->getPort()); - $this->assertSame('/0', $url->getPath()); - $this->assertEquals('0', (string) $url->getQuery()); - $this->assertSame('0', $url->getFragment()); - $this->assertEquals('http://0:50/0?0#0', (string) $url); - - $url = Url::factory(''); - $this->assertSame('', (string) $url); - - $url = Url::factory('0'); - $this->assertSame('0', (string) $url); - } - - public function testBuildsRelativeUrlsWithFalsyParts() - { - $url = Url::buildUrl(array( - 'host' => '0', - 'path' => '0', - )); - - $this->assertSame('//0/0', $url); - - $url = Url::buildUrl(array( - 'path' => '0', - )); - $this->assertSame('0', $url); - } - - public function testUrlStoresParts() - { - $url = Url::factory('http://test:pass@www.test.com:8081/path/path2/?a=1&b=2#fragment'); - $this->assertEquals('http', $url->getScheme()); - $this->assertEquals('test', $url->getUsername()); - $this->assertEquals('pass', $url->getPassword()); - $this->assertEquals('www.test.com', $url->getHost()); - $this->assertEquals(8081, $url->getPort()); - $this->assertEquals('/path/path2/', $url->getPath()); - $this->assertEquals('fragment', $url->getFragment()); - $this->assertEquals('a=1&b=2', (string) $url->getQuery()); - - $this->assertEquals(array( - 'fragment' => 'fragment', - 'host' => 'www.test.com', - 'pass' => 'pass', - 'path' => '/path/path2/', - 'port' => 8081, - 'query' => 'a=1&b=2', - 'scheme' => 'http', - 'user' => 'test' - ), $url->getParts()); - } - - public function testHandlesPathsCorrectly() - { - $url = Url::factory('http://www.test.com'); - $this->assertEquals('', $url->getPath()); - $url->setPath('test'); - $this->assertEquals('test', $url->getPath()); - - $url->setPath('/test/123/abc'); - $this->assertEquals(array('test', '123', 'abc'), $url->getPathSegments()); - - $parts = parse_url('http://www.test.com/test'); - $parts['path'] = ''; - $this->assertEquals('http://www.test.com', Url::buildUrl($parts)); - $parts['path'] = 'test'; - $this->assertEquals('http://www.test.com/test', Url::buildUrl($parts)); - } - - public function testAddsQueryStringIfPresent() - { - $this->assertEquals('?foo=bar', Url::buildUrl(array( - 'query' => 'foo=bar' - ))); - } - - public function testAddsToPath() - { - // Does nothing here - $this->assertEquals('http://e.com/base?a=1', (string) Url::factory('http://e.com/base?a=1')->addPath(false)); - $this->assertEquals('http://e.com/base?a=1', (string) Url::factory('http://e.com/base?a=1')->addPath('')); - $this->assertEquals('http://e.com/base?a=1', (string) Url::factory('http://e.com/base?a=1')->addPath('/')); - - $this->assertEquals('http://e.com/base/relative?a=1', (string) Url::factory('http://e.com/base?a=1')->addPath('relative')); - $this->assertEquals('http://e.com/base/relative?a=1', (string) Url::factory('http://e.com/base?a=1')->addPath('/relative')); - } - - /** - * URL combination data provider - * - * @return array - */ - public function urlCombineDataProvider() - { - return array( - array('http://www.example.com/', 'http://www.example.com/', 'http://www.example.com/'), - array('http://www.example.com/path', '/absolute', 'http://www.example.com/absolute'), - array('http://www.example.com/path', '/absolute?q=2', 'http://www.example.com/absolute?q=2'), - array('http://www.example.com/path', 'more', 'http://www.example.com/path/more'), - array('http://www.example.com/path', 'more?q=1', 'http://www.example.com/path/more?q=1'), - array('http://www.example.com/', '?q=1', 'http://www.example.com/?q=1'), - array('http://www.example.com/path', 'http://test.com', 'http://test.com'), - array('http://www.example.com:8080/path', 'http://test.com', 'http://test.com'), - array('http://www.example.com:8080/path', '?q=2#abc', 'http://www.example.com:8080/path?q=2#abc'), - array('http://u:a@www.example.com/path', 'test', 'http://u:a@www.example.com/path/test'), - array('http://www.example.com/path', 'http://u:a@www.example.com/', 'http://u:a@www.example.com/'), - array('/path?q=2', 'http://www.test.com/', 'http://www.test.com/path?q=2'), - array('http://api.flickr.com/services/', 'http://www.flickr.com/services/oauth/access_token', 'http://www.flickr.com/services/oauth/access_token'), - array('http://www.example.com/?foo=bar', 'some/path', 'http://www.example.com/some/path?foo=bar'), - array('http://www.example.com/?foo=bar', 'some/path?boo=moo', 'http://www.example.com/some/path?boo=moo&foo=bar'), - array('http://www.example.com/some/', 'path?foo=bar&foo=baz', 'http://www.example.com/some/path?foo=bar&foo=baz'), - ); - } - - /** - * @dataProvider urlCombineDataProvider - */ - public function testCombinesUrls($a, $b, $c) - { - $this->assertEquals($c, (string) Url::factory($a)->combine($b)); - } - - public function testHasGettersAndSetters() - { - $url = Url::factory('http://www.test.com/'); - $this->assertEquals('example.com', $url->setHost('example.com')->getHost()); - $this->assertEquals('8080', $url->setPort(8080)->getPort()); - $this->assertEquals('/foo/bar', $url->setPath(array('foo', 'bar'))->getPath()); - $this->assertEquals('a', $url->setPassword('a')->getPassword()); - $this->assertEquals('b', $url->setUsername('b')->getUsername()); - $this->assertEquals('abc', $url->setFragment('abc')->getFragment()); - $this->assertEquals('https', $url->setScheme('https')->getScheme()); - $this->assertEquals('a=123', (string) $url->setQuery('a=123')->getQuery()); - $this->assertEquals('https://b:a@example.com:8080/foo/bar?a=123#abc', (string) $url); - $this->assertEquals('b=boo', (string) $url->setQuery(new QueryString(array( - 'b' => 'boo' - )))->getQuery()); - $this->assertEquals('https://b:a@example.com:8080/foo/bar?b=boo#abc', (string) $url); - } - - public function testSetQueryAcceptsArray() - { - $url = Url::factory('http://www.test.com'); - $url->setQuery(array('a' => 'b')); - $this->assertEquals('http://www.test.com?a=b', (string) $url); - } - - public function urlProvider() - { - return array( - array('/foo/..', '/'), - array('//foo//..', '/'), - array('/foo/../..', '/'), - array('/foo/../.', '/'), - array('/./foo/..', '/'), - array('/./foo', '/foo'), - array('/./foo/', '/foo/'), - array('/./foo/bar/baz/pho/../..', '/foo/bar'), - array('*', '*'), - array('/foo', '/foo'), - array('/abc/123/../foo/', '/abc/foo/'), - array('/a/b/c/./../../g', '/a/g'), - array('/b/c/./../../g', '/g'), - array('/b/c/./../../g', '/g'), - array('/c/./../../g', '/g'), - array('/./../../g', '/g'), - ); - } - - /** - * @dataProvider urlProvider - */ - public function testNormalizesPaths($path, $result) - { - $url = Url::factory('http://www.example.com/'); - $url->setPath($path)->normalizePath(); - $this->assertEquals($result, $url->getPath()); - } - - public function testSettingHostWithPortModifiesPort() - { - $url = Url::factory('http://www.example.com'); - $url->setHost('foo:8983'); - $this->assertEquals('foo', $url->getHost()); - $this->assertEquals(8983, $url->getPort()); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testValidatesUrlCanBeParsed() - { - Url::factory('foo:////'); - } - - public function testConvertsSpecialCharsInPathWhenCastingToString() - { - $url = Url::factory('http://foo.com/baz bar?a=b'); - $url->addPath('?'); - $this->assertEquals('http://foo.com/baz%20bar/%3F?a=b', (string) $url); - } - - /** - * @link http://tools.ietf.org/html/rfc3986#section-5.4.1 - */ - public function rfc3986UrlProvider() - { - $result = array( - array('g', 'http://a/b/c/g'), - array('./g', 'http://a/b/c/g'), - array('g/', 'http://a/b/c/g/'), - array('/g', 'http://a/g'), - array('?y', 'http://a/b/c/d;p?y'), - array('g?y', 'http://a/b/c/g?y'), - array('#s', 'http://a/b/c/d;p?q#s'), - array('g#s', 'http://a/b/c/g#s'), - array('g?y#s', 'http://a/b/c/g?y#s'), - array(';x', 'http://a/b/c/;x'), - array('g;x', 'http://a/b/c/g;x'), - array('g;x?y#s', 'http://a/b/c/g;x?y#s'), - array('', 'http://a/b/c/d;p?q'), - array('.', 'http://a/b/c'), - array('./', 'http://a/b/c/'), - array('..', 'http://a/b'), - array('../', 'http://a/b/'), - array('../g', 'http://a/b/g'), - array('../..', 'http://a/'), - array('../../', 'http://a/'), - array('../../g', 'http://a/g') - ); - - // This support was added in PHP 5.4.7: https://bugs.php.net/bug.php?id=62844 - if (version_compare(PHP_VERSION, '5.4.7', '>=')) { - $result[] = array('//g', 'http://g'); - } - - return $result; - } - - /** - * @dataProvider rfc3986UrlProvider - */ - public function testCombinesUrlsUsingRfc3986($relative, $result) - { - $a = Url::factory('http://a/b/c/d;p?q'); - $b = Url::factory($relative); - $this->assertEquals($result, trim((string) $a->combine($b, true), '=')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/server.js b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/server.js deleted file mode 100644 index 4156f1aad..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/server.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Guzzle node.js test server to return queued responses to HTTP requests and - * expose a RESTful API for enqueueing responses and retrieving the requests - * that have been received. - * - * - Delete all requests that have been received: - * DELETE /guzzle-server/requests - * Host: 127.0.0.1:8124 - * - * - Enqueue responses - * PUT /guzzle-server/responses - * Host: 127.0.0.1:8124 - * - * [{ "statusCode": 200, "reasonPhrase": "OK", "headers": {}, "body": "" }] - * - * - Get the received requests - * GET /guzzle-server/requests - * Host: 127.0.0.1:8124 - * - * - Shutdown the server - * DELETE /guzzle-server - * Host: 127.0.0.1:8124 - * - * @package Guzzle PHP - * @license See the LICENSE file that was distributed with this source code. - */ - -var http = require("http"); - -/** - * Guzzle node.js server - * @class - */ -var GuzzleServer = function(port, log) { - - this.port = port; - this.log = log; - this.responses = []; - this.requests = []; - var that = this; - - var controlRequest = function(request, req, res) { - if (req.url == '/guzzle-server/perf') { - res.writeHead(200, "OK", {"Content-Length": 16}); - res.end("Body of response"); - } else if (req.method == "DELETE") { - if (req.url == "/guzzle-server/requests") { - // Clear the received requests - that.requests = []; - res.writeHead(200, "OK", { "Content-Length": 0 }); - res.end(); - if (this.log) { - console.log("Flushing requests"); - } - } else if (req.url == "/guzzle-server") { - // Shutdown the server - res.writeHead(200, "OK", { "Content-Length": 0, "Connection": "close" }); - res.end(); - if (this.log) { - console.log("Shutting down"); - } - that.server.close(); - } - } else if (req.method == "GET") { - if (req.url === "/guzzle-server/requests") { - // Get received requests - var data = that.requests.join("\n----[request]\n"); - res.writeHead(200, "OK", { "Content-Length": data.length }); - res.end(data); - if (that.log) { - console.log("Sending receiving requests"); - } - } - } else if (req.method == "PUT") { - if (req.url == "/guzzle-server/responses") { - if (that.log) { - console.log("Adding responses..."); - } - // Received response to queue - var data = request.split("\r\n\r\n")[1]; - if (!data) { - if (that.log) { - console.log("No response data was provided"); - } - res.writeHead(400, "NO RESPONSES IN REQUEST", { "Content-Length": 0 }); - } else { - that.responses = eval("(" + data + ")"); - if (that.log) { - console.log(that.responses); - } - res.writeHead(200, "OK", { "Content-Length": 0 }); - } - res.end(); - } - } - }; - - var receivedRequest = function(request, req, res) { - if (req.url.indexOf("/guzzle-server") === 0) { - controlRequest(request, req, res); - } else if (req.url.indexOf("/guzzle-server") == -1 && !that.responses.length) { - res.writeHead(500); - res.end("No responses in queue"); - } else { - var response = that.responses.shift(); - res.writeHead(response.statusCode, response.reasonPhrase, response.headers); - res.end(response.body); - that.requests.push(request); - } - }; - - this.start = function() { - - that.server = http.createServer(function(req, res) { - - var request = req.method + " " + req.url + " HTTP/" + req.httpVersion + "\r\n"; - for (var i in req.headers) { - request += i + ": " + req.headers[i] + "\r\n"; - } - request += "\r\n"; - - // Receive each chunk of the request body - req.addListener("data", function(chunk) { - request += chunk; - }); - - // Called when the request completes - req.addListener("end", function() { - receivedRequest(request, req, res); - }); - }); - that.server.listen(port, "127.0.0.1"); - - if (this.log) { - console.log("Server running at http://127.0.0.1:8124/"); - } - }; -}; - -// Get the port from the arguments -port = process.argv.length >= 3 ? process.argv[2] : 8124; -log = process.argv.length >= 4 ? process.argv[3] : false; - -// Start the server -server = new GuzzleServer(port, log); -server.start(); diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/InflectorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/InflectorTest.php deleted file mode 100644 index 990c0af66..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/InflectorTest.php +++ /dev/null @@ -1,37 +0,0 @@ -assertSame(Inflector::getDefault(), Inflector::getDefault()); - } - - public function testSnake() - { - $this->assertEquals('camel_case', Inflector::getDefault()->snake('camelCase')); - $this->assertEquals('camel_case', Inflector::getDefault()->snake('CamelCase')); - $this->assertEquals('camel_case_words', Inflector::getDefault()->snake('CamelCaseWords')); - $this->assertEquals('camel_case_words', Inflector::getDefault()->snake('CamelCase_words')); - $this->assertEquals('test', Inflector::getDefault()->snake('test')); - $this->assertEquals('test', Inflector::getDefault()->snake('test')); - $this->assertEquals('expect100_continue', Inflector::getDefault()->snake('Expect100Continue')); - } - - public function testCamel() - { - $this->assertEquals('CamelCase', Inflector::getDefault()->camel('camel_case')); - $this->assertEquals('CamelCaseWords', Inflector::getDefault()->camel('camel_case_words')); - $this->assertEquals('Test', Inflector::getDefault()->camel('test')); - $this->assertEquals('Expect100Continue', ucfirst(Inflector::getDefault()->camel('expect100_continue'))); - // Get from cache - $this->assertEquals('Test', Inflector::getDefault()->camel('test', false)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/MemoizingInflectorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/MemoizingInflectorTest.php deleted file mode 100644 index f00b7fad8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/MemoizingInflectorTest.php +++ /dev/null @@ -1,46 +0,0 @@ -getMock('Guzzle\Inflection\Inflector', array('snake', 'camel')); - $mock->expects($this->once())->method('snake')->will($this->returnValue('foo_bar')); - $mock->expects($this->once())->method('camel')->will($this->returnValue('FooBar')); - - $inflector = new MemoizingInflector($mock); - $this->assertEquals('foo_bar', $inflector->snake('FooBar')); - $this->assertEquals('foo_bar', $inflector->snake('FooBar')); - $this->assertEquals('FooBar', $inflector->camel('foo_bar')); - $this->assertEquals('FooBar', $inflector->camel('foo_bar')); - } - - public function testProtectsAgainstCacheOverflow() - { - $inflector = new MemoizingInflector(new Inflector(), 10); - for ($i = 1; $i < 11; $i++) { - $inflector->camel('foo_' . $i); - $inflector->snake('Foo' . $i); - } - - $cache = $this->readAttribute($inflector, 'cache'); - $this->assertEquals(10, count($cache['snake'])); - $this->assertEquals(10, count($cache['camel'])); - - $inflector->camel('baz!'); - $inflector->snake('baz!'); - - // Now ensure that 20% of the cache was removed (2), then the item was added - $cache = $this->readAttribute($inflector, 'cache'); - $this->assertEquals(9, count($cache['snake'])); - $this->assertEquals(9, count($cache['camel'])); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/PreComputedInflectorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/PreComputedInflectorTest.php deleted file mode 100644 index ff2654cf6..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/PreComputedInflectorTest.php +++ /dev/null @@ -1,45 +0,0 @@ -getMock('Guzzle\Inflection\Inflector', array('snake', 'camel')); - $mock->expects($this->once())->method('snake')->with('Test')->will($this->returnValue('test')); - $mock->expects($this->once())->method('camel')->with('Test')->will($this->returnValue('Test')); - $inflector = new PreComputedInflector($mock, array('FooBar' => 'foo_bar'), array('foo_bar' => 'FooBar')); - $this->assertEquals('FooBar', $inflector->camel('foo_bar')); - $this->assertEquals('foo_bar', $inflector->snake('FooBar')); - $this->assertEquals('Test', $inflector->camel('Test')); - $this->assertEquals('test', $inflector->snake('Test')); - } - - public function testMirrorsPrecomputedValues() - { - $mock = $this->getMock('Guzzle\Inflection\Inflector', array('snake', 'camel')); - $mock->expects($this->never())->method('snake'); - $mock->expects($this->never())->method('camel'); - $inflector = new PreComputedInflector($mock, array('Zeep' => 'zeep'), array(), true); - $this->assertEquals('Zeep', $inflector->camel('zeep')); - $this->assertEquals('zeep', $inflector->snake('Zeep')); - } - - public function testMirrorsPrecomputedValuesByMerging() - { - $mock = $this->getMock('Guzzle\Inflection\Inflector', array('snake', 'camel')); - $mock->expects($this->never())->method('snake'); - $mock->expects($this->never())->method('camel'); - $inflector = new PreComputedInflector($mock, array('Zeep' => 'zeep'), array('foo' => 'Foo'), true); - $this->assertEquals('Zeep', $inflector->camel('zeep')); - $this->assertEquals('zeep', $inflector->snake('Zeep')); - $this->assertEquals('Foo', $inflector->camel('foo')); - $this->assertEquals('foo', $inflector->snake('Foo')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/AppendIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/AppendIteratorTest.php deleted file mode 100644 index 8d6ae845a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/AppendIteratorTest.php +++ /dev/null @@ -1,29 +0,0 @@ - 1, - 'b' => 2 - )); - $b = new \ArrayIterator(array()); - $c = new \ArrayIterator(array( - 'c' => 3, - 'd' => 4 - )); - $i = new AppendIterator(); - $i->append($a); - $i->append($b); - $i->append($c); - $this->assertEquals(array(1, 2, 3, 4), iterator_to_array($i, false)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/ChunkedIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/ChunkedIteratorTest.php deleted file mode 100644 index 5d474b557..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/ChunkedIteratorTest.php +++ /dev/null @@ -1,60 +0,0 @@ -assertEquals(11, count($chunks)); - foreach ($chunks as $j => $chunk) { - $this->assertEquals(range($j * 10, min(100, $j * 10 + 9)), $chunk); - } - } - - public function testChunksIteratorWithOddValues() - { - $chunked = new ChunkedIterator(new \ArrayIterator(array(1, 2, 3, 4, 5)), 2); - $chunks = iterator_to_array($chunked, false); - $this->assertEquals(3, count($chunks)); - $this->assertEquals(array(1, 2), $chunks[0]); - $this->assertEquals(array(3, 4), $chunks[1]); - $this->assertEquals(array(5), $chunks[2]); - } - - /** - * @test - * @runInSeparateProcess - */ - public function mustNotTerminateWithTraversable() - { - $traversable = simplexml_load_string('')->foo; - $chunked = new ChunkedIterator($traversable, 2); - $actual = iterator_to_array($chunked, false); - $this->assertCount(2, $actual); - } - - /** - * @test - */ - public function sizeOfZeroMakesIteratorInvalid() { - $chunked = new ChunkedIterator(new \ArrayIterator(range(1, 5)), 0); - $chunked->rewind(); - $this->assertFalse($chunked->valid()); - } - - /** - * @test - * @expectedException \InvalidArgumentException - */ - public function sizeLowerZeroThrowsException() { - $chunked = new ChunkedIterator(new \ArrayIterator(range(1, 5)), -1); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/FilterIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/FilterIteratorTest.php deleted file mode 100644 index 73b4f6987..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/FilterIteratorTest.php +++ /dev/null @@ -1,28 +0,0 @@ -assertEquals(range(1, 99, 2), iterator_to_array($i, false)); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesCallable() - { - $i = new FilterIterator(new \ArrayIterator(), new \stdClass()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MapIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MapIteratorTest.php deleted file mode 100644 index 4de4a6bc1..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MapIteratorTest.php +++ /dev/null @@ -1,28 +0,0 @@ -assertEquals(range(0, 1000, 10), iterator_to_array($i, false)); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesCallable() - { - $i = new MapIterator(new \ArrayIterator(), new \stdClass()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MethodProxyIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MethodProxyIteratorTest.php deleted file mode 100644 index 5bcf06fb0..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MethodProxyIteratorTest.php +++ /dev/null @@ -1,28 +0,0 @@ -append('a'); - $proxy->append('b'); - $this->assertEquals(array('a', 'b'), $i->getArrayCopy()); - $this->assertEquals(array('a', 'b'), $proxy->getArrayCopy()); - } - - public function testUsesInnerIterator() - { - $i = new MethodProxyIterator(new ChunkedIterator(new \ArrayIterator(array(1, 2, 3, 4, 5)), 2)); - $this->assertEquals(3, count(iterator_to_array($i, false))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ArrayLogAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ArrayLogAdapterTest.php deleted file mode 100644 index 95033e0a7..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ArrayLogAdapterTest.php +++ /dev/null @@ -1,23 +0,0 @@ -log('test', \LOG_NOTICE, 'localhost'); - $this->assertEquals(array(array('message' => 'test', 'priority' => \LOG_NOTICE, 'extras' => 'localhost')), $adapter->getLogs()); - } - - public function testClearLog() - { - $adapter = new ArrayLogAdapter(); - $adapter->log('test', \LOG_NOTICE, 'localhost'); - $adapter->clearLogs(); - $this->assertEquals(array(), $adapter->getLogs()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ClosureLogAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ClosureLogAdapterTest.php deleted file mode 100644 index 7d1aa1609..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ClosureLogAdapterTest.php +++ /dev/null @@ -1,30 +0,0 @@ -adapter = new ClosureLogAdapter(function($message, $priority, $extras = null) use ($that, &$modified) { - $modified = array($message, $priority, $extras); - }); - $this->adapter->log('test', LOG_NOTICE, 'localhost'); - $this->assertEquals(array('test', LOG_NOTICE, 'localhost'), $modified); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testThrowsExceptionWhenNotCallable() - { - $this->adapter = new ClosureLogAdapter(123); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/MessageFormatterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/MessageFormatterTest.php deleted file mode 100644 index 385172443..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/MessageFormatterTest.php +++ /dev/null @@ -1,143 +0,0 @@ -request = new EntityEnclosingRequest('POST', 'http://foo.com?q=test', array( - 'X-Foo' => 'bar', - 'Authorization' => 'Baz' - )); - $this->request->setBody(EntityBody::factory('Hello')); - - $this->response = new Response(200, array( - 'X-Test' => 'Abc' - ), 'Foo'); - - $this->handle = $this->getMockBuilder('Guzzle\Http\Curl\CurlHandle') - ->disableOriginalConstructor() - ->setMethods(array('getError', 'getErrorNo', 'getStderr', 'getInfo')) - ->getMock(); - - $this->handle->expects($this->any()) - ->method('getError') - ->will($this->returnValue('e')); - - $this->handle->expects($this->any()) - ->method('getErrorNo') - ->will($this->returnValue('123')); - - $this->handle->expects($this->any()) - ->method('getStderr') - ->will($this->returnValue('testing')); - - $this->handle->expects($this->any()) - ->method('getInfo') - ->will($this->returnValueMap(array( - array(CURLINFO_CONNECT_TIME, '123'), - array(CURLINFO_TOTAL_TIME, '456') - ))); - } - - public function logProvider() - { - return array( - // Uses the cache for the second time - array('{method} - {method}', 'POST - POST'), - array('{url}', 'http://foo.com?q=test'), - array('{port}', '80'), - array('{resource}', '/?q=test'), - array('{host}', 'foo.com'), - array('{hostname}', gethostname()), - array('{protocol}/{version}', 'HTTP/1.1'), - array('{code} {phrase}', '200 OK'), - array('{req_header_Foo}', ''), - array('{req_header_X-Foo}', 'bar'), - array('{req_header_Authorization}', 'Baz'), - array('{res_header_foo}', ''), - array('{res_header_X-Test}', 'Abc'), - array('{req_body}', 'Hello'), - array('{res_body}', 'Foo'), - array('{curl_stderr}', 'testing'), - array('{curl_error}', 'e'), - array('{curl_code}', '123'), - array('{connect_time}', '123'), - array('{total_time}', '456') - ); - } - - /** - * @dataProvider logProvider - */ - public function testFormatsMessages($template, $output) - { - $formatter = new MessageFormatter($template); - $this->assertEquals($output, $formatter->format($this->request, $this->response, $this->handle)); - } - - public function testFormatsRequestsAndResponses() - { - $formatter = new MessageFormatter(); - $formatter->setTemplate('{request}{response}'); - $this->assertEquals($this->request . $this->response, $formatter->format($this->request, $this->response)); - } - - public function testAddsTimestamp() - { - $formatter = new MessageFormatter('{ts}'); - $this->assertNotEmpty($formatter->format($this->request, $this->response)); - } - - public function testUsesResponseWhenNoHandleAndGettingCurlInformation() - { - $formatter = new MessageFormatter('{connect_time}/{total_time}'); - $response = $this->getMockBuilder('Guzzle\Http\Message\Response') - ->disableOriginalConstructor() - ->setMethods(array('getInfo')) - ->getMock(); - $response->expects($this->exactly(2)) - ->method('getInfo') - ->will($this->returnValueMap(array( - array('connect_time', '1'), - array('total_time', '2'), - ))); - $this->assertEquals('1/2', $formatter->format($this->request, $response)); - } - - public function testUsesEmptyStringWhenNoHandleAndNoResponse() - { - $formatter = new MessageFormatter('{connect_time}/{total_time}'); - $this->assertEquals('/', $formatter->format($this->request)); - } - - public function testInjectsTotalTime() - { - $out = ''; - $formatter = new MessageFormatter('{connect_time}/{total_time}'); - $adapter = new ClosureLogAdapter(function ($m) use (&$out) { $out .= $m; }); - $log = new LogPlugin($adapter, $formatter); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nHI"); - $client = new Client($this->getServer()->getUrl()); - $client->addSubscriber($log); - $client->get('/')->send(); - $this->assertNotEquals('/', $out); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/PsrLogAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/PsrLogAdapterTest.php deleted file mode 100644 index 7b72dd6a0..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/PsrLogAdapterTest.php +++ /dev/null @@ -1,25 +0,0 @@ -pushHandler($handler); - $adapter = new PsrLogAdapter($log); - $adapter->log('test!', LOG_INFO); - $this->assertTrue($handler->hasInfoRecords()); - $this->assertSame($log, $adapter->getLogObject()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php deleted file mode 100644 index 1b6128365..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php +++ /dev/null @@ -1,51 +0,0 @@ -stream = fopen('php://temp', 'r+'); - $this->log = new Logger(); - $this->log->addWriter(new Stream($this->stream)); - $this->adapter = new Zf2LogAdapter($this->log); - - } - - public function testLogsMessagesToAdaptedObject() - { - // Test without a priority - $this->adapter->log('Zend_Test!', \LOG_NOTICE); - rewind($this->stream); - $contents = stream_get_contents($this->stream); - $this->assertEquals(1, substr_count($contents, 'Zend_Test!')); - - // Test with a priority - $this->adapter->log('Zend_Test!', \LOG_ALERT); - rewind($this->stream); - $contents = stream_get_contents($this->stream); - $this->assertEquals(2, substr_count($contents, 'Zend_Test!')); - } - - public function testExposesAdaptedLogObject() - { - $this->assertEquals($this->log, $this->adapter->getLogObject()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/CustomResponseModel.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/CustomResponseModel.php deleted file mode 100644 index 3fb6527be..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/CustomResponseModel.php +++ /dev/null @@ -1,21 +0,0 @@ -command = $command; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php deleted file mode 100644 index aabb15f9c..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php +++ /dev/null @@ -1,25 +0,0 @@ -command = $command; - $this->response = $response; - $this->message = 'Error from ' . $response; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ExceptionMock.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ExceptionMock.php deleted file mode 100644 index 97a197487..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ExceptionMock.php +++ /dev/null @@ -1,11 +0,0 @@ -multiHandle; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockObserver.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockObserver.php deleted file mode 100644 index 11e22eb46..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockObserver.php +++ /dev/null @@ -1,65 +0,0 @@ -events as $event) { - if ($event->getName() == $eventName) { - return true; - } - } - - return false; - } - - public function getLastEvent() - { - return end($this->events); - } - - public function count() - { - return count($this->events); - } - - public function getGrouped() - { - $events = array(); - foreach ($this->events as $event) { - if (!isset($events[$event->getName()])) { - $events[$event->getName()] = array(); - } - $events[$event->getName()][] = $event; - } - - return $events; - } - - public function getData($event, $key, $occurrence = 0) - { - $grouped = $this->getGrouped(); - if (isset($grouped[$event])) { - return $grouped[$event][$occurrence][$key]; - } - - return null; - } - - public function update(Event $event) - { - $this->events[] = $event; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockSubject.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockSubject.php deleted file mode 100644 index e011959bb..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockSubject.php +++ /dev/null @@ -1,7 +0,0 @@ - 'allseeing-i.com', - 'path' => '/', - 'data' => array( - 'PHPSESSID' => '6c951590e7a9359bcedde25cda73e43c' - ), - 'max_age' => NULL, - 'expires' => 'Sat, 26-Jul-2008 17:00:42 GMT', - 'version' => NULL, - 'secure' => NULL, - 'discard' => NULL, - 'port' => NULL, - 'cookies' => array( - 'ASIHTTPRequestTestCookie' => 'This+is+the+value' - ), - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - array('', false), - array('foo', false), - // Test setting a blank value for a cookie - array(array( - 'foo=', 'foo =', 'foo =;', 'foo= ;', 'foo =', 'foo= '), - array( - 'cookies' => array( - 'foo' => '' - ), - 'data' => array(), - 'discard' => null, - 'domain' => null, - 'expires' => null, - 'max_age' => null, - 'path' => '/', - 'port' => null, - 'secure' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - // Test setting a value and removing quotes - array(array( - 'foo=1', 'foo =1', 'foo =1;', 'foo=1 ;', 'foo =1', 'foo= 1', 'foo = 1 ;', 'foo="1"', 'foo="1";', 'foo= "1";'), - array( - 'cookies' => array( - 'foo' => '1' - ), - 'data' => array(), - 'discard' => null, - 'domain' => null, - 'expires' => null, - 'max_age' => null, - 'path' => '/', - 'port' => null, - 'secure' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - // Test setting multiple values - array(array( - 'foo=1; bar=2;', 'foo =1; bar = "2"', 'foo=1; bar=2'), - array( - 'cookies' => array( - 'foo' => '1', - 'bar' => '2', - ), - 'data' => array(), - 'discard' => null, - 'domain' => null, - 'expires' => null, - 'max_age' => null, - 'path' => '/', - 'port' => null, - 'secure' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - // Tests getting the domain and path from a reference request - array(array( - 'foo=1; port="80,8081"; httponly', 'foo=1; port="80,8081"; domain=www.test.com; HttpOnly;', 'foo=1; ; domain=www.test.com; path=/path/; port="80,8081"; HttpOnly;'), - array( - 'cookies' => array( - 'foo' => 1 - ), - 'data' => array(), - 'discard' => null, - 'domain' => 'www.test.com', - 'expires' => null, - 'max_age' => null, - 'path' => '/path/', - 'port' => array('80', '8081'), - 'secure' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => true - ), - 'http://www.test.com/path/' - ), - // Some of the following tests are based on http://framework.zend.com/svn/framework/standard/trunk/tests/Zend/Http/CookieTest.php - array( - 'justacookie=foo; domain=example.com', - array( - 'cookies' => array( - 'justacookie' => 'foo' - ), - 'domain' => 'example.com', - 'path' => '', - 'data' => array(), - 'discard' => null, - 'expires' => null, - 'max_age' => null, - 'path' => '/', - 'port' => null, - 'secure' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - array( - 'expires=tomorrow; secure; path=/Space Out/; expires=Tue, 21-Nov-2006 08:33:44 GMT; domain=.example.com', - array( - 'cookies' => array( - 'expires' => 'tomorrow' - ), - 'domain' => '.example.com', - 'path' => '/Space Out/', - 'expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'data' => array(), - 'discard' => null, - 'port' => null, - 'secure' => true, - 'version' => null, - 'max_age' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - array( - 'domain=unittests; expires=Tue, 21-Nov-2006 08:33:44 GMT; domain=example.com; path=/some value/', - array( - 'cookies' => array( - 'domain' => 'unittests' - ), - 'domain' => 'example.com', - 'path' => '/some value/', - 'expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'secure' => false, - 'data' => array(), - 'discard' => null, - 'max_age' => null, - 'port' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - array( - 'path=indexAction; path=/; domain=.foo.com; expires=Tue, 21-Nov-2006 08:33:44 GMT', - array( - 'cookies' => array( - 'path' => 'indexAction' - ), - 'domain' => '.foo.com', - 'path' => '/', - 'expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'secure' => false, - 'data' => array(), - 'discard' => null, - 'max_age' => null, - 'port' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - array( - 'secure=sha1; secure; SECURE; domain=some.really.deep.domain.com; version=1; Max-Age=86400', - array( - 'cookies' => array( - 'secure' => 'sha1' - ), - 'domain' => 'some.really.deep.domain.com', - 'path' => '/', - 'secure' => true, - 'data' => array(), - 'discard' => null, - 'expires' => time() + 86400, - 'max_age' => 86400, - 'port' => null, - 'version' => 1, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - array( - 'PHPSESSID=123456789+abcd%2Cef; secure; discard; domain=.localdomain; path=/foo/baz; expires=Tue, 21-Nov-2006 08:33:44 GMT;', - array( - 'cookies' => array( - 'PHPSESSID' => '123456789+abcd%2Cef' - ), - 'domain' => '.localdomain', - 'path' => '/foo/baz', - 'expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'secure' => true, - 'data' => array(), - 'discard' => true, - 'max_age' => null, - 'port' => null, - 'version' => null, - 'comment' => null, - 'comment_url' => null, - 'http_only' => false - ) - ), - ); - } - - /** - * @dataProvider cookieParserDataProvider - */ - public function testParseCookie($cookie, $parsed, $url = null) - { - $c = $this->cookieParserClass; - $parser = new $c(); - - $request = null; - if ($url) { - $url = Url::factory($url); - $host = $url->getHost(); - $path = $url->getPath(); - } else { - $host = ''; - $path = ''; - } - - foreach ((array) $cookie as $c) { - $p = $parser->parseCookie($c, $host, $path); - - // Remove expires values from the assertion if they are relatively equal by allowing a 5 minute difference - if ($p['expires'] != $parsed['expires']) { - if (abs($p['expires'] - $parsed['expires']) < 300) { - unset($p['expires']); - unset($parsed['expires']); - } - } - - if (is_array($parsed)) { - foreach ($parsed as $key => $value) { - $this->assertEquals($parsed[$key], $p[$key], 'Comparing ' . $key . ' ' . var_export($value, true) . ' : ' . var_export($parsed, true) . ' | ' . var_export($p, true)); - } - - foreach ($p as $key => $value) { - $this->assertEquals($p[$key], $parsed[$key], 'Comparing ' . $key . ' ' . var_export($value, true) . ' : ' . var_export($parsed, true) . ' | ' . var_export($p, true)); - } - } else { - $this->assertEquals($parsed, $p); - } - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Cookie/CookieParserTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Cookie/CookieParserTest.php deleted file mode 100644 index 75d336fa5..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Cookie/CookieParserTest.php +++ /dev/null @@ -1,22 +0,0 @@ -parseCookie('foo=baz+bar', null, null, true); - $this->assertEquals(array( - 'foo' => 'baz bar' - ), $result['cookies']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserProvider.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserProvider.php deleted file mode 100644 index da58bb465..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserProvider.php +++ /dev/null @@ -1,225 +0,0 @@ - 'GET', - 'protocol' => 'HTTP', - 'version' => '1.1', - 'request_url' => array( - 'scheme' => 'http', - 'host' => '', - 'port' => '', - 'path' => '/', - 'query' => '' - ), - 'headers' => array(), - 'body' => '' - )), - // Path and query string, multiple header values per header and case sensitive storage - array("HEAD /path?query=foo HTTP/1.0\r\nHost: example.com\r\nX-Foo: foo\r\nx-foo: Bar\r\nX-Foo: foo\r\nX-Foo: Baz\r\n\r\n", array( - 'method' => 'HEAD', - 'protocol' => 'HTTP', - 'version' => '1.0', - 'request_url' => array( - 'scheme' => 'http', - 'host' => 'example.com', - 'port' => '', - 'path' => '/path', - 'query' => 'query=foo' - ), - 'headers' => array( - 'Host' => 'example.com', - 'X-Foo' => array('foo', 'foo', 'Baz'), - 'x-foo' => 'Bar' - ), - 'body' => '' - )), - // Includes a body - array("PUT / HTTP/1.0\r\nhost: example.com:443\r\nContent-Length: 4\r\n\r\ntest", array( - 'method' => 'PUT', - 'protocol' => 'HTTP', - 'version' => '1.0', - 'request_url' => array( - 'scheme' => 'https', - 'host' => 'example.com', - 'port' => '443', - 'path' => '/', - 'query' => '' - ), - 'headers' => array( - 'host' => 'example.com:443', - 'Content-Length' => '4' - ), - 'body' => 'test' - )), - // Includes Authorization headers - array("GET / HTTP/1.1\r\nHost: example.com:8080\r\nAuthorization: Basic {$auth}\r\n\r\n", array( - 'method' => 'GET', - 'protocol' => 'HTTP', - 'version' => '1.1', - 'request_url' => array( - 'scheme' => 'http', - 'host' => 'example.com', - 'port' => '8080', - 'path' => '/', - 'query' => '' - ), - 'headers' => array( - 'Host' => 'example.com:8080', - 'Authorization' => "Basic {$auth}" - ), - 'body' => '' - )), - // Include authorization header - array("GET / HTTP/1.1\r\nHost: example.com:8080\r\nauthorization: Basic {$auth}\r\n\r\n", array( - 'method' => 'GET', - 'protocol' => 'HTTP', - 'version' => '1.1', - 'request_url' => array( - 'scheme' => 'http', - 'host' => 'example.com', - 'port' => '8080', - 'path' => '/', - 'query' => '' - ), - 'headers' => array( - 'Host' => 'example.com:8080', - 'authorization' => "Basic {$auth}" - ), - 'body' => '' - )), - ); - } - - public function responseProvider() - { - return array( - // Empty request - array('', false), - - array("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", array( - 'protocol' => 'HTTP', - 'version' => '1.1', - 'code' => '200', - 'reason_phrase' => 'OK', - 'headers' => array( - 'Content-Length' => 0 - ), - 'body' => '' - )), - array("HTTP/1.0 400 Bad Request\r\nContent-Length: 0\r\n\r\n", array( - 'protocol' => 'HTTP', - 'version' => '1.0', - 'code' => '400', - 'reason_phrase' => 'Bad Request', - 'headers' => array( - 'Content-Length' => 0 - ), - 'body' => '' - )), - array("HTTP/1.0 100 Continue\r\n\r\n", array( - 'protocol' => 'HTTP', - 'version' => '1.0', - 'code' => '100', - 'reason_phrase' => 'Continue', - 'headers' => array(), - 'body' => '' - )), - array("HTTP/1.1 204 No Content\r\nX-Foo: foo\r\nx-foo: Bar\r\nX-Foo: foo\r\n\r\n", array( - 'protocol' => 'HTTP', - 'version' => '1.1', - 'code' => '204', - 'reason_phrase' => 'No Content', - 'headers' => array( - 'X-Foo' => array('foo', 'foo'), - 'x-foo' => 'Bar' - ), - 'body' => '' - )), - array("HTTP/1.1 200 Ok that is great!\r\nContent-Length: 4\r\n\r\nTest", array( - 'protocol' => 'HTTP', - 'version' => '1.1', - 'code' => '200', - 'reason_phrase' => 'Ok that is great!', - 'headers' => array( - 'Content-Length' => 4 - ), - 'body' => 'Test' - )), - ); - } - - public function compareRequestResults($result, $expected) - { - if (!$result) { - $this->assertFalse($expected); - return; - } - - $this->assertEquals($result['method'], $expected['method']); - $this->assertEquals($result['protocol'], $expected['protocol']); - $this->assertEquals($result['version'], $expected['version']); - $this->assertEquals($result['request_url'], $expected['request_url']); - $this->assertEquals($result['body'], $expected['body']); - $this->compareHttpHeaders($result['headers'], $expected['headers']); - } - - public function compareResponseResults($result, $expected) - { - if (!$result) { - $this->assertFalse($expected); - return; - } - - $this->assertEquals($result['protocol'], $expected['protocol']); - $this->assertEquals($result['version'], $expected['version']); - $this->assertEquals($result['code'], $expected['code']); - $this->assertEquals($result['reason_phrase'], $expected['reason_phrase']); - $this->assertEquals($result['body'], $expected['body']); - $this->compareHttpHeaders($result['headers'], $expected['headers']); - } - - protected function normalizeHeaders($headers) - { - $normalized = array(); - foreach ($headers as $key => $value) { - $key = strtolower($key); - if (!isset($normalized[$key])) { - $normalized[$key] = $value; - } elseif (!is_array($normalized[$key])) { - $normalized[$key] = array($value); - } else { - $normalized[$key][] = $value; - } - } - - foreach ($normalized as $key => &$value) { - if (is_array($value)) { - sort($value); - } - } - - return $normalized; - } - - public function compareHttpHeaders($result, $expected) - { - // Aggregate all headers case-insensitively - $result = $this->normalizeHeaders($result); - $expected = $this->normalizeHeaders($expected); - $this->assertEquals($result, $expected); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserTest.php deleted file mode 100644 index 2f5222893..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserTest.php +++ /dev/null @@ -1,58 +0,0 @@ -compareRequestResults($parts, $parser->parseRequest($message)); - } - - /** - * @dataProvider responseProvider - */ - public function testParsesResponses($message, $parts) - { - $parser = new MessageParser(); - $this->compareResponseResults($parts, $parser->parseResponse($message)); - } - - public function testParsesRequestsWithMissingProtocol() - { - $parser = new MessageParser(); - $parts = $parser->parseRequest("GET /\r\nHost: Foo.com\r\n\r\n"); - $this->assertEquals('GET', $parts['method']); - $this->assertEquals('HTTP', $parts['protocol']); - $this->assertEquals('1.1', $parts['version']); - } - - public function testParsesRequestsWithMissingVersion() - { - $parser = new MessageParser(); - $parts = $parser->parseRequest("GET / HTTP\r\nHost: Foo.com\r\n\r\n"); - $this->assertEquals('GET', $parts['method']); - $this->assertEquals('HTTP', $parts['protocol']); - $this->assertEquals('1.1', $parts['version']); - } - - public function testParsesResponsesWithMissingReasonPhrase() - { - $parser = new MessageParser(); - $parts = $parser->parseResponse("HTTP/1.1 200\r\n\r\n"); - $this->assertEquals('200', $parts['code']); - $this->assertEquals('', $parts['reason_phrase']); - $this->assertEquals('HTTP', $parts['protocol']); - $this->assertEquals('1.1', $parts['version']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/PeclHttpMessageParserTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/PeclHttpMessageParserTest.php deleted file mode 100644 index 6706e2063..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/PeclHttpMessageParserTest.php +++ /dev/null @@ -1,36 +0,0 @@ -markTestSkipped('pecl_http is not available.'); - } - } - - /** - * @dataProvider requestProvider - */ - public function testParsesRequests($message, $parts) - { - $parser = new PeclHttpMessageParser(); - $this->compareRequestResults($parts, $parser->parseRequest($message)); - } - - /** - * @dataProvider responseProvider - */ - public function testParsesResponses($message, $parts) - { - $parser = new PeclHttpMessageParser(); - $this->compareResponseResults($parts, $parser->parseResponse($message)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/ParserRegistryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/ParserRegistryTest.php deleted file mode 100644 index 7675efb96..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/ParserRegistryTest.php +++ /dev/null @@ -1,33 +0,0 @@ -registerParser('foo', $c); - $this->assertSame($c, $r->getParser('foo')); - } - - public function testReturnsNullWhenNotFound() - { - $r = new ParserRegistry(); - $this->assertNull($r->getParser('FOO')); - } - - public function testReturnsLazyLoadedDefault() - { - $r = new ParserRegistry(); - $c = $r->getParser('cookie'); - $this->assertInstanceOf('Guzzle\Parser\Cookie\CookieParser', $c); - $this->assertSame($c, $r->getParser('cookie')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/AbstractUriTemplateTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/AbstractUriTemplateTest.php deleted file mode 100644 index a05fc2e4d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/AbstractUriTemplateTest.php +++ /dev/null @@ -1,113 +0,0 @@ - 'value', - 'hello' => 'Hello World!', - 'empty' => '', - 'path' => '/foo/bar', - 'x' => '1024', - 'y' => '768', - 'null' => null, - 'list' => array('red', 'green', 'blue'), - 'keys' => array( - "semi" => ';', - "dot" => '.', - "comma" => ',' - ), - 'empty_keys' => array(), - ); - - return array_map(function($t) use ($params) { - $t[] = $params; - return $t; - }, array( - array('foo', 'foo'), - array('{var}', 'value'), - array('{hello}', 'Hello%20World%21'), - array('{+var}', 'value'), - array('{+hello}', 'Hello%20World!'), - array('{+path}/here', '/foo/bar/here'), - array('here?ref={+path}', 'here?ref=/foo/bar'), - array('X{#var}', 'X#value'), - array('X{#hello}', 'X#Hello%20World!'), - array('map?{x,y}', 'map?1024,768'), - array('{x,hello,y}', '1024,Hello%20World%21,768'), - array('{+x,hello,y}', '1024,Hello%20World!,768'), - array('{+path,x}/here', '/foo/bar,1024/here'), - array('{#x,hello,y}', '#1024,Hello%20World!,768'), - array('{#path,x}/here', '#/foo/bar,1024/here'), - array('X{.var}', 'X.value'), - array('X{.x,y}', 'X.1024.768'), - array('{/var}', '/value'), - array('{/var,x}/here', '/value/1024/here'), - array('{;x,y}', ';x=1024;y=768'), - array('{;x,y,empty}', ';x=1024;y=768;empty'), - array('{?x,y}', '?x=1024&y=768'), - array('{?x,y,empty}', '?x=1024&y=768&empty='), - array('?fixed=yes{&x}', '?fixed=yes&x=1024'), - array('{&x,y,empty}', '&x=1024&y=768&empty='), - array('{var:3}', 'val'), - array('{var:30}', 'value'), - array('{list}', 'red,green,blue'), - array('{list*}', 'red,green,blue'), - array('{keys}', 'semi,%3B,dot,.,comma,%2C'), - array('{keys*}', 'semi=%3B,dot=.,comma=%2C'), - array('{+path:6}/here', '/foo/b/here'), - array('{+list}', 'red,green,blue'), - array('{+list*}', 'red,green,blue'), - array('{+keys}', 'semi,;,dot,.,comma,,'), - array('{+keys*}', 'semi=;,dot=.,comma=,'), - array('{#path:6}/here', '#/foo/b/here'), - array('{#list}', '#red,green,blue'), - array('{#list*}', '#red,green,blue'), - array('{#keys}', '#semi,;,dot,.,comma,,'), - array('{#keys*}', '#semi=;,dot=.,comma=,'), - array('X{.var:3}', 'X.val'), - array('X{.list}', 'X.red,green,blue'), - array('X{.list*}', 'X.red.green.blue'), - array('X{.keys}', 'X.semi,%3B,dot,.,comma,%2C'), - array('X{.keys*}', 'X.semi=%3B.dot=..comma=%2C'), - array('{/var:1,var}', '/v/value'), - array('{/list}', '/red,green,blue'), - array('{/list*}', '/red/green/blue'), - array('{/list*,path:4}', '/red/green/blue/%2Ffoo'), - array('{/keys}', '/semi,%3B,dot,.,comma,%2C'), - array('{/keys*}', '/semi=%3B/dot=./comma=%2C'), - array('{;hello:5}', ';hello=Hello'), - array('{;list}', ';list=red,green,blue'), - array('{;list*}', ';list=red;list=green;list=blue'), - array('{;keys}', ';keys=semi,%3B,dot,.,comma,%2C'), - array('{;keys*}', ';semi=%3B;dot=.;comma=%2C'), - array('{?var:3}', '?var=val'), - array('{?list}', '?list=red,green,blue'), - array('{?list*}', '?list=red&list=green&list=blue'), - array('{?keys}', '?keys=semi,%3B,dot,.,comma,%2C'), - array('{?keys*}', '?semi=%3B&dot=.&comma=%2C'), - array('{&var:3}', '&var=val'), - array('{&list}', '&list=red,green,blue'), - array('{&list*}', '&list=red&list=green&list=blue'), - array('{&keys}', '&keys=semi,%3B,dot,.,comma,%2C'), - array('{&keys*}', '&semi=%3B&dot=.&comma=%2C'), - array('{.null}', ''), - array('{.null,var}', '.value'), - array('X{.empty_keys*}', 'X'), - array('X{.empty_keys}', 'X'), - // Test that missing expansions are skipped - array('test{&missing*}', 'test'), - // Test that multiple expansions can be set - array('http://{var}/{var:2}{?keys*}', 'http://value/va?semi=%3B&dot=.&comma=%2C'), - // Test more complex query string stuff - array('http://www.test.com{+path}{?var,keys*}', 'http://www.test.com/foo/bar?var=value&semi=%3B&dot=.&comma=%2C') - )); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php deleted file mode 100644 index 633c5d539..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php +++ /dev/null @@ -1,27 +0,0 @@ -markTestSkipped('uri_template PECL extension must be installed to test PeclUriTemplate'); - } - } - - /** - * @dataProvider templateProvider - */ - public function testExpandsUriTemplates($template, $expansion, $params) - { - $uri = new PeclUriTemplate($template); - $this->assertEquals($expansion, $uri->expand($template, $params)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/UriTemplateTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/UriTemplateTest.php deleted file mode 100644 index 5130d6f4b..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/UriTemplateTest.php +++ /dev/null @@ -1,106 +0,0 @@ -assertEquals($expansion, $uri->expand($template, $params)); - } - - public function expressionProvider() - { - return array( - array( - '{+var*}', array( - 'operator' => '+', - 'values' => array( - array('value' => 'var', 'modifier' => '*') - ) - ), - ), - array( - '{?keys,var,val}', array( - 'operator' => '?', - 'values' => array( - array('value' => 'keys', 'modifier' => ''), - array('value' => 'var', 'modifier' => ''), - array('value' => 'val', 'modifier' => '') - ) - ), - ), - array( - '{+x,hello,y}', array( - 'operator' => '+', - 'values' => array( - array('value' => 'x', 'modifier' => ''), - array('value' => 'hello', 'modifier' => ''), - array('value' => 'y', 'modifier' => '') - ) - ) - ) - ); - } - - /** - * @dataProvider expressionProvider - */ - public function testParsesExpressions($exp, $data) - { - $template = new UriTemplate($exp); - - // Access the config object - $class = new \ReflectionClass($template); - $method = $class->getMethod('parseExpression'); - $method->setAccessible(true); - - $exp = substr($exp, 1, -1); - $this->assertEquals($data, $method->invokeArgs($template, array($exp))); - } - - /** - * @ticket https://github.com/guzzle/guzzle/issues/90 - */ - public function testAllowsNestedArrayExpansion() - { - $template = new UriTemplate(); - - $result = $template->expand('http://example.com{+path}{/segments}{?query,data*,foo*}', array( - 'path' => '/foo/bar', - 'segments' => array('one', 'two'), - 'query' => 'test', - 'data' => array( - 'more' => array('fun', 'ice cream') - ), - 'foo' => array( - 'baz' => array( - 'bar' => 'fizz', - 'test' => 'buzz' - ), - 'bam' => 'boo' - ) - )); - - $this->assertEquals('http://example.com/foo/bar/one,two?query=test&more%5B0%5D=fun&more%5B1%5D=ice%20cream&baz%5Bbar%5D=fizz&baz%5Btest%5D=buzz&bam=boo', $result); - } - - /** - * @ticket https://github.com/guzzle/guzzle/issues/426 - */ - public function testSetRegex() - { - $template = new UriTemplate(); - $template->setRegex('/\<\$(.+)\>/'); - $this->assertSame('/foo', $template->expand('/<$a>', array('a' => 'foo'))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Async/AsyncPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Async/AsyncPluginTest.php deleted file mode 100644 index 16990a5a8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Async/AsyncPluginTest.php +++ /dev/null @@ -1,93 +0,0 @@ -assertArrayHasKey('request.before_send', $events); - $this->assertArrayHasKey('request.exception', $events); - $this->assertArrayHasKey('curl.callback.progress', $events); - } - - public function testEnablesProgressCallbacks() - { - $p = new AsyncPlugin(); - $request = RequestFactory::getInstance()->create('PUT', 'http://www.example.com'); - $event = new Event(array( - 'request' => $request - )); - $p->onBeforeSend($event); - $this->assertEquals(true, $request->getCurlOptions()->get('progress')); - } - - public function testAddsTimesOutAfterSending() - { - $p = new AsyncPlugin(); - $request = RequestFactory::getInstance()->create('PUT', 'http://www.example.com'); - $handle = CurlHandle::factory($request); - $event = new Event(array( - 'request' => $request, - 'handle' => $handle->getHandle(), - 'uploaded' => 10, - 'upload_size' => 10, - 'downloaded' => 0 - )); - $p->onCurlProgress($event); - } - - public function testEnsuresRequestIsSet() - { - $p = new AsyncPlugin(); - $event = new Event(array( - 'uploaded' => 10, - 'upload_size' => 10, - 'downloaded' => 0 - )); - $p->onCurlProgress($event); - } - - public function testMasksCurlExceptions() - { - $p = new AsyncPlugin(); - $request = RequestFactory::getInstance()->create('PUT', 'http://www.example.com'); - $e = new CurlException('Error'); - $event = new Event(array( - 'request' => $request, - 'exception' => $e - )); - $p->onRequestTimeout($event); - $this->assertEquals(RequestInterface::STATE_COMPLETE, $request->getState()); - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - $this->assertTrue($request->getResponse()->hasHeader('X-Guzzle-Async')); - } - - public function testEnsuresIntegration() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 204 FOO\r\nContent-Length: 4\r\n\r\ntest"); - $client = new Client($this->getServer()->getUrl()); - $request = $client->post('/', null, array( - 'foo' => 'bar' - )); - $request->getEventDispatcher()->addSubscriber(new AsyncPlugin()); - $request->send(); - $this->assertEquals('', $request->getResponse()->getBody(true)); - $this->assertTrue($request->getResponse()->hasHeader('X-Guzzle-Async')); - $received = $this->getServer()->getReceivedRequests(true); - $this->assertEquals('POST', $received[0]->getMethod()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/AbstractBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/AbstractBackoffStrategyTest.php deleted file mode 100644 index 72af26308..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/AbstractBackoffStrategyTest.php +++ /dev/null @@ -1,86 +0,0 @@ -getMockBuilder('Guzzle\Plugin\Backoff\AbstractBackoffStrategy') - ->setMethods(array('getDelay', 'makesDecision')) - ->getMockForAbstractClass(); - } - - public function testReturnsZeroWhenNoNextAndGotNull() - { - $request = new Request('GET', 'http://www.foo.com'); - $mock = $this->getMockStrategy(); - $mock->expects($this->atLeastOnce())->method('getDelay')->will($this->returnValue(null)); - $this->assertEquals(0, $mock->getBackoffPeriod(0, $request)); - } - - public function testReturnsFalse() - { - $request = new Request('GET', 'http://www.foo.com'); - $mock = $this->getMockStrategy(); - $mock->expects($this->atLeastOnce())->method('getDelay')->will($this->returnValue(false)); - $this->assertEquals(false, $mock->getBackoffPeriod(0, $request)); - } - - public function testReturnsNextValueWhenNullOrTrue() - { - $request = new Request('GET', 'http://www.foo.com'); - $mock = $this->getMockStrategy(); - $mock->expects($this->atLeastOnce())->method('getDelay')->will($this->returnValue(null)); - $mock->expects($this->any())->method('makesDecision')->will($this->returnValue(false)); - - $mock2 = $this->getMockStrategy(); - $mock2->expects($this->atLeastOnce())->method('getDelay')->will($this->returnValue(10)); - $mock2->expects($this->atLeastOnce())->method('makesDecision')->will($this->returnValue(true)); - $mock->setNext($mock2); - - $this->assertEquals(10, $mock->getBackoffPeriod(0, $request)); - } - - public function testReturnsFalseWhenNullAndNoNext() - { - $request = new Request('GET', 'http://www.foo.com'); - $s = new TruncatedBackoffStrategy(2); - $this->assertFalse($s->getBackoffPeriod(0, $request)); - } - - public function testHasNext() - { - $a = new TruncatedBackoffStrategy(2); - $b = new TruncatedBackoffStrategy(2); - $a->setNext($b); - $this->assertSame($b, $a->getNext()); - } - - public function testSkipsOtherDecisionsInChainWhenOneReturnsTrue() - { - $a = new CallbackBackoffStrategy(function () { return null; }, true); - $b = new CallbackBackoffStrategy(function () { return true; }, true); - $c = new CallbackBackoffStrategy(function () { return null; }, true); - $d = new CallbackBackoffStrategy(function () { return 10; }, false); - $a->setNext($b); - $b->setNext($c); - $c->setNext($d); - $this->assertEquals(10, $a->getBackoffPeriod(2, new Request('GET', 'http://www.foo.com'))); - } - - public function testReturnsZeroWhenDecisionMakerReturnsTrueButNoFurtherStrategiesAreInTheChain() - { - $a = new CallbackBackoffStrategy(function () { return null; }, true); - $b = new CallbackBackoffStrategy(function () { return true; }, true); - $a->setNext($b); - $this->assertSame(0, $a->getBackoffPeriod(2, new Request('GET', 'http://www.foo.com'))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/BackoffLoggerTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/BackoffLoggerTest.php deleted file mode 100644 index a64dd826e..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/BackoffLoggerTest.php +++ /dev/null @@ -1,110 +0,0 @@ -message = ''; - } - - public function testHasEventList() - { - $this->assertEquals(1, count(BackoffLogger::getSubscribedEvents())); - } - - public function testLogsEvents() - { - list($logPlugin, $request, $response) = $this->getMocks(); - - $response = $this->getMockBuilder('Guzzle\Http\Message\Response') - ->setConstructorArgs(array(503)) - ->setMethods(array('getInfo')) - ->getMock(); - - $response->expects($this->any()) - ->method('getInfo') - ->will($this->returnValue(2)); - - $handle = $this->getMockHandle(); - - $event = new Event(array( - 'request' => $request, - 'response' => $response, - 'retries' => 1, - 'delay' => 3, - 'handle' => $handle - )); - - $logPlugin->onRequestRetry($event); - $this->assertContains( - '] PUT http://www.example.com - 503 Service Unavailable - Retries: 1, Delay: 3, Time: 2, 2, cURL: 30 Foo', - $this->message - ); - } - - public function testCanSetTemplate() - { - $l = new BackoffLogger(new ClosureLogAdapter(function () {})); - $l->setTemplate('foo'); - $t = $this->readAttribute($l, 'formatter'); - $this->assertEquals('foo', $this->readAttribute($t, 'template')); - } - - /** - * @return array - */ - protected function getMocks() - { - $that = $this; - $logger = new ClosureLogAdapter(function ($message) use ($that) { - $that->message .= $message . "\n"; - }); - $logPlugin = new BackoffLogger($logger); - $response = new Response(503); - $request = RequestFactory::getInstance()->create('PUT', 'http://www.example.com', array( - 'Content-Length' => 3, - 'Foo' => 'Bar' - )); - - return array($logPlugin, $request, $response); - } - - /** - * @return CurlHandle - */ - protected function getMockHandle() - { - $handle = $this->getMockBuilder('Guzzle\Http\Curl\CurlHandle') - ->disableOriginalConstructor() - ->setMethods(array('getError', 'getErrorNo', 'getInfo')) - ->getMock(); - - $handle->expects($this->once()) - ->method('getError') - ->will($this->returnValue('Foo')); - - $handle->expects($this->once()) - ->method('getErrorNo') - ->will($this->returnValue(30)); - - $handle->expects($this->any()) - ->method('getInfo') - ->will($this->returnValue(2)); - - return $handle; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/BackoffPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/BackoffPluginTest.php deleted file mode 100644 index 496e49eb2..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/BackoffPluginTest.php +++ /dev/null @@ -1,297 +0,0 @@ -retried = false; - } - - public static function getSubscribedEvents() - { - return array(BackoffPlugin::RETRY_EVENT => 'onRequestRetry'); - } - - public function onRequestRetry(Event $event) - { - $this->retried = $event; - } - - public function testHasEventList() - { - $this->assertEquals(1, count(BackoffPlugin::getAllEvents())); - } - - public function testCreatesDefaultExponentialBackoffPlugin() - { - $plugin = BackoffPlugin::getExponentialBackoff(3, array(204), array(10)); - $this->assertInstanceOf('Guzzle\Plugin\Backoff\BackoffPlugin', $plugin); - $strategy = $this->readAttribute($plugin, 'strategy'); - $this->assertInstanceOf('Guzzle\Plugin\Backoff\TruncatedBackoffStrategy', $strategy); - $this->assertEquals(3, $this->readAttribute($strategy, 'max')); - $strategy = $this->readAttribute($strategy, 'next'); - $this->assertInstanceOf('Guzzle\Plugin\Backoff\HttpBackoffStrategy', $strategy); - $this->assertEquals(array(204 => true), $this->readAttribute($strategy, 'errorCodes')); - $strategy = $this->readAttribute($strategy, 'next'); - $this->assertInstanceOf('Guzzle\Plugin\Backoff\CurlBackoffStrategy', $strategy); - $this->assertEquals(array(10 => true), $this->readAttribute($strategy, 'errorCodes')); - $strategy = $this->readAttribute($strategy, 'next'); - $this->assertInstanceOf('Guzzle\Plugin\Backoff\ExponentialBackoffStrategy', $strategy); - } - - public function testDoesNotRetryUnlessStrategyReturnsNumber() - { - $request = new Request('GET', 'http://www.example.com'); - $request->setState('transfer'); - - $mock = $this->getMockBuilder('Guzzle\Plugin\Backoff\BackoffStrategyInterface') - ->setMethods(array('getBackoffPeriod')) - ->getMockForAbstractClass(); - - $mock->expects($this->once()) - ->method('getBackoffPeriod') - ->will($this->returnValue(false)); - - $plugin = new BackoffPlugin($mock); - $plugin->addSubscriber($this); - $plugin->onRequestSent(new Event(array('request' => $request))); - $this->assertFalse($this->retried); - } - - public function testUpdatesRequestForRetry() - { - $request = new Request('GET', 'http://www.example.com'); - $request->setState('transfer'); - $response = new Response(500); - $handle = $this->getMockBuilder('Guzzle\Http\Curl\CurlHandle')->disableOriginalConstructor()->getMock(); - $e = new CurlException(); - $e->setCurlHandle($handle); - - $plugin = new BackoffPlugin(new ConstantBackoffStrategy(10)); - $plugin->addSubscriber($this); - - $event = new Event(array( - 'request' => $request, - 'response' => $response, - 'exception' => $e - )); - - $plugin->onRequestSent($event); - $this->assertEquals(array( - 'request' => $request, - 'response' => $response, - 'handle' => $handle, - 'retries' => 1, - 'delay' => 10 - ), $this->readAttribute($this->retried, 'context')); - - $plugin->onRequestSent($event); - $this->assertEquals(array( - 'request' => $request, - 'response' => $response, - 'handle' => $handle, - 'retries' => 2, - 'delay' => 10 - ), $this->readAttribute($this->retried, 'context')); - } - - public function testDoesNothingWhenNotRetryingAndPollingRequest() - { - $request = new Request('GET', 'http://www.foo.com'); - $plugin = new BackoffPlugin(new ConstantBackoffStrategy(10)); - $plugin->onRequestPoll(new Event(array('request' => $request))); - } - - public function testRetriesRequests() - { - // Create a script to return several 500 and 503 response codes - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata" - )); - - $plugin = new BackoffPlugin( - new TruncatedBackoffStrategy(3, - new HttpBackoffStrategy(null, - new CurlBackoffStrategy(null, - new ConstantBackoffStrategy(0.05) - ) - ) - ) - ); - - $client = new Client($this->getServer()->getUrl()); - $client->getEventDispatcher()->addSubscriber($plugin); - $request = $client->get(); - $request->send(); - - // Make sure it eventually completed successfully - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - $this->assertEquals('data', $request->getResponse()->getBody(true)); - - // Check that three requests were made to retry this request - $this->assertEquals(3, count($this->getServer()->getReceivedRequests(false))); - $this->assertEquals(2, $request->getParams()->get(BackoffPlugin::RETRY_PARAM)); - } - - /** - * @expectedException \Guzzle\Http\Exception\ServerErrorResponseException - */ - public function testFailsOnTruncation() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n" - )); - - $plugin = new BackoffPlugin( - new TruncatedBackoffStrategy(2, - new HttpBackoffStrategy(null, - new ConstantBackoffStrategy(0.05) - ) - ) - ); - - $client = new Client($this->getServer()->getUrl()); - $client->addSubscriber($plugin); - $client->get()->send(); - } - - public function testRetriesRequestsWhenInParallel() - { - // Create a script to return several 500 and 503 response codes - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata" - )); - - $plugin = new BackoffPlugin( - new HttpBackoffStrategy(null, - new TruncatedBackoffStrategy(3, - new CurlBackoffStrategy(null, - new ConstantBackoffStrategy(0.1) - ) - ) - ) - ); - $client = new Client($this->getServer()->getUrl()); - $client->getEventDispatcher()->addSubscriber($plugin); - $requests = array(); - for ($i = 0; $i < 5; $i++) { - $requests[] = $client->get(); - } - $client->send($requests); - - $this->assertEquals(15, count($this->getServer()->getReceivedRequests(false))); - } - - /** - * @covers Guzzle\Plugin\Backoff\BackoffPlugin - * @covers Guzzle\Http\Curl\CurlMulti - */ - public function testRetriesPooledRequestsUsingDelayAndPollingEvent() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ndata" - )); - // Need to sleep for some time ensure that the polling works correctly in the observer - $plugin = new BackoffPlugin(new HttpBackoffStrategy(null, - new TruncatedBackoffStrategy(1, - new ConstantBackoffStrategy(0.5)))); - - $client = new Client($this->getServer()->getUrl()); - $client->getEventDispatcher()->addSubscriber($plugin); - $request = $client->get(); - $request->send(); - // Make sure it eventually completed successfully - $this->assertEquals('data', $request->getResponse()->getBody(true)); - // Check that two requests were made to retry this request - $this->assertEquals(2, count($this->getServer()->getReceivedRequests(false))); - } - - public function testSeeksToBeginningOfRequestBodyWhenRetrying() - { - // Create a request with a body - $request = new EntityEnclosingRequest('PUT', 'http://www.example.com'); - $request->setBody('abc'); - // Set the retry time to be something that will be retried always - $request->getParams()->set(BackoffPlugin::DELAY_PARAM, 2); - // Seek to the end of the stream - $request->getBody()->seek(3); - $this->assertEquals('', $request->getBody()->read(1)); - // Create a plugin that does not delay when retrying - $plugin = new BackoffPlugin(new ConstantBackoffStrategy(0)); - $plugin->onRequestPoll($this->getMockEvent($request)); - // Ensure that the stream was seeked to 0 - $this->assertEquals('a', $request->getBody()->read(1)); - } - - public function testDoesNotSeekOnRequestsWithNoBodyWhenRetrying() - { - // Create a request with a body - $request = new EntityEnclosingRequest('PUT', 'http://www.example.com'); - $request->getParams()->set(BackoffPlugin::DELAY_PARAM, 2); - $plugin = new BackoffPlugin(new ConstantBackoffStrategy(0)); - $plugin->onRequestPoll($this->getMockEvent($request)); - } - - protected function getMockEvent(RequestInterface $request) - { - // Create a mock curl multi object - $multi = $this->getMockBuilder('Guzzle\Http\Curl\CurlMulti') - ->setMethods(array('remove', 'add')) - ->getMock(); - - // Create an event that is expected for the Poll event - $event = new Event(array( - 'request' => $request, - 'curl_multi' => $multi - )); - $event->setName(CurlMultiInterface::POLLING_REQUEST); - - return $event; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CallbackBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CallbackBackoffStrategyTest.php deleted file mode 100644 index c0ce10d5c..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CallbackBackoffStrategyTest.php +++ /dev/null @@ -1,31 +0,0 @@ -getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $strategy = new CallbackBackoffStrategy(function () { return 10; }, true); - $this->assertTrue($strategy->makesDecision()); - $this->assertEquals(10, $strategy->getBackoffPeriod(0, $request)); - // Ensure it chains correctly when null is returned - $strategy = new CallbackBackoffStrategy(function () { return null; }, false); - $this->assertFalse($strategy->makesDecision()); - $this->assertFalse($strategy->getBackoffPeriod(0, $request)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ConstantBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ConstantBackoffStrategyTest.php deleted file mode 100644 index 703eb4a22..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ConstantBackoffStrategyTest.php +++ /dev/null @@ -1,20 +0,0 @@ -assertFalse($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertEquals(3.5, $strategy->getBackoffPeriod(0, $request)); - $this->assertEquals(3.5, $strategy->getBackoffPeriod(1, $request)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CurlBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CurlBackoffStrategyTest.php deleted file mode 100644 index 0a5c3e28d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CurlBackoffStrategyTest.php +++ /dev/null @@ -1,36 +0,0 @@ -assertNotEmpty(CurlBackoffStrategy::getDefaultFailureCodes()); - $strategy = new CurlBackoffStrategy(); - $this->assertTrue($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $e = new CurlException(); - $e->setError('foo', CURLE_BAD_CALLING_ORDER); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, null, $e)); - - foreach (CurlBackoffStrategy::getDefaultFailureCodes() as $code) { - $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request, null, $e->setError('foo', $code))); - } - } - - public function testIgnoresNonErrors() - { - $strategy = new CurlBackoffStrategy(); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, new Response(200))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ExponentialBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ExponentialBackoffStrategyTest.php deleted file mode 100644 index 09965bcbf..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ExponentialBackoffStrategyTest.php +++ /dev/null @@ -1,23 +0,0 @@ -assertFalse($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertEquals(1, $strategy->getBackoffPeriod(0, $request)); - $this->assertEquals(2, $strategy->getBackoffPeriod(1, $request)); - $this->assertEquals(4, $strategy->getBackoffPeriod(2, $request)); - $this->assertEquals(8, $strategy->getBackoffPeriod(3, $request)); - $this->assertEquals(16, $strategy->getBackoffPeriod(4, $request)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/HttpBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/HttpBackoffStrategyTest.php deleted file mode 100644 index ae68a4eb8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/HttpBackoffStrategyTest.php +++ /dev/null @@ -1,47 +0,0 @@ -assertNotEmpty(HttpBackoffStrategy::getDefaultFailureCodes()); - $strategy = new HttpBackoffStrategy(); - $this->assertTrue($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - - $response = new Response(200); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, $response)); - $response->setStatus(400); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, $response)); - - foreach (HttpBackoffStrategy::getDefaultFailureCodes() as $code) { - $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request, $response->setStatus($code))); - } - } - - public function testAllowsCustomCodes() - { - $strategy = new HttpBackoffStrategy(array(204)); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $response = new Response(204); - $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request, $response)); - $response->setStatus(500); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, $response)); - } - - public function testIgnoresNonErrors() - { - $strategy = new HttpBackoffStrategy(); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/LinearBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/LinearBackoffStrategyTest.php deleted file mode 100644 index b4ce8e4af..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/LinearBackoffStrategyTest.php +++ /dev/null @@ -1,21 +0,0 @@ -assertFalse($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request)); - $this->assertEquals(5, $strategy->getBackoffPeriod(1, $request)); - $this->assertEquals(10, $strategy->getBackoffPeriod(2, $request)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ReasonPhraseBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ReasonPhraseBackoffStrategyTest.php deleted file mode 100644 index dea5a6878..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ReasonPhraseBackoffStrategyTest.php +++ /dev/null @@ -1,32 +0,0 @@ -assertEmpty(ReasonPhraseBackoffStrategy::getDefaultFailureCodes()); - $strategy = new ReasonPhraseBackoffStrategy(array('Foo', 'Internal Server Error')); - $this->assertTrue($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $response = new Response(200); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, $response)); - $response->setStatus(200, 'Foo'); - $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request, $response)); - } - - public function testIgnoresNonErrors() - { - $strategy = new ReasonPhraseBackoffStrategy(); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/TruncatedBackoffStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/TruncatedBackoffStrategyTest.php deleted file mode 100644 index 5590dfb1c..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/TruncatedBackoffStrategyTest.php +++ /dev/null @@ -1,30 +0,0 @@ -assertTrue($strategy->makesDecision()); - $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); - $this->assertFalse($strategy->getBackoffPeriod(0, $request)); - $this->assertFalse($strategy->getBackoffPeriod(1, $request)); - $this->assertFalse($strategy->getBackoffPeriod(2, $request)); - - $response = new Response(500); - $strategy->setNext(new HttpBackoffStrategy(null, new ConstantBackoffStrategy(10))); - $this->assertEquals(10, $strategy->getBackoffPeriod(0, $request, $response)); - $this->assertEquals(10, $strategy->getBackoffPeriod(1, $request, $response)); - $this->assertFalse($strategy->getBackoffPeriod(2, $request, $response)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/CachePluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/CachePluginTest.php deleted file mode 100644 index 69da60a93..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/CachePluginTest.php +++ /dev/null @@ -1,441 +0,0 @@ -assertInstanceOf('Guzzle\Plugin\Cache\CacheStorageInterface', $this->readAttribute($plugin, 'storage')); - } - - public function testAddsDefaultCollaborators() - { - $this->assertNotEmpty(CachePlugin::getSubscribedEvents()); - $plugin = new CachePlugin(array( - 'storage' => $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')->getMockForAbstractClass() - )); - $this->assertInstanceOf('Guzzle\Plugin\Cache\CacheStorageInterface', $this->readAttribute($plugin, 'storage')); - $this->assertInstanceOf( - 'Guzzle\Plugin\Cache\CanCacheStrategyInterface', - $this->readAttribute($plugin, 'canCache') - ); - $this->assertInstanceOf( - 'Guzzle\Plugin\Cache\RevalidationInterface', - $this->readAttribute($plugin, 'revalidation') - ); - } - - public function testAddsCallbackCollaborators() - { - $this->assertNotEmpty(CachePlugin::getSubscribedEvents()); - $plugin = new CachePlugin(array('can_cache' => function () {})); - $this->assertInstanceOf( - 'Guzzle\Plugin\Cache\CallbackCanCacheStrategy', - $this->readAttribute($plugin, 'canCache') - ); - } - - public function testCanPassCacheAsOnlyArgumentToConstructor() - { - $p = new CachePlugin(new DoctrineCacheAdapter(new ArrayCache())); - $p = new CachePlugin(new DefaultCacheStorage(new DoctrineCacheAdapter(new ArrayCache()))); - } - - public function testUsesCreatedCacheStorage() - { - $plugin = new CachePlugin(array( - 'adapter' => $this->getMockBuilder('Guzzle\Cache\CacheAdapterInterface')->getMockForAbstractClass() - )); - $this->assertInstanceOf('Guzzle\Plugin\Cache\CacheStorageInterface', $this->readAttribute($plugin, 'storage')); - } - - public function testUsesProvidedOptions() - { - $can = $this->getMockBuilder('Guzzle\Plugin\Cache\CanCacheStrategyInterface')->getMockForAbstractClass(); - $revalidate = $this->getMockBuilder('Guzzle\Plugin\Cache\RevalidationInterface')->getMockForAbstractClass(); - $plugin = new CachePlugin(array( - 'storage' => $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')->getMockForAbstractClass(), - 'can_cache' => $can, - 'revalidation' => $revalidate - )); - $this->assertSame($can, $this->readAttribute($plugin, 'canCache')); - $this->assertSame($revalidate, $this->readAttribute($plugin, 'revalidation')); - } - - public function satisfyProvider() - { - $req1 = new Request('GET', 'http://foo.com', array('Cache-Control' => 'no-cache')); - - return array( - // The response is too old to satisfy the request - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-age=20')), new Response(200, array('Age' => 100)), false, false), - // The response cannot satisfy the request because it is stale - array(new Request('GET', 'http://foo.com'), new Response(200, array('Cache-Control' => 'max-age=10', 'Age' => 100)), false, false), - // Allows the expired response to satisfy the request because of the max-stale - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale=15')), new Response(200, array('Cache-Control' => 'max-age=90', 'Age' => 100)), true, false), - // Max stale is > than the allowed staleness - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale=5')), new Response(200, array('Cache-Control' => 'max-age=90', 'Age' => 100)), false, false), - // Performs cache revalidation - array($req1, new Response(200), true, true), - // Performs revalidation due to ETag on the response and no cache-control on the request - array(new Request('GET', 'http://foo.com'), new Response(200, array( - 'ETag' => 'ABC', - 'Expires' => date('c', strtotime('+1 year')) - )), true, true), - ); - } - - /** - * @dataProvider satisfyProvider - */ - public function testChecksIfResponseCanSatisfyRequest($request, $response, $can, $revalidates) - { - $didRevalidate = false; - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')->getMockForAbstractClass(); - $revalidate = $this->getMockBuilder('Guzzle\Plugin\Cache\DefaultRevalidation') - ->setMethods(array('revalidate')) - ->setConstructorArgs(array($storage)) - ->getMockForAbstractClass(); - - $revalidate->expects($this->any()) - ->method('revalidate') - ->will($this->returnCallback(function () use (&$didRevalidate) { - $didRevalidate = true; - return true; - })); - - $plugin = new CachePlugin(array( - 'storage' => $storage, - 'revalidation' => $revalidate - )); - - $this->assertEquals($can, $plugin->canResponseSatisfyRequest($request, $response)); - $this->assertEquals($didRevalidate, $revalidates); - } - - public function satisfyFailedProvider() - { - return array( - // Neither has stale-if-error - array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100)), false), - // Request has stale-if-error - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50')), true), - // Request has valid stale-if-error - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=50')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50')), true), - // Request has expired stale-if-error - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=20')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50')), false), - // Response has permanent stale-if-error - array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error', )), true), - // Response has valid stale-if-error - array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=50')), true), - // Response has expired stale-if-error - array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=20')), false), - // Request has valid stale-if-error but response does not - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=50')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=20')), false), - // Response has valid stale-if-error but request does not - array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=20')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=50')), false), - ); - } - - /** - * @dataProvider satisfyFailedProvider - */ - public function testChecksIfResponseCanSatisfyFailedRequest($request, $response, $can) - { - $plugin = new CachePlugin(); - - $this->assertEquals($can, $plugin->canResponseSatisfyFailedRequest($request, $response)); - } - - public function testDoesNothingWhenRequestIsNotCacheable() - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - $storage->expects($this->never())->method('fetch'); - - $plugin = new CachePlugin(array( - 'storage' => $storage, - 'can_cache' => new CallbackCanCacheStrategy(function () { return false; }) - )); - - $plugin->onRequestBeforeSend(new Event(array( - 'request' => new Request('GET', 'http://foo.com') - ))); - } - - public function satisfiableProvider() - { - $date = new \DateTime('-10 seconds'); - - return array( - // Fresh response - array(new Response(200, array(), 'foo')), - // Stale response - array(new Response(200, array('Date' => $date->format('c'), 'Cache-Control' => 'max-age=5'), 'foo')) - ); - } - - /** - * @dataProvider satisfiableProvider - */ - public function testInjectsSatisfiableResponses($response) - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - - $storage->expects($this->once())->method('fetch')->will($this->returnValue($response)); - $plugin = new CachePlugin(array('storage' => $storage)); - $request = new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale')); - $plugin->onRequestBeforeSend(new Event(array('request' => $request))); - $plugin->onRequestSent(new Event(array('request' => $request, 'response' => $request->getResponse()))); - $this->assertEquals($response->getStatusCode(), $request->getResponse()->getStatusCode()); - $this->assertEquals((string) $response->getBody(), (string) $request->getResponse()->getBody()); - $this->assertTrue($request->getResponse()->hasHeader('Age')); - if ($request->getResponse()->isFresh() === false) { - $this->assertContains('110', (string) $request->getResponse()->getHeader('Warning')); - } - $this->assertSame( - sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), - (string) $request->getHeader('Via') - ); - $this->assertSame( - sprintf('%s GuzzleCache/%s',$request->getProtocolVersion(), Version::VERSION), - (string) $request->getResponse()->getHeader('Via') - ); - $this->assertTrue($request->getParams()->get('cache.lookup')); - $this->assertTrue($request->getParams()->get('cache.hit')); - $this->assertTrue($request->getResponse()->hasHeader('X-Cache-Lookup')); - $this->assertTrue($request->getResponse()->hasHeader('X-Cache')); - $this->assertEquals('HIT from GuzzleCache', (string) $request->getResponse()->getHeader('X-Cache')); - $this->assertEquals('HIT from GuzzleCache', (string) $request->getResponse()->getHeader('X-Cache-Lookup')); - } - - public function satisfiableOnErrorProvider() - { - $date = new \DateTime('-10 seconds'); - return array( - array( - new Response(200, array( - 'Date' => $date->format('c'), - 'Cache-Control' => 'max-age=5, stale-if-error' - ), 'foo'), - ) - ); - } - - /** - * @dataProvider satisfiableOnErrorProvider - */ - public function testInjectsSatisfiableResponsesOnError($cacheResponse) - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - $storage->expects($this->exactly(2))->method('fetch')->will($this->returnValue($cacheResponse)); - $plugin = new CachePlugin(array('storage' => $storage)); - $request = new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale')); - $plugin->onRequestBeforeSend(new Event(array('request' => $request))); - $plugin->onRequestError( - $event = new Event(array( - 'request' => $request, - 'response' => $request->getResponse(), - )) - ); - $response = $event['response']; - $this->assertEquals($cacheResponse->getStatusCode(), $response->getStatusCode()); - $this->assertEquals((string) $cacheResponse->getBody(), (string) $response->getBody()); - $this->assertTrue($response->hasHeader('Age')); - if ($response->isFresh() === false) { - $this->assertContains('110', (string) $response->getHeader('Warning')); - } - $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $request->getHeader('Via')); - $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $response->getHeader('Via')); - $this->assertTrue($request->getParams()->get('cache.lookup')); - $this->assertSame('error', $request->getParams()->get('cache.hit')); - $this->assertTrue($response->hasHeader('X-Cache-Lookup')); - $this->assertTrue($response->hasHeader('X-Cache')); - $this->assertEquals('HIT from GuzzleCache', (string) $response->getHeader('X-Cache-Lookup')); - $this->assertEquals('HIT_ERROR from GuzzleCache', (string) $response->getHeader('X-Cache')); - } - - /** - * @dataProvider satisfiableOnErrorProvider - */ - public function testInjectsSatisfiableResponsesOnException($cacheResponse) - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - $storage->expects($this->exactly(2))->method('fetch')->will($this->returnValue($cacheResponse)); - $plugin = new CachePlugin(array('storage' => $storage)); - $request = new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale')); - $plugin->onRequestBeforeSend(new Event(array( - 'request' => $request - ))); - $plugin->onRequestException( - new Event(array( - 'request' => $request, - 'response' => $request->getResponse(), - 'exception' => $this->getMock('Guzzle\Http\Exception\CurlException'), - )) - ); - $plugin->onRequestSent( - new Event(array( - 'request' => $request, - 'response' => $response = $request->getResponse(), - )) - ); - $this->assertEquals($cacheResponse->getStatusCode(), $response->getStatusCode()); - $this->assertEquals((string) $cacheResponse->getBody(), (string) $response->getBody()); - $this->assertTrue($response->hasHeader('Age')); - if ($response->isFresh() === false) { - $this->assertContains('110', (string) $response->getHeader('Warning')); - } - $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $request->getHeader('Via')); - $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $response->getHeader('Via')); - $this->assertTrue($request->getParams()->get('cache.lookup')); - $this->assertSame('error', $request->getParams()->get('cache.hit')); - $this->assertTrue($response->hasHeader('X-Cache-Lookup')); - $this->assertTrue($response->hasHeader('X-Cache')); - $this->assertEquals('HIT from GuzzleCache', (string) $response->getHeader('X-Cache-Lookup')); - $this->assertEquals('HIT_ERROR from GuzzleCache', (string) $response->getHeader('X-Cache')); - } - - public function unsatisfiableOnErrorProvider() - { - $date = new \DateTime('-10 seconds'); - - return array( - // no-store on request - array( - false, - array('Cache-Control' => 'no-store'), - new Response(200, array('Date' => $date->format('D, d M Y H:i:s T'), 'Cache-Control' => 'max-age=5, stale-if-error'), 'foo'), - ), - // request expired - array( - true, - array('Cache-Control' => 'stale-if-error=4'), - new Response(200, array('Date' => $date->format('D, d M Y H:i:s T'), 'Cache-Control' => 'max-age=5, stale-if-error'), 'foo'), - ), - // response expired - array( - true, - array('Cache-Control' => 'stale-if-error'), - new Response(200, array('Date' => $date->format('D, d M Y H:i:s T'), 'Cache-Control' => 'max-age=5, stale-if-error=4'), 'foo'), - ), - ); - } - - /** - * @dataProvider unsatisfiableOnErrorProvider - */ - public function testDoesNotInjectUnsatisfiableResponsesOnError($requestCanCache, $requestHeaders, $cacheResponse) - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - $storage->expects($this->exactly($requestCanCache ? 2 : 0))->method('fetch')->will($this->returnValue($cacheResponse)); - $plugin = new CachePlugin(array('storage' => $storage)); - $request = new Request('GET', 'http://foo.com', $requestHeaders); - $plugin->onRequestBeforeSend(new Event(array( - 'request' => $request - ))); - $plugin->onRequestError( - $event = new Event(array( - 'request' => $request, - 'response' => $response = $request->getResponse(), - )) - ); - - $this->assertSame($response, $event['response']); - } - - /** - * @dataProvider unsatisfiableOnErrorProvider - */ - public function testDoesNotInjectUnsatisfiableResponsesOnException($requestCanCache, $requestHeaders, $responseParts) - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - $storage->expects($this->exactly($requestCanCache ? 2 : 0))->method('fetch')->will($this->returnValue($responseParts)); - $plugin = new CachePlugin(array('storage' => $storage)); - $request = new Request('GET', 'http://foo.com', $requestHeaders); - $plugin->onRequestBeforeSend(new Event(array( - 'request' => $request - ))); - $plugin->onRequestException( - $event = new Event(array( - 'request' => $request, - 'response' => $response = $request->getResponse(), - 'exception' => $this->getMock('Guzzle\Http\Exception\CurlException'), - )) - ); - - $this->assertSame($response, $request->getResponse()); - } - - public function testCachesResponsesWhenCacheable() - { - $cache = new ArrayCache(); - $plugin = new CachePlugin($cache); - - $request = new Request('GET', 'http://foo.com'); - $response = new Response(200, array(), 'Foo'); - $plugin->onRequestBeforeSend(new Event(array( - 'request' => $request - ))); - $plugin->onRequestSent(new Event(array( - 'request' => $request, - 'response' => $response - ))); - $data = $this->readAttribute($cache, 'data'); - $this->assertNotEmpty($data); - } - - public function testPurgesRequests() - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('purge')) - ->getMockForAbstractClass(); - $storage->expects($this->atLeastOnce())->method('purge'); - $plugin = new CachePlugin(array('storage' => $storage)); - $request = new Request('GET', 'http://foo.com', array('X-Foo' => 'Bar')); - $plugin->purge($request); - } - - public function testAutoPurgesRequests() - { - $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface') - ->setMethods(array('purge')) - ->getMockForAbstractClass(); - $storage->expects($this->atLeastOnce())->method('purge'); - $plugin = new CachePlugin(array('storage' => $storage, 'auto_purge' => true)); - $client = new Client(); - $request = $client->put('http://foo.com', array('X-Foo' => 'Bar')); - $request->addSubscriber($plugin); - $request->setResponse(new Response(200), true); - $request->send(); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/CallbackCanCacheStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/CallbackCanCacheStrategyTest.php deleted file mode 100644 index f3d9bafe2..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/CallbackCanCacheStrategyTest.php +++ /dev/null @@ -1,72 +0,0 @@ -assertTrue($c->canCacheRequest(new Request('DELETE', 'http://www.foo.com'))); - } - - /** - * The following is a bit of an integration test to ensure that the CachePlugin honors a - * custom can cache strategy. - */ - public function testIntegrationWithCachePlugin() - { - $c = new CallbackCanCacheStrategy( - function ($request) { return true; }, - function ($response) { return true; } - ); - - // Make a request and response that have no business being cached - $request = new Request('DELETE', 'http://www.foo.com'); - $response = Response::fromMessage( - "HTTP/1.1 200 OK\r\n" - . "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n" - . "Last-Modified: Wed, 09 Jan 2013 08:48:53 GMT\r\n" - . "Content-Length: 2\r\n" - . "Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n\r\n" - . "hi" - ); - - $this->assertTrue($c->canCacheRequest($request)); - $this->assertTrue($c->canCacheResponse($response)); - - $s = $this->getMockBuilder('Guzzle\Plugin\Cache\DefaultCacheStorage') - ->setConstructorArgs(array(new DoctrineCacheAdapter(new ArrayCache()))) - ->setMethods(array('fetch')) - ->getMockForAbstractClass(); - - $s->expects($this->once()) - ->method('fetch') - ->will($this->returnValue($response)); - - $plugin = new CachePlugin(array('can_cache' => $c, 'storage' => $s)); - $plugin->onRequestBeforeSend(new Event(array('request' => $request))); - - $this->assertEquals(200, $request->getResponse()->getStatusCode()); - $this->assertEquals('hi', $request->getResponse()->getBody(true)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCacheStorageTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCacheStorageTest.php deleted file mode 100644 index 701a0155f..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCacheStorageTest.php +++ /dev/null @@ -1,193 +0,0 @@ - 'application/json')); - $response = new Response(200, array( - 'Content-Type' => 'application/json', - 'Connection' => 'close', - 'X-Foo' => 'Bar', - 'Vary' => 'Accept' - ), 'test'); - $s->cache($request, $response); - $data = $this->readAttribute($a, 'data'); - - return array( - 'cache' => $a, - 'adapter' => $c, - 'storage' => $s, - 'request' => $request, - 'response' => $response, - 'serialized' => end($data) - ); - } - - public function testReturnsNullForCacheMiss() - { - $cache = $this->getCache(); - $this->assertNull($cache['storage']->fetch(new Request('GET', 'http://test.com'))); - } - - public function testCachesRequests() - { - $cache = $this->getCache(); - $foundRequest = $foundBody = $bodyKey = false; - foreach ($this->readAttribute($cache['cache'], 'data') as $key => $v) { - if (strpos($v, 'foo.com')) { - $foundRequest = true; - $data = unserialize($v); - $bodyKey = $data[0][3]; - $this->assertInternalType('integer', $data[0][4]); - $this->assertFalse(isset($data[0][0]['connection'])); - $this->assertEquals('foo.com', $data[0][0]['host']); - } elseif ($v == 'test') { - $foundBody = $key; - } - } - $this->assertContains($bodyKey, $foundBody); - $this->assertTrue($foundRequest); - } - - public function testFetchesResponse() - { - $cache = $this->getCache(); - $response = $cache['storage']->fetch($cache['request']); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertFalse($response->hasHeader('Connection')); - $this->assertEquals('Bar', (string) $response->getHeader('X-Foo')); - $this->assertEquals('test', (string) $response->getBody()); - $this->assertTrue(in_array($cache['serialized'], $this->readAttribute($cache['cache'], 'data'))); - } - - public function testDeletesRequestItemsAndBody() - { - $cache = $this->getCache(); - $cache['storage']->delete($cache['request']); - $this->assertFalse(in_array('test', $this->readAttribute($cache['cache'], 'data'))); - $this->assertFalse(in_array($cache['serialized'], $this->readAttribute($cache['cache'], 'data'))); - } - - public function testCachesMultipleRequestsWithVary() - { - $cache = $this->getCache(); - $cache['request']->setHeader('Accept', 'application/xml'); - $response = $cache['response']->setHeader('Content-Type', 'application/xml'); - $response->setBody('123'); - $cache['storage']->cache($cache['request'], $response); - $data = $this->readAttribute($cache['cache'], 'data'); - foreach ($data as $v) { - if (strpos($v, 'foo.com')) { - $u = unserialize($v); - $this->assertEquals(2, count($u)); - $this->assertEquals($u[0][0]['accept'], 'application/xml'); - $this->assertEquals($u[0][1]['content-type'], 'application/xml'); - $this->assertEquals($u[1][0]['accept'], 'application/json'); - $this->assertEquals($u[1][1]['content-type'], 'application/json'); - $this->assertNotSame($u[0][3], $u[1][3]); - break; - } - } - } - - public function testPurgeRemovesAllMethodCaches() - { - $cache = $this->getCache(); - foreach (array('HEAD', 'POST', 'PUT', 'DELETE') as $method) { - $request = RequestFactory::getInstance()->cloneRequestWithMethod($cache['request'], $method); - $cache['storage']->cache($request, $cache['response']); - } - $cache['storage']->purge('http://foo.com'); - $this->assertFalse(in_array('test', $this->readAttribute($cache['cache'], 'data'))); - $this->assertFalse(in_array($cache['serialized'], $this->readAttribute($cache['cache'], 'data'))); - $this->assertEquals( - array('DoctrineNamespaceCacheKey[]'), - array_keys($this->readAttribute($cache['cache'], 'data')) - ); - } - - public function testRemovesExpiredResponses() - { - $cache = $this->getCache(); - $request = new Request('GET', 'http://xyz.com'); - $response = new Response(200, array('Age' => 1000, 'Cache-Control' => 'max-age=-10000')); - $cache['storage']->cache($request, $response); - $this->assertNull($cache['storage']->fetch($request)); - $data = $this->readAttribute($cache['cache'], 'data'); - $this->assertFalse(in_array('xyz.com', $data)); - $this->assertTrue(in_array($cache['serialized'], $data)); - } - - public function testUsesVaryToDetermineResult() - { - $cache = $this->getCache(); - $this->assertInstanceOf('Guzzle\Http\Message\Response', $cache['storage']->fetch($cache['request'])); - $request = new Request('GET', 'http://foo.com', array('Accept' => 'application/xml')); - $this->assertNull($cache['storage']->fetch($request)); - } - - public function testEnsuresResponseIsStillPresent() - { - $cache = $this->getCache(); - $data = $this->readAttribute($cache['cache'], 'data'); - $key = array_search('test', $data); - $cache['cache']->delete(substr($key, 1, -4)); - $this->assertNull($cache['storage']->fetch($cache['request'])); - } - - public function staleProvider() - { - return array( - array( - new Request('GET', 'http://foo.com', array('Accept' => 'foo')), - new Response(200, array('Cache-Control' => 'stale-if-error=100', 'Vary' => 'Accept')) - ), - array( - new Request('GET', 'http://foo.com', array('Accept' => 'foo')), - new Response(200, array('Cache-Control' => 'stale-if-error', 'Vary' => 'Accept')) - ) - ); - } - - /** - * @dataProvider staleProvider - */ - public function testUsesStaleTimeDirectiveForTtd($request, $response) - { - $cache = $this->getCache(); - $cache['storage']->cache($request, $response); - $data = $this->readAttribute($cache['cache'], 'data'); - foreach ($data as $v) { - if (strpos($v, 'foo.com')) { - $u = unserialize($v); - $this->assertGreaterThan($u[1][4], $u[0][4]); - break; - } - } - } - - public function testCanFilterCacheKeys() - { - $cache = $this->getCache(); - $cache['request']->getQuery()->set('auth', 'foo'); - $this->assertNull($cache['storage']->fetch($cache['request'])); - $cache['request']->getParams()->set('cache.key_filter', 'auth'); - $this->assertNotNull($cache['storage']->fetch($cache['request'])); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCanCacheStrategyTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCanCacheStrategyTest.php deleted file mode 100644 index de4d182a2..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCanCacheStrategyTest.php +++ /dev/null @@ -1,40 +0,0 @@ -assertTrue($strategy->canCacheRequest($request)); - } - - public function testDoesNotCacheNoStore() - { - $strategy = new DefaultCanCacheStrategy(); - $request = new Request('GET', 'http://foo.com', array('cache-control' => 'no-store')); - $this->assertFalse($strategy->canCacheRequest($request)); - } - - public function testCanCacheResponse() - { - $response = $this->getMockBuilder('Guzzle\Http\Message\Response') - ->setMethods(array('canCache')) - ->setConstructorArgs(array(200)) - ->getMock(); - $response->expects($this->once()) - ->method('canCache') - ->will($this->returnValue(true)); - $strategy = new DefaultCanCacheStrategy(); - $this->assertTrue($strategy->canCacheResponse($response)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultRevalidationTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultRevalidationTest.php deleted file mode 100644 index 19bcecace..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultRevalidationTest.php +++ /dev/null @@ -1,246 +0,0 @@ -getHttpDate('-100 hours') . "\r\nContent-Length: 4\r\n\r\nData", - "HTTP/1.1 304 NOT MODIFIED\r\nCache-Control: max-age=2000000\r\nContent-Length: 0\r\n\r\n", - ), - // Forces revalidation that overwrites what is in cache - array( - false, - "\r\n", - "HTTP/1.1 200 OK\r\nCache-Control: must-revalidate, no-cache\r\nDate: " . $this->getHttpDate('-10 hours') . "\r\nContent-Length: 4\r\n\r\nData", - "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\nDatas", - "HTTP/1.1 200 OK\r\nContent-Length: 5\r\nDate: " . $this->getHttpDate('now') . "\r\n\r\nDatas" - ), - // Throws an exception during revalidation - array( - false, - "\r\n", - "HTTP/1.1 200 OK\r\nCache-Control: no-cache\r\nDate: " . $this->getHttpDate('-3 hours') . "\r\n\r\nData", - "HTTP/1.1 500 INTERNAL SERVER ERROR\r\nContent-Length: 0\r\n\r\n" - ), - // ETag mismatch - array( - false, - "\r\n", - "HTTP/1.1 200 OK\r\nCache-Control: no-cache\r\nETag: \"123\"\r\nDate: " . $this->getHttpDate('-10 hours') . "\r\n\r\nData", - "HTTP/1.1 304 NOT MODIFIED\r\nETag: \"123456\"\r\n\r\n", - ), - ); - } - - /** - * @dataProvider cacheRevalidationDataProvider - */ - public function testRevalidatesResponsesAgainstOriginServer($can, $request, $response, $validate = null, $result = null) - { - // Send some responses to the test server for cache validation - $server = $this->getServer(); - $server->flush(); - - if ($validate) { - $server->enqueue($validate); - } - - $request = RequestFactory::getInstance()->fromMessage("GET / HTTP/1.1\r\nHost: 127.0.0.1:" . $server->getPort() . "\r\n" . $request); - $response = Response::fromMessage($response); - $request->setClient(new Client()); - - $plugin = new CachePlugin(new DoctrineCacheAdapter(new ArrayCache())); - $this->assertEquals( - $can, - $plugin->canResponseSatisfyRequest($request, $response), - '-> ' . $request . "\n" . $response - ); - - if ($result) { - $result = Response::fromMessage($result); - $result->removeHeader('Date'); - $request->getResponse()->removeHeader('Date'); - $request->getResponse()->removeHeader('Connection'); - // Get rid of dates - $this->assertEquals((string) $result, (string) $request->getResponse()); - } - - if ($validate) { - $this->assertEquals(1, count($server->getReceivedRequests())); - } - } - - public function testHandles404RevalidationResponses() - { - $request = new Request('GET', 'http://foo.com'); - $request->setClient(new Client()); - $badResponse = new Response(404, array(), 'Oh no!'); - $badRequest = clone $request; - $badRequest->setResponse($badResponse, true); - $response = new Response(200, array(), 'foo'); - - // Seed the cache - $s = new DefaultCacheStorage(new DoctrineCacheAdapter(new ArrayCache())); - $s->cache($request, $response); - $this->assertNotNull($s->fetch($request)); - - $rev = $this->getMockBuilder('Guzzle\Plugin\Cache\DefaultRevalidation') - ->setConstructorArgs(array($s)) - ->setMethods(array('createRevalidationRequest')) - ->getMock(); - - $rev->expects($this->once()) - ->method('createRevalidationRequest') - ->will($this->returnValue($badRequest)); - - try { - $rev->revalidate($request, $response); - $this->fail('Should have thrown an exception'); - } catch (BadResponseException $e) { - $this->assertSame($badResponse, $e->getResponse()); - $this->assertNull($s->fetch($request)); - } - } - - public function testCanRevalidateWithPlugin() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\n" . - "Date: Mon, 12 Nov 2012 03:06:37 GMT\r\n" . - "Cache-Control: private, s-maxage=0, max-age=0, must-revalidate\r\n" . - "Last-Modified: Mon, 12 Nov 2012 02:53:38 GMT\r\n" . - "Content-Length: 2\r\n\r\nhi", - "HTTP/1.0 304 Not Modified\r\n" . - "Date: Mon, 12 Nov 2012 03:06:38 GMT\r\n" . - "Content-Type: text/html; charset=UTF-8\r\n" . - "Last-Modified: Mon, 12 Nov 2012 02:53:38 GMT\r\n" . - "Age: 6302\r\n\r\n", - "HTTP/1.0 304 Not Modified\r\n" . - "Date: Mon, 12 Nov 2012 03:06:38 GMT\r\n" . - "Content-Type: text/html; charset=UTF-8\r\n" . - "Last-Modified: Mon, 12 Nov 2012 02:53:38 GMT\r\n" . - "Age: 6302\r\n\r\n", - )); - $client = new Client($this->getServer()->getUrl()); - $client->addSubscriber(new CachePlugin()); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - $this->assertEquals(3, count($this->getServer()->getReceivedRequests())); - } - - public function testCanHandleRevalidationFailures() - { - $client = new Client($this->getServer()->getUrl()); - $lm = gmdate('c', time() - 60); - $mock = new MockPlugin(array( - new Response(200, array( - 'Date' => $lm, - 'Cache-Control' => 'max-age=100, must-revalidate, stale-if-error=9999', - 'Last-Modified' => $lm, - 'Content-Length' => 2 - ), 'hi'), - new CurlException('Bleh') - )); - $client->addSubscriber(new CachePlugin()); - $client->addSubscriber($mock); - $client->get()->send(); - $response = $client->get()->send(); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('hi', $response->getBody(true)); - $this->assertEquals(2, count($mock->getReceivedRequests())); - $this->assertEquals(0, count($mock->getQueue())); - } - - public function testCanHandleStaleIfErrorWhenRevalidating() - { - $lm = gmdate('c', time() - 60); - $mock = new MockPlugin(array( - new Response(200, array( - 'Date' => $lm, - 'Cache-Control' => 'must-revalidate, max-age=0, stale-if-error=1200', - 'Last-Modified' => $lm, - 'Content-Length' => 2 - ), 'hi'), - new CurlException('Oh no!') - )); - $cache = new CachePlugin(); - $client = new Client('http://www.example.com'); - $client->addSubscriber($cache); - $client->addSubscriber($mock); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - $response = $client->get()->send(); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertCount(0, $mock); - $this->assertEquals('HIT from GuzzleCache', (string) $response->getHeader('X-Cache-Lookup')); - $this->assertEquals('HIT_ERROR from GuzzleCache', (string) $response->getHeader('X-Cache')); - } - - /** - * @group issue-437 - */ - public function testDoesNotTouchClosureListeners() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\n" . - "Date: Mon, 12 Nov 2012 03:06:37 GMT\r\n" . - "Cache-Control: private, s-maxage=0, max-age=0, must-revalidate\r\n" . - "Last-Modified: Mon, 12 Nov 2012 02:53:38 GMT\r\n" . - "Content-Length: 2\r\n\r\nhi", - "HTTP/1.0 304 Not Modified\r\n" . - "Date: Mon, 12 Nov 2012 03:06:38 GMT\r\n" . - "Content-Type: text/html; charset=UTF-8\r\n" . - "Last-Modified: Mon, 12 Nov 2012 02:53:38 GMT\r\n" . - "Age: 6302\r\n\r\n", - "HTTP/1.0 304 Not Modified\r\n" . - "Date: Mon, 12 Nov 2012 03:06:38 GMT\r\n" . - "Content-Type: text/html; charset=UTF-8\r\n" . - "Last-Modified: Mon, 12 Nov 2012 02:53:38 GMT\r\n" . - "Age: 6302\r\n\r\n", - )); - $client = new Client($this->getServer()->getUrl()); - $client->addSubscriber(new CachePlugin()); - $client->getEventDispatcher()->addListener('command.after_send', function(){}); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - $this->assertEquals(200, $client->get()->send()->getStatusCode()); - } - -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DenyRevalidationTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DenyRevalidationTest.php deleted file mode 100644 index 9af80f255..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DenyRevalidationTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertFalse($deny->revalidate(new Request('GET', 'http://foo.com'), new Response(200))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/SkipRevalidationTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/SkipRevalidationTest.php deleted file mode 100644 index 4bcc04bfa..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/SkipRevalidationTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertTrue($skip->revalidate(new Request('GET', 'http://foo.com'), new Response(200))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/ArrayCookieJarTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/ArrayCookieJarTest.php deleted file mode 100644 index 32897d084..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/ArrayCookieJarTest.php +++ /dev/null @@ -1,353 +0,0 @@ -jar = new ArrayCookieJar(); - } - - protected function getTestCookies() - { - return array( - new Cookie(array('name' => 'foo', 'value' => 'bar', 'domain' => 'foo.com', 'path' => '/', 'discard' => true)), - new Cookie(array('name' => 'test', 'value' => '123', 'domain' => 'baz.com', 'path' => '/foo', 'expires' => 2)), - new Cookie(array('name' => 'you', 'value' => '123', 'domain' => 'bar.com', 'path' => '/boo', 'expires' => time() + 1000)) - ); - } - - /** - * Provides test data for cookie cookieJar retrieval - */ - public function getCookiesDataProvider() - { - return array( - array(array('foo', 'baz', 'test', 'muppet', 'googoo'), '', '', '', false), - array(array('foo', 'baz', 'muppet', 'googoo'), '', '', '', true), - array(array('googoo'), 'www.example.com', '', '', false), - array(array('muppet', 'googoo'), 'test.y.example.com', '', '', false), - array(array('foo', 'baz'), 'example.com', '', '', false), - array(array('muppet'), 'x.y.example.com', '/acme/', '', false), - array(array('muppet'), 'x.y.example.com', '/acme/test/', '', false), - array(array('googoo'), 'x.y.example.com', '/test/acme/test/', '', false), - array(array('foo', 'baz'), 'example.com', '', '', false), - array(array('baz'), 'example.com', '', 'baz', false), - ); - } - - public function testStoresAndRetrievesCookies() - { - $cookies = $this->getTestCookies(); - foreach ($cookies as $cookie) { - $this->assertTrue($this->jar->add($cookie)); - } - - $this->assertEquals(3, count($this->jar)); - $this->assertEquals(3, count($this->jar->getIterator())); - $this->assertEquals($cookies, $this->jar->all(null, null, null, false, false)); - } - - public function testRemovesExpiredCookies() - { - $cookies = $this->getTestCookies(); - foreach ($this->getTestCookies() as $cookie) { - $this->jar->add($cookie); - } - $this->jar->removeExpired(); - $this->assertEquals(array($cookies[0], $cookies[2]), $this->jar->all()); - } - - public function testRemovesTemporaryCookies() - { - $cookies = $this->getTestCookies(); - foreach ($this->getTestCookies() as $cookie) { - $this->jar->add($cookie); - } - $this->jar->removeTemporary(); - $this->assertEquals(array($cookies[2]), $this->jar->all()); - } - - public function testIsSerializable() - { - $this->assertEquals('[]', $this->jar->serialize()); - $this->jar->unserialize('[]'); - $this->assertEquals(array(), $this->jar->all()); - - $cookies = $this->getTestCookies(); - foreach ($this->getTestCookies() as $cookie) { - $this->jar->add($cookie); - } - - // Remove discard and expired cookies - $serialized = $this->jar->serialize(); - $data = json_decode($serialized, true); - $this->assertEquals(1, count($data)); - - $a = new ArrayCookieJar(); - $a->unserialize($serialized); - $this->assertEquals(1, count($a)); - } - - public function testRemovesSelectively() - { - $cookies = $this->getTestCookies(); - foreach ($this->getTestCookies() as $cookie) { - $this->jar->add($cookie); - } - - // Remove foo.com cookies - $this->jar->remove('foo.com'); - $this->assertEquals(2, count($this->jar)); - // Try again, removing no further cookies - $this->jar->remove('foo.com'); - $this->assertEquals(2, count($this->jar)); - - // Remove bar.com cookies with path of /boo - $this->jar->remove('bar.com', '/boo'); - $this->assertEquals(1, count($this->jar)); - - // Remove cookie by name - $this->jar->remove(null, null, 'test'); - $this->assertEquals(0, count($this->jar)); - } - - public function testDoesNotAddIncompleteCookies() - { - $this->assertEquals(false, $this->jar->add(new Cookie())); - $this->assertFalse($this->jar->add(new Cookie(array( - 'name' => 'foo' - )))); - $this->assertFalse($this->jar->add(new Cookie(array( - 'name' => false - )))); - $this->assertFalse($this->jar->add(new Cookie(array( - 'name' => true - )))); - $this->assertFalse($this->jar->add(new Cookie(array( - 'name' => 'foo', - 'domain' => 'foo.com' - )))); - } - - public function testDoesAddValidCookies() - { - $this->assertTrue($this->jar->add(new Cookie(array( - 'name' => 'foo', - 'domain' => 'foo.com', - 'value' => 0 - )))); - $this->assertTrue($this->jar->add(new Cookie(array( - 'name' => 'foo', - 'domain' => 'foo.com', - 'value' => 0.0 - )))); - $this->assertTrue($this->jar->add(new Cookie(array( - 'name' => 'foo', - 'domain' => 'foo.com', - 'value' => '0' - )))); - } - - public function testOverwritesCookiesThatAreOlderOrDiscardable() - { - $t = time() + 1000; - $data = array( - 'name' => 'foo', - 'value' => 'bar', - 'domain' => '.example.com', - 'path' => '/', - 'max_age' => '86400', - 'port' => array(80, 8080), - 'version' => '1', - 'secure' => true, - 'discard' => true, - 'expires' => $t - ); - - // Make sure that the discard cookie is overridden with the non-discard - $this->assertTrue($this->jar->add(new Cookie($data))); - - unset($data['discard']); - $this->assertTrue($this->jar->add(new Cookie($data))); - $this->assertEquals(1, count($this->jar)); - - $c = $this->jar->all(); - $this->assertEquals(false, $c[0]->getDiscard()); - - // Make sure it doesn't duplicate the cookie - $this->jar->add(new Cookie($data)); - $this->assertEquals(1, count($this->jar)); - - // Make sure the more future-ful expiration date supersede the other - $data['expires'] = time() + 2000; - $this->assertTrue($this->jar->add(new Cookie($data))); - $this->assertEquals(1, count($this->jar)); - $c = $this->jar->all(); - $this->assertNotEquals($t, $c[0]->getExpires()); - } - - public function testOverwritesCookiesThatHaveChanged() - { - $t = time() + 1000; - $data = array( - 'name' => 'foo', - 'value' => 'bar', - 'domain' => '.example.com', - 'path' => '/', - 'max_age' => '86400', - 'port' => array(80, 8080), - 'version' => '1', - 'secure' => true, - 'discard' => true, - 'expires' => $t - ); - - // Make sure that the discard cookie is overridden with the non-discard - $this->assertTrue($this->jar->add(new Cookie($data))); - - $data['value'] = 'boo'; - $this->assertTrue($this->jar->add(new Cookie($data))); - $this->assertEquals(1, count($this->jar)); - - // Changing the value plus a parameter also must overwrite the existing one - $data['value'] = 'zoo'; - $data['secure'] = false; - $this->assertTrue($this->jar->add(new Cookie($data))); - $this->assertEquals(1, count($this->jar)); - - $c = $this->jar->all(); - $this->assertEquals('zoo', $c[0]->getValue()); - } - - public function testAddsCookiesFromResponseWithNoRequest() - { - $response = new Response(200, array( - 'Set-Cookie' => array( - "fpc=d=.Hm.yh4.1XmJWjJfs4orLQzKzPImxklQoxXSHOZATHUSEFciRueW_7704iYUtsXNEXq0M92Px2glMdWypmJ7HIQl6XIUvrZimWjQ3vIdeuRbI.FNQMAfcxu_XN1zSx7l.AcPdKL6guHc2V7hIQFhnjRW0rxm2oHY1P4bGQxFNz7f.tHm12ZD3DbdMDiDy7TBXsuP4DM-&v=2; expires=Fri, 02-Mar-2019 02:17:40 GMT; path=/; domain=127.0.0.1", - "FPCK3=AgBNbvoQAGpGEABZLRAAbFsQAF1tEABkDhAAeO0=; expires=Sat, 02-Apr-2019 02:17:40 GMT; path=/; domain=127.0.0.1", - "CH=deleted; expires=Wed, 03-Mar-2010 02:17:39 GMT; path=/; domain=127.0.0.1", - "CH=AgBNbvoQAAEcEAApuhAAMJcQADQvEAAvGxAALe0QAD6uEAATwhAAC1AQAC8t; expires=Sat, 02-Apr-2019 02:17:40 GMT; path=/; domain=127.0.0.1" - ) - )); - - $this->jar->addCookiesFromResponse($response); - $this->assertEquals(3, count($this->jar)); - $this->assertEquals(1, count($this->jar->all(null, null, 'fpc'))); - $this->assertEquals(1, count($this->jar->all(null, null, 'FPCK3'))); - $this->assertEquals(1, count($this->jar->all(null, null, 'CH'))); - } - - public function testAddsCookiesFromResponseWithRequest() - { - $response = new Response(200, array( - 'Set-Cookie' => "fpc=d=.Hm.yh4.1XmJWjJfs4orLQzKzPImxklQoxXSHOZATHUSEFciRueW_7704iYUtsXNEXq0M92Px2glMdWypmJ7HIQl6XIUvrZimWjQ3vIdeuRbI.FNQMAfcxu_XN1zSx7l.AcPdKL6guHc2V7hIQFhnjRW0rxm2oHY1P4bGQxFNz7f.tHm12ZD3DbdMDiDy7TBXsuP4DM-&v=2; expires=Fri, 02-Mar-2019 02:17:40 GMT;" - )); - $request = new Request('GET', 'http://www.example.com'); - $this->jar->addCookiesFromResponse($response, $request); - $this->assertEquals(1, count($this->jar)); - } - - public function getMatchingCookiesDataProvider() - { - return array( - array('https://example.com', array(0)), - array('http://example.com', array()), - array('https://example.com:8912', array()), - array('https://foo.example.com', array(0)), - array('http://foo.example.com/test/acme/', array(4)) - ); - } - - /** - * @dataProvider getMatchingCookiesDataProvider - */ - public function testReturnsCookiesMatchingRequests($url, $cookies) - { - $bag = array( - new Cookie(array( - 'name' => 'foo', - 'value' => 'bar', - 'domain' => 'example.com', - 'path' => '/', - 'max_age' => '86400', - 'port' => array(443, 8080), - 'version' => '1', - 'secure' => true - )), - new Cookie(array( - 'name' => 'baz', - 'value' => 'foobar', - 'domain' => 'example.com', - 'path' => '/', - 'max_age' => '86400', - 'port' => array(80, 8080), - 'version' => '1', - 'secure' => true - )), - new Cookie(array( - 'name' => 'test', - 'value' => '123', - 'domain' => 'www.foobar.com', - 'path' => '/path/', - 'discard' => true - )), - new Cookie(array( - 'name' => 'muppet', - 'value' => 'cookie_monster', - 'domain' => '.y.example.com', - 'path' => '/acme/', - 'comment' => 'Comment goes here...', - 'expires' => time() + 86400 - )), - new Cookie(array( - 'name' => 'googoo', - 'value' => 'gaga', - 'domain' => '.example.com', - 'path' => '/test/acme/', - 'max_age' => 1500, - 'version' => 2 - )) - ); - - foreach ($bag as $cookie) { - $this->jar->add($cookie); - } - - $request = new Request('GET', $url); - $results = $this->jar->getMatchingCookies($request); - $this->assertEquals(count($cookies), count($results)); - foreach ($cookies as $i) { - $this->assertContains($bag[$i], $results); - } - } - - /** - * @expectedException \Guzzle\Plugin\Cookie\Exception\InvalidCookieException - * @expectedExceptionMessage The cookie name must not contain invalid characters: abc:@123 - */ - public function testThrowsExceptionWithStrictMode() - { - $a = new ArrayCookieJar(); - $a->setStrictMode(true); - $a->add(new Cookie(array( - 'name' => 'abc:@123', - 'value' => 'foo', - 'domain' => 'bar' - ))); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/FileCookieJarTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/FileCookieJarTest.php deleted file mode 100644 index ac9471fd8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/FileCookieJarTest.php +++ /dev/null @@ -1,63 +0,0 @@ -file = tempnam('/tmp', 'file-cookies'); - } - - public function testLoadsFromFileFile() - { - $jar = new FileCookieJar($this->file); - $this->assertEquals(array(), $jar->all()); - unlink($this->file); - } - - public function testPersistsToFileFile() - { - $jar = new FileCookieJar($this->file); - $jar->add(new Cookie(array( - 'name' => 'foo', - 'value' => 'bar', - 'domain' => 'foo.com', - 'expires' => time() + 1000 - ))); - $jar->add(new Cookie(array( - 'name' => 'baz', - 'value' => 'bar', - 'domain' => 'foo.com', - 'expires' => time() + 1000 - ))); - $jar->add(new Cookie(array( - 'name' => 'boo', - 'value' => 'bar', - 'domain' => 'foo.com', - ))); - - $this->assertEquals(3, count($jar)); - unset($jar); - - // Make sure it wrote to the file - $contents = file_get_contents($this->file); - $this->assertNotEmpty($contents); - - // Load the cookieJar from the file - $jar = new FileCookieJar($this->file); - - // Weeds out temporary and session cookies - $this->assertEquals(2, count($jar)); - unset($jar); - unlink($this->file); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookiePluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookiePluginTest.php deleted file mode 100644 index f8c175cce..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookiePluginTest.php +++ /dev/null @@ -1,134 +0,0 @@ -getMockBuilder('Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar') - ->setMethods(array('addCookiesFromResponse')) - ->getMock(); - - $mock->expects($this->exactly(1)) - ->method('addCookiesFromResponse') - ->with($response); - - $plugin = new CookiePlugin($mock); - $plugin->onRequestSent(new Event(array( - 'response' => $response - ))); - } - - public function testAddsCookiesToRequests() - { - $cookie = new Cookie(array( - 'name' => 'foo', - 'value' => 'bar' - )); - - $mock = $this->getMockBuilder('Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar') - ->setMethods(array('getMatchingCookies')) - ->getMock(); - - $mock->expects($this->once()) - ->method('getMatchingCookies') - ->will($this->returnValue(array($cookie))); - - $plugin = new CookiePlugin($mock); - - $client = new Client(); - $client->getEventDispatcher()->addSubscriber($plugin); - - $request = $client->get('http://www.example.com'); - $plugin->onRequestBeforeSend(new Event(array( - 'request' => $request - ))); - - $this->assertEquals('bar', $request->getCookie('foo')); - } - - public function testCookiesAreExtractedFromRedirectResponses() - { - $plugin = new CookiePlugin(new ArrayCookieJar()); - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 302 Moved Temporarily\r\n" . - "Set-Cookie: test=583551; expires=Wednesday, 23-Mar-2050 19:49:45 GMT; path=/\r\n" . - "Location: /redirect\r\n\r\n", - "HTTP/1.1 200 OK\r\n" . - "Content-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\n" . - "Content-Length: 0\r\n\r\n" - )); - - $client = new Client($this->getServer()->getUrl()); - $client->getEventDispatcher()->addSubscriber($plugin); - - $client->get()->send(); - $request = $client->get(); - $request->send(); - $this->assertEquals('test=583551', $request->getHeader('Cookie')); - - $requests = $this->getServer()->getReceivedRequests(true); - // Confirm subsequent requests have the cookie. - $this->assertEquals('test=583551', $requests[2]->getHeader('Cookie')); - // Confirm the redirected request has the cookie. - $this->assertEquals('test=583551', $requests[1]->getHeader('Cookie')); - } - - public function testCookiesAreNotAddedWhenParamIsSet() - { - $jar = new ArrayCookieJar(); - $plugin = new CookiePlugin($jar); - - $jar->add(new Cookie(array( - 'domain' => 'example.com', - 'path' => '/', - 'name' => 'test', - 'value' => 'hi', - 'expires' => time() + 3600 - ))); - - $client = new Client('http://example.com'); - $client->getEventDispatcher()->addSubscriber($plugin); - - // Ensure that it is normally added - $request = $client->get(); - $request->setResponse(new Response(200), true); - $request->send(); - $this->assertEquals('hi', $request->getCookie('test')); - - // Now ensure that it is not added - $request = $client->get(); - $request->getParams()->set('cookies.disable', true); - $request->setResponse(new Response(200), true); - $request->send(); - $this->assertNull($request->getCookie('test')); - } - - public function testProvidesCookieJar() - { - $jar = new ArrayCookieJar(); - $plugin = new CookiePlugin($jar); - $this->assertSame($jar, $plugin->getCookieJar()); - } - - public function testEscapesCookieDomains() - { - $cookie = new Cookie(array('domain' => '/foo/^$[A-Z]+/')); - $this->assertFalse($cookie->matchesDomain('foo')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieTest.php deleted file mode 100644 index 3d8b0e9bb..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieTest.php +++ /dev/null @@ -1,208 +0,0 @@ -assertEquals('/', $cookie->getPath()); - $this->assertEquals(array(), $cookie->getPorts()); - } - - public function testConvertsDateTimeMaxAgeToUnixTimestamp() - { - $cookie = new Cookie(array( - 'expires' => 'November 20, 1984' - )); - $this->assertTrue(is_numeric($cookie->getExpires())); - } - - public function testAddsExpiresBasedOnMaxAge() - { - $t = time(); - $cookie = new Cookie(array( - 'max_age' => 100 - )); - $this->assertEquals($t + 100, $cookie->getExpires()); - } - - public function testHoldsValues() - { - $t = time(); - $data = array( - 'name' => 'foo', - 'value' => 'baz', - 'path' => '/bar', - 'domain' => 'baz.com', - 'expires' => $t, - 'max_age' => 100, - 'comment' => 'Hi', - 'comment_url' => 'foo.com', - 'port' => array(1, 2), - 'version' => 2, - 'secure' => true, - 'discard' => true, - 'http_only' => true, - 'data' => array( - 'foo' => 'baz', - 'bar' => 'bam' - ) - ); - - $cookie = new Cookie($data); - $this->assertEquals($data, $cookie->toArray()); - - $this->assertEquals('foo', $cookie->getName()); - $this->assertEquals('baz', $cookie->getValue()); - $this->assertEquals('baz.com', $cookie->getDomain()); - $this->assertEquals('/bar', $cookie->getPath()); - $this->assertEquals($t, $cookie->getExpires()); - $this->assertEquals(100, $cookie->getMaxAge()); - $this->assertEquals('Hi', $cookie->getComment()); - $this->assertEquals('foo.com', $cookie->getCommentUrl()); - $this->assertEquals(array(1, 2), $cookie->getPorts()); - $this->assertEquals(2, $cookie->getVersion()); - $this->assertTrue($cookie->getSecure()); - $this->assertTrue($cookie->getDiscard()); - $this->assertTrue($cookie->getHttpOnly()); - $this->assertEquals('baz', $cookie->getAttribute('foo')); - $this->assertEquals('bam', $cookie->getAttribute('bar')); - $this->assertEquals(array( - 'foo' => 'baz', - 'bar' => 'bam' - ), $cookie->getAttributes()); - - $cookie->setName('a') - ->setValue('b') - ->setPath('c') - ->setDomain('bar.com') - ->setExpires(10) - ->setMaxAge(200) - ->setComment('e') - ->setCommentUrl('f') - ->setPorts(array(80)) - ->setVersion(3) - ->setSecure(false) - ->setHttpOnly(false) - ->setDiscard(false) - ->setAttribute('snoop', 'dog'); - - $this->assertEquals('a', $cookie->getName()); - $this->assertEquals('b', $cookie->getValue()); - $this->assertEquals('c', $cookie->getPath()); - $this->assertEquals('bar.com', $cookie->getDomain()); - $this->assertEquals(10, $cookie->getExpires()); - $this->assertEquals(200, $cookie->getMaxAge()); - $this->assertEquals('e', $cookie->getComment()); - $this->assertEquals('f', $cookie->getCommentUrl()); - $this->assertEquals(array(80), $cookie->getPorts()); - $this->assertEquals(3, $cookie->getVersion()); - $this->assertFalse($cookie->getSecure()); - $this->assertFalse($cookie->getDiscard()); - $this->assertFalse($cookie->getHttpOnly()); - $this->assertEquals('dog', $cookie->getAttribute('snoop')); - } - - public function testDeterminesIfExpired() - { - $c = new Cookie(); - $c->setExpires(10); - $this->assertTrue($c->isExpired()); - $c->setExpires(time() + 10000); - $this->assertFalse($c->isExpired()); - } - - public function testMatchesPorts() - { - $cookie = new Cookie(); - // Always matches when nothing is set - $this->assertTrue($cookie->matchesPort(2)); - - $cookie->setPorts(array(1, 2)); - $this->assertTrue($cookie->matchesPort(2)); - $this->assertFalse($cookie->matchesPort(100)); - } - - public function testMatchesDomain() - { - $cookie = new Cookie(); - $this->assertTrue($cookie->matchesDomain('baz.com')); - - $cookie->setDomain('baz.com'); - $this->assertTrue($cookie->matchesDomain('baz.com')); - $this->assertFalse($cookie->matchesDomain('bar.com')); - - $cookie->setDomain('.baz.com'); - $this->assertTrue($cookie->matchesDomain('.baz.com')); - $this->assertTrue($cookie->matchesDomain('foo.baz.com')); - $this->assertFalse($cookie->matchesDomain('baz.bar.com')); - $this->assertTrue($cookie->matchesDomain('baz.com')); - - $cookie->setDomain('.127.0.0.1'); - $this->assertTrue($cookie->matchesDomain('127.0.0.1')); - - $cookie->setDomain('127.0.0.1'); - $this->assertTrue($cookie->matchesDomain('127.0.0.1')); - - $cookie->setDomain('.com.'); - $this->assertFalse($cookie->matchesDomain('baz.com')); - - $cookie->setDomain('.local'); - $this->assertTrue($cookie->matchesDomain('example.local')); - } - - public function testMatchesPath() - { - $cookie = new Cookie(); - $this->assertTrue($cookie->matchesPath('/foo')); - - $cookie->setPath('/foo'); - $this->assertTrue($cookie->matchesPath('/foo')); - $this->assertTrue($cookie->matchesPath('/foo/bar')); - $this->assertFalse($cookie->matchesPath('/bar')); - } - - public function cookieValidateProvider() - { - return array( - array('foo', 'baz', 'bar', true), - array('0', '0', '0', true), - array('', 'baz', 'bar', 'The cookie name must not be empty'), - array('foo', '', 'bar', 'The cookie value must not be empty'), - array('foo', 'baz', '', 'The cookie domain must not be empty'), - array('foo\\', 'baz', '0', 'The cookie name must not contain invalid characters: foo\\'), - ); - } - - /** - * @dataProvider cookieValidateProvider - */ - public function testValidatesCookies($name, $value, $domain, $result) - { - $cookie = new Cookie(array( - 'name' => $name, - 'value' => $value, - 'domain' => $domain - )); - $this->assertSame($result, $cookie->validate()); - } - - public function testCreatesInvalidCharacterString() - { - $m = new \ReflectionMethod('Guzzle\Plugin\Cookie\Cookie', 'getInvalidCharacters'); - $m->setAccessible(true); - $p = new \ReflectionProperty('Guzzle\Plugin\Cookie\Cookie', 'invalidCharString'); - $p->setAccessible(true); - $p->setValue(''); - // Expects a string containing 51 invalid characters - $this->assertEquals(51, strlen($m->invoke($m))); - $this->assertContains('@', $m->invoke($m)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/CurlAuth/CurlAuthPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/CurlAuth/CurlAuthPluginTest.php deleted file mode 100644 index 2a4b49eb6..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/CurlAuth/CurlAuthPluginTest.php +++ /dev/null @@ -1,39 +0,0 @@ -getEventDispatcher()->addSubscriber($plugin); - $request = $client->get('/'); - $this->assertEquals('michael', $request->getUsername()); - $this->assertEquals('test', $request->getPassword()); - Version::$emitWarnings = true; - } - - public function testAddsDigestAuthentication() - { - Version::$emitWarnings = false; - $plugin = new CurlAuthPlugin('julian', 'test', CURLAUTH_DIGEST); - $client = new Client('http://www.test.com/'); - $client->getEventDispatcher()->addSubscriber($plugin); - $request = $client->get('/'); - $this->assertEquals('julian', $request->getUsername()); - $this->assertEquals('test', $request->getPassword()); - $this->assertEquals('julian:test', $request->getCurlOptions()->get(CURLOPT_USERPWD)); - $this->assertEquals(CURLAUTH_DIGEST, $request->getCurlOptions()->get(CURLOPT_HTTPAUTH)); - Version::$emitWarnings = true; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/ErrorResponse/ErrorResponsePluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/ErrorResponse/ErrorResponsePluginTest.php deleted file mode 100644 index 6f94186b5..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/ErrorResponse/ErrorResponsePluginTest.php +++ /dev/null @@ -1,137 +0,0 @@ -flush(); - } - - public function setUp() - { - $mockError = 'Guzzle\Tests\Mock\ErrorResponseMock'; - $description = ServiceDescription::factory(array( - 'operations' => array( - 'works' => array( - 'httpMethod' => 'GET', - 'errorResponses' => array( - array('code' => 500, 'class' => $mockError), - array('code' => 503, 'reason' => 'foo', 'class' => $mockError), - array('code' => 200, 'reason' => 'Error!', 'class' => $mockError) - ) - ), - 'bad_class' => array( - 'httpMethod' => 'GET', - 'errorResponses' => array( - array('code' => 500, 'class' => 'Does\\Not\\Exist') - ) - ), - 'does_not_implement' => array( - 'httpMethod' => 'GET', - 'errorResponses' => array( - array('code' => 500, 'class' => __CLASS__) - ) - ), - 'no_errors' => array('httpMethod' => 'GET'), - 'no_class' => array( - 'httpMethod' => 'GET', - 'errorResponses' => array( - array('code' => 500) - ) - ), - ) - )); - $this->client = new Client($this->getServer()->getUrl()); - $this->client->setDescription($description); - } - - /** - * @expectedException \Guzzle\Http\Exception\ServerErrorResponseException - */ - public function testSkipsWhenErrorResponsesIsNotSet() - { - $this->getServer()->enqueue("HTTP/1.1 500 Foo\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('no_errors')->execute(); - } - - public function testSkipsWhenErrorResponsesIsNotSetAndAllowsSuccess() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('no_errors')->execute(); - } - - /** - * @expectedException \Guzzle\Plugin\ErrorResponse\Exception\ErrorResponseException - * @expectedExceptionMessage Does\Not\Exist does not exist - */ - public function testEnsuresErrorResponseExists() - { - $this->getServer()->enqueue("HTTP/1.1 500 Foo\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('bad_class')->execute(); - } - - /** - * @expectedException \Guzzle\Plugin\ErrorResponse\Exception\ErrorResponseException - * @expectedExceptionMessage must implement Guzzle\Plugin\ErrorResponse\ErrorResponseExceptionInterface - */ - public function testEnsuresErrorResponseImplementsInterface() - { - $this->getServer()->enqueue("HTTP/1.1 500 Foo\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('does_not_implement')->execute(); - } - - public function testThrowsSpecificErrorResponseOnMatch() - { - try { - $this->getServer()->enqueue("HTTP/1.1 500 Foo\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $command = $this->client->getCommand('works'); - $command->execute(); - $this->fail('Exception not thrown'); - } catch (ErrorResponseMock $e) { - $this->assertSame($command, $e->command); - $this->assertEquals(500, $e->response->getStatusCode()); - } - } - - /** - * @expectedException \Guzzle\Tests\Mock\ErrorResponseMock - */ - public function testThrowsWhenCodeAndPhraseMatch() - { - $this->getServer()->enqueue("HTTP/1.1 200 Error!\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('works')->execute(); - } - - public function testSkipsWhenReasonDoesNotMatch() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('works')->execute(); - } - - public function testSkipsWhenNoClassIsSet() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $this->client->addSubscriber(new ErrorResponsePlugin()); - $this->client->getCommand('no_class')->execute(); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/History/HistoryPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/History/HistoryPluginTest.php deleted file mode 100644 index 84dc90df9..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/History/HistoryPluginTest.php +++ /dev/null @@ -1,140 +0,0 @@ -get(); - $requests[$i]->setResponse(new Response(200), true); - $requests[$i]->send(); - $h->add($requests[$i]); - } - - return $requests; - } - - public function testDescribesSubscribedEvents() - { - $this->assertInternalType('array', HistoryPlugin::getSubscribedEvents()); - } - - public function testMaintainsLimitValue() - { - $h = new HistoryPlugin(); - $this->assertSame($h, $h->setLimit(10)); - $this->assertEquals(10, $h->getLimit()); - } - - public function testAddsRequests() - { - $h = new HistoryPlugin(); - $requests = $this->addRequests($h, 1); - $this->assertEquals(1, count($h)); - $i = $h->getIterator(); - $this->assertEquals(1, count($i)); - $this->assertEquals($requests[0], $i[0]); - } - - /** - * @depends testAddsRequests - */ - public function testMaintainsLimit() - { - $h = new HistoryPlugin(); - $h->setLimit(2); - $requests = $this->addRequests($h, 3); - $this->assertEquals(2, count($h)); - $i = 0; - foreach ($h as $request) { - if ($i > 0) { - $this->assertSame($requests[$i], $request); - } - } - } - - public function testReturnsLastRequest() - { - $h = new HistoryPlugin(); - $requests = $this->addRequests($h, 5); - $this->assertSame(end($requests), $h->getLastRequest()); - } - - public function testReturnsLastResponse() - { - $h = new HistoryPlugin(); - $requests = $this->addRequests($h, 5); - $this->assertSame(end($requests)->getResponse(), $h->getLastResponse()); - } - - public function testClearsHistory() - { - $h = new HistoryPlugin(); - $requests = $this->addRequests($h, 5); - $this->assertEquals(5, count($h)); - $h->clear(); - $this->assertEquals(0, count($h)); - } - - /** - * @depends testAddsRequests - */ - public function testUpdatesAddRequests() - { - $h = new HistoryPlugin(); - $client = new Client('http://localhost/'); - $client->getEventDispatcher()->addSubscriber($h); - - $request = $client->get(); - $request->setResponse(new Response(200), true); - $request->send(); - - $this->assertSame($request, $h->getLastRequest()); - } - - public function testCanCastToString() - { - $client = new Client('http://localhost/'); - $h = new HistoryPlugin(); - $client->getEventDispatcher()->addSubscriber($h); - - $mock = new MockPlugin(array( - new Response(301, array('Location' => '/redirect1', 'Content-Length' => 0)), - new Response(307, array('Location' => '/redirect2', 'Content-Length' => 0)), - new Response(200, array('Content-Length' => '2'), 'HI') - )); - - $client->getEventDispatcher()->addSubscriber($mock); - $request = $client->get(); - $request->send(); - $this->assertEquals(3, count($h)); - $this->assertEquals(3, count($mock->getReceivedRequests())); - - $h = str_replace("\r", '', $h); - $this->assertContains("> GET / HTTP/1.1\nHost: localhost\nUser-Agent:", $h); - $this->assertContains("< HTTP/1.1 301 Moved Permanently\nLocation: /redirect1", $h); - $this->assertContains("< HTTP/1.1 307 Temporary Redirect\nLocation: /redirect2", $h); - $this->assertContains("< HTTP/1.1 200 OK\nContent-Length: 2\n\nHI", $h); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Log/LogPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Log/LogPluginTest.php deleted file mode 100644 index ad663a53c..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Log/LogPluginTest.php +++ /dev/null @@ -1,95 +0,0 @@ -adapter = new ClosureLogAdapter(function ($message) { - echo $message; - }); - } - - public function testIgnoresCurlEventsWhenNotWiringBodies() - { - $p = new LogPlugin($this->adapter); - $this->assertNotEmpty($p->getSubscribedEvents()); - $event = new Event(array('request' => new Request('GET', 'http://foo.com'))); - $p->onCurlRead($event); - $p->onCurlWrite($event); - $p->onRequestBeforeSend($event); - } - - public function testLogsWhenComplete() - { - $output = ''; - $p = new LogPlugin(new ClosureLogAdapter(function ($message) use (&$output) { - $output = $message; - }), '{method} {resource} | {code} {res_body}'); - - $p->onRequestSent(new Event(array( - 'request' => new Request('GET', 'http://foo.com'), - 'response' => new Response(200, array(), 'Foo') - ))); - - $this->assertEquals('GET / | 200 Foo', $output); - } - - public function testWiresBodiesWhenNeeded() - { - $client = new Client($this->getServer()->getUrl()); - $plugin = new LogPlugin($this->adapter, '{req_body} | {res_body}', true); - $client->getEventDispatcher()->addSubscriber($plugin); - $request = $client->put(); - - // Send the response from the dummy server as the request body - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\nsend"); - $stream = fopen($this->getServer()->getUrl(), 'r'); - $request->setBody(EntityBody::factory($stream, 4)); - - $tmpFile = tempnam(sys_get_temp_dir(), 'non_repeatable'); - $request->setResponseBody(EntityBody::factory(fopen($tmpFile, 'w'))); - - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 8\r\n\r\nresponse"); - - ob_start(); - $request->send(); - $message = ob_get_clean(); - - unlink($tmpFile); - $this->assertContains("send", $message); - $this->assertContains("response", $message); - } - - public function testHasHelpfulStaticFactoryMethod() - { - $s = fopen('php://temp', 'r+'); - $client = new Client(); - $client->addSubscriber(LogPlugin::getDebugPlugin(true, $s)); - $request = $client->put('http://foo.com', array('Content-Type' => 'Foo'), 'Bar'); - $request->setresponse(new Response(200), true); - $request->send(); - rewind($s); - $contents = stream_get_contents($s); - $this->assertContains('# Request:', $contents); - $this->assertContainsIns('PUT / HTTP/1.1', $contents); - $this->assertContains('# Response:', $contents); - $this->assertContainsIns('HTTP/1.1 200 OK', $contents); - $this->assertContains('# Errors:', $contents); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Md5/CommandContentMd5PluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Md5/CommandContentMd5PluginTest.php deleted file mode 100644 index 4bd411113..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Md5/CommandContentMd5PluginTest.php +++ /dev/null @@ -1,97 +0,0 @@ - array( - 'test' => array( - 'httpMethod' => 'PUT', - 'parameters' => array( - 'ContentMD5' => array(), - 'Body' => array( - 'location' => 'body' - ) - ) - ) - ) - )); - - $client = new Client(); - $client->setDescription($description); - - return $client; - } - - public function testHasEvents() - { - $this->assertNotEmpty(CommandContentMd5Plugin::getSubscribedEvents()); - } - - public function testValidatesMd5WhenParamExists() - { - $client = $this->getClient(); - $command = $client->getCommand('test', array( - 'Body' => 'Foo', - 'ContentMD5' => true - )); - $event = new Event(array('command' => $command)); - $request = $command->prepare(); - $plugin = new CommandContentMd5Plugin(); - $plugin->onCommandBeforeSend($event); - $this->assertEquals('E1bGfXrRY42Ba/uCLdLCXQ==', (string) $request->getHeader('Content-MD5')); - } - - public function testDoesNothingWhenNoPayloadExists() - { - $client = $this->getClient(); - $client->getDescription()->getOperation('test')->setHttpMethod('GET'); - $command = $client->getCommand('test'); - $event = new Event(array('command' => $command)); - $request = $command->prepare(); - $plugin = new CommandContentMd5Plugin(); - $plugin->onCommandBeforeSend($event); - $this->assertNull($request->getHeader('Content-MD5')); - } - - public function testAddsValidationToResponsesOfContentMd5() - { - $client = $this->getClient(); - $client->getDescription()->getOperation('test')->setHttpMethod('GET'); - $command = $client->getCommand('test', array( - 'ValidateMD5' => true - )); - $event = new Event(array('command' => $command)); - $request = $command->prepare(); - $plugin = new CommandContentMd5Plugin(); - $plugin->onCommandBeforeSend($event); - $listeners = $request->getEventDispatcher()->getListeners('request.complete'); - $this->assertNotEmpty($listeners); - } - - public function testIgnoresValidationWhenDisabled() - { - $client = $this->getClient(); - $client->getDescription()->getOperation('test')->setHttpMethod('GET'); - $command = $client->getCommand('test', array( - 'ValidateMD5' => false - )); - $event = new Event(array('command' => $command)); - $request = $command->prepare(); - $plugin = new CommandContentMd5Plugin(); - $plugin->onCommandBeforeSend($event); - $listeners = $request->getEventDispatcher()->getListeners('request.complete'); - $this->assertEmpty($listeners); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Md5/Md5ValidatorPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Md5/Md5ValidatorPluginTest.php deleted file mode 100644 index 482e92b28..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Md5/Md5ValidatorPluginTest.php +++ /dev/null @@ -1,120 +0,0 @@ -create('GET', 'http://www.test.com/'); - $request->getEventDispatcher()->addSubscriber($plugin); - - $body = 'abc'; - $hash = md5($body); - $response = new Response(200, array( - 'Content-MD5' => $hash, - 'Content-Length' => 3 - ), 'abc'); - - $request->dispatch('request.complete', array( - 'response' => $response - )); - - // Try again with no Content-MD5 - $response->removeHeader('Content-MD5'); - $request->dispatch('request.complete', array( - 'response' => $response - )); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testThrowsExceptionOnInvalidMd5() - { - $plugin = new Md5ValidatorPlugin(); - $request = RequestFactory::getInstance()->create('GET', 'http://www.test.com/'); - $request->getEventDispatcher()->addSubscriber($plugin); - - $request->dispatch('request.complete', array( - 'response' => new Response(200, array( - 'Content-MD5' => 'foobar', - 'Content-Length' => 3 - ), 'abc') - )); - } - - public function testSkipsWhenContentLengthIsTooLarge() - { - $plugin = new Md5ValidatorPlugin(false, 1); - $request = RequestFactory::getInstance()->create('GET', 'http://www.test.com/'); - $request->getEventDispatcher()->addSubscriber($plugin); - - $request->dispatch('request.complete', array( - 'response' => new Response(200, array( - 'Content-MD5' => 'foobar', - 'Content-Length' => 3 - ), 'abc') - )); - } - - public function testProperlyValidatesWhenUsingContentEncoding() - { - $plugin = new Md5ValidatorPlugin(true); - $request = RequestFactory::getInstance()->create('GET', 'http://www.test.com/'); - $request->getEventDispatcher()->addSubscriber($plugin); - - // Content-MD5 is the MD5 hash of the canonical content after all - // content-encoding has been applied. Because cURL will automatically - // decompress entity bodies, we need to re-compress it to calculate. - $body = EntityBody::factory('abc'); - $body->compress(); - $hash = $body->getContentMd5(); - $body->uncompress(); - - $response = new Response(200, array( - 'Content-MD5' => $hash, - 'Content-Encoding' => 'gzip' - ), 'abc'); - $request->dispatch('request.complete', array( - 'response' => $response - )); - $this->assertEquals('abc', $response->getBody(true)); - - // Try again with an unknown encoding - $response = new Response(200, array( - 'Content-MD5' => $hash, - 'Content-Encoding' => 'foobar' - ), 'abc'); - $request->dispatch('request.complete', array( - 'response' => $response - )); - - // Try again with compress - $body->compress('bzip2.compress'); - $response = new Response(200, array( - 'Content-MD5' => $body->getContentMd5(), - 'Content-Encoding' => 'compress' - ), 'abc'); - $request->dispatch('request.complete', array( - 'response' => $response - )); - - // Try again with encoding and disabled content-encoding checks - $request->getEventDispatcher()->removeSubscriber($plugin); - $plugin = new Md5ValidatorPlugin(false); - $request->getEventDispatcher()->addSubscriber($plugin); - $request->dispatch('request.complete', array( - 'response' => $response - )); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Mock/MockPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Mock/MockPluginTest.php deleted file mode 100644 index 52be80609..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Mock/MockPluginTest.php +++ /dev/null @@ -1,198 +0,0 @@ -assertInternalType('array', MockPlugin::getSubscribedEvents()); - } - - public function testDescribesEvents() - { - $this->assertInternalType('array', MockPlugin::getAllEvents()); - } - - public function testCanBeTemporary() - { - $plugin = new MockPlugin(); - $this->assertFalse($plugin->isTemporary()); - $plugin = new MockPlugin(null, true); - $this->assertTrue($plugin->isTemporary()); - } - - public function testIsCountable() - { - $plugin = new MockPlugin(); - $plugin->addResponse(Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); - $this->assertEquals(1, count($plugin)); - } - - /** - * @depends testIsCountable - */ - public function testCanClearQueue() - { - $plugin = new MockPlugin(); - $plugin->addResponse(Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); - $plugin->clearQueue(); - $this->assertEquals(0, count($plugin)); - } - - public function testCanInspectQueue() - { - $plugin = new MockPlugin(); - $this->assertInternalType('array', $plugin->getQueue()); - $plugin->addResponse(Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); - $queue = $plugin->getQueue(); - $this->assertInternalType('array', $queue); - $this->assertEquals(1, count($queue)); - } - - public function testRetrievesResponsesFromFiles() - { - $response = MockPlugin::getMockFile(__DIR__ . '/../../TestData/mock_response'); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response); - $this->assertEquals(200, $response->getStatusCode()); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testThrowsExceptionWhenResponseFileIsNotFound() - { - MockPlugin::getMockFile('missing/filename'); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testInvalidResponsesThrowAnException() - { - $p = new MockPlugin(); - $p->addResponse($this); - } - - public function testAddsResponseObjectsToQueue() - { - $p = new MockPlugin(); - $response = Response::fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $p->addResponse($response); - $this->assertEquals(array($response), $p->getQueue()); - } - - public function testAddsResponseFilesToQueue() - { - $p = new MockPlugin(); - $p->addResponse(__DIR__ . '/../../TestData/mock_response'); - $this->assertEquals(1, count($p)); - } - - /** - * @depends testAddsResponseFilesToQueue - */ - public function testAddsMockResponseToRequestFromClient() - { - $p = new MockPlugin(); - $response = MockPlugin::getMockFile(__DIR__ . '/../../TestData/mock_response'); - $p->addResponse($response); - - $client = new Client('http://localhost:123/'); - $client->getEventDispatcher()->addSubscriber($p, 9999); - $request = $client->get(); - $request->send(); - - $this->assertSame($response, $request->getResponse()); - $this->assertEquals(0, count($p)); - } - - /** - * @depends testAddsResponseFilesToQueue - */ - public function testUpdateIgnoresWhenEmpty() - { - $p = new MockPlugin(); - $p->onRequestBeforeSend(new Event()); - } - - /** - * @depends testAddsMockResponseToRequestFromClient - */ - public function testDetachesTemporaryWhenEmpty() - { - $p = new MockPlugin(null, true); - $p->addResponse(MockPlugin::getMockFile(__DIR__ . '/../../TestData/mock_response')); - $client = new Client('http://localhost:123/'); - $client->getEventDispatcher()->addSubscriber($p, 9999); - $request = $client->get(); - $request->send(); - - $this->assertFalse($this->hasSubscriber($client, $p)); - } - - public function testLoadsResponsesFromConstructor() - { - $p = new MockPlugin(array(new Response(200))); - $this->assertEquals(1, $p->count()); - } - - public function testStoresMockedRequests() - { - $p = new MockPlugin(array(new Response(200), new Response(200))); - $client = new Client('http://localhost:123/'); - $client->getEventDispatcher()->addSubscriber($p, 9999); - - $request1 = $client->get(); - $request1->send(); - $this->assertEquals(array($request1), $p->getReceivedRequests()); - - $request2 = $client->get(); - $request2->send(); - $this->assertEquals(array($request1, $request2), $p->getReceivedRequests()); - - $p->flush(); - $this->assertEquals(array(), $p->getReceivedRequests()); - } - - public function testReadsBodiesFromMockedRequests() - { - $p = new MockPlugin(array(new Response(200))); - $p->readBodies(true); - $client = new Client('http://localhost:123/'); - $client->getEventDispatcher()->addSubscriber($p, 9999); - - $body = EntityBody::factory('foo'); - $request = $client->put(); - $request->setBody($body); - $request->send(); - $this->assertEquals(3, $body->ftell()); - } - - public function testCanMockBadRequestExceptions() - { - $client = new Client('http://localhost:123/'); - $ex = new CurlException('Foo'); - $mock = new MockPlugin(array($ex)); - $client->addSubscriber($mock); - $request = $client->get('foo'); - - try { - $request->send(); - $this->fail('Did not dequeue an exception'); - } catch (CurlException $e) { - $this->assertSame($e, $ex); - $this->assertSame($request, $ex->getRequest()); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Oauth/OauthPluginTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Oauth/OauthPluginTest.php deleted file mode 100644 index ed753177a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Oauth/OauthPluginTest.php +++ /dev/null @@ -1,329 +0,0 @@ - 'foo', - 'consumer_secret' => 'bar', - 'token' => 'count', - 'token_secret' => 'dracula' - ); - - protected function getRequest() - { - return RequestFactory::getInstance()->create('POST', 'http://www.test.com/path?a=b&c=d', null, array( - 'e' => 'f' - )); - } - - public function testSubscribesToEvents() - { - $events = OauthPlugin::getSubscribedEvents(); - $this->assertArrayHasKey('request.before_send', $events); - } - - public function testAcceptsConfigurationData() - { - $p = new OauthPlugin($this->config); - - // Access the config object - $class = new \ReflectionClass($p); - $property = $class->getProperty('config'); - $property->setAccessible(true); - $config = $property->getValue($p); - - $this->assertEquals('foo', $config['consumer_key']); - $this->assertEquals('bar', $config['consumer_secret']); - $this->assertEquals('count', $config['token']); - $this->assertEquals('dracula', $config['token_secret']); - $this->assertEquals('1.0', $config['version']); - $this->assertEquals('HMAC-SHA1', $config['signature_method']); - $this->assertEquals('header', $config['request_method']); - } - - public function testCreatesStringToSignFromPostRequest() - { - $p = new OauthPlugin($this->config); - $request = $this->getRequest(); - $signString = $p->getStringToSign($request, self::TIMESTAMP, self::NONCE); - - $this->assertContains('&e=f', rawurldecode($signString)); - - $expectedSignString = - // Method and URL - 'POST&http%3A%2F%2Fwww.test.com%2Fpath' . - // Sorted parameters from query string and body - '&a%3Db%26c%3Dd%26e%3Df%26oauth_consumer_key%3Dfoo' . - '%26oauth_nonce%3De7aa11195ca58349bec8b5ebe351d3497eb9e603%26' . - 'oauth_signature_method%3DHMAC-SHA1' . - '%26oauth_timestamp%3D' . self::TIMESTAMP . '%26oauth_token%3Dcount%26oauth_version%3D1.0'; - - $this->assertEquals($expectedSignString, $signString); - } - - public function testCreatesStringToSignIgnoringPostFields() - { - $config = $this->config; - $config['disable_post_params'] = true; - $p = new OauthPlugin($config); - $request = $this->getRequest(); - $sts = rawurldecode($p->getStringToSign($request, self::TIMESTAMP, self::NONCE)); - $this->assertNotContains('&e=f', $sts); - } - - public function testCreatesStringToSignFromPostRequestWithCustomContentType() - { - $p = new OauthPlugin($this->config); - $request = $this->getRequest(); - $request->setHeader('Content-Type', 'Foo'); - $this->assertEquals( - // Method and URL - 'POST&http%3A%2F%2Fwww.test.com%2Fpath' . - // Sorted parameters from query string and body - '&a%3Db%26c%3Dd%26oauth_consumer_key%3Dfoo' . - '%26oauth_nonce%3D'. self::NONCE .'%26' . - 'oauth_signature_method%3DHMAC-SHA1' . - '%26oauth_timestamp%3D' . self::TIMESTAMP . '%26oauth_token%3Dcount%26oauth_version%3D1.0', - $p->getStringToSign($request, self::TIMESTAMP, self::NONCE) - ); - } - - /** - * @depends testCreatesStringToSignFromPostRequest - */ - public function testConvertsBooleansToStrings() - { - $p = new OauthPlugin($this->config); - $request = $this->getRequest(); - $request->getQuery()->set('a', true); - $request->getQuery()->set('c', false); - $this->assertContains('&a%3Dtrue%26c%3Dfalse', $p->getStringToSign($request, self::TIMESTAMP, self::NONCE)); - } - - public function testCreatesStringToSignFromPostRequestWithNullValues() - { - $config = array( - 'consumer_key' => 'foo', - 'consumer_secret' => 'bar', - 'token' => null, - 'token_secret' => 'dracula' - ); - - $p = new OauthPlugin($config); - $request = $this->getRequest(); - $signString = $p->getStringToSign($request, self::TIMESTAMP, self::NONCE); - - $this->assertContains('&e=f', rawurldecode($signString)); - - $expectedSignString = // Method and URL - 'POST&http%3A%2F%2Fwww.test.com%2Fpath' . - // Sorted parameters from query string and body - '&a%3Db%26c%3Dd%26e%3Df%26oauth_consumer_key%3Dfoo' . - '%26oauth_nonce%3De7aa11195ca58349bec8b5ebe351d3497eb9e603%26' . - 'oauth_signature_method%3DHMAC-SHA1' . - '%26oauth_timestamp%3D' . self::TIMESTAMP . '%26oauth_version%3D1.0'; - - $this->assertEquals($expectedSignString, $signString); - } - - /** - * @depends testCreatesStringToSignFromPostRequest - */ - public function testMultiDimensionalArray() - { - $p = new OauthPlugin($this->config); - $request = $this->getRequest(); - $request->getQuery()->set('a', array('b' => array('e' => 'f', 'c' => 'd'))); - $this->assertContains('a%255Bb%255D%255Bc%255D%3Dd%26a%255Bb%255D%255Be%255D%3Df%26c%3Dd%26e%3Df%26', $p->getStringToSign($request, self::TIMESTAMP, self::NONCE)); - } - - /** - * @depends testCreatesStringToSignFromPostRequest - */ - public function testSignsStrings() - { - $p = new OauthPlugin(array_merge($this->config, array( - 'signature_callback' => function($string, $key) { - return "_{$string}|{$key}_"; - } - ))); - $request = $this->getRequest(); - $sig = $p->getSignature($request, self::TIMESTAMP, self::NONCE); - $this->assertEquals( - '_POST&http%3A%2F%2Fwww.test.com%2Fpath&a%3Db%26c%3Dd%26e%3Df%26oauth_consumer_key%3Dfoo' . - '%26oauth_nonce%3D'. self::NONCE .'%26oauth_signature_method%3DHMAC-SHA1' . - '%26oauth_timestamp%3D' . self::TIMESTAMP . '%26oauth_token%3Dcount%26oauth_version%3D1.0|' . - 'bar&dracula_', - base64_decode($sig) - ); - } - - /** - * Test that the Oauth is signed correctly and that extra strings haven't been added - * to the authorization header. - */ - public function testSignsOauthRequests() - { - $p = new OauthPlugin($this->config); - $event = new Event(array( - 'request' => $this->getRequest(), - 'timestamp' => self::TIMESTAMP - )); - $params = $p->onRequestBeforeSend($event); - - $this->assertTrue($event['request']->hasHeader('Authorization')); - - $authorizationHeader = (string)$event['request']->getHeader('Authorization'); - - $this->assertStringStartsWith('OAuth ', $authorizationHeader); - - $stringsToCheck = array( - 'oauth_consumer_key="foo"', - 'oauth_nonce="'.urlencode($params['oauth_nonce']).'"', - 'oauth_signature="'.urlencode($params['oauth_signature']).'"', - 'oauth_signature_method="HMAC-SHA1"', - 'oauth_timestamp="' . self::TIMESTAMP . '"', - 'oauth_token="count"', - 'oauth_version="1.0"', - ); - - $totalLength = strlen('OAuth '); - - //Separator is not used before first parameter. - $separator = ''; - - foreach ($stringsToCheck as $stringToCheck) { - $this->assertContains($stringToCheck, $authorizationHeader); - $totalLength += strlen($separator); - $totalLength += strlen($stringToCheck); - $separator = ', '; - } - - // Technically this test is not universally valid. It would be allowable to have extra \n characters - // in the Authorization header. However Guzzle does not do this, so we just perform a simple check - // on length to validate the Authorization header is composed of only the strings above. - $this->assertEquals($totalLength, strlen($authorizationHeader), 'Authorization has extra characters i.e. contains extra elements compared to stringsToCheck.'); - } - - public function testSignsOauthQueryStringRequest() - { - $config = array_merge( - $this->config, - array('request_method' => OauthPlugin::REQUEST_METHOD_QUERY) - ); - - $p = new OauthPlugin($config); - $event = new Event(array( - 'request' => $this->getRequest(), - 'timestamp' => self::TIMESTAMP - )); - $params = $p->onRequestBeforeSend($event); - - $this->assertFalse($event['request']->hasHeader('Authorization')); - - $stringsToCheck = array( - 'a=b', - 'c=d', - 'oauth_consumer_key=foo', - 'oauth_nonce='.urlencode($params['oauth_nonce']), - 'oauth_signature='.urlencode($params['oauth_signature']), - 'oauth_signature_method=HMAC-SHA1', - 'oauth_timestamp='.self::TIMESTAMP, - 'oauth_token=count', - 'oauth_version=1.0', - ); - - $queryString = (string) $event['request']->getQuery(); - - $totalLength = strlen('?'); - - //Separator is not used before first parameter. - $separator = ''; - - foreach ($stringsToCheck as $stringToCheck) { - $this->assertContains($stringToCheck, $queryString); - $totalLength += strlen($separator); - $totalLength += strlen($stringToCheck); - $separator = '&'; - } - - // Removes the last query string separator '&' - $totalLength -= 1; - - $this->assertEquals($totalLength, strlen($queryString), 'Query string has extra characters i.e. contains extra elements compared to stringsToCheck.'); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testInvalidArgumentExceptionOnMethodError() - { - $config = array_merge( - $this->config, - array('request_method' => 'FakeMethod') - ); - - $p = new OauthPlugin($config); - $event = new Event(array( - 'request' => $this->getRequest(), - 'timestamp' => self::TIMESTAMP - )); - - $p->onRequestBeforeSend($event); - } - - public function testDoesNotAddFalseyValuesToAuthorization() - { - unset($this->config['token']); - $p = new OauthPlugin($this->config); - $event = new Event(array('request' => $this->getRequest(), 'timestamp' => self::TIMESTAMP)); - $p->onRequestBeforeSend($event); - $this->assertTrue($event['request']->hasHeader('Authorization')); - $this->assertNotContains('oauth_token=', (string) $event['request']->getHeader('Authorization')); - } - - public function testOptionalOauthParametersAreNotAutomaticallyAdded() - { - // The only required Oauth parameters are the consumer key and secret. That is enough credentials - // for signing oauth requests. - $config = array( - 'consumer_key' => 'foo', - 'consumer_secret' => 'bar', - ); - - $plugin = new OauthPlugin($config); - $event = new Event(array( - 'request' => $this->getRequest(), - 'timestamp' => self::TIMESTAMP - )); - - $timestamp = $plugin->getTimestamp($event); - $request = $event['request']; - $nonce = $plugin->generateNonce($request); - - $paramsToSign = $plugin->getParamsToSign($request, $timestamp, $nonce); - - $optionalParams = array( - 'callback' => 'oauth_callback', - 'token' => 'oauth_token', - 'verifier' => 'oauth_verifier', - 'token_secret' => 'token_secret' - ); - - foreach ($optionalParams as $optionName => $oauthName) { - $this->assertArrayNotHasKey($oauthName, $paramsToSign, "Optional Oauth param '$oauthName' was not set via config variable '$optionName', but it is listed in getParamsToSign()."); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/AbstractConfigLoaderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/AbstractConfigLoaderTest.php deleted file mode 100644 index 8b42fb839..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/AbstractConfigLoaderTest.php +++ /dev/null @@ -1,149 +0,0 @@ -loader = $this->getMockBuilder('Guzzle\Service\AbstractConfigLoader') - ->setMethods(array('build')) - ->getMockForAbstractClass(); - } - - public function tearDown() - { - foreach ($this->cleanup as $file) { - unlink($file); - } - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testOnlyLoadsSupportedTypes() - { - $this->loader->load(new \stdClass()); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - * @expectedExceptionMessage Unable to open fooooooo.json - */ - public function testFileMustBeReadable() - { - $this->loader->load('fooooooo.json'); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - * @expectedExceptionMessage Unknown file extension - */ - public function testMustBeSupportedExtension() - { - $this->loader->load(dirname(__DIR__) . '/TestData/FileBody.txt'); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - * @expectedExceptionMessage Error loading JSON data from - */ - public function testJsonMustBeValue() - { - $filename = tempnam(sys_get_temp_dir(), 'json') . '.json'; - file_put_contents($filename, '{/{./{}foo'); - $this->cleanup[] = $filename; - $this->loader->load($filename); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - * @expectedExceptionMessage PHP files must return an array - */ - public function testPhpFilesMustReturnAnArray() - { - $filename = tempnam(sys_get_temp_dir(), 'php') . '.php'; - file_put_contents($filename, 'cleanup[] = $filename; - $this->loader->load($filename); - } - - public function testLoadsPhpFileIncludes() - { - $filename = tempnam(sys_get_temp_dir(), 'php') . '.php'; - file_put_contents($filename, ' "bar");'); - $this->cleanup[] = $filename; - $this->loader->expects($this->exactly(1))->method('build')->will($this->returnArgument(0)); - $config = $this->loader->load($filename); - $this->assertEquals(array('foo' => 'bar'), $config); - } - - public function testCanCreateFromJson() - { - $file = dirname(__DIR__) . '/TestData/services/json1.json'; - // The build method will just return the config data - $this->loader->expects($this->exactly(1))->method('build')->will($this->returnArgument(0)); - $data = $this->loader->load($file); - // Ensure that the config files were merged using the includes directives - $this->assertArrayHasKey('includes', $data); - $this->assertArrayHasKey('services', $data); - $this->assertInternalType('array', $data['services']['foo']); - $this->assertInternalType('array', $data['services']['abstract']); - $this->assertInternalType('array', $data['services']['mock']); - $this->assertEquals('bar', $data['services']['foo']['params']['baz']); - } - - public function testUsesAliases() - { - $file = dirname(__DIR__) . '/TestData/services/json1.json'; - $this->loader->addAlias('foo', $file); - // The build method will just return the config data - $this->loader->expects($this->exactly(1))->method('build')->will($this->returnArgument(0)); - $data = $this->loader->load('foo'); - $this->assertEquals('bar', $data['services']['foo']['params']['baz']); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - * @expectedExceptionMessage Unable to open foo.json - */ - public function testCanRemoveAliases() - { - $file = dirname(__DIR__) . '/TestData/services/json1.json'; - $this->loader->addAlias('foo.json', $file); - $this->loader->removeAlias('foo.json'); - $this->loader->load('foo.json'); - } - - public function testCanLoadArraysWithIncludes() - { - $file = dirname(__DIR__) . '/TestData/services/json1.json'; - $config = array('includes' => array($file)); - // The build method will just return the config data - $this->loader->expects($this->exactly(1))->method('build')->will($this->returnArgument(0)); - $data = $this->loader->load($config); - $this->assertEquals('bar', $data['services']['foo']['params']['baz']); - } - - public function testDoesNotEnterInfiniteLoop() - { - $prefix = $file = dirname(__DIR__) . '/TestData/description'; - $this->loader->load("{$prefix}/baz.json"); - $this->assertCount(4, $this->readAttribute($this->loader, 'loadedFiles')); - // Ensure that the internal list of loaded files is reset - $this->loader->load("{$prefix}/../test_service2.json"); - $this->assertCount(1, $this->readAttribute($this->loader, 'loadedFiles')); - // Ensure that previously loaded files will be reloaded when starting fresh - $this->loader->load("{$prefix}/baz.json"); - $this->assertCount(4, $this->readAttribute($this->loader, 'loadedFiles')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderLoaderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderLoaderTest.php deleted file mode 100644 index f63070e38..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderLoaderTest.php +++ /dev/null @@ -1,177 +0,0 @@ - array( - 'abstract' => array( - 'params' => array( - 'access_key' => 'xyz', - 'secret' => 'abc', - ), - ), - 'foo' => array( - 'extends' => 'abstract', - 'params' => array( - 'baz' => 'bar', - ), - ), - 'mock' => array( - 'extends' => 'abstract', - 'params' => array( - 'username' => 'foo', - 'password' => 'baz', - 'subdomain' => 'bar', - ) - ) - ) - ); - - $builder = $arrayFactory->load($data); - - // Ensure that services were parsed - $this->assertTrue(isset($builder['mock'])); - $this->assertTrue(isset($builder['abstract'])); - $this->assertTrue(isset($builder['foo'])); - $this->assertFalse(isset($builder['jimmy'])); - } - - /** - * @expectedException Guzzle\Service\Exception\ServiceNotFoundException - * @expectedExceptionMessage foo is trying to extend a non-existent service: abstract - */ - public function testThrowsExceptionWhenExtendingNonExistentService() - { - $arrayFactory = new ServiceBuilderLoader(); - - $data = array( - 'services' => array( - 'foo' => array( - 'extends' => 'abstract' - ) - ) - ); - - $builder = $arrayFactory->load($data); - } - - public function testAllowsGlobalParameterOverrides() - { - $arrayFactory = new ServiceBuilderLoader(); - - $data = array( - 'services' => array( - 'foo' => array( - 'params' => array( - 'foo' => 'baz', - 'bar' => 'boo' - ) - ) - ) - ); - - $builder = $arrayFactory->load($data, array( - 'bar' => 'jar', - 'far' => 'car' - )); - - $compiled = json_decode($builder->serialize(), true); - $this->assertEquals(array( - 'foo' => 'baz', - 'bar' => 'jar', - 'far' => 'car' - ), $compiled['foo']['params']); - } - - public function tstDoesNotErrorOnCircularReferences() - { - $arrayFactory = new ServiceBuilderLoader(); - $arrayFactory->load(array( - 'services' => array( - 'too' => array('extends' => 'ball'), - 'ball' => array('extends' => 'too'), - ) - )); - } - - public function configProvider() - { - $foo = array( - 'extends' => 'bar', - 'class' => 'stdClass', - 'params' => array('a' => 'test', 'b' => '456') - ); - - return array( - array( - // Does not extend the existing `foo` service but overwrites it - array( - 'services' => array( - 'foo' => $foo, - 'bar' => array('params' => array('baz' => '123')) - ) - ), - array( - 'services' => array( - 'foo' => array('class' => 'Baz') - ) - ), - array( - 'services' => array( - 'foo' => array('class' => 'Baz'), - 'bar' => array('params' => array('baz' => '123')) - ) - ) - ), - array( - // Extends the existing `foo` service - array( - 'services' => array( - 'foo' => $foo, - 'bar' => array('params' => array('baz' => '123')) - ) - ), - array( - 'services' => array( - 'foo' => array( - 'extends' => 'foo', - 'params' => array('b' => '123', 'c' => 'def') - ) - ) - ), - array( - 'services' => array( - 'foo' => array( - 'extends' => 'bar', - 'class' => 'stdClass', - 'params' => array('a' => 'test', 'b' => '123', 'c' => 'def') - ), - 'bar' => array('params' => array('baz' => '123')) - ) - ) - ) - ); - } - - /** - * @dataProvider configProvider - */ - public function testCombinesConfigs($a, $b, $c) - { - $l = new ServiceBuilderLoader(); - $m = new \ReflectionMethod($l, 'mergeData'); - $m->setAccessible(true); - $this->assertEquals($c, $m->invoke($l, $a, $b)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php deleted file mode 100644 index e1b3a1d49..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php +++ /dev/null @@ -1,317 +0,0 @@ - array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'username' => 'michael', - 'password' => 'testing123', - 'subdomain' => 'michael', - ), - ), - 'billy.mock' => array( - 'alias' => 'Hello!', - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'username' => 'billy', - 'password' => 'passw0rd', - 'subdomain' => 'billy', - ), - ), - 'billy.testing' => array( - 'extends' => 'billy.mock', - 'params' => array( - 'subdomain' => 'test.billy', - ), - ), - 'missing_params' => array( - 'extends' => 'billy.mock' - ) - ); - - public function testAllowsSerialization() - { - $builder = ServiceBuilder::factory($this->arrayData); - $cached = unserialize(serialize($builder)); - $this->assertEquals($cached, $builder); - } - - public function testDelegatesFactoryMethodToAbstractFactory() - { - $builder = ServiceBuilder::factory($this->arrayData); - $c = $builder->get('michael.mock'); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\MockClient', $c); - } - - /** - * @expectedException Guzzle\Service\Exception\ServiceNotFoundException - * @expectedExceptionMessage No service is registered as foobar - */ - public function testThrowsExceptionWhenGettingInvalidClient() - { - ServiceBuilder::factory($this->arrayData)->get('foobar'); - } - - public function testStoresClientCopy() - { - $builder = ServiceBuilder::factory($this->arrayData); - $client = $builder->get('michael.mock'); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\MockClient', $client); - $this->assertEquals('http://127.0.0.1:8124/v1/michael', $client->getBaseUrl()); - $this->assertEquals($client, $builder->get('michael.mock')); - - // Get another client but throw this one away - $client2 = $builder->get('billy.mock', true); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\MockClient', $client2); - $this->assertEquals('http://127.0.0.1:8124/v1/billy', $client2->getBaseUrl()); - - // Make sure the original client is still there and set - $this->assertTrue($client === $builder->get('michael.mock')); - - // Create a new billy.mock client that is stored - $client3 = $builder->get('billy.mock'); - - // Make sure that the stored billy.mock client is equal to the other stored client - $this->assertTrue($client3 === $builder->get('billy.mock')); - - // Make sure that this client is not equal to the previous throwaway client - $this->assertFalse($client2 === $builder->get('billy.mock')); - } - - public function testBuildersPassOptionsThroughToClients() - { - $s = new ServiceBuilder(array( - 'michael.mock' => array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'base_url' => 'http://www.test.com/', - 'subdomain' => 'michael', - 'password' => 'test', - 'username' => 'michael', - 'curl.curlopt_proxyport' => 8080 - ) - ) - )); - - $c = $s->get('michael.mock'); - $this->assertEquals(8080, $c->getConfig('curl.curlopt_proxyport')); - } - - public function testUsesTheDefaultBuilderWhenNoBuilderIsSpecified() - { - $s = new ServiceBuilder(array( - 'michael.mock' => array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'base_url' => 'http://www.test.com/', - 'subdomain' => 'michael', - 'password' => 'test', - 'username' => 'michael', - 'curl.curlopt_proxyport' => 8080 - ) - ) - )); - - $c = $s->get('michael.mock'); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\MockClient', $c); - } - - public function testUsedAsArray() - { - $b = ServiceBuilder::factory($this->arrayData); - $this->assertTrue($b->offsetExists('michael.mock')); - $this->assertFalse($b->offsetExists('not_there')); - $this->assertInstanceOf('Guzzle\Service\Client', $b['michael.mock']); - - unset($b['michael.mock']); - $this->assertFalse($b->offsetExists('michael.mock')); - - $b['michael.mock'] = new Client('http://www.test.com/'); - $this->assertInstanceOf('Guzzle\Service\Client', $b['michael.mock']); - } - - public function testFactoryCanCreateFromJson() - { - $tmp = sys_get_temp_dir() . '/test.js'; - file_put_contents($tmp, json_encode($this->arrayData)); - $b = ServiceBuilder::factory($tmp); - unlink($tmp); - $s = $b->get('billy.testing'); - $this->assertEquals('test.billy', $s->getConfig('subdomain')); - $this->assertEquals('billy', $s->getConfig('username')); - } - - public function testFactoryCanCreateFromArray() - { - $b = ServiceBuilder::factory($this->arrayData); - $s = $b->get('billy.testing'); - $this->assertEquals('test.billy', $s->getConfig('subdomain')); - $this->assertEquals('billy', $s->getConfig('username')); - } - - public function testFactoryDoesNotRequireParams() - { - $b = ServiceBuilder::factory($this->arrayData); - $s = $b->get('missing_params'); - $this->assertEquals('billy', $s->getConfig('username')); - } - - public function testBuilderAllowsReferencesBetweenClients() - { - $builder = ServiceBuilder::factory(array( - 'a' => array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'other_client' => '{b}', - 'username' => 'x', - 'password' => 'y', - 'subdomain' => 'z' - ) - ), - 'b' => array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'username' => '1', - 'password' => '2', - 'subdomain' => '3' - ) - ) - )); - - $client = $builder['a']; - $this->assertEquals('x', $client->getConfig('username')); - $this->assertSame($builder['b'], $client->getConfig('other_client')); - $this->assertEquals('1', $builder['b']->getConfig('username')); - } - - public function testEmitsEventsWhenClientsAreCreated() - { - // Ensure that the client signals that it emits an event - $this->assertEquals(array('service_builder.create_client'), ServiceBuilder::getAllEvents()); - - // Create a test service builder - $builder = ServiceBuilder::factory(array( - 'a' => array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'username' => 'test', - 'password' => '123', - 'subdomain' => 'z' - ) - ) - )); - - // Add an event listener to pick up client creation events - $emits = 0; - $builder->getEventDispatcher()->addListener('service_builder.create_client', function($event) use (&$emits) { - $emits++; - }); - - // Get the 'a' client by name - $client = $builder->get('a'); - - // Ensure that the event was emitted once, and that the client was present - $this->assertEquals(1, $emits); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\MockClient', $client); - } - - public function testCanAddGlobalParametersToServicesOnLoad() - { - $builder = ServiceBuilder::factory($this->arrayData, array( - 'username' => 'fred', - 'new_value' => 'test' - )); - - $data = json_decode($builder->serialize(), true); - - foreach ($data as $service) { - $this->assertEquals('fred', $service['params']['username']); - $this->assertEquals('test', $service['params']['new_value']); - } - } - - public function testAddsGlobalPlugins() - { - $b = new ServiceBuilder($this->arrayData); - $b->addGlobalPlugin(new HistoryPlugin()); - $s = $b->get('michael.mock'); - $this->assertTrue($s->getEventDispatcher()->hasListeners('request.sent')); - } - - public function testCanGetData() - { - $b = new ServiceBuilder($this->arrayData); - $this->assertEquals($this->arrayData['michael.mock'], $b->getData('michael.mock')); - $this->assertNull($b->getData('ewofweoweofe')); - } - - public function testCanGetByAlias() - { - $b = new ServiceBuilder($this->arrayData); - $this->assertSame($b->get('billy.mock'), $b->get('Hello!')); - } - - public function testCanOverwriteParametersForThrowawayClients() - { - $b = new ServiceBuilder($this->arrayData); - - $c1 = $b->get('michael.mock'); - $this->assertEquals('michael', $c1->getConfig('username')); - - $c2 = $b->get('michael.mock', array('username' => 'jeremy')); - $this->assertEquals('jeremy', $c2->getConfig('username')); - } - - public function testGettingAThrowawayClientWithParametersDoesNotAffectGettingOtherClients() - { - $b = new ServiceBuilder($this->arrayData); - - $c1 = $b->get('michael.mock', array('username' => 'jeremy')); - $this->assertEquals('jeremy', $c1->getConfig('username')); - - $c2 = $b->get('michael.mock'); - $this->assertEquals('michael', $c2->getConfig('username')); - } - - public function testCanUseArbitraryData() - { - $b = new ServiceBuilder(); - $b['a'] = 'foo'; - $this->assertTrue(isset($b['a'])); - $this->assertEquals('foo', $b['a']); - unset($b['a']); - $this->assertFalse(isset($b['a'])); - } - - public function testCanRegisterServiceData() - { - $b = new ServiceBuilder(); - $b['a'] = array( - 'class' => 'Guzzle\Tests\Service\Mock\MockClient', - 'params' => array( - 'username' => 'billy', - 'password' => 'passw0rd', - 'subdomain' => 'billy', - ) - ); - $this->assertTrue(isset($b['a'])); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\MockClient', $b['a']); - $client = $b['a']; - unset($b['a']); - $this->assertFalse(isset($b['a'])); - // Ensure that instantiated clients can be registered - $b['mock'] = $client; - $this->assertSame($client, $b['mock']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/CachingConfigLoaderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/CachingConfigLoaderTest.php deleted file mode 100644 index b8245ad58..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/CachingConfigLoaderTest.php +++ /dev/null @@ -1,43 +0,0 @@ -getMockBuilder('Guzzle\Service\ConfigLoaderInterface') - ->setMethods(array('load')) - ->getMockForAbstractClass(); - $data = array('foo' => 'bar'); - $loader->expects($this->once()) - ->method('load') - ->will($this->returnValue($data)); - $cache = new CachingConfigLoader($loader, $cache); - $this->assertEquals($data, $cache->load('foo')); - $this->assertEquals($data, $cache->load('foo')); - } - - public function testDoesNotCacheArrays() - { - $cache = new DoctrineCacheAdapter(new ArrayCache()); - $loader = $this->getMockBuilder('Guzzle\Service\ConfigLoaderInterface') - ->setMethods(array('load')) - ->getMockForAbstractClass(); - $data = array('foo' => 'bar'); - $loader->expects($this->exactly(2)) - ->method('load') - ->will($this->returnValue($data)); - $cache = new CachingConfigLoader($loader, $cache); - $this->assertEquals($data, $cache->load(array())); - $this->assertEquals($data, $cache->load(array())); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/ClientTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/ClientTest.php deleted file mode 100644 index 6ca92cd13..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/ClientTest.php +++ /dev/null @@ -1,307 +0,0 @@ -serviceTest = new ServiceDescription(array( - 'test_command' => new Operation(array( - 'doc' => 'documentationForCommand', - 'method' => 'DELETE', - 'class' => 'Guzzle\\Tests\\Service\\Mock\\Command\\MockCommand', - 'args' => array( - 'bucket' => array( - 'required' => true - ), - 'key' => array( - 'required' => true - ) - ) - )) - )); - - $this->service = ServiceDescription::factory(__DIR__ . '/../TestData/test_service.json'); - } - - public function testAllowsCustomClientParameters() - { - $client = new Mock\MockClient(null, array( - Client::COMMAND_PARAMS => array(AbstractCommand::RESPONSE_PROCESSING => 'foo') - )); - $command = $client->getCommand('mock_command'); - $this->assertEquals('foo', $command->get(AbstractCommand::RESPONSE_PROCESSING)); - } - - public function testFactoryCreatesClient() - { - $client = Client::factory(array( - 'base_url' => 'http://www.test.com/', - 'test' => '123' - )); - - $this->assertEquals('http://www.test.com/', $client->getBaseUrl()); - $this->assertEquals('123', $client->getConfig('test')); - } - - public function testFactoryDoesNotRequireBaseUrl() - { - $client = Client::factory(); - } - - public function testDescribesEvents() - { - $this->assertInternalType('array', Client::getAllEvents()); - } - - public function testExecutesCommands() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - - $client = new Client($this->getServer()->getUrl()); - $cmd = new MockCommand(); - $client->execute($cmd); - - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $cmd->getResponse()); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $cmd->getResult()); - $this->assertEquals(1, count($this->getServer()->getReceivedRequests(false))); - } - - public function testExecutesCommandsWithArray() - { - $client = new Client('http://www.test.com/'); - $client->getEventDispatcher()->addSubscriber(new MockPlugin(array( - new Response(200), - new Response(200) - ))); - - // Create a command set and a command - $set = array(new MockCommand(), new MockCommand()); - $client->execute($set); - - // Make sure it sent - $this->assertTrue($set[0]->isExecuted()); - $this->assertTrue($set[1]->isExecuted()); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testThrowsExceptionWhenInvalidCommandIsExecuted() - { - $client = new Client(); - $client->execute(new \stdClass()); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testThrowsExceptionWhenMissingCommand() - { - $client = new Client(); - - $mock = $this->getMock('Guzzle\\Service\\Command\\Factory\\FactoryInterface'); - $mock->expects($this->any()) - ->method('factory') - ->with($this->equalTo('test')) - ->will($this->returnValue(null)); - - $client->setCommandFactory($mock); - $client->getCommand('test'); - } - - public function testCreatesCommandsUsingCommandFactory() - { - $mockCommand = new MockCommand(); - - $client = new Mock\MockClient(); - $mock = $this->getMock('Guzzle\\Service\\Command\\Factory\\FactoryInterface'); - $mock->expects($this->any()) - ->method('factory') - ->with($this->equalTo('foo')) - ->will($this->returnValue($mockCommand)); - - $client->setCommandFactory($mock); - - $command = $client->getCommand('foo', array('acl' => '123')); - $this->assertSame($mockCommand, $command); - $command = $client->getCommand('foo', array('acl' => '123')); - $this->assertSame($mockCommand, $command); - $this->assertSame($client, $command->getClient()); - } - - public function testOwnsServiceDescription() - { - $client = new Mock\MockClient(); - $this->assertNull($client->getDescription()); - - $description = $this->getMock('Guzzle\\Service\\Description\\ServiceDescription'); - $this->assertSame($client, $client->setDescription($description)); - $this->assertSame($description, $client->getDescription()); - } - - public function testOwnsResourceIteratorFactory() - { - $client = new Mock\MockClient(); - - $method = new \ReflectionMethod($client, 'getResourceIteratorFactory'); - $method->setAccessible(TRUE); - $rf1 = $method->invoke($client); - - $rf = $this->readAttribute($client, 'resourceIteratorFactory'); - $this->assertInstanceOf('Guzzle\\Service\\Resource\\ResourceIteratorClassFactory', $rf); - $this->assertSame($rf1, $rf); - - $rf = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock'); - $client->setResourceIteratorFactory($rf); - $this->assertNotSame($rf1, $rf); - } - - public function testClientResetsRequestsBeforeExecutingCommands() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nHi", - "HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\nI" - )); - - $client = new Mock\MockClient($this->getServer()->getUrl()); - - $command = $client->getCommand('mock_command'); - $client->execute($command); - $client->execute($command); - $this->assertEquals('I', $command->getResponse()->getBody(true)); - } - - public function testClientCreatesIterators() - { - $client = new Mock\MockClient(); - - $iterator = $client->getIterator('mock_command', array( - 'foo' => 'bar' - ), array( - 'limit' => 10 - )); - - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - $this->assertEquals(10, $this->readAttribute($iterator, 'limit')); - - $command = $this->readAttribute($iterator, 'originalCommand'); - $this->assertEquals('bar', $command->get('foo')); - } - - public function testClientCreatesIteratorsWithNoOptions() - { - $client = new Mock\MockClient(); - $iterator = $client->getIterator('mock_command'); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - } - - public function testClientCreatesIteratorsWithCommands() - { - $client = new Mock\MockClient(); - $command = new MockCommand(); - $iterator = $client->getIterator($command); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - $iteratorCommand = $this->readAttribute($iterator, 'originalCommand'); - $this->assertSame($command, $iteratorCommand); - } - - public function testClientHoldsInflector() - { - $client = new Mock\MockClient(); - $this->assertInstanceOf('Guzzle\Inflection\MemoizingInflector', $client->getInflector()); - - $inflector = new Inflector(); - $client->setInflector($inflector); - $this->assertSame($inflector, $client->getInflector()); - } - - public function testClientAddsGlobalCommandOptions() - { - $client = new Mock\MockClient('http://www.foo.com', array( - Client::COMMAND_PARAMS => array( - 'mesa' => 'bar' - ) - )); - $command = $client->getCommand('mock_command'); - $this->assertEquals('bar', $command->get('mesa')); - } - - public function testSupportsServiceDescriptionBaseUrls() - { - $description = new ServiceDescription(array('baseUrl' => 'http://foo.com')); - $client = new Client(); - $client->setDescription($description); - $this->assertEquals('http://foo.com', $client->getBaseUrl()); - } - - public function testMergesDefaultCommandParamsCorrectly() - { - $client = new Mock\MockClient('http://www.foo.com', array( - Client::COMMAND_PARAMS => array( - 'mesa' => 'bar', - 'jar' => 'jar' - ) - )); - $command = $client->getCommand('mock_command', array('jar' => 'test')); - $this->assertEquals('bar', $command->get('mesa')); - $this->assertEquals('test', $command->get('jar')); - } - - /** - * @expectedException \Guzzle\Http\Exception\BadResponseException - */ - public function testWrapsSingleCommandExceptions() - { - $client = new Mock\MockClient('http://foobaz.com'); - $mock = new MockPlugin(array(new Response(401))); - $client->addSubscriber($mock); - $client->execute(new MockCommand()); - } - - public function testWrapsMultipleCommandExceptions() - { - $client = new Mock\MockClient('http://foobaz.com'); - $mock = new MockPlugin(array(new Response(200), new Response(200), new Response(404), new Response(500))); - $client->addSubscriber($mock); - - $cmds = array(new MockCommand(), new MockCommand(), new MockCommand(), new MockCommand()); - try { - $client->execute($cmds); - } catch (CommandTransferException $e) { - $this->assertEquals(2, count($e->getFailedRequests())); - $this->assertEquals(2, count($e->getSuccessfulRequests())); - $this->assertEquals(2, count($e->getFailedCommands())); - $this->assertEquals(2, count($e->getSuccessfulCommands())); - - foreach ($e->getSuccessfulCommands() as $c) { - $this->assertTrue($c->getResponse()->isSuccessful()); - } - - foreach ($e->getFailedCommands() as $c) { - $this->assertFalse($c->getRequest()->getResponse()->isSuccessful()); - } - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/AbstractCommandTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/AbstractCommandTest.php deleted file mode 100644 index 1004fae66..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/AbstractCommandTest.php +++ /dev/null @@ -1,16 +0,0 @@ -setDescription(ServiceDescription::factory(__DIR__ . '/../../TestData/test_service.json')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/ClosureCommandTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/ClosureCommandTest.php deleted file mode 100644 index d76224697..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/ClosureCommandTest.php +++ /dev/null @@ -1,54 +0,0 @@ - function($command, $api) { - $command->set('testing', '123'); - $request = RequestFactory::getInstance()->create('GET', 'http://www.test.com/'); - return $request; - } - )); - - $client = $this->getServiceBuilder()->get('mock'); - $c->setClient($client)->prepare(); - $this->assertEquals('123', $c->get('testing')); - $this->assertEquals('http://www.test.com/', $c->getRequest()->getUrl()); - } - - /** - * @expectedException UnexpectedValueException - * @expectedExceptionMessage Closure command did not return a RequestInterface object - */ - public function testMustReturnRequest() - { - $c = new ClosureCommand(array( - 'closure' => function($command, $api) { - return false; - } - )); - - $client = $this->getServiceBuilder()->get('mock'); - $c->setClient($client)->prepare(); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/CommandTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/CommandTest.php deleted file mode 100644 index 1b95ac3b8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/CommandTest.php +++ /dev/null @@ -1,437 +0,0 @@ -assertEquals('123', $command->get('test')); - $this->assertFalse($command->isPrepared()); - $this->assertFalse($command->isExecuted()); - } - - public function testDeterminesShortName() - { - $api = new Operation(array('name' => 'foobar')); - $command = new MockCommand(array(), $api); - $this->assertEquals('foobar', $command->getName()); - - $command = new MockCommand(); - $this->assertEquals('mock_command', $command->getName()); - - $command = new Sub(); - $this->assertEquals('sub.sub', $command->getName()); - } - - /** - * @expectedException RuntimeException - */ - public function testGetRequestThrowsExceptionBeforePreparation() - { - $command = new MockCommand(); - $command->getRequest(); - } - - public function testGetResponseExecutesCommandsWhenNeeded() - { - $response = new Response(200); - $client = $this->getClient(); - $this->setMockResponse($client, array($response)); - $command = new MockCommand(); - $command->setClient($client); - $this->assertSame($response, $command->getResponse()); - $this->assertSame($response, $command->getResponse()); - } - - public function testGetResultExecutesCommandsWhenNeeded() - { - $response = new Response(200); - $client = $this->getClient(); - $this->setMockResponse($client, array($response)); - $command = new MockCommand(); - $command->setClient($client); - $this->assertSame($response, $command->getResult()); - $this->assertSame($response, $command->getResult()); - } - - public function testSetClient() - { - $command = new MockCommand(); - $client = $this->getClient(); - - $command->setClient($client); - $this->assertEquals($client, $command->getClient()); - - unset($client); - unset($command); - - $command = new MockCommand(); - $client = $this->getClient(); - - $command->setClient($client)->prepare(); - $this->assertEquals($client, $command->getClient()); - $this->assertTrue($command->isPrepared()); - } - - public function testExecute() - { - $client = $this->getClient(); - $response = new Response(200, array( - 'Content-Type' => 'application/xml' - ), '123'); - $this->setMockResponse($client, array($response)); - $command = new MockCommand(); - $this->assertSame($command, $command->setClient($client)); - - // Returns the result of the command - $this->assertInstanceOf('SimpleXMLElement', $command->execute()); - - $this->assertTrue($command->isPrepared()); - $this->assertTrue($command->isExecuted()); - $this->assertSame($response, $command->getResponse()); - $this->assertInstanceOf('Guzzle\\Http\\Message\\Request', $command->getRequest()); - // Make sure that the result was automatically set to a SimpleXMLElement - $this->assertInstanceOf('SimpleXMLElement', $command->getResult()); - $this->assertEquals('123', (string) $command->getResult()->data); - } - - public function testConvertsJsonResponsesToArray() - { - $client = $this->getClient(); - $this->setMockResponse($client, array( - new \Guzzle\Http\Message\Response(200, array( - 'Content-Type' => 'application/json' - ), '{ "key": "Hi!" }' - ) - )); - $command = new MockCommand(); - $command->setClient($client); - $command->execute(); - $this->assertEquals(array( - 'key' => 'Hi!' - ), $command->getResult()); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - */ - public function testConvertsInvalidJsonResponsesToArray() - { - $client = $this->getClient(); - $this->setMockResponse($client, array( - new \Guzzle\Http\Message\Response(200, array( - 'Content-Type' => 'application/json' - ), '{ "key": "Hi!" }invalid' - ) - )); - $command = new MockCommand(); - $command->setClient($client); - $command->execute(); - } - - public function testProcessResponseIsNotXml() - { - $client = $this->getClient(); - $this->setMockResponse($client, array( - new Response(200, array( - 'Content-Type' => 'application/octet-stream' - ), 'abc,def,ghi') - )); - $command = new MockCommand(); - $client->execute($command); - - // Make sure that the result was not converted to XML - $this->assertFalse($command->getResult() instanceof \SimpleXMLElement); - } - - /** - * @expectedException RuntimeException - */ - public function testExecuteThrowsExceptionWhenNoClientIsSet() - { - $command = new MockCommand(); - $command->execute(); - } - - /** - * @expectedException RuntimeException - */ - public function testPrepareThrowsExceptionWhenNoClientIsSet() - { - $command = new MockCommand(); - $command->prepare(); - } - - public function testCommandsAllowsCustomRequestHeaders() - { - $command = new MockCommand(); - $command->getRequestHeaders()->set('test', '123'); - $this->assertInstanceOf('Guzzle\Common\Collection', $command->getRequestHeaders()); - $this->assertEquals('123', $command->getRequestHeaders()->get('test')); - - $command->setClient($this->getClient())->prepare(); - $this->assertEquals('123', (string) $command->getRequest()->getHeader('test')); - } - - public function testCommandsAllowsCustomRequestHeadersAsArray() - { - $command = new MockCommand(array(AbstractCommand::HEADERS_OPTION => array('Foo' => 'Bar'))); - $this->assertInstanceOf('Guzzle\Common\Collection', $command->getRequestHeaders()); - $this->assertEquals('Bar', $command->getRequestHeaders()->get('Foo')); - } - - private function getOperation() - { - return new Operation(array( - 'name' => 'foobar', - 'httpMethod' => 'POST', - 'class' => 'Guzzle\\Tests\\Service\\Mock\\Command\\MockCommand', - 'parameters' => array( - 'test' => array( - 'default' => '123', - 'type' => 'string' - ) - ))); - } - - public function testCommandsUsesOperation() - { - $api = $this->getOperation(); - $command = new MockCommand(array(), $api); - $this->assertSame($api, $command->getOperation()); - $command->setClient($this->getClient())->prepare(); - $this->assertEquals('123', $command->get('test')); - $this->assertSame($api, $command->getOperation($api)); - } - - public function testCloneMakesNewRequest() - { - $client = $this->getClient(); - $command = new MockCommand(array(), $this->getOperation()); - $command->setClient($client); - - $command->prepare(); - $this->assertTrue($command->isPrepared()); - - $command2 = clone $command; - $this->assertFalse($command2->isPrepared()); - } - - public function testHasOnCompleteMethod() - { - $that = $this; - $called = 0; - - $testFunction = function($command) use (&$called, $that) { - $called++; - $that->assertInstanceOf('Guzzle\Service\Command\CommandInterface', $command); - }; - - $client = $this->getClient(); - $command = new MockCommand(array( - 'command.on_complete' => $testFunction - ), $this->getOperation()); - $command->setClient($client); - - $command->prepare()->setResponse(new Response(200), true); - $command->execute(); - $this->assertEquals(1, $called); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testOnCompleteMustBeCallable() - { - $client = $this->getClient(); - $command = new MockCommand(); - $command->setOnComplete('foo'); - } - - public function testCanSetResultManually() - { - $client = $this->getClient(); - $client->getEventDispatcher()->addSubscriber(new MockPlugin(array( - new Response(200) - ))); - $command = new MockCommand(); - $client->execute($command); - $command->setResult('foo!'); - $this->assertEquals('foo!', $command->getResult()); - } - - public function testCanInitConfig() - { - $command = $this->getMockBuilder('Guzzle\\Service\\Command\\AbstractCommand') - ->setConstructorArgs(array(array( - 'foo' => 'bar' - ), new Operation(array( - 'parameters' => array( - 'baz' => new Parameter(array( - 'default' => 'baaar' - )) - ) - )))) - ->getMockForAbstractClass(); - - $this->assertEquals('bar', $command['foo']); - $this->assertEquals('baaar', $command['baz']); - } - - public function testAddsCurlOptionsToRequestsWhenPreparing() - { - $command = new MockCommand(array( - 'foo' => 'bar', - 'curl.options' => array('CURLOPT_PROXYPORT' => 8080) - )); - $client = new Client(); - $command->setClient($client); - $request = $command->prepare(); - $this->assertEquals(8080, $request->getCurlOptions()->get(CURLOPT_PROXYPORT)); - } - - public function testIsInvokable() - { - $client = $this->getClient(); - $response = new Response(200); - $this->setMockResponse($client, array($response)); - $command = new MockCommand(); - $command->setClient($client); - // Returns the result of the command - $this->assertSame($response, $command()); - } - - public function testCreatesDefaultOperation() - { - $command = $this->getMockBuilder('Guzzle\Service\Command\AbstractCommand')->getMockForAbstractClass(); - $this->assertInstanceOf('Guzzle\Service\Description\Operation', $command->getOperation()); - } - - public function testAllowsValidatorToBeInjected() - { - $command = $this->getMockBuilder('Guzzle\Service\Command\AbstractCommand')->getMockForAbstractClass(); - $v = new SchemaValidator(); - $command->setValidator($v); - $this->assertSame($v, $this->readAttribute($command, 'validator')); - } - - public function testCanDisableValidation() - { - $command = new MockCommand(); - $command->setClient(new \Guzzle\Service\Client()); - $v = $this->getMockBuilder('Guzzle\Service\Description\SchemaValidator') - ->setMethods(array('validate')) - ->getMock(); - $v->expects($this->never())->method('validate'); - $command->setValidator($v); - $command->set(AbstractCommand::DISABLE_VALIDATION, true); - $command->prepare(); - } - - public function testValidatorDoesNotUpdateNonDefaultValues() - { - $command = new MockCommand(array('test' => 123, 'foo' => 'bar')); - $command->setClient(new \Guzzle\Service\Client()); - $command->prepare(); - $this->assertEquals(123, $command->get('test')); - $this->assertEquals('bar', $command->get('foo')); - } - - public function testValidatorUpdatesDefaultValues() - { - $command = new MockCommand(); - $command->setClient(new \Guzzle\Service\Client()); - $command->prepare(); - $this->assertEquals(123, $command->get('test')); - $this->assertEquals('abc', $command->get('_internal')); - } - - /** - * @expectedException \Guzzle\Service\Exception\ValidationException - * @expectedExceptionMessage [Foo] Baz - */ - public function testValidatesCommandBeforeSending() - { - $command = new MockCommand(); - $command->setClient(new \Guzzle\Service\Client()); - $v = $this->getMockBuilder('Guzzle\Service\Description\SchemaValidator') - ->setMethods(array('validate', 'getErrors')) - ->getMock(); - $v->expects($this->any())->method('validate')->will($this->returnValue(false)); - $v->expects($this->any())->method('getErrors')->will($this->returnValue(array('[Foo] Baz', '[Bar] Boo'))); - $command->setValidator($v); - $command->prepare(); - } - - /** - * @expectedException \Guzzle\Service\Exception\ValidationException - * @expectedExceptionMessage Validation errors: [abc] must be of type string - */ - public function testValidatesAdditionalParameters() - { - $description = ServiceDescription::factory(array( - 'operations' => array( - 'foo' => array( - 'parameters' => array( - 'baz' => array('type' => 'integer') - ), - 'additionalParameters' => array( - 'type' => 'string' - ) - ) - ) - )); - - $client = new Client(); - $client->setDescription($description); - $command = $client->getCommand('foo', array( - 'abc' => false, - 'command.headers' => array('foo' => 'bar') - )); - $command->prepare(); - } - - public function testCanAccessValidationErrorsFromCommand() - { - $validationErrors = array('[Foo] Baz', '[Bar] Boo'); - $command = new MockCommand(); - $command->setClient(new \Guzzle\Service\Client()); - - $this->assertFalse($command->getValidationErrors()); - - $v = $this->getMockBuilder('Guzzle\Service\Description\SchemaValidator') - ->setMethods(array('validate', 'getErrors')) - ->getMock(); - $v->expects($this->any())->method('getErrors')->will($this->returnValue($validationErrors)); - $command->setValidator($v); - - $this->assertEquals($validationErrors, $command->getValidationErrors()); - } - - public function testCanChangeResponseBody() - { - $body = EntityBody::factory(); - $command = new MockCommand(); - $command->setClient(new \Guzzle\Service\Client()); - $command->set(AbstractCommand::RESPONSE_BODY, $body); - $request = $command->prepare(); - $this->assertSame($body, $this->readAttribute($request, 'responseBody')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/DefaultRequestSerializerTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/DefaultRequestSerializerTest.php deleted file mode 100644 index b7a4682fc..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/DefaultRequestSerializerTest.php +++ /dev/null @@ -1,122 +0,0 @@ -serializer = DefaultRequestSerializer::getInstance(); - $this->client = new Client('http://foo.com/baz'); - $this->operation = new Operation(array('httpMethod' => 'POST')); - $this->command = $this->getMockBuilder('Guzzle\Service\Command\AbstractCommand') - ->setConstructorArgs(array(array(), $this->operation)) - ->getMockForAbstractClass(); - $this->command->setClient($this->client); - } - - public function testAllowsCustomVisitor() - { - $this->serializer->addVisitor('custom', new HeaderVisitor()); - $this->command['test'] = '123'; - $this->operation->addParam(new Parameter(array('name' => 'test', 'location' => 'custom'))); - $request = $this->serializer->prepare($this->command); - $this->assertEquals('123', (string) $request->getHeader('test')); - } - - public function testUsesRelativePath() - { - $this->operation->setUri('bar'); - $request = $this->serializer->prepare($this->command); - $this->assertEquals('http://foo.com/baz/bar', (string) $request->getUrl()); - } - - public function testUsesRelativePathWithUriLocations() - { - $this->command['test'] = '123'; - $this->operation->setUri('bar/{test}'); - $this->operation->addParam(new Parameter(array('name' => 'test', 'location' => 'uri'))); - $request = $this->serializer->prepare($this->command); - $this->assertEquals('http://foo.com/baz/bar/123', (string) $request->getUrl()); - } - - public function testAllowsCustomFactory() - { - $f = new VisitorFlyweight(); - $serializer = new DefaultRequestSerializer($f); - $this->assertSame($f, $this->readAttribute($serializer, 'factory')); - } - - public function testMixedParams() - { - $this->operation->setUri('bar{?limit,fields}'); - $this->operation->addParam(new Parameter(array( - 'name' => 'limit', - 'location' => 'uri', - 'required' => false, - ))); - $this->operation->addParam(new Parameter(array( - 'name' => 'fields', - 'location' => 'uri', - 'required' => true, - ))); - - $this->command['fields'] = array('id', 'name'); - - $request = $this->serializer->prepare($this->command); - $this->assertEquals('http://foo.com/baz/bar?fields='.urlencode('id,name'), (string) $request->getUrl()); - } - - public function testValidatesAdditionalParameters() - { - $description = ServiceDescription::factory(array( - 'operations' => array( - 'foo' => array( - 'httpMethod' => 'PUT', - 'parameters' => array( - 'bar' => array('location' => 'header') - ), - 'additionalParameters' => array( - 'location' => 'json' - ) - ) - ) - )); - - $client = new Client(); - $client->setDescription($description); - $command = $client->getCommand('foo'); - $command['bar'] = 'test'; - $command['hello'] = 'abc'; - $request = $command->prepare(); - $this->assertEquals('test', (string) $request->getHeader('bar')); - $this->assertEquals('{"hello":"abc"}', (string) $request->getBody()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/DefaultResponseParserTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/DefaultResponseParserTest.php deleted file mode 100644 index a6a02f951..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/DefaultResponseParserTest.php +++ /dev/null @@ -1,59 +0,0 @@ -setClient(new Client()); - $request = $op->prepare(); - $request->setResponse(new Response(200, array( - 'Content-Type' => 'application/xml' - ), 'Bar'), true); - $this->assertInstanceOf('SimpleXMLElement', $op->execute()); - } - - public function testParsesJsonResponses() - { - $op = new OperationCommand(array(), new Operation()); - $op->setClient(new Client()); - $request = $op->prepare(); - $request->setResponse(new Response(200, array( - 'Content-Type' => 'application/json' - ), '{"Baz":"Bar"}'), true); - $this->assertEquals(array('Baz' => 'Bar'), $op->execute()); - } - - /** - * @expectedException \Guzzle\Common\Exception\RuntimeException - */ - public function testThrowsExceptionWhenParsingJsonFails() - { - $op = new OperationCommand(array(), new Operation()); - $op->setClient(new Client()); - $request = $op->prepare(); - $request->setResponse(new Response(200, array('Content-Type' => 'application/json'), '{"Baz":ddw}'), true); - $op->execute(); - } - - public function testAddsContentTypeWhenExpectsIsSetOnCommand() - { - $op = new OperationCommand(array(), new Operation()); - $op['command.expects'] = 'application/json'; - $op->setClient(new Client()); - $request = $op->prepare(); - $request->setResponse(new Response(200, null, '{"Baz":"Bar"}'), true); - $this->assertEquals(array('Baz' => 'Bar'), $op->execute()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/AliasFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/AliasFactoryTest.php deleted file mode 100644 index ab1041ad3..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/AliasFactoryTest.php +++ /dev/null @@ -1,76 +0,0 @@ -client = new Client(); - - $map = new MapFactory(array( - 'test' => 'Guzzle\Tests\Service\Mock\Command\MockCommand', - 'test1' => 'Guzzle\Tests\Service\Mock\Command\OtherCommand' - )); - - $this->factory = new AliasFactory($this->client, array( - 'foo' => 'test', - 'bar' => 'sub', - 'sub' => 'test1', - 'krull' => 'test3', - 'krull_2' => 'krull', - 'sub_2' => 'bar', - 'bad_link' => 'jarjar' - )); - - $map2 = new MapFactory(array( - 'test3' => 'Guzzle\Tests\Service\Mock\Command\Sub\Sub' - )); - - $this->client->setCommandFactory(new CompositeFactory(array($map, $this->factory, $map2))); - } - - public function aliasProvider() - { - return array( - array('foo', 'Guzzle\Tests\Service\Mock\Command\MockCommand', false), - array('bar', 'Guzzle\Tests\Service\Mock\Command\OtherCommand', false), - array('sub', 'Guzzle\Tests\Service\Mock\Command\OtherCommand', false), - array('sub_2', 'Guzzle\Tests\Service\Mock\Command\OtherCommand', false), - array('krull', 'Guzzle\Tests\Service\Mock\Command\Sub\Sub', false), - array('krull_2', 'Guzzle\Tests\Service\Mock\Command\Sub\Sub', false), - array('missing', null, true), - array('bad_link', null, true) - ); - } - - /** - * @dataProvider aliasProvider - */ - public function testAliasesCommands($key, $result, $exception) - { - try { - $command = $this->client->getCommand($key); - if (is_null($result)) { - $this->assertNull($command); - } else { - $this->assertInstanceof($result, $command); - } - } catch (\Exception $e) { - if (!$exception) { - $this->fail('Got exception when it was not expected'); - } - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/CompositeFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/CompositeFactoryTest.php deleted file mode 100644 index b896dcfd6..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/CompositeFactoryTest.php +++ /dev/null @@ -1,124 +0,0 @@ -getMockBuilder($class) - ->disableOriginalConstructor() - ->getMock(); - } - - public function testIsIterable() - { - $factory = new CompositeFactory(array($this->getFactory(), $this->getFactory())); - $this->assertEquals(2, count($factory)); - $this->assertEquals(2, count(iterator_to_array($factory->getIterator()))); - } - - public function testFindsFactories() - { - $f1 = $this->getFactory(); - $f2 = $this->getFactory('Guzzle\\Service\\Command\\Factory\\CompositeFactory'); - $factory = new CompositeFactory(array($f1, $f2)); - $this->assertNull($factory->find('foo')); - $this->assertNull($factory->find($this->getFactory())); - $this->assertSame($f1, $factory->find('Guzzle\\Service\\Command\\Factory\\MapFactory')); - $this->assertSame($f2, $factory->find('Guzzle\\Service\\Command\\Factory\\CompositeFactory')); - $this->assertSame($f1, $factory->find($f1)); - $this->assertSame($f2, $factory->find($f2)); - - $this->assertFalse($factory->has('foo')); - $this->assertTrue($factory->has('Guzzle\\Service\\Command\\Factory\\MapFactory')); - $this->assertTrue($factory->has('Guzzle\\Service\\Command\\Factory\\CompositeFactory')); - } - - public function testCreatesCommands() - { - $factory = new CompositeFactory(); - $this->assertNull($factory->factory('foo')); - - $f1 = $this->getFactory(); - $mockCommand1 = $this->getMockForAbstractClass('Guzzle\\Service\\Command\\AbstractCommand'); - - $f1->expects($this->once()) - ->method('factory') - ->with($this->equalTo('foo')) - ->will($this->returnValue($mockCommand1)); - - $factory = new CompositeFactory(array($f1)); - $this->assertSame($mockCommand1, $factory->factory('foo')); - } - - public function testAllowsRemovalOfFactories() - { - $f1 = $this->getFactory(); - $f2 = $this->getFactory(); - $f3 = $this->getFactory('Guzzle\\Service\\Command\\Factory\\CompositeFactory'); - $factories = array($f1, $f2, $f3); - $factory = new CompositeFactory($factories); - - $factory->remove('foo'); - $this->assertEquals($factories, $factory->getIterator()->getArrayCopy()); - - $factory->remove($f1); - $this->assertEquals(array($f2, $f3), $factory->getIterator()->getArrayCopy()); - - $factory->remove('Guzzle\\Service\\Command\\Factory\\MapFactory'); - $this->assertEquals(array($f3), $factory->getIterator()->getArrayCopy()); - - $factory->remove('Guzzle\\Service\\Command\\Factory\\CompositeFactory'); - $this->assertEquals(array(), $factory->getIterator()->getArrayCopy()); - - $factory->remove('foo'); - $this->assertEquals(array(), $factory->getIterator()->getArrayCopy()); - } - - public function testAddsFactoriesBeforeAndAtEnd() - { - $f1 = $this->getFactory(); - $f2 = $this->getFactory(); - $f3 = $this->getFactory('Guzzle\\Service\\Command\\Factory\\CompositeFactory'); - $f4 = $this->getFactory(); - - $factory = new CompositeFactory(); - - $factory->add($f1); - $this->assertEquals(array($f1), $factory->getIterator()->getArrayCopy()); - - $factory->add($f2); - $this->assertEquals(array($f1, $f2), $factory->getIterator()->getArrayCopy()); - - $factory->add($f3, $f2); - $this->assertEquals(array($f1, $f3, $f2), $factory->getIterator()->getArrayCopy()); - - $factory->add($f4, 'Guzzle\\Service\\Command\\Factory\\CompositeFactory'); - $this->assertEquals(array($f1, $f4, $f3, $f2), $factory->getIterator()->getArrayCopy()); - } - - public function testProvidesDefaultChainForClients() - { - $client = $this->getMock('Guzzle\\Service\\Client'); - $chain = CompositeFactory::getDefaultChain($client); - $a = $chain->getIterator()->getArrayCopy(); - $this->assertEquals(1, count($a)); - $this->assertInstanceOf('Guzzle\\Service\\Command\\Factory\\ConcreteClassFactory', $a[0]); - - $description = $this->getMock('Guzzle\\Service\\Description\\ServiceDescription'); - $client->expects($this->once()) - ->method('getDescription') - ->will($this->returnValue($description)); - $chain = CompositeFactory::getDefaultChain($client); - $a = $chain->getIterator()->getArrayCopy(); - $this->assertEquals(2, count($a)); - $this->assertInstanceOf('Guzzle\\Service\\Command\\Factory\\ServiceDescriptionFactory', $a[0]); - $this->assertInstanceOf('Guzzle\\Service\\Command\\Factory\\ConcreteClassFactory', $a[1]); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ConcreteClassFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ConcreteClassFactoryTest.php deleted file mode 100644 index 766471822..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ConcreteClassFactoryTest.php +++ /dev/null @@ -1,49 +0,0 @@ - $prefix - )); - } - - $factory = new ConcreteClassFactory($client); - - if (is_null($result)) { - $this->assertNull($factory->factory($key)); - } else { - $this->assertInstanceof($result, $factory->factory($key)); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/MapFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/MapFactoryTest.php deleted file mode 100644 index ee720d1e7..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/MapFactoryTest.php +++ /dev/null @@ -1,37 +0,0 @@ - 'Guzzle\Tests\Service\Mock\Command\MockCommand', - 'test1' => 'Guzzle\Tests\Service\Mock\Command\OtherCommand' - )); - - if (is_null($result)) { - $this->assertNull($factory->factory($key)); - } else { - $this->assertInstanceof($result, $factory->factory($key)); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ServiceDescriptionFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ServiceDescriptionFactoryTest.php deleted file mode 100644 index 337263481..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ServiceDescriptionFactoryTest.php +++ /dev/null @@ -1,68 +0,0 @@ -getDescription(); - - $factory = new ServiceDescriptionFactory($d); - $this->assertSame($d, $factory->getServiceDescription()); - - if (is_null($result)) { - $this->assertNull($factory->factory($key)); - } else { - $this->assertInstanceof($result, $factory->factory($key)); - } - } - - public function testUsesUcFirstIfNoExactMatch() - { - $d = $this->getDescription(); - $factory = new ServiceDescriptionFactory($d, new Inflector()); - $this->assertInstanceof('Guzzle\Tests\Service\Mock\Command\OtherCommand', $factory->factory('Test')); - $this->assertInstanceof('Guzzle\Tests\Service\Mock\Command\OtherCommand', $factory->factory('test')); - } - - public function testUsesInflectionIfNoExactMatch() - { - $d = $this->getDescription(); - $factory = new ServiceDescriptionFactory($d, new Inflector()); - $this->assertInstanceof('Guzzle\Tests\Service\Mock\Command\OtherCommand', $factory->factory('Binks')); - $this->assertInstanceof('Guzzle\Tests\Service\Mock\Command\OtherCommand', $factory->factory('binks')); - $this->assertInstanceof('Guzzle\Tests\Service\Mock\Command\MockCommand', $factory->factory('JarJar')); - $this->assertInstanceof('Guzzle\Tests\Service\Mock\Command\MockCommand', $factory->factory('jar_jar')); - } - - protected function getDescription() - { - return ServiceDescription::factory(array( - 'operations' => array( - 'jar_jar' => array('class' => 'Guzzle\Tests\Service\Mock\Command\MockCommand'), - 'binks' => array('class' => 'Guzzle\Tests\Service\Mock\Command\OtherCommand'), - 'Test' => array('class' => 'Guzzle\Tests\Service\Mock\Command\OtherCommand') - ) - )); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/AbstractVisitorTestCase.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/AbstractVisitorTestCase.php deleted file mode 100644 index 46b472eb5..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/AbstractVisitorTestCase.php +++ /dev/null @@ -1,110 +0,0 @@ -command = new MockCommand(); - $this->request = new EntityEnclosingRequest('POST', 'http://www.test.com/some/path.php'); - $this->validator = new SchemaValidator(); - } - - protected function getCommand($location) - { - $command = new OperationCommand(array(), $this->getNestedCommand($location)); - $command->setClient(new MockClient()); - - return $command; - } - - protected function getNestedCommand($location) - { - return new Operation(array( - 'httpMethod' => 'POST', - 'parameters' => array( - 'foo' => new Parameter(array( - 'type' => 'object', - 'location' => $location, - 'sentAs' => 'Foo', - 'required' => true, - 'properties' => array( - 'test' => array( - 'type' => 'object', - 'required' => true, - 'properties' => array( - 'baz' => array( - 'type' => 'boolean', - 'default' => true - ), - 'jenga' => array( - 'type' => 'string', - 'default' => 'hello', - 'sentAs' => 'Jenga_Yall!', - 'filters' => array('strtoupper') - ) - ) - ), - 'bar' => array('default' => 123) - ), - 'additionalProperties' => array( - 'type' => 'string', - 'filters' => array('strtoupper'), - 'location' => $location - ) - )), - 'arr' => new Parameter(array( - 'type' => 'array', - 'location' => $location, - 'items' => array( - 'type' => 'string', - 'filters' => array('strtoupper') - ) - )), - ) - )); - } - - protected function getCommandWithArrayParamAndFilters() - { - $operation = new Operation(array( - 'httpMethod' => 'POST', - 'parameters' => array( - 'foo' => new Parameter(array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'Foo', - 'required' => true, - 'default' => 'bar', - 'filters' => array('strtoupper') - )), - 'arr' => new Parameter(array( - 'type' => 'array', - 'location' => 'query', - 'sentAs' => 'Arr', - 'required' => true, - 'default' => array(123, 456, 789), - 'filters' => array(array('method' => 'implode', 'args' => array(',', '@value'))) - )) - ) - )); - $command = new OperationCommand(array(), $operation); - $command->setClient(new MockClient()); - - return $command; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/BodyVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/BodyVisitorTest.php deleted file mode 100644 index 2a95c452a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/BodyVisitorTest.php +++ /dev/null @@ -1,63 +0,0 @@ -getNestedCommand('body')->getParam('foo')->setSentAs('Foo'); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertEquals('123', (string) $this->request->getBody()); - $this->assertNull($this->request->getHeader('Expect')); - } - - public function testAddsExpectHeaderWhenSetToTrue() - { - $visitor = new Visitor(); - $param = $this->getNestedCommand('body')->getParam('foo')->setSentAs('Foo'); - $param->setData('expect_header', true); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertEquals('123', (string) $this->request->getBody()); - } - - public function testCanDisableExpectHeader() - { - $visitor = new Visitor(); - $param = $this->getNestedCommand('body')->getParam('foo')->setSentAs('Foo'); - $param->setData('expect_header', false); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertNull($this->request->getHeader('Expect')); - } - - public function testCanSetExpectHeaderBasedOnSize() - { - $visitor = new Visitor(); - $param = $this->getNestedCommand('body')->getParam('foo')->setSentAs('Foo'); - // The body is less than the cutoff - $param->setData('expect_header', 5); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertNull($this->request->getHeader('Expect')); - // Now check when the body is greater than the cutoff - $param->setData('expect_header', 2); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertEquals('100-Continue', (string) $this->request->getHeader('Expect')); - } - - public function testAddsContentEncodingWhenSetOnBody() - { - $visitor = new Visitor(); - $param = $this->getNestedCommand('body')->getParam('foo')->setSentAs('Foo'); - $body = EntityBody::factory('foo'); - $body->compress(); - $visitor->visit($this->command, $this->request, $param, $body); - $this->assertEquals('gzip', (string) $this->request->getHeader('Content-Encoding')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/HeaderVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/HeaderVisitorTest.php deleted file mode 100644 index 7ea1ae913..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/HeaderVisitorTest.php +++ /dev/null @@ -1,48 +0,0 @@ -getNestedCommand('header')->getParam('foo')->setSentAs('test'); - $param->setAdditionalProperties(new Parameter(array())); - $visitor->visit($this->command, $this->request, $param, 'test'); - } - - public function testVisitsLocation() - { - $visitor = new Visitor(); - $param = $this->getNestedCommand('header')->getParam('foo')->setSentAs('test'); - $param->setAdditionalProperties(false); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertEquals('123', (string) $this->request->getHeader('test')); - } - - public function testVisitsMappedPrefixHeaders() - { - $visitor = new Visitor(); - $param = $this->getNestedCommand('header')->getParam('foo')->setSentAs('test'); - $param->setSentAs('x-foo-'); - $param->setAdditionalProperties(new Parameter(array( - 'type' => 'string' - ))); - $visitor->visit($this->command, $this->request, $param, array( - 'bar' => 'test', - 'baz' => '123' - )); - $this->assertEquals('test', (string) $this->request->getHeader('x-foo-bar')); - $this->assertEquals('123', (string) $this->request->getHeader('x-foo-baz')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/JsonVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/JsonVisitorTest.php deleted file mode 100644 index ea6782f53..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/JsonVisitorTest.php +++ /dev/null @@ -1,60 +0,0 @@ -after($this->command, $this->request); - - $param = $this->getNestedCommand('json')->getParam('foo'); - $visitor->visit($this->command, $this->request, $param->setSentAs('test'), '123'); - $visitor->visit($this->command, $this->request, $param->setSentAs('test2'), 'abc'); - $visitor->after($this->command, $this->request); - $this->assertEquals('{"test":"123","test2":"abc"}', (string) $this->request->getBody()); - } - - public function testAddsJsonHeader() - { - $visitor = new Visitor(); - $visitor->setContentTypeHeader('application/json-foo'); - $param = $this->getNestedCommand('json')->getParam('foo'); - $visitor->visit($this->command, $this->request, $param->setSentAs('test'), '123'); - $visitor->after($this->command, $this->request); - $this->assertEquals('application/json-foo', (string) $this->request->getHeader('Content-Type')); - } - - public function testRecursivelyBuildsJsonBodies() - { - $command = $this->getCommand('json'); - $request = $command->prepare(); - $this->assertEquals('{"Foo":{"test":{"baz":true,"Jenga_Yall!":"HELLO"},"bar":123}}', (string) $request->getBody()); - } - - public function testAppliesFiltersToAdditionalProperties() - { - $command = $this->getCommand('json'); - $command->set('foo', array('not_set' => 'abc')); - $request = $command->prepare(); - $result = json_decode($request->getBody(), true); - $this->assertEquals('ABC', $result['Foo']['not_set']); - } - - public function testAppliesFiltersToArrayItemValues() - { - $command = $this->getCommand('json'); - $command->set('arr', array('a', 'b')); - $request = $command->prepare(); - $result = json_decode($request->getBody(), true); - $this->assertEquals(array('A', 'B'), $result['arr']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFieldVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFieldVisitorTest.php deleted file mode 100644 index 540b41087..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFieldVisitorTest.php +++ /dev/null @@ -1,33 +0,0 @@ -getNestedCommand('postField')->getParam('foo'); - $visitor->visit($this->command, $this->request, $param->setSentAs('test'), '123'); - $this->assertEquals('123', (string) $this->request->getPostField('test')); - } - - public function testRecursivelyBuildsPostFields() - { - $command = $this->getCommand('postField'); - $request = $command->prepare(); - $visitor = new Visitor(); - $param = $command->getOperation()->getParam('foo'); - $visitor->visit($command, $request, $param, $command['foo']); - $visitor->after($command, $request); - $this->assertEquals( - 'Foo[test][baz]=1&Foo[test][Jenga_Yall!]=HELLO&Foo[bar]=123', - rawurldecode((string) $request->getPostFields()) - ); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFileVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFileVisitorTest.php deleted file mode 100644 index 21e3cec33..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFileVisitorTest.php +++ /dev/null @@ -1,54 +0,0 @@ -getNestedCommand('postFile')->getParam('foo'); - - // Test using a path to a file - $visitor->visit($this->command, $this->request, $param->setSentAs('test_3'), __FILE__); - $this->assertInternalType('array', $this->request->getPostFile('test_3')); - - // Test with a PostFile - $visitor->visit($this->command, $this->request, $param->setSentAs(null), new PostFile('baz', __FILE__)); - $this->assertInternalType('array', $this->request->getPostFile('baz')); - } - - public function testVisitsLocationWithMultipleFiles() - { - $description = ServiceDescription::factory(array( - 'operations' => array( - 'DoPost' => array( - 'httpMethod' => 'POST', - 'parameters' => array( - 'foo' => array( - 'location' => 'postFile', - 'type' => array('string', 'array') - ) - ) - ) - ) - )); - $this->getServer()->flush(); - $this->getServer()->enqueue(array("HTTP/1.1 200 OK\r\nContent-Length:0\r\n\r\n")); - $client = new Client($this->getServer()->getUrl()); - $client->setDescription($description); - $command = $client->getCommand('DoPost', array('foo' => array(__FILE__, __FILE__))); - $command->execute(); - $received = $this->getServer()->getReceivedRequests(); - $this->assertContains('name="foo[0]";', $received[0]); - $this->assertContains('name="foo[1]";', $received[0]); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/QueryVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/QueryVisitorTest.php deleted file mode 100644 index 607af7603..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/QueryVisitorTest.php +++ /dev/null @@ -1,48 +0,0 @@ -getNestedCommand('query')->getParam('foo')->setSentAs('test'); - $visitor->visit($this->command, $this->request, $param, '123'); - $this->assertEquals('123', $this->request->getQuery()->get('test')); - } - - /** - * @covers Guzzle\Service\Command\LocationVisitor\Request\QueryVisitor - * @covers Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::resolveRecursively - */ - public function testRecursivelyBuildsQueryStrings() - { - $command = $this->getCommand('query'); - $command->getOperation()->getParam('foo')->setSentAs('Foo'); - $request = $command->prepare(); - $this->assertEquals( - 'Foo[test][baz]=1&Foo[test][Jenga_Yall!]=HELLO&Foo[bar]=123', - rawurldecode($request->getQuery()) - ); - } - - /** - * @covers Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::resolveRecursively - */ - public function testFiltersAreAppliedToArrayParamType() - { - $command = $this->getCommandWithArrayParamAndFilters(); - $request = $command->prepare(); - $query = $request->getQuery(); - // param type 'string' - $this->assertEquals('BAR', $query->get('Foo')); - // param type 'array' - $this->assertEquals('123,456,789', $query->get('Arr')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/ResponseBodyVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/ResponseBodyVisitorTest.php deleted file mode 100644 index ff8cec599..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/ResponseBodyVisitorTest.php +++ /dev/null @@ -1,20 +0,0 @@ -getNestedCommand('response_body')->getParam('foo'); - $visitor->visit($this->command, $this->request, $param, sys_get_temp_dir() . '/foo.txt'); - $body = $this->readAttribute($this->request, 'responseBody'); - $this->assertContains('/foo.txt', $body->getUri()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/XmlVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/XmlVisitorTest.php deleted file mode 100644 index beb58b00a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/XmlVisitorTest.php +++ /dev/null @@ -1,558 +0,0 @@ - array( - 'xmlRoot' => array( - 'name' => 'test', - 'namespaces' => 'http://foo.com' - ) - ), - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string'), - 'Baz' => array('location' => 'xml', 'type' => 'string') - ) - ), - array('Foo' => 'test', 'Baz' => 'bar'), - 'testbar' - ), - // Ensure that the content-type is not added - array(array('parameters' => array('Foo' => array('location' => 'xml', 'type' => 'string'))), array(), ''), - // Test with adding attributes and no namespace - array( - array( - 'data' => array( - 'xmlRoot' => array( - 'name' => 'test' - ) - ), - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string', 'data' => array('xmlAttribute' => true)) - ) - ), - array('Foo' => 'test', 'Baz' => 'bar'), - '' - ), - // Test adding with an array - array( - array( - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string'), - 'Baz' => array( - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'type' => 'numeric', - 'sentAs' => 'Bar' - ) - ) - ) - ), - array('Foo' => 'test', 'Baz' => array(1, 2)), - 'test12' - ), - // Test adding an object - array( - array( - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string'), - 'Baz' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Bar' => array('type' => 'string'), - 'Bam' => array() - ) - ) - ) - ), - array('Foo' => 'test', 'Baz' => array('Bar' => 'abc', 'Bam' => 'foo')), - 'testabcfoo' - ), - // Add an array that contains an object - array( - array( - 'parameters' => array( - 'Baz' => array( - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'type' => 'object', - 'sentAs' => 'Bar', - 'properties' => array('A' => array(), 'B' => array()) - ) - ) - ) - ), - array('Baz' => array( - array('A' => '1', 'B' => '2'), - array('A' => '3', 'B' => '4') - )), - '1234' - ), - // Add an object of attributes - array( - array( - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string'), - 'Baz' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Bar' => array('type' => 'string', 'data' => array('xmlAttribute' => true)), - 'Bam' => array() - ) - ) - ) - ), - array('Foo' => 'test', 'Baz' => array('Bar' => 'abc', 'Bam' => 'foo')), - 'testfoo' - ), - // Check order doesn't matter - array( - array( - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string'), - 'Baz' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Bar' => array('type' => 'string', 'data' => array('xmlAttribute' => true)), - 'Bam' => array() - ) - ) - ) - ), - array('Foo' => 'test', 'Baz' => array('Bam' => 'foo', 'Bar' => 'abc')), - 'testfoo' - ), - // Add values with custom namespaces - array( - array( - 'parameters' => array( - 'Foo' => array( - 'location' => 'xml', - 'type' => 'string', - 'data' => array( - 'xmlNamespace' => 'http://foo.com' - ) - ) - ) - ), - array('Foo' => 'test'), - 'test' - ), - // Add attributes with custom namespace prefix - array( - array( - 'parameters' => array( - 'Wrap' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Foo' => array( - 'type' => 'string', - 'sentAs' => 'xsi:baz', - 'data' => array( - 'xmlNamespace' => 'http://foo.com', - 'xmlAttribute' => true - ) - ) - ) - ), - ) - ), - array('Wrap' => array( - 'Foo' => 'test' - )), - '' - ), - // Add nodes with custom namespace prefix - array( - array( - 'parameters' => array( - 'Wrap' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Foo' => array( - 'type' => 'string', - 'sentAs' => 'xsi:Foo', - 'data' => array( - 'xmlNamespace' => 'http://foobar.com' - ) - ) - ) - ), - ) - ), - array('Wrap' => array( - 'Foo' => 'test' - )), - 'test' - ), - array( - array( - 'parameters' => array( - 'Foo' => array( - 'location' => 'xml', - 'type' => 'string', - 'data' => array( - 'xmlNamespace' => 'http://foo.com' - ) - ) - ) - ), - array('Foo' => '

    This is a title

    '), - 'This is a title]]>' - ), - // Flat array at top level - array( - array( - 'parameters' => array( - 'Bars' => array( - 'type' => 'array', - 'data' => array('xmlFlattened' => true), - 'location' => 'xml', - 'items' => array( - 'type' => 'object', - 'sentAs' => 'Bar', - 'properties' => array( - 'A' => array(), - 'B' => array() - ) - ) - ), - 'Boos' => array( - 'type' => 'array', - 'data' => array('xmlFlattened' => true), - 'location' => 'xml', - 'items' => array( - 'sentAs' => 'Boo', - 'type' => 'string' - ) - ) - ) - ), - array( - 'Bars' => array( - array('A' => '1', 'B' => '2'), - array('A' => '3', 'B' => '4') - ), - 'Boos' => array('test', '123') - ), - '1234test123' - ), - // Nested flat arrays - array( - array( - 'parameters' => array( - 'Delete' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Items' => array( - 'type' => 'array', - 'data' => array('xmlFlattened' => true), - 'items' => array( - 'type' => 'object', - 'sentAs' => 'Item', - 'properties' => array( - 'A' => array(), - 'B' => array() - ) - ) - ) - ) - ) - ) - ), - array( - 'Delete' => array( - 'Items' => array( - array('A' => '1', 'B' => '2'), - array('A' => '3', 'B' => '4') - ) - ) - ), - '1234' - ) - ); - } - - /** - * @dataProvider xmlProvider - */ - public function testSerializesXml(array $operation, array $input, $xml) - { - $operation = new Operation($operation); - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array($input, $operation)) - ->getMockForAbstractClass(); - $command->setClient(new Client('http://www.test.com/some/path.php')); - $request = $command->prepare(); - if (!empty($input)) { - $this->assertEquals('application/xml', (string) $request->getHeader('Content-Type')); - } else { - $this->assertNull($request->getHeader('Content-Type')); - } - $body = str_replace(array("\n", ""), '', (string) $request->getBody()); - $this->assertEquals($xml, $body); - } - - public function testAddsContentTypeAndTopLevelValues() - { - $operation = new Operation(array( - 'data' => array( - 'xmlRoot' => array( - 'name' => 'test', - 'namespaces' => array( - 'xsi' => 'http://foo.com' - ) - ) - ), - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string'), - 'Baz' => array('location' => 'xml', 'type' => 'string') - ) - )); - - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array(array( - 'Foo' => 'test', - 'Baz' => 'bar' - ), $operation)) - ->getMockForAbstractClass(); - - $command->setClient(new Client()); - $request = $command->prepare(); - $this->assertEquals('application/xml', (string) $request->getHeader('Content-Type')); - $this->assertEquals( - '' . "\n" - . 'testbar' . "\n", - (string) $request->getBody() - ); - } - - public function testCanChangeContentType() - { - $visitor = new XmlVisitor(); - $visitor->setContentTypeHeader('application/foo'); - $this->assertEquals('application/foo', $this->readAttribute($visitor, 'contentType')); - } - - public function testCanAddArrayOfSimpleTypes() - { - $request = new EntityEnclosingRequest('POST', 'http://foo.com'); - $visitor = new XmlVisitor(); - $param = new Parameter(array( - 'type' => 'object', - 'location' => 'xml', - 'name' => 'Out', - 'properties' => array( - 'Nodes' => array( - 'required' => true, - 'type' => 'array', - 'min' => 1, - 'items' => array('type' => 'string', 'sentAs' => 'Node') - ) - ) - )); - - $param->setParent(new Operation(array( - 'data' => array( - 'xmlRoot' => array( - 'name' => 'Test', - 'namespaces' => array( - 'https://foo/' - ) - ) - ) - ))); - - $value = array('Nodes' => array('foo', 'baz')); - $this->assertTrue($this->validator->validate($param, $value)); - $visitor->visit($this->command, $request, $param, $value); - $visitor->after($this->command, $request); - - $this->assertEquals( - "\n" - . "foobaz\n", - (string) $request->getBody() - ); - } - - public function testCanAddMultipleNamespacesToRoot() - { - $operation = new Operation(array( - 'data' => array( - 'xmlRoot' => array( - 'name' => 'Hi', - 'namespaces' => array( - 'xsi' => 'http://foo.com', - 'foo' => 'http://foobar.com' - ) - ) - ), - 'parameters' => array( - 'Foo' => array('location' => 'xml', 'type' => 'string') - ) - )); - - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array(array( - 'Foo' => 'test' - ), $operation)) - ->getMockForAbstractClass(); - - $command->setClient(new Client()); - $request = $command->prepare(); - $this->assertEquals('application/xml', (string) $request->getHeader('Content-Type')); - $this->assertEquals( - '' . "\n" - . 'test' . "\n", - (string) $request->getBody() - ); - } - - public function testValuesAreFiltered() - { - $operation = new Operation(array( - 'parameters' => array( - 'Foo' => array( - 'location' => 'xml', - 'type' => 'string', - 'filters' => array('strtoupper') - ), - 'Bar' => array( - 'location' => 'xml', - 'type' => 'object', - 'properties' => array( - 'Baz' => array( - 'filters' => array('strtoupper') - ) - ) - ) - ) - )); - - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array(array( - 'Foo' => 'test', - 'Bar' => array( - 'Baz' => 'abc' - ) - ), $operation)) - ->getMockForAbstractClass(); - - $command->setClient(new Client()); - $request = $command->prepare(); - $this->assertEquals( - '' . "\n" - . 'TESTABC' . "\n", - (string) $request->getBody() - ); - } - - public function testSkipsNullValues() - { - $operation = new Operation(array( - 'parameters' => array( - 'Foo' => array( - 'location' => 'xml', - 'type' => 'string' - ), - 'Bar' => array( - 'location' => 'xml', - 'type' => 'object', - 'properties' => array( - 'Baz' => array(), - 'Bam' => array(), - ) - ), - 'Arr' => array( - 'type' => 'array', - 'items' => array( - 'type' => 'string' - ) - ) - ) - )); - - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array(array( - 'Foo' => null, - 'Bar' => array( - 'Bar' => null, - 'Bam' => 'test' - ), - 'Arr' => array(null) - ), $operation)) - ->getMockForAbstractClass(); - - $command->setClient(new Client()); - $request = $command->prepare(); - $this->assertEquals( - '' . "\n" - . 'test' . "\n", - (string) $request->getBody() - ); - } - - public function testAllowsXmlEncoding() - { - $operation = new Operation(array( - 'data' => array( - 'xmlEncoding' => 'UTF-8' - ), - 'parameters' => array( - 'Foo' => array('location' => 'xml') - ) - )); - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array(array('Foo' => 'test'), $operation)) - ->getMockForAbstractClass(); - $command->setClient(new Client()); - $request = $command->prepare(); - $this->assertEquals( - '' . "\n" - . 'test' . "\n", - (string) $request->getBody() - ); - } - - public function testAllowsSendingXmlPayloadIfNoXmlParamsWereSet() - { - $operation = new Operation(array( - 'httpMethod' => 'POST', - 'data' => array('xmlAllowEmpty' => true), - 'parameters' => array('Foo' => array('location' => 'xml')) - )); - $command = $this->getMockBuilder('Guzzle\Service\Command\OperationCommand') - ->setConstructorArgs(array(array(), $operation)) - ->getMockForAbstractClass(); - $command->setClient(new Client('http://foo.com')); - $request = $command->prepare(); - $this->assertEquals( - '' . "\n" - . '' . "\n", - (string) $request->getBody() - ); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/AbstractResponseVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/AbstractResponseVisitorTest.php deleted file mode 100644 index 7b8600342..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/AbstractResponseVisitorTest.php +++ /dev/null @@ -1,29 +0,0 @@ -value = array(); - $this->command = new MockCommand(); - $this->response = new Response(200, array( - 'X-Foo' => 'bar', - 'Content-Length' => 3, - 'Content-Type' => 'text/plain' - ), 'Foo'); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/BodyVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/BodyVisitorTest.php deleted file mode 100644 index 932e39bff..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/BodyVisitorTest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'body', 'name' => 'foo')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('Foo', (string) $this->value['foo']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/HeaderVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/HeaderVisitorTest.php deleted file mode 100644 index db54b1abb..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/HeaderVisitorTest.php +++ /dev/null @@ -1,98 +0,0 @@ - 'header', - 'name' => 'ContentType', - 'sentAs' => 'Content-Type' - )); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('text/plain', $this->value['ContentType']); - } - - public function testVisitsLocationWithFilters() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'header', - 'name' => 'Content-Type', - 'filters' => array('strtoupper') - )); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('TEXT/PLAIN', $this->value['Content-Type']); - } - - public function testVisitsMappedPrefixHeaders() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'header', - 'name' => 'Metadata', - 'sentAs' => 'X-Baz-', - 'type' => 'object', - 'additionalProperties' => array( - 'type' => 'string' - ) - )); - $response = new Response(200, array( - 'X-Baz-Test' => 'ABC', - 'X-Baz-Bar' => array('123', '456'), - 'Content-Length' => 3 - ), 'Foo'); - $visitor->visit($this->command, $response, $param, $this->value); - $this->assertEquals(array( - 'Metadata' => array( - 'Test' => 'ABC', - 'Bar' => array('123', '456') - ) - ), $this->value); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testDiscardingUnknownHeaders() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'header', - 'name' => 'Content-Type', - 'additionalParameters' => false - )); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('text/plain', $this->value['Content-Type']); - $this->assertArrayNotHasKey('X-Foo', $this->value); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testDiscardingUnknownPropertiesWithAliasing() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'header', - 'name' => 'ContentType', - 'sentAs' => 'Content-Type', - 'additionalParameters' => false - )); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('text/plain', $this->value['ContentType']); - $this->assertArrayNotHasKey('X-Foo', $this->value); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/JsonVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/JsonVisitorTest.php deleted file mode 100644 index 4f8d30b1e..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/JsonVisitorTest.php +++ /dev/null @@ -1,157 +0,0 @@ -getMockBuilder('Guzzle\Service\Command\AbstractCommand') - ->setMethods(array('getResponse')) - ->getMockForAbstractClass(); - $command->expects($this->once()) - ->method('getResponse') - ->will($this->returnValue(new Response(200, null, '{"foo":"bar"}'))); - $result = array(); - $visitor->before($command, $result); - $this->assertEquals(array('foo' => 'bar'), $result); - } - - public function testVisitsLocation() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'array', - 'items' => array( - 'filters' => 'strtoupper', - 'type' => 'string' - ) - )); - $this->value = array('foo' => array('a', 'b', 'c')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('A', 'B', 'C'), $this->value['foo']); - } - - public function testRenamesTopLevelValues() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'sentAs' => 'Baz', - 'type' => 'string', - )); - $this->value = array('Baz' => 'test'); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => 'test'), $this->value); - } - - public function testRenamesDoesNotFailForNonExistentKey() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'properties' => array( - 'bar' => array( - 'name' => 'bar', - 'sentAs' => 'baz', - ), - ), - )); - $this->value = array('foo' => array('unknown' => 'Unknown')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => array('unknown' => 'Unknown')), $this->value); - } - - public function testTraversesObjectsAndAppliesFilters() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'properties' => array( - 'foo' => array('filters' => 'strtoupper'), - 'bar' => array('filters' => 'strtolower') - ) - )); - $this->value = array('foo' => array('foo' => 'hello', 'bar' => 'THERE')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => 'HELLO', 'bar' => 'there'), $this->value['foo']); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testDiscardingUnknownProperties() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => array( - 'bar' => array( - 'type' => 'string', - 'name' => 'bar', - ), - ), - )); - $this->value = array('foo' => array('bar' => 15, 'unknown' => 'Unknown')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => array('bar' => 15)), $this->value); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testDiscardingUnknownPropertiesWithAliasing() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => array( - 'bar' => array( - 'name' => 'bar', - 'sentAs' => 'baz', - ), - ), - )); - $this->value = array('foo' => array('baz' => 15, 'unknown' => 'Unknown')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => array('bar' => 15)), $this->value); - } - - public function testWalksAdditionalProperties() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'additionalProperties' => array( - 'type' => 'object', - 'properties' => array( - 'bar' => array( - 'type' => 'string', - 'filters' => array('base64_decode') - ) - ), - ), - )); - $this->value = array('foo' => array('baz' => array('bar' => 'Zm9v'))); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('foo', $this->value['foo']['baz']['bar']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/ReasonPhraseVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/ReasonPhraseVisitorTest.php deleted file mode 100644 index 23cd40fed..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/ReasonPhraseVisitorTest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'reasonPhrase', 'name' => 'phrase')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals('OK', $this->value['phrase']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/StatusCodeVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/StatusCodeVisitorTest.php deleted file mode 100644 index 7211a5801..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/StatusCodeVisitorTest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'statusCode', 'name' => 'code')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(200, $this->value['code']); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/XmlVisitorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/XmlVisitorTest.php deleted file mode 100644 index e7acc3247..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/XmlVisitorTest.php +++ /dev/null @@ -1,415 +0,0 @@ -getMockBuilder('Guzzle\Service\Command\AbstractCommand') - ->setMethods(array('getResponse')) - ->getMockForAbstractClass(); - $command->expects($this->once()) - ->method('getResponse') - ->will($this->returnValue(new Response(200, null, 'test'))); - $result = array(); - $visitor->before($command, $result); - $this->assertEquals(array('Bar' => 'test'), $result); - } - - public function testBeforeMethodParsesXmlWithNamespace() - { - $this->markTestSkipped("Response/XmlVisitor cannot accept 'xmlns' in response, see #368 (http://git.io/USa1mA)."); - - $visitor = new Visitor(); - $command = $this->getMockBuilder('Guzzle\Service\Command\AbstractCommand') - ->setMethods(array('getResponse')) - ->getMockForAbstractClass(); - $command->expects($this->once()) - ->method('getResponse') - ->will($this->returnValue(new Response(200, null, 'test'))); - $result = array(); - $visitor->before($command, $result); - $this->assertEquals(array('Bar' => 'test'), $result); - } - - public function testBeforeMethodParsesNestedXml() - { - $visitor = new Visitor(); - $command = $this->getMockBuilder('Guzzle\Service\Command\AbstractCommand') - ->setMethods(array('getResponse')) - ->getMockForAbstractClass(); - $command->expects($this->once()) - ->method('getResponse') - ->will($this->returnValue(new Response(200, null, 'test'))); - $result = array(); - $visitor->before($command, $result); - $this->assertEquals(array('Items' => array('Bar' => 'test')), $result); - } - - public function testCanExtractAndRenameTopLevelXmlValues() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'xml', - 'name' => 'foo', - 'sentAs' => 'Bar' - )); - $value = array('Bar' => 'test'); - $visitor->visit($this->command, $this->response, $param, $value); - $this->assertArrayHasKey('foo', $value); - $this->assertEquals('test', $value['foo']); - } - - public function testEnsuresRepeatedArraysAreInCorrectLocations() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'xml', - 'name' => 'foo', - 'sentAs' => 'Foo', - 'type' => 'array', - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'Bar' => array('type' => 'string'), - 'Baz' => array('type' => 'string'), - 'Bam' => array('type' => 'string') - ) - ) - )); - - $xml = new \SimpleXMLElement('12'); - $value = json_decode(json_encode($xml), true); - $visitor->visit($this->command, $this->response, $param, $value); - $this->assertEquals(array( - 'foo' => array( - array ( - 'Bar' => '1', - 'Baz' => '2' - ) - ) - ), $value); - } - - public function testEnsuresFlatArraysAreFlat() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'location' => 'xml', - 'name' => 'foo', - 'type' => 'array', - 'items' => array('type' => 'string') - )); - - $value = array('foo' => array('bar', 'baz')); - $visitor->visit($this->command, $this->response, $param, $value); - $this->assertEquals(array('foo' => array('bar', 'baz')), $value); - - $value = array('foo' => 'bar'); - $visitor->visit($this->command, $this->response, $param, $value); - $this->assertEquals(array('foo' => array('bar')), $value); - } - - public function xmlDataProvider() - { - $param = new Parameter(array( - 'location' => 'xml', - 'name' => 'Items', - 'type' => 'array', - 'items' => array( - 'type' => 'object', - 'name' => 'Item', - 'properties' => array( - 'Bar' => array('type' => 'string'), - 'Baz' => array('type' => 'string') - ) - ) - )); - - return array( - array($param, '12', array( - 'Items' => array( - array('Bar' => 1), - array('Bar' => 2) - ) - )), - array($param, '1', array( - 'Items' => array( - array('Bar' => 1) - ) - )), - array($param, '', array( - 'Items' => array() - )) - ); - } - - /** - * @dataProvider xmlDataProvider - */ - public function testEnsuresWrappedArraysAreInCorrectLocations($param, $xml, $result) - { - $visitor = new Visitor(); - $xml = new \SimpleXMLElement($xml); - $value = json_decode(json_encode($xml), true); - $visitor->visit($this->command, $this->response, $param, $value); - $this->assertEquals($result, $value); - } - - public function testCanRenameValues() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'TerminatingInstances', - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'instancesSet', - 'items' => array( - 'name' => 'item', - 'type' => 'object', - 'sentAs' => 'item', - 'properties' => array( - 'InstanceId' => array( - 'type' => 'string', - 'sentAs' => 'instanceId', - ), - 'CurrentState' => array( - 'type' => 'object', - 'sentAs' => 'currentState', - 'properties' => array( - 'Code' => array( - 'type' => 'numeric', - 'sentAs' => 'code', - ), - 'Name' => array( - 'type' => 'string', - 'sentAs' => 'name', - ), - ), - ), - 'PreviousState' => array( - 'type' => 'object', - 'sentAs' => 'previousState', - 'properties' => array( - 'Code' => array( - 'type' => 'numeric', - 'sentAs' => 'code', - ), - 'Name' => array( - 'type' => 'string', - 'sentAs' => 'name', - ), - ), - ), - ), - ) - )); - - $value = array( - 'instancesSet' => array ( - 'item' => array ( - 'instanceId' => 'i-3ea74257', - 'currentState' => array( - 'code' => '32', - 'name' => 'shutting-down', - ), - 'previousState' => array( - 'code' => '16', - 'name' => 'running', - ), - ), - ) - ); - - $visitor->visit($this->command, $this->response, $param, $value); - - $this->assertEquals(array( - 'TerminatingInstances' => array( - array( - 'InstanceId' => 'i-3ea74257', - 'CurrentState' => array( - 'Code' => '32', - 'Name' => 'shutting-down', - ), - 'PreviousState' => array( - 'Code' => '16', - 'Name' => 'running', - ) - ) - ) - ), $value); - } - - public function testCanRenameAttributes() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'RunningQueues', - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'type' => 'object', - 'sentAs' => 'item', - 'properties' => array( - 'QueueId' => array( - 'type' => 'string', - 'sentAs' => 'queue_id', - 'data' => array( - 'xmlAttribute' => true, - ), - ), - 'CurrentState' => array( - 'type' => 'object', - 'properties' => array( - 'Code' => array( - 'type' => 'numeric', - 'sentAs' => 'code', - 'data' => array( - 'xmlAttribute' => true, - ), - ), - 'Name' => array( - 'sentAs' => 'name', - 'data' => array( - 'xmlAttribute' => true, - ), - ), - ), - ), - 'PreviousState' => array( - 'type' => 'object', - 'properties' => array( - 'Code' => array( - 'type' => 'numeric', - 'sentAs' => 'code', - 'data' => array( - 'xmlAttribute' => true, - ), - ), - 'Name' => array( - 'sentAs' => 'name', - 'data' => array( - 'xmlAttribute' => true, - ), - ), - ), - ), - ), - ) - )); - - $xml = ''; - $value = json_decode(json_encode(new \SimpleXMLElement($xml)), true); - $visitor->visit($this->command, $this->response, $param, $value); - - $this->assertEquals(array( - 'RunningQueues' => array( - array( - 'QueueId' => 'q-3ea74257', - 'CurrentState' => array( - 'Code' => '32', - 'Name' => 'processing', - ), - 'PreviousState' => array( - 'Code' => '16', - 'Name' => 'wait', - ), - ), - ) - ), $value); - } - - public function testAddsEmptyArraysWhenValueIsMissing() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'Foo', - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'Baz' => array('type' => 'array'), - 'Bar' => array( - 'type' => 'object', - 'properties' => array( - 'Baz' => array('type' => 'array'), - ) - ) - ) - ) - )); - - $value = array(); - $visitor->visit($this->command, $this->response, $param, $value); - - $value = array( - 'Foo' => array( - 'Bar' => array() - ) - ); - $visitor->visit($this->command, $this->response, $param, $value); - $this->assertEquals(array( - 'Foo' => array( - array( - 'Bar' => array() - ) - ) - ), $value); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testDiscardingUnknownProperties() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => array( - 'bar' => array( - 'type' => 'string', - 'name' => 'bar', - ), - ), - )); - $this->value = array('foo' => array('bar' => 15, 'unknown' => 'Unknown')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => array('bar' => 15)), $this->value); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testDiscardingUnknownPropertiesWithAliasing() - { - $visitor = new Visitor(); - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => array( - 'bar' => array( - 'name' => 'bar', - 'sentAs' => 'baz', - ), - ), - )); - $this->value = array('foo' => array('baz' => 15, 'unknown' => 'Unknown')); - $visitor->visit($this->command, $this->response, $param, $this->value); - $this->assertEquals(array('foo' => array('bar' => 15)), $this->value); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/VisitorFlyweightTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/VisitorFlyweightTest.php deleted file mode 100644 index a252ffe60..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/VisitorFlyweightTest.php +++ /dev/null @@ -1,53 +0,0 @@ -assertInstanceOf('Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor', $f->getRequestVisitor('json')); - $this->assertInstanceOf('Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor', $f->getResponseVisitor('json')); - } - - public function testCanUseCustomMappings() - { - $f = new VisitorFlyweight(array()); - $this->assertEquals(array(), $this->readAttribute($f, 'mappings')); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage No request visitor has been mapped for foo - */ - public function testThrowsExceptionWhenRetrievingUnknownVisitor() - { - VisitorFlyweight::getInstance()->getRequestVisitor('foo'); - } - - public function testCachesVisitors() - { - $f = new VisitorFlyweight(); - $v1 = $f->getRequestVisitor('json'); - $this->assertSame($v1, $f->getRequestVisitor('json')); - } - - public function testAllowsAddingVisitors() - { - $f = new VisitorFlyweight(); - $j1 = new JsonRequestVisitor(); - $j2 = new JsonResponseVisitor(); - $f->addRequestVisitor('json', $j1); - $f->addResponseVisitor('json', $j2); - $this->assertSame($j1, $f->getRequestVisitor('json')); - $this->assertSame($j2, $f->getResponseVisitor('json')); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationCommandTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationCommandTest.php deleted file mode 100644 index 95fb533af..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationCommandTest.php +++ /dev/null @@ -1,102 +0,0 @@ -getRequestSerializer(); - $b = new DefaultRequestSerializer(VisitorFlyweight::getInstance()); - $operation->setRequestSerializer($b); - $this->assertNotSame($a, $operation->getRequestSerializer()); - } - - public function testPreparesRequestUsingSerializer() - { - $op = new OperationCommand(array(), new Operation()); - $op->setClient(new Client()); - $s = $this->getMockBuilder('Guzzle\Service\Command\RequestSerializerInterface') - ->setMethods(array('prepare')) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('prepare') - ->will($this->returnValue(new EntityEnclosingRequest('POST', 'http://foo.com'))); - $op->setRequestSerializer($s); - $op->prepare(); - } - - public function testParsesResponsesWithResponseParser() - { - $op = new OperationCommand(array(), new Operation()); - $p = $this->getMockBuilder('Guzzle\Service\Command\ResponseParserInterface') - ->setMethods(array('parse')) - ->getMockForAbstractClass(); - $p->expects($this->once()) - ->method('parse') - ->will($this->returnValue(array('foo' => 'bar'))); - $op->setResponseParser($p); - $op->setClient(new Client()); - $request = $op->prepare(); - $request->setResponse(new Response(200), true); - $this->assertEquals(array('foo' => 'bar'), $op->execute()); - } - - public function testParsesResponsesUsingModelParserWhenMatchingModelIsFound() - { - $description = ServiceDescription::factory(array( - 'operations' => array( - 'foo' => array('responseClass' => 'bar', 'responseType' => 'model') - ), - 'models' => array( - 'bar' => array( - 'type' => 'object', - 'properties' => array( - 'Baz' => array('type' => 'string', 'location' => 'xml') - ) - ) - ) - )); - - $op = new OperationCommand(array(), $description->getOperation('foo')); - $op->setClient(new Client()); - $request = $op->prepare(); - $request->setResponse(new Response(200, array( - 'Content-Type' => 'application/xml' - ), 'Bar'), true); - $result = $op->execute(); - $this->assertEquals(new Model(array('Baz' => 'Bar')), $result); - } - - public function testAllowsRawResponses() - { - $description = new ServiceDescription(array( - 'operations' => array('foo' => array('responseClass' => 'bar', 'responseType' => 'model')), - 'models' => array('bar' => array()) - )); - $op = new OperationCommand(array( - OperationCommand::RESPONSE_PROCESSING => OperationCommand::TYPE_RAW - ), $description->getOperation('foo')); - $op->setClient(new Client()); - $request = $op->prepare(); - $response = new Response(200, array( - 'Content-Type' => 'application/xml' - ), 'Bar'); - $request->setResponse($response, true); - $this->assertSame($response, $op->execute()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationResponseParserTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationResponseParserTest.php deleted file mode 100644 index 69ba1fcea..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationResponseParserTest.php +++ /dev/null @@ -1,335 +0,0 @@ -addVisitor('foo', $visitor); - $this->assertSame($visitor, $this->readAttribute($p, 'factory')->getResponseVisitor('foo')); - } - - public function testUsesParentParser() - { - $p = new OperationResponseParser(new VisitorFlyweight()); - $operation = new Operation(); - $operation->setServiceDescription(new ServiceDescription()); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($p)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/xml'), 'C'), true); - $this->assertInstanceOf('SimpleXMLElement', $op->execute()); - } - - public function testVisitsLocations() - { - $parser = new OperationResponseParser(new VisitorFlyweight(array())); - $parser->addVisitor('statusCode', new StatusCodeVisitor()); - $parser->addVisitor('reasonPhrase', new ReasonPhraseVisitor()); - $parser->addVisitor('json', new JsonVisitor()); - $op = new OperationCommand(array(), $this->getDescription()->getOperation('test')); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(201), true); - $result = $op->execute(); - $this->assertEquals(201, $result['code']); - $this->assertEquals('Created', $result['phrase']); - } - - public function testVisitsLocationsForJsonResponse() - { - $parser = OperationResponseParser::getInstance(); - $operation = $this->getDescription()->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array( - 'Content-Type' => 'application/json' - ), '{"baz":"bar","enigma":"123"}'), true); - $result = $op->execute(); - $this->assertEquals(array( - 'baz' => 'bar', - 'enigma' => '123', - 'code' => 200, - 'phrase' => 'OK' - ), $result->toArray()); - } - - public function testSkipsUnkownModels() - { - $parser = OperationResponseParser::getInstance(); - $operation = $this->getDescription()->getOperation('test'); - $operation->setResponseClass('Baz')->setResponseType('model'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(201), true); - $this->assertInstanceOf('Guzzle\Http\Message\Response', $op->execute()); - } - - public function testAllowsModelProcessingToBeDisabled() - { - $parser = OperationResponseParser::getInstance(); - $operation = $this->getDescription()->getOperation('test'); - $op = new OperationCommand(array('command.response_processing' => 'native'), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array( - 'Content-Type' => 'application/json' - ), '{"baz":"bar","enigma":"123"}'), true); - $result = $op->execute(); - $this->assertInstanceOf('Guzzle\Service\Resource\Model', $result); - $this->assertEquals(array( - 'baz' => 'bar', - 'enigma' => '123' - ), $result->toArray()); - } - - public function testCanInjectModelSchemaIntoModels() - { - $parser = new OperationResponseParser(VisitorFlyweight::getInstance(), true); - $desc = $this->getDescription(); - $operation = $desc->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array( - 'Content-Type' => 'application/json' - ), '{"baz":"bar","enigma":"123"}'), true); - $result = $op->execute(); - $this->assertSame($result->getStructure(), $desc->getModel('Foo')); - } - - public function testDoesNotParseXmlWhenNotUsingXmlVisitor() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Foo')), - 'models' => array( - 'Foo' => array( - 'type' => 'object', - 'properties' => array('baz' => array('location' => 'body')) - ) - ) - )); - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $brokenXml = '<><><>>>>'; - $op->prepare()->setResponse(new Response(200, array( - 'Content-Type' => 'application/xml' - ), $brokenXml), true); - $result = $op->execute(); - $this->assertEquals(array('baz'), $result->getKeys()); - $this->assertEquals($brokenXml, (string) $result['baz']); - } - - public function testVisitsAdditionalProperties() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Foo')), - 'models' => array( - 'Foo' => array( - 'type' => 'object', - 'properties' => array( - 'code' => array('location' => 'statusCode') - ), - 'additionalProperties' => array( - 'location' => 'json', - 'type' => 'object', - 'properties' => array( - 'a' => array( - 'type' => 'string', - 'filters' => 'strtoupper' - ) - ) - ) - ) - ) - )); - - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $json = '[{"a":"test"},{"a":"baz"}]'; - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), $json), true); - $result = $op->execute()->toArray(); - $this->assertEquals(array( - 'code' => 200, - array('a' => 'TEST'), - array('a' => 'BAZ') - ), $result); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/399 - */ - public function testAdditionalPropertiesDisabledDiscardsData() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Foo')), - 'models' => array( - 'Foo' => array( - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => array( - 'name' => array( - 'location' => 'json', - 'type' => 'string', - ), - 'nested' => array( - 'location' => 'json', - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => array( - 'width' => array( - 'type' => 'integer' - ) - ), - ), - 'code' => array('location' => 'statusCode') - ), - - ) - ) - )); - - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $json = '{"name":"test", "volume":2.0, "nested":{"width":10,"bogus":1}}'; - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), $json), true); - $result = $op->execute()->toArray(); - $this->assertEquals(array( - 'name' => 'test', - 'nested' => array( - 'width' => 10, - ), - 'code' => 200 - ), $result); - } - - public function testCreatesCustomResponseClassInterface() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Guzzle\Tests\Mock\CustomResponseModel')) - )); - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), 'hi!'), true); - $result = $op->execute(); - $this->assertInstanceOf('Guzzle\Tests\Mock\CustomResponseModel', $result); - $this->assertSame($op, $result->command); - } - - /** - * @expectedException \Guzzle\Service\Exception\ResponseClassException - * @expectedExceptionMessage must exist - */ - public function testEnsuresResponseClassExists() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Foo\Baz\Bar')) - )); - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), 'hi!'), true); - $op->execute(); - } - - /** - * @expectedException \Guzzle\Service\Exception\ResponseClassException - * @expectedExceptionMessage and implement - */ - public function testEnsuresResponseClassImplementsResponseClassInterface() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => __CLASS__)) - )); - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), 'hi!'), true); - $op->execute(); - } - - protected function getDescription() - { - return ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Foo')), - 'models' => array( - 'Foo' => array( - 'type' => 'object', - 'properties' => array( - 'baz' => array('type' => 'string', 'location' => 'json'), - 'code' => array('location' => 'statusCode'), - 'phrase' => array('location' => 'reasonPhrase'), - ) - ) - ) - )); - } - - public function testCanAddListenerToParseDomainObjects() - { - $client = new Client(); - $client->setDescription(ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'FooBazBar')) - ))); - $foo = new \stdClass(); - $client->getEventDispatcher()->addListener('command.parse_response', function ($e) use ($foo) { - $e['result'] = $foo; - }); - $command = $client->getCommand('test'); - $command->prepare()->setResponse(new Response(200), true); - $result = $command->execute(); - $this->assertSame($result, $foo); - } - - /** - * @group issue-399 - * @link https://github.com/guzzle/guzzle/issues/501 - */ - public function testAdditionalPropertiesWithRefAreResolved() - { - $parser = OperationResponseParser::getInstance(); - $description = ServiceDescription::factory(array( - 'operations' => array('test' => array('responseClass' => 'Foo')), - 'models' => array( - 'Baz' => array('type' => 'string'), - 'Foo' => array( - 'type' => 'object', - 'additionalProperties' => array('$ref' => 'Baz', 'location' => 'json') - ) - ) - )); - $operation = $description->getOperation('test'); - $op = new OperationCommand(array(), $operation); - $op->setResponseParser($parser)->setClient(new Client()); - $json = '{"a":"a","b":"b","c":"c"}'; - $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), $json), true); - $result = $op->execute()->toArray(); - $this->assertEquals(array('a' => 'a', 'b' => 'b', 'c' => 'c'), $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/OperationTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/OperationTest.php deleted file mode 100644 index ae33b6925..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/OperationTest.php +++ /dev/null @@ -1,308 +0,0 @@ - 'test', - 'summary' => 'doc', - 'notes' => 'notes', - 'documentationUrl' => 'http://www.example.com', - 'httpMethod' => 'POST', - 'uri' => '/api/v1', - 'responseClass' => 'array', - 'responseNotes' => 'returns the json_decoded response', - 'deprecated' => true, - 'parameters' => array( - 'key' => array( - 'required' => true, - 'type' => 'string', - 'maxLength' => 10 - ), - 'key_2' => array( - 'required' => true, - 'type' => 'integer', - 'default' => 10 - ) - ) - )); - - $this->assertEquals('test', $c->getName()); - $this->assertEquals('doc', $c->getSummary()); - $this->assertEquals('http://www.example.com', $c->getDocumentationUrl()); - $this->assertEquals('POST', $c->getHttpMethod()); - $this->assertEquals('/api/v1', $c->getUri()); - $this->assertEquals('array', $c->getResponseClass()); - $this->assertEquals('returns the json_decoded response', $c->getResponseNotes()); - $this->assertTrue($c->getDeprecated()); - $this->assertEquals('Guzzle\\Service\\Command\\OperationCommand', $c->getClass()); - $this->assertEquals(array( - 'key' => new Parameter(array( - 'name' => 'key', - 'required' => true, - 'type' => 'string', - 'maxLength' => 10, - 'parent' => $c - )), - 'key_2' => new Parameter(array( - 'name' => 'key_2', - 'required' => true, - 'type' => 'integer', - 'default' => 10, - 'parent' => $c - )) - ), $c->getParams()); - - $this->assertEquals(new Parameter(array( - 'name' => 'key_2', - 'required' => true, - 'type' => 'integer', - 'default' => 10, - 'parent' => $c - )), $c->getParam('key_2')); - - $this->assertNull($c->getParam('afefwef')); - $this->assertArrayNotHasKey('parent', $c->getParam('key_2')->toArray()); - } - - public function testAllowsConcreteCommands() - { - $c = new Operation(array( - 'name' => 'test', - 'class' => 'Guzzle\\Service\\Command\ClosureCommand', - 'parameters' => array( - 'p' => new Parameter(array( - 'name' => 'foo' - )) - ) - )); - $this->assertEquals('Guzzle\\Service\\Command\ClosureCommand', $c->getClass()); - } - - public function testConvertsToArray() - { - $data = array( - 'name' => 'test', - 'class' => 'Guzzle\\Service\\Command\ClosureCommand', - 'summary' => 'test', - 'documentationUrl' => 'http://www.example.com', - 'httpMethod' => 'PUT', - 'uri' => '/', - 'parameters' => array('p' => array('name' => 'foo')) - ); - $c = new Operation($data); - $toArray = $c->toArray(); - unset($data['name']); - $this->assertArrayHasKey('parameters', $toArray); - $this->assertInternalType('array', $toArray['parameters']); - - // Normalize the array - unset($data['parameters']); - unset($toArray['parameters']); - - $data['responseType'] = 'primitive'; - $data['responseClass'] = 'array'; - $this->assertEquals($data, $toArray); - } - - public function testDeterminesIfHasParam() - { - $command = $this->getTestCommand(); - $this->assertTrue($command->hasParam('data')); - $this->assertFalse($command->hasParam('baz')); - } - - public function testReturnsParamNames() - { - $command = $this->getTestCommand(); - $this->assertEquals(array('data'), $command->getParamNames()); - } - - protected function getTestCommand() - { - return new Operation(array( - 'parameters' => array( - 'data' => new Parameter(array( - 'type' => 'string' - )) - ) - )); - } - - public function testCanBuildUpCommands() - { - $c = new Operation(array()); - $c->setName('foo') - ->setClass('Baz') - ->setDeprecated(false) - ->setSummary('summary') - ->setDocumentationUrl('http://www.foo.com') - ->setHttpMethod('PUT') - ->setResponseNotes('oh') - ->setResponseClass('string') - ->setUri('/foo/bar') - ->addParam(new Parameter(array( - 'name' => 'test' - ))); - - $this->assertEquals('foo', $c->getName()); - $this->assertEquals('Baz', $c->getClass()); - $this->assertEquals(false, $c->getDeprecated()); - $this->assertEquals('summary', $c->getSummary()); - $this->assertEquals('http://www.foo.com', $c->getDocumentationUrl()); - $this->assertEquals('PUT', $c->getHttpMethod()); - $this->assertEquals('oh', $c->getResponseNotes()); - $this->assertEquals('string', $c->getResponseClass()); - $this->assertEquals('/foo/bar', $c->getUri()); - $this->assertEquals(array('test'), $c->getParamNames()); - } - - public function testCanRemoveParams() - { - $c = new Operation(array()); - $c->addParam(new Parameter(array('name' => 'foo'))); - $this->assertTrue($c->hasParam('foo')); - $c->removeParam('foo'); - $this->assertFalse($c->hasParam('foo')); - } - - public function testAddsNameToParametersIfNeeded() - { - $command = new Operation(array('parameters' => array('foo' => new Parameter(array())))); - $this->assertEquals('foo', $command->getParam('foo')->getName()); - } - - public function testContainsApiErrorInformation() - { - $command = $this->getOperation(); - $this->assertEquals(1, count($command->getErrorResponses())); - $arr = $command->toArray(); - $this->assertEquals(1, count($arr['errorResponses'])); - $command->addErrorResponse(400, 'Foo', 'Baz\\Bar'); - $this->assertEquals(2, count($command->getErrorResponses())); - $command->setErrorResponses(array()); - $this->assertEquals(0, count($command->getErrorResponses())); - } - - public function testHasNotes() - { - $o = new Operation(array('notes' => 'foo')); - $this->assertEquals('foo', $o->getNotes()); - $o->setNotes('bar'); - $this->assertEquals('bar', $o->getNotes()); - } - - public function testHasData() - { - $o = new Operation(array('data' => array('foo' => 'baz', 'bar' => 123))); - $o->setData('test', false); - $this->assertEquals('baz', $o->getData('foo')); - $this->assertEquals(123, $o->getData('bar')); - $this->assertNull($o->getData('wfefwe')); - $this->assertEquals(array( - 'parameters' => array(), - 'class' => 'Guzzle\Service\Command\OperationCommand', - 'data' => array('foo' => 'baz', 'bar' => 123, 'test' => false), - 'responseClass' => 'array', - 'responseType' => 'primitive' - ), $o->toArray()); - } - - public function testHasServiceDescription() - { - $s = new ServiceDescription(); - $o = new Operation(array(), $s); - $this->assertSame($s, $o->getServiceDescription()); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testValidatesResponseType() - { - $o = new Operation(array('responseClass' => 'array', 'responseType' => 'foo')); - } - - public function testInfersResponseType() - { - $o = $this->getOperation(); - $o->setServiceDescription(new ServiceDescription(array('models' => array('Foo' => array())))); - $this->assertEquals('primitive', $o->getResponseType()); - $this->assertEquals('primitive', $o->setResponseClass('boolean')->getResponseType()); - $this->assertEquals('primitive', $o->setResponseClass('array')->getResponseType()); - $this->assertEquals('primitive', $o->setResponseClass('integer')->getResponseType()); - $this->assertEquals('primitive', $o->setResponseClass('string')->getResponseType()); - $this->assertEquals('class', $o->setResponseClass('foo')->getResponseType()); - $this->assertEquals('class', $o->setResponseClass(__CLASS__)->getResponseType()); - $this->assertEquals('model', $o->setResponseClass('Foo')->getResponseType()); - } - - public function testHasResponseType() - { - // infers in the constructor - $o = new Operation(array('responseClass' => 'array')); - $this->assertEquals('primitive', $o->getResponseType()); - // Infers when set - $o = new Operation(); - $this->assertEquals('primitive', $o->getResponseType()); - $this->assertEquals('model', $o->setResponseType('model')->getResponseType()); - } - - public function testHasAdditionalParameters() - { - $o = new Operation(array( - 'additionalParameters' => array( - 'type' => 'string', 'name' => 'binks' - ), - 'parameters' => array( - 'foo' => array('type' => 'integer') - ) - )); - $this->assertEquals('string', $o->getAdditionalParameters()->getType()); - $arr = $o->toArray(); - $this->assertEquals(array( - 'type' => 'string' - ), $arr['additionalParameters']); - } - - /** - * @return Operation - */ - protected function getOperation() - { - return new Operation(array( - 'name' => 'OperationTest', - 'class' => get_class($this), - 'parameters' => array( - 'test' => array('type' => 'object'), - 'bool_1' => array('default' => true, 'type' => 'boolean'), - 'bool_2' => array('default' => false), - 'float' => array('type' => 'numeric'), - 'int' => array('type' => 'integer'), - 'date' => array('type' => 'string'), - 'timestamp' => array('type' => 'string'), - 'string' => array('type' => 'string'), - 'username' => array('type' => 'string', 'required' => true, 'filters' => 'strtolower'), - 'test_function' => array('type' => 'string', 'filters' => __CLASS__ . '::strtoupper') - ), - 'errorResponses' => array( - array('code' => 503, 'reason' => 'InsufficientCapacity', 'class' => 'Guzzle\\Exception\\RuntimeException') - ) - )); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ParameterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ParameterTest.php deleted file mode 100644 index b9c162aae..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ParameterTest.php +++ /dev/null @@ -1,411 +0,0 @@ - 'foo', - 'type' => 'bar', - 'required' => true, - 'default' => '123', - 'description' => '456', - 'minLength' => 2, - 'maxLength' => 5, - 'location' => 'body', - 'static' => 'static!', - 'filters' => array('trim', 'json_encode') - ); - - public function testCreatesParamFromArray() - { - $p = new Parameter($this->data); - $this->assertEquals('foo', $p->getName()); - $this->assertEquals('bar', $p->getType()); - $this->assertEquals(true, $p->getRequired()); - $this->assertEquals('123', $p->getDefault()); - $this->assertEquals('456', $p->getDescription()); - $this->assertEquals(2, $p->getMinLength()); - $this->assertEquals(5, $p->getMaxLength()); - $this->assertEquals('body', $p->getLocation()); - $this->assertEquals('static!', $p->getStatic()); - $this->assertEquals(array('trim', 'json_encode'), $p->getFilters()); - } - - public function testCanConvertToArray() - { - $p = new Parameter($this->data); - unset($this->data['name']); - $this->assertEquals($this->data, $p->toArray()); - } - - public function testUsesStatic() - { - $d = $this->data; - $d['default'] = 'booboo'; - $d['static'] = true; - $p = new Parameter($d); - $this->assertEquals('booboo', $p->getValue('bar')); - } - - public function testUsesDefault() - { - $d = $this->data; - $d['default'] = 'foo'; - $d['static'] = null; - $p = new Parameter($d); - $this->assertEquals('foo', $p->getValue(null)); - } - - public function testReturnsYourValue() - { - $d = $this->data; - $d['static'] = null; - $p = new Parameter($d); - $this->assertEquals('foo', $p->getValue('foo')); - } - - public function testZeroValueDoesNotCauseDefaultToBeReturned() - { - $d = $this->data; - $d['default'] = '1'; - $d['static'] = null; - $p = new Parameter($d); - $this->assertEquals('0', $p->getValue('0')); - } - - public function testFiltersValues() - { - $d = $this->data; - $d['static'] = null; - $d['filters'] = 'strtoupper'; - $p = new Parameter($d); - $this->assertEquals('FOO', $p->filter('foo')); - } - - public function testConvertsBooleans() - { - $p = new Parameter(array('type' => 'boolean')); - $this->assertEquals(true, $p->filter('true')); - $this->assertEquals(false, $p->filter('false')); - } - - public function testUsesArrayByDefaultForFilters() - { - $d = $this->data; - $d['filters'] = null; - $p = new Parameter($d); - $this->assertEquals(array(), $p->getFilters()); - } - - public function testAllowsSimpleLocationValue() - { - $p = new Parameter(array('name' => 'myname', 'location' => 'foo', 'sentAs' => 'Hello')); - $this->assertEquals('foo', $p->getLocation()); - $this->assertEquals('Hello', $p->getSentAs()); - } - - public function testParsesTypeValues() - { - $p = new Parameter(array('type' => 'foo')); - $this->assertEquals('foo', $p->getType()); - } - - /** - * @expectedException InvalidArgumentException - * @expectedExceptionMessage A [method] value must be specified for each complex filter - */ - public function testValidatesComplexFilters() - { - $p = new Parameter(array('filters' => array(array('args' => 'foo')))); - } - - public function testCanBuildUpParams() - { - $p = new Parameter(array()); - $p->setName('foo') - ->setDescription('c') - ->setFilters(array('d')) - ->setLocation('e') - ->setSentAs('f') - ->setMaxLength(1) - ->setMinLength(1) - ->setMinimum(2) - ->setMaximum(2) - ->setMinItems(3) - ->setMaxItems(3) - ->setRequired(true) - ->setStatic(true) - ->setDefault('h') - ->setType('i'); - - $p->addFilter('foo'); - - $this->assertEquals('foo', $p->getName()); - $this->assertEquals('h', $p->getDefault()); - $this->assertEquals('c', $p->getDescription()); - $this->assertEquals(array('d', 'foo'), $p->getFilters()); - $this->assertEquals('e', $p->getLocation()); - $this->assertEquals('f', $p->getSentAs()); - $this->assertEquals(1, $p->getMaxLength()); - $this->assertEquals(1, $p->getMinLength()); - $this->assertEquals(2, $p->getMaximum()); - $this->assertEquals(2, $p->getMinimum()); - $this->assertEquals(3, $p->getMaxItems()); - $this->assertEquals(3, $p->getMinItems()); - $this->assertEquals(true, $p->getRequired()); - $this->assertEquals(true, $p->getStatic()); - $this->assertEquals('i', $p->getType()); - } - - public function testAllowsNestedShape() - { - $command = $this->getServiceBuilder()->get('mock')->getCommand('mock_command')->getOperation(); - $param = new Parameter(array( - 'parent' => $command, - 'name' => 'foo', - 'type' => 'object', - 'location' => 'query', - 'properties' => array( - 'foo' => array( - 'type' => 'object', - 'required' => true, - 'properties' => array( - 'baz' => array( - 'name' => 'baz', - 'type' => 'bool', - ) - ) - ), - 'bar' => array( - 'name' => 'bar', - 'default' => '123' - ) - ) - )); - - $this->assertSame($command, $param->getParent()); - $this->assertNotEmpty($param->getProperties()); - $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $param->getProperty('foo')); - $this->assertSame($param, $param->getProperty('foo')->getParent()); - $this->assertSame($param->getProperty('foo'), $param->getProperty('foo')->getProperty('baz')->getParent()); - $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $param->getProperty('bar')); - $this->assertSame($param, $param->getProperty('bar')->getParent()); - - $array = $param->toArray(); - $this->assertInternalType('array', $array['properties']); - $this->assertArrayHasKey('foo', $array['properties']); - $this->assertArrayHasKey('bar', $array['properties']); - } - - public function testAllowsComplexFilters() - { - $that = $this; - $param = new Parameter(array()); - $param->setFilters(array(array('method' => function ($a, $b, $c, $d) use ($that, $param) { - $that->assertEquals('test', $a); - $that->assertEquals('my_value!', $b); - $that->assertEquals('bar', $c); - $that->assertSame($param, $d); - return 'abc' . $b; - }, 'args' => array('test', '@value', 'bar', '@api')))); - $this->assertEquals('abcmy_value!', $param->filter('my_value!')); - } - - public function testCanChangeParentOfNestedParameter() - { - $param1 = new Parameter(array('name' => 'parent')); - $param2 = new Parameter(array('name' => 'child')); - $param2->setParent($param1); - $this->assertSame($param1, $param2->getParent()); - } - - public function testCanRemoveFromNestedStructure() - { - $param1 = new Parameter(array('name' => 'parent')); - $param2 = new Parameter(array('name' => 'child')); - $param1->addProperty($param2); - $this->assertSame($param1, $param2->getParent()); - $this->assertSame($param2, $param1->getProperty('child')); - - // Remove a single child from the structure - $param1->removeProperty('child'); - $this->assertNull($param1->getProperty('child')); - // Remove the entire structure - $param1->addProperty($param2); - $param1->removeProperty('child'); - $this->assertNull($param1->getProperty('child')); - } - - public function testAddsAdditionalProperties() - { - $p = new Parameter(array( - 'type' => 'object', - 'additionalProperties' => array('type' => 'string') - )); - $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $p->getAdditionalProperties()); - $this->assertNull($p->getAdditionalProperties()->getAdditionalProperties()); - $p = new Parameter(array('type' => 'object')); - $this->assertTrue($p->getAdditionalProperties()); - } - - public function testAddsItems() - { - $p = new Parameter(array( - 'type' => 'array', - 'items' => array('type' => 'string') - )); - $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $p->getItems()); - $out = $p->toArray(); - $this->assertEquals('array', $out['type']); - $this->assertInternalType('array', $out['items']); - } - - public function testHasExtraProperties() - { - $p = new Parameter(); - $this->assertEquals(array(), $p->getData()); - $p->setData(array('foo' => 'bar')); - $this->assertEquals('bar', $p->getData('foo')); - $p->setData('baz', 'boo'); - $this->assertEquals(array('foo' => 'bar', 'baz' => 'boo'), $p->getData()); - } - - public function testCanRetrieveKnownPropertiesUsingDataMethod() - { - $p = new Parameter(); - $this->assertEquals(null, $p->getData('foo')); - $p->setName('test'); - $this->assertEquals('test', $p->getData('name')); - } - - public function testHasInstanceOf() - { - $p = new Parameter(); - $this->assertNull($p->getInstanceOf()); - $p->setInstanceOf('Foo'); - $this->assertEquals('Foo', $p->getInstanceOf()); - } - - public function testHasPattern() - { - $p = new Parameter(); - $this->assertNull($p->getPattern()); - $p->setPattern('/[0-9]+/'); - $this->assertEquals('/[0-9]+/', $p->getPattern()); - } - - public function testHasEnum() - { - $p = new Parameter(); - $this->assertNull($p->getEnum()); - $p->setEnum(array('foo', 'bar')); - $this->assertEquals(array('foo', 'bar'), $p->getEnum()); - } - - public function testSerializesItems() - { - $p = new Parameter(array( - 'type' => 'object', - 'additionalProperties' => array('type' => 'string') - )); - $this->assertEquals(array( - 'type' => 'object', - 'additionalProperties' => array('type' => 'string') - ), $p->toArray()); - } - - public function testResolvesRefKeysRecursively() - { - $description = new ServiceDescription(array( - 'models' => array( - 'JarJar' => array('type' => 'string', 'default' => 'Mesa address tha senate!'), - 'Anakin' => array('type' => 'array', 'items' => array('$ref' => 'JarJar')) - ) - )); - $p = new Parameter(array('$ref' => 'Anakin', 'description' => 'added'), $description); - $this->assertEquals(array( - 'type' => 'array', - 'items' => array('type' => 'string', 'default' => 'Mesa address tha senate!'), - 'description' => 'added' - ), $p->toArray()); - } - - public function testResolvesExtendsRecursively() - { - $jarJar = array('type' => 'string', 'default' => 'Mesa address tha senate!', 'description' => 'a'); - $anakin = array('type' => 'array', 'items' => array('extends' => 'JarJar', 'description' => 'b')); - $description = new ServiceDescription(array( - 'models' => array('JarJar' => $jarJar, 'Anakin' => $anakin) - )); - // Description attribute will be updated, and format added - $p = new Parameter(array('extends' => 'Anakin', 'format' => 'date'), $description); - $this->assertEquals(array( - 'type' => 'array', - 'format' => 'date', - 'items' => array( - 'type' => 'string', - 'default' => 'Mesa address tha senate!', - 'description' => 'b' - ) - ), $p->toArray()); - } - - public function testHasKeyMethod() - { - $p = new Parameter(array('name' => 'foo', 'sentAs' => 'bar')); - $this->assertEquals('bar', $p->getWireName()); - $p->setSentAs(null); - $this->assertEquals('foo', $p->getWireName()); - } - - public function testIncludesNameInToArrayWhenItemsAttributeHasName() - { - $p = new Parameter(array( - 'type' => 'array', - 'name' => 'Abc', - 'items' => array( - 'name' => 'Foo', - 'type' => 'object' - ) - )); - $result = $p->toArray(); - $this->assertEquals(array( - 'type' => 'array', - 'items' => array( - 'name' => 'Foo', - 'type' => 'object', - 'additionalProperties' => true - ) - ), $result); - } - - public function dateTimeProvider() - { - $d = 'October 13, 2012 16:15:46 UTC'; - - return array( - array($d, 'date-time', '2012-10-13T16:15:46Z'), - array($d, 'date', '2012-10-13'), - array($d, 'timestamp', strtotime($d)), - array(new \DateTime($d), 'timestamp', strtotime($d)) - ); - } - - /** - * @dataProvider dateTimeProvider - */ - public function testAppliesFormat($d, $format, $result) - { - $p = new Parameter(); - $p->setFormat($format); - $this->assertEquals($format, $p->getFormat()); - $this->assertEquals($result, $p->filter($d)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php deleted file mode 100644 index eb3619bea..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertEquals($result, SchemaFormatter::format($format, $value)); - } - - /** - * @expectedException \Guzzle\Common\Exception\InvalidArgumentException - */ - public function testValidatesDateTimeInput() - { - SchemaFormatter::format('date-time', false); - } - - public function testEnsuresTimestampsAreIntegers() - { - $t = time(); - $result = SchemaFormatter::format('timestamp', $t); - $this->assertSame($t, $result); - $this->assertInternalType('int', $result); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaValidatorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaValidatorTest.php deleted file mode 100644 index 4d6cc8728..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaValidatorTest.php +++ /dev/null @@ -1,326 +0,0 @@ -validator = new SchemaValidator(); - } - - public function testValidatesArrayListsAreNumericallyIndexed() - { - $value = array(array(1)); - $this->assertFalse($this->validator->validate($this->getComplexParam(), $value)); - $this->assertEquals( - array('[Foo][0] must be an array of properties. Got a numerically indexed array.'), - $this->validator->getErrors() - ); - } - - public function testValidatesArrayListsContainProperItems() - { - $value = array(true); - $this->assertFalse($this->validator->validate($this->getComplexParam(), $value)); - $this->assertEquals( - array('[Foo][0] must be of type object'), - $this->validator->getErrors() - ); - } - - public function testAddsDefaultValuesInLists() - { - $value = array(array()); - $this->assertTrue($this->validator->validate($this->getComplexParam(), $value)); - $this->assertEquals(array(array('Bar' => true)), $value); - } - - public function testMergesDefaultValuesInLists() - { - $value = array( - array('Baz' => 'hello!'), - array('Bar' => false) - ); - $this->assertTrue($this->validator->validate($this->getComplexParam(), $value)); - $this->assertEquals(array( - array( - 'Baz' => 'hello!', - 'Bar' => true - ), - array('Bar' => false) - ), $value); - } - - public function testCorrectlyConvertsParametersToArrayWhenArraysArePresent() - { - $param = $this->getComplexParam(); - $result = $param->toArray(); - $this->assertInternalType('array', $result['items']); - $this->assertEquals('array', $result['type']); - $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $param->getItems()); - } - - public function testAllowsInstanceOf() - { - $p = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'instanceOf' => get_class($this) - )); - $this->assertTrue($this->validator->validate($p, $this)); - $this->assertFalse($this->validator->validate($p, $p)); - $this->assertEquals(array('[foo] must be an instance of ' . __CLASS__), $this->validator->getErrors()); - } - - public function testEnforcesInstanceOfOnlyWhenObject() - { - $p = new Parameter(array( - 'name' => 'foo', - 'type' => array('object', 'string'), - 'instanceOf' => get_class($this) - )); - $this->assertTrue($this->validator->validate($p, $this)); - $s = 'test'; - $this->assertTrue($this->validator->validate($p, $s)); - } - - public function testConvertsObjectsToArraysWhenToArrayInterface() - { - $o = $this->getMockBuilder('Guzzle\Common\ToArrayInterface') - ->setMethods(array('toArray')) - ->getMockForAbstractClass(); - $o->expects($this->once()) - ->method('toArray') - ->will($this->returnValue(array( - 'foo' => 'bar' - ))); - $p = new Parameter(array( - 'name' => 'test', - 'type' => 'object', - 'properties' => array( - 'foo' => array('required' => 'true') - ) - )); - $this->assertTrue($this->validator->validate($p, $o)); - } - - public function testMergesValidationErrorsInPropertiesWithParent() - { - $p = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'properties' => array( - 'bar' => array('type' => 'string', 'required' => true, 'description' => 'This is what it does'), - 'test' => array('type' => 'string', 'minLength' => 2, 'maxLength' => 5), - 'test2' => array('type' => 'string', 'minLength' => 2, 'maxLength' => 2), - 'test3' => array('type' => 'integer', 'minimum' => 100), - 'test4' => array('type' => 'integer', 'maximum' => 10), - 'test5' => array('type' => 'array', 'maxItems' => 2), - 'test6' => array('type' => 'string', 'enum' => array('a', 'bc')), - 'test7' => array('type' => 'string', 'pattern' => '/[0-9]+/'), - 'test8' => array('type' => 'number'), - 'baz' => array( - 'type' => 'array', - 'minItems' => 2, - 'required' => true, - "items" => array("type" => "string") - ) - ) - )); - - $value = array( - 'test' => 'a', - 'test2' => 'abc', - 'baz' => array(false), - 'test3' => 10, - 'test4' => 100, - 'test5' => array(1, 3, 4), - 'test6' => 'Foo', - 'test7' => 'abc', - 'test8' => 'abc' - ); - - $this->assertFalse($this->validator->validate($p, $value)); - $this->assertEquals(array ( - '[foo][bar] is a required string: This is what it does', - '[foo][baz] must contain 2 or more elements', - '[foo][baz][0] must be of type string', - '[foo][test2] length must be less than or equal to 2', - '[foo][test3] must be greater than or equal to 100', - '[foo][test4] must be less than or equal to 10', - '[foo][test5] must contain 2 or fewer elements', - '[foo][test6] must be one of "a" or "bc"', - '[foo][test7] must match the following regular expression: /[0-9]+/', - '[foo][test8] must be of type number', - '[foo][test] length must be greater than or equal to 2', - ), $this->validator->getErrors()); - } - - public function testHandlesNullValuesInArraysWithDefaults() - { - $p = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'required' => true, - 'properties' => array( - 'bar' => array( - 'type' => 'object', - 'required' => true, - 'properties' => array( - 'foo' => array('default' => 'hi') - ) - ) - ) - )); - $value = array(); - $this->assertTrue($this->validator->validate($p, $value)); - $this->assertEquals(array('bar' => array('foo' => 'hi')), $value); - } - - public function testFailsWhenNullValuesInArraysWithNoDefaults() - { - $p = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'required' => true, - 'properties' => array( - 'bar' => array( - 'type' => 'object', - 'required' => true, - 'properties' => array('foo' => array('type' => 'string')) - ) - ) - )); - $value = array(); - $this->assertFalse($this->validator->validate($p, $value)); - $this->assertEquals(array('[foo][bar] is a required object'), $this->validator->getErrors()); - } - - public function testChecksTypes() - { - $p = new SchemaValidator(); - $r = new \ReflectionMethod($p, 'determineType'); - $r->setAccessible(true); - $this->assertEquals('any', $r->invoke($p, 'any', 'hello')); - $this->assertEquals(false, $r->invoke($p, 'foo', 'foo')); - $this->assertEquals('string', $r->invoke($p, 'string', 'hello')); - $this->assertEquals(false, $r->invoke($p, 'string', false)); - $this->assertEquals('integer', $r->invoke($p, 'integer', 1)); - $this->assertEquals(false, $r->invoke($p, 'integer', 'abc')); - $this->assertEquals('numeric', $r->invoke($p, 'numeric', 1)); - $this->assertEquals('numeric', $r->invoke($p, 'numeric', '1')); - $this->assertEquals('number', $r->invoke($p, 'number', 1)); - $this->assertEquals('number', $r->invoke($p, 'number', '1')); - $this->assertEquals(false, $r->invoke($p, 'numeric', 'a')); - $this->assertEquals('boolean', $r->invoke($p, 'boolean', true)); - $this->assertEquals('boolean', $r->invoke($p, 'boolean', false)); - $this->assertEquals(false, $r->invoke($p, 'boolean', 'false')); - $this->assertEquals('null', $r->invoke($p, 'null', null)); - $this->assertEquals(false, $r->invoke($p, 'null', 'abc')); - $this->assertEquals('array', $r->invoke($p, 'array', array())); - $this->assertEquals(false, $r->invoke($p, 'array', 'foo')); - } - - public function testValidatesFalseAdditionalProperties() - { - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'properties' => array('bar' => array('type' => 'string')), - 'additionalProperties' => false - )); - $value = array('test' => '123'); - $this->assertFalse($this->validator->validate($param, $value)); - $this->assertEquals(array('[foo][test] is not an allowed property'), $this->validator->getErrors()); - $value = array('bar' => '123'); - $this->assertTrue($this->validator->validate($param, $value)); - } - - public function testAllowsUndefinedAdditionalProperties() - { - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'properties' => array('bar' => array('type' => 'string')) - )); - $value = array('test' => '123'); - $this->assertTrue($this->validator->validate($param, $value)); - } - - public function testValidatesAdditionalProperties() - { - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'properties' => array('bar' => array('type' => 'string')), - 'additionalProperties' => array('type' => 'integer') - )); - $value = array('test' => 'foo'); - $this->assertFalse($this->validator->validate($param, $value)); - $this->assertEquals(array('[foo][test] must be of type integer'), $this->validator->getErrors()); - } - - public function testValidatesAdditionalPropertiesThatArrayArrays() - { - $param = new Parameter(array( - 'name' => 'foo', - 'type' => 'object', - 'additionalProperties' => array( - 'type' => 'array', - 'items' => array('type' => 'string') - ) - )); - $value = array('test' => array(true)); - $this->assertFalse($this->validator->validate($param, $value)); - $this->assertEquals(array('[foo][test][0] must be of type string'), $this->validator->getErrors()); - } - - public function testIntegersCastToStringWhenTypeMismatch() - { - $param = new Parameter(array('name' => 'test', 'type' => 'string')); - $value = 12; - $this->assertTrue($this->validator->validate($param, $value)); - $this->assertEquals('12', $value); - } - - public function testRequiredMessageIncludesType() - { - $param = new Parameter(array('name' => 'test', 'type' => array('string', 'boolean'), 'required' => true)); - $value = null; - $this->assertFalse($this->validator->validate($param, $value)); - $this->assertEquals(array('[test] is a required string or boolean'), $this->validator->getErrors()); - } - - protected function getComplexParam() - { - return new Parameter(array( - 'name' => 'Foo', - 'type' => 'array', - 'required' => true, - 'min' => 1, - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'Baz' => array( - 'type' => 'string', - ), - 'Bar' => array( - 'required' => true, - 'type' => 'boolean', - 'default' => true - ) - ) - ) - )); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionLoaderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionLoaderTest.php deleted file mode 100644 index bbfd1d6df..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionLoaderTest.php +++ /dev/null @@ -1,177 +0,0 @@ - true, - 'baz' => array('bar'), - 'apiVersion' => '123', - 'operations' => array() - )); - - $this->assertEquals(true, $d->getData('foo')); - $this->assertEquals(array('bar'), $d->getData('baz')); - $this->assertEquals('123', $d->getApiVersion()); - } - - public function testAllowsDeepNestedInheritance() - { - $d = ServiceDescription::factory(array( - 'operations' => array( - 'abstract' => array( - 'httpMethod' => 'HEAD', - 'parameters' => array( - 'test' => array('type' => 'string', 'required' => true) - ) - ), - 'abstract2' => array('uri' => '/test', 'extends' => 'abstract'), - 'concrete' => array('extends' => 'abstract2'), - 'override' => array('extends' => 'abstract', 'httpMethod' => 'PUT'), - 'override2' => array('extends' => 'override', 'httpMethod' => 'POST', 'uri' => '/') - ) - )); - - $c = $d->getOperation('concrete'); - $this->assertEquals('/test', $c->getUri()); - $this->assertEquals('HEAD', $c->getHttpMethod()); - $params = $c->getParams(); - $param = $params['test']; - $this->assertEquals('string', $param->getType()); - $this->assertTrue($param->getRequired()); - - // Ensure that merging HTTP method does not make an array - $this->assertEquals('PUT', $d->getOperation('override')->getHttpMethod()); - $this->assertEquals('POST', $d->getOperation('override2')->getHttpMethod()); - $this->assertEquals('/', $d->getOperation('override2')->getUri()); - } - - /** - * @expectedException RuntimeException - */ - public function testThrowsExceptionWhenExtendingMissingCommand() - { - ServiceDescription::factory(array( - 'operations' => array( - 'concrete' => array( - 'extends' => 'missing' - ) - ) - )); - } - - public function testAllowsMultipleInheritance() - { - $description = ServiceDescription::factory(array( - 'operations' => array( - 'a' => array( - 'httpMethod' => 'GET', - 'parameters' => array( - 'a1' => array( - 'default' => 'foo', - 'required' => true, - 'prepend' => 'hi' - ) - ) - ), - 'b' => array( - 'extends' => 'a', - 'parameters' => array( - 'b2' => array() - ) - ), - 'c' => array( - 'parameters' => array( - 'a1' => array( - 'default' => 'bar', - 'required' => true, - 'description' => 'test' - ), - 'c3' => array() - ) - ), - 'd' => array( - 'httpMethod' => 'DELETE', - 'extends' => array('b', 'c'), - 'parameters' => array( - 'test' => array() - ) - ) - ) - )); - - $command = $description->getOperation('d'); - $this->assertEquals('DELETE', $command->getHttpMethod()); - $this->assertContains('a1', $command->getParamNames()); - $this->assertContains('b2', $command->getParamNames()); - $this->assertContains('c3', $command->getParamNames()); - $this->assertContains('test', $command->getParamNames()); - - $this->assertTrue($command->getParam('a1')->getRequired()); - $this->assertEquals('bar', $command->getParam('a1')->getDefault()); - $this->assertEquals('test', $command->getParam('a1')->getDescription()); - } - - public function testAddsOtherFields() - { - $description = ServiceDescription::factory(array( - 'operations' => array(), - 'description' => 'Foo', - 'apiVersion' => 'bar' - )); - $this->assertEquals('Foo', $description->getDescription()); - $this->assertEquals('bar', $description->getApiVersion()); - } - - public function testCanLoadNestedExtends() - { - $description = ServiceDescription::factory(array( - 'operations' => array( - 'root' => array( - 'class' => 'foo' - ), - 'foo' => array( - 'extends' => 'root', - 'parameters' => array( - 'baz' => array('type' => 'string') - ) - ), - 'foo_2' => array( - 'extends' => 'foo', - 'parameters' => array( - 'bar' => array('type' => 'string') - ) - ), - 'foo_3' => array( - 'class' => 'bar', - 'parameters' => array( - 'bar2' => array('type' => 'string') - ) - ), - 'foo_4' => array( - 'extends' => array('foo_2', 'foo_3'), - 'parameters' => array( - 'bar3' => array('type' => 'string') - ) - ) - ) - )); - - $this->assertTrue($description->hasOperation('foo_4')); - $foo4 = $description->getOperation('foo_4'); - $this->assertTrue($foo4->hasParam('baz')); - $this->assertTrue($foo4->hasParam('bar')); - $this->assertTrue($foo4->hasParam('bar2')); - $this->assertTrue($foo4->hasParam('bar3')); - $this->assertEquals('bar', $foo4->getClass()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionTest.php deleted file mode 100644 index ff2545235..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionTest.php +++ /dev/null @@ -1,240 +0,0 @@ -serviceData = array( - 'test_command' => new Operation(array( - 'name' => 'test_command', - 'description' => 'documentationForCommand', - 'httpMethod' => 'DELETE', - 'class' => 'Guzzle\\Tests\\Service\\Mock\\Command\\MockCommand', - 'parameters' => array( - 'bucket' => array('required' => true), - 'key' => array('required' => true) - ) - )) - ); - } - - /** - * @covers Guzzle\Service\Description\ServiceDescription::factory - * @covers Guzzle\Service\Description\ServiceDescriptionLoader::build - */ - public function testFactoryDelegatesToConcreteFactories() - { - $jsonFile = __DIR__ . '/../../TestData/test_service.json'; - $this->assertInstanceOf('Guzzle\Service\Description\ServiceDescription', ServiceDescription::factory($jsonFile)); - } - - public function testConstructor() - { - $service = new ServiceDescription(array('operations' => $this->serviceData)); - $this->assertEquals(1, count($service->getOperations())); - $this->assertFalse($service->hasOperation('foobar')); - $this->assertTrue($service->hasOperation('test_command')); - } - - public function testIsSerializable() - { - $service = new ServiceDescription(array('operations' => $this->serviceData)); - $data = serialize($service); - $d2 = unserialize($data); - $this->assertEquals(serialize($service), serialize($d2)); - } - - public function testSerializesParameters() - { - $service = new ServiceDescription(array( - 'operations' => array( - 'foo' => new Operation(array('parameters' => array('foo' => array('type' => 'string')))) - ) - )); - $serialized = serialize($service); - $this->assertContains('"parameters":{"foo":', $serialized); - $service = unserialize($serialized); - $this->assertTrue($service->getOperation('foo')->hasParam('foo')); - } - - public function testAllowsForJsonBasedArrayParamsFunctionalTest() - { - $description = new ServiceDescription(array( - 'operations' => array( - 'test' => new Operation(array( - 'httpMethod' => 'PUT', - 'parameters' => array( - 'data' => array( - 'required' => true, - 'filters' => 'json_encode', - 'location' => 'body' - ) - ) - )) - ) - )); - $client = new Client(); - $client->setDescription($description); - $command = $client->getCommand('test', array( - 'data' => array( - 'foo' => 'bar' - ) - )); - - $request = $command->prepare(); - $this->assertEquals('{"foo":"bar"}', (string) $request->getBody()); - } - - public function testContainsModels() - { - $d = new ServiceDescription(array( - 'operations' => array('foo' => array()), - 'models' => array( - 'Tag' => array('type' => 'object'), - 'Person' => array('type' => 'object') - ) - )); - $this->assertTrue($d->hasModel('Tag')); - $this->assertTrue($d->hasModel('Person')); - $this->assertFalse($d->hasModel('Foo')); - $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $d->getModel('Tag')); - $this->assertNull($d->getModel('Foo')); - $this->assertContains('"models":{', serialize($d)); - $this->assertEquals(array('Tag', 'Person'), array_keys($d->getModels())); - } - - public function testCanAddModels() - { - $d = new ServiceDescription(array()); - $this->assertFalse($d->hasModel('Foo')); - $d->addModel(new Parameter(array('name' => 'Foo'))); - $this->assertTrue($d->hasModel('Foo')); - } - - public function testHasAttributes() - { - $d = new ServiceDescription(array( - 'operations' => array(), - 'name' => 'Name', - 'description' => 'Description', - 'apiVersion' => '1.24' - )); - - $this->assertEquals('Name', $d->getName()); - $this->assertEquals('Description', $d->getDescription()); - $this->assertEquals('1.24', $d->getApiVersion()); - - $s = serialize($d); - $this->assertContains('"name":"Name"', $s); - $this->assertContains('"description":"Description"', $s); - $this->assertContains('"apiVersion":"1.24"', $s); - - $d = unserialize($s); - $this->assertEquals('Name', $d->getName()); - $this->assertEquals('Description', $d->getDescription()); - $this->assertEquals('1.24', $d->getApiVersion()); - } - - public function testPersistsCustomAttributes() - { - $data = array( - 'operations' => array('foo' => array('class' => 'foo', 'parameters' => array())), - 'name' => 'Name', - 'description' => 'Test', - 'apiVersion' => '1.24', - 'auth' => 'foo', - 'keyParam' => 'bar' - ); - $d = new ServiceDescription($data); - $d->setData('hello', 'baz'); - $this->assertEquals('foo', $d->getData('auth')); - $this->assertEquals('baz', $d->getData('hello')); - $this->assertEquals('bar', $d->getData('keyParam')); - // responseClass and responseType are added by default - $data['operations']['foo']['responseClass'] = 'array'; - $data['operations']['foo']['responseType'] = 'primitive'; - $this->assertEquals($data + array('hello' => 'baz'), json_decode($d->serialize(), true)); - } - - public function testHasToArray() - { - $data = array( - 'operations' => array(), - 'name' => 'Name', - 'description' => 'Test' - ); - $d = new ServiceDescription($data); - $arr = $d->toArray(); - $this->assertEquals('Name', $arr['name']); - $this->assertEquals('Test', $arr['description']); - } - - public function testReturnsNullWhenRetrievingMissingOperation() - { - $s = new ServiceDescription(array()); - $this->assertNull($s->getOperation('foo')); - } - - public function testCanAddOperations() - { - $s = new ServiceDescription(array()); - $this->assertFalse($s->hasOperation('Foo')); - $s->addOperation(new Operation(array('name' => 'Foo'))); - $this->assertTrue($s->hasOperation('Foo')); - } - - /** - * @expectedException Guzzle\Common\Exception\InvalidArgumentException - */ - public function testValidatesOperationTypes() - { - $s = new ServiceDescription(array( - 'operations' => array('foo' => new \stdClass()) - )); - } - - public function testHasBaseUrl() - { - $description = new ServiceDescription(array('baseUrl' => 'http://foo.com')); - $this->assertEquals('http://foo.com', $description->getBaseUrl()); - $description->setBaseUrl('http://foobar.com'); - $this->assertEquals('http://foobar.com', $description->getBaseUrl()); - } - - public function testCanUseBasePath() - { - $description = new ServiceDescription(array('basePath' => 'http://foo.com')); - $this->assertEquals('http://foo.com', $description->getBaseUrl()); - } - - public function testModelsHaveNames() - { - $desc = array( - 'models' => array( - 'date' => array('type' => 'string'), - 'user'=> array( - 'type' => 'object', - 'properties' => array( - 'dob' => array('$ref' => 'date') - ) - ) - ) - ); - - $s = ServiceDescription::factory($desc); - $this->assertEquals('date', $s->getModel('date')->getName()); - $this->assertEquals('dob', $s->getModel('user')->getProperty('dob')->getName()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/CommandTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/CommandTransferExceptionTest.php deleted file mode 100644 index be0d4ac8b..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/CommandTransferExceptionTest.php +++ /dev/null @@ -1,66 +0,0 @@ -addSuccessfulCommand($c1)->addFailedCommand($c2); - $this->assertSame(array($c1), $e->getSuccessfulCommands()); - $this->assertSame(array($c2), $e->getFailedCommands()); - $this->assertSame(array($c1, $c2), $e->getAllCommands()); - } - - public function testConvertsMultiExceptionIntoCommandTransfer() - { - $r1 = new Request('GET', 'http://foo.com'); - $r2 = new Request('GET', 'http://foobaz.com'); - $e = new MultiTransferException('Test', 123); - $e->addSuccessfulRequest($r1)->addFailedRequest($r2); - $ce = CommandTransferException::fromMultiTransferException($e); - - $this->assertInstanceOf('Guzzle\Service\Exception\CommandTransferException', $ce); - $this->assertEquals('Test', $ce->getMessage()); - $this->assertEquals(123, $ce->getCode()); - $this->assertSame(array($r1), $ce->getSuccessfulRequests()); - $this->assertSame(array($r2), $ce->getFailedRequests()); - } - - public function testCanRetrieveExceptionForCommand() - { - $r1 = new Request('GET', 'http://foo.com'); - $e1 = new \Exception('foo'); - $c1 = $this->getMockBuilder('Guzzle\Tests\Service\Mock\Command\MockCommand') - ->setMethods(array('getRequest')) - ->getMock(); - $c1->expects($this->once())->method('getRequest')->will($this->returnValue($r1)); - - $e = new MultiTransferException('Test', 123); - $e->addFailedRequestWithException($r1, $e1); - $ce = CommandTransferException::fromMultiTransferException($e); - $ce->addFailedCommand($c1); - - $this->assertSame($e1, $ce->getExceptionForFailedCommand($c1)); - } - - public function testAddsNonRequestExceptions() - { - $e = new MultiTransferException(); - $e->add(new \Exception('bar')); - $e->addFailedRequestWithException(new Request('GET', 'http://www.foo.com'), new \Exception('foo')); - $ce = CommandTransferException::fromMultiTransferException($e); - $this->assertEquals(2, count($ce)); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php deleted file mode 100644 index 6455295ad..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php +++ /dev/null @@ -1,15 +0,0 @@ -assertEquals($items, $e->getCommands()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php deleted file mode 100644 index ef789d8a9..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php +++ /dev/null @@ -1,17 +0,0 @@ -setErrors($errors); - $this->assertEquals($errors, $e->getErrors()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php deleted file mode 100644 index 4ab423e85..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php +++ /dev/null @@ -1,31 +0,0 @@ - 'iterable_command', - 'parameters' => array( - 'page_size' => array('type' => 'integer'), - 'next_token' => array('type' => 'string') - ) - )); - } - - protected function build() - { - $this->request = $this->client->createRequest('GET'); - - // Add the next token and page size query string values - $this->request->getQuery()->set('next_token', $this->get('next_token')); - - if ($this->get('page_size')) { - $this->request->getQuery()->set('page_size', $this->get('page_size')); - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php deleted file mode 100644 index 831a7e795..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php +++ /dev/null @@ -1,32 +0,0 @@ - get_called_class() == __CLASS__ ? 'mock_command' : 'sub.sub', - 'httpMethod' => 'POST', - 'parameters' => array( - 'test' => array( - 'default' => 123, - 'required' => true, - 'doc' => 'Test argument' - ), - '_internal' => array( - 'default' => 'abc' - ), - 'foo' => array('filters' => array('strtoupper')) - ) - )); - } - - protected function build() - { - $this->request = $this->client->createRequest(); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php deleted file mode 100644 index 72ae1f6a7..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php +++ /dev/null @@ -1,30 +0,0 @@ - 'other_command', - 'parameters' => array( - 'test' => array( - 'default' => '123', - 'required' => true, - 'doc' => 'Test argument' - ), - 'other' => array(), - 'arg' => array('type' => 'string'), - 'static' => array('static' => true, 'default' => 'this is static') - ) - )); - } - - protected function build() - { - $this->request = $this->client->getRequest('HEAD'); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/Sub/Sub.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/Sub/Sub.php deleted file mode 100644 index d348480cf..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/Sub/Sub.php +++ /dev/null @@ -1,7 +0,0 @@ - '{scheme}://127.0.0.1:8124/{api_version}/{subdomain}', - 'scheme' => 'http', - 'api_version' => 'v1' - ), array('username', 'password', 'subdomain')); - - return new self($config->get('base_url'), $config); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php deleted file mode 100644 index 8faf4123a..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php +++ /dev/null @@ -1,42 +0,0 @@ -nextToken) { - $this->command->set('next_token', $this->nextToken); - } - - $this->command->set('page_size', (int) $this->calculatePageSize()); - $this->command->execute(); - - $data = json_decode($this->command->getResponse()->getBody(true), true); - - $this->nextToken = $data['next_token']; - - return $data['resources']; - } - - public function next() - { - $this->calledNext++; - parent::next(); - } - - public function getResources() - { - return $this->resources; - } - - public function getIteratedCount() - { - return $this->iteratedCount; - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php deleted file mode 100644 index 41c207372..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php +++ /dev/null @@ -1,37 +0,0 @@ -assertFalse($factory->canBuild($cmd)); - $factory->build($cmd); - } - - public function testBuildsResourceIterators() - { - $f1 = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model'); - $factory = new CompositeResourceIteratorFactory(array()); - $factory->addFactory($f1); - $command = new MockCommand(); - $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\Tests\Service\Mock')); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php deleted file mode 100644 index d166e9261..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php +++ /dev/null @@ -1,40 +0,0 @@ -build(new MockCommand()); - } - - public function testBuildsResourceIterators() - { - $factory = new MapResourceIteratorFactory(array( - 'mock_command' => 'Guzzle\Tests\Service\Mock\Model\MockCommandIterator' - )); - $iterator = $factory->build(new MockCommand()); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - } - - public function testUsesWildcardMappings() - { - $factory = new MapResourceIteratorFactory(array( - '*' => 'Guzzle\Tests\Service\Mock\Model\MockCommandIterator' - )); - $iterator = $factory->build(new MockCommand()); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ModelTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ModelTest.php deleted file mode 100644 index 7214133e5..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ModelTest.php +++ /dev/null @@ -1,65 +0,0 @@ - 'object')); - $model = new Model(array('foo' => 'bar'), $param); - $this->assertSame($param, $model->getStructure()); - $this->assertEquals('bar', $model->get('foo')); - $this->assertEquals('bar', $model['foo']); - } - - public function testCanBeUsedWithoutStructure() - { - $model = new Model(array( - 'Foo' => 'baz', - 'Bar' => array( - 'Boo' => 'Bam' - ) - )); - $transform = function ($key, $value) { - return ($value && is_array($value)) ? new Collection($value) : $value; - }; - $model = $model->map($transform); - $this->assertInstanceOf('Guzzle\Common\Collection', $model->getPath('Bar')); - } - - public function testAllowsFiltering() - { - $model = new Model(array( - 'Foo' => 'baz', - 'Bar' => 'a' - )); - $model = $model->filter(function ($i, $v) { - return $v[0] == 'a'; - }); - $this->assertEquals(array('Bar' => 'a'), $model->toArray()); - } - - public function testDoesNotIncludeEmptyStructureInString() - { - $model = new Model(array('Foo' => 'baz')); - $str = (string) $model; - $this->assertContains('Debug output of model', $str); - $this->assertNotContains('Model structure', $str); - } - - public function testDoesIncludeModelStructureInString() - { - $model = new Model(array('Foo' => 'baz'), new Parameter(array('name' => 'Foo'))); - $str = (string) $model; - $this->assertContains('Debug output of Foo model', $str); - $this->assertContains('Model structure', $str); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php deleted file mode 100644 index 7b061b537..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php +++ /dev/null @@ -1,41 +0,0 @@ -registerNamespace('Baz'); - $command = new MockCommand(); - $factory->build($command); - } - - public function testBuildsResourceIterators() - { - $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model'); - $command = new MockCommand(); - $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\Tests\Service\Mock')); - $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); - } - - public function testChecksIfCanBuild() - { - $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service'); - $this->assertFalse($factory->canBuild(new MockCommand())); - $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model'); - $this->assertTrue($factory->canBuild(new MockCommand())); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorTest.php deleted file mode 100644 index 2cd03187d..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorTest.php +++ /dev/null @@ -1,185 +0,0 @@ -assertInternalType('array', ResourceIterator::getAllEvents()); - } - - public function testConstructorConfiguresDefaults() - { - $ri = $this->getMockForAbstractClass('Guzzle\\Service\\Resource\\ResourceIterator', array( - $this->getServiceBuilder()->get('mock')->getCommand('iterable_command'), - array( - 'limit' => 10, - 'page_size' => 3 - ) - ), 'MockIterator'); - - $this->assertEquals(false, $ri->getNextToken()); - $this->assertEquals(false, $ri->current()); - } - - public function testSendsRequestsForNextSetOfResources() - { - // Queue up an array of responses for iterating - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"g\", \"h\", \"i\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 41\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"j\"] }" - )); - - // Create a new resource iterator using the IterableCommand mock - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'), array( - 'page_size' => 3 - )); - - // Ensure that no requests have been sent yet - $this->assertEquals(0, count($this->getServer()->getReceivedRequests(false))); - - //$this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i', 'j'), $ri->toArray()); - $ri->toArray(); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals(3, count($requests)); - - $this->assertEquals(3, $requests[0]->getQuery()->get('page_size')); - $this->assertEquals(3, $requests[1]->getQuery()->get('page_size')); - $this->assertEquals(3, $requests[2]->getQuery()->get('page_size')); - - // Reset and resend - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"g\", \"h\", \"i\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 41\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"j\"] }", - )); - - $d = array(); - reset($ri); - foreach ($ri as $data) { - $d[] = $data; - } - $this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i', 'j'), $d); - } - - public function testCalculatesPageSize() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"g\", \"h\", \"i\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"j\", \"k\"] }" - )); - - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'), array( - 'page_size' => 3, - 'limit' => 7 - )); - - $this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i', 'j'), $ri->toArray()); - $requests = $this->getServer()->getReceivedRequests(true); - $this->assertEquals(3, count($requests)); - $this->assertEquals(3, $requests[0]->getQuery()->get('page_size')); - $this->assertEquals(3, $requests[1]->getQuery()->get('page_size')); - $this->assertEquals(1, $requests[2]->getQuery()->get('page_size')); - } - - public function testUseAsArray() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"g\", \"h\", \"i\"] }" - )); - - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command')); - - // Ensure that the key is never < 0 - $this->assertEquals(0, $ri->key()); - $this->assertEquals(0, count($ri)); - - // Ensure that the iterator can be used as KVP array - $data = array(); - foreach ($ri as $key => $value) { - $data[$key] = $value; - } - - // Ensure that the iterate is countable - $this->assertEquals(6, count($ri)); - $this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i'), $data); - } - - public function testBailsWhenSendReturnsNoResults() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [] }" - )); - - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command')); - - // Ensure that the iterator can be used as KVP array - $data = $ri->toArray(); - - // Ensure that the iterate is countable - $this->assertEquals(3, count($ri)); - $this->assertEquals(array('d', 'e', 'f'), $data); - - $this->assertEquals(2, $ri->getRequestCount()); - } - - public function testHoldsDataOptions() - { - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command')); - $this->assertNull($ri->get('foo')); - $this->assertSame($ri, $ri->set('foo', 'bar')); - $this->assertEquals('bar', $ri->get('foo')); - } - - public function testSettingLimitOrPageSizeClearsData() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }", - "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }" - )); - - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command')); - $ri->toArray(); - $this->assertNotEmpty($this->readAttribute($ri, 'resources')); - - $ri->setLimit(10); - $this->assertEmpty($this->readAttribute($ri, 'resources')); - - $ri->toArray(); - $this->assertNotEmpty($this->readAttribute($ri, 'resources')); - $ri->setPageSize(10); - $this->assertEmpty($this->readAttribute($ri, 'resources')); - } - - public function testWorksWithCustomAppendIterator() - { - $this->getServer()->flush(); - $this->getServer()->enqueue(array( - "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }" - )); - $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command')); - $a = new \Guzzle\Iterator\AppendIterator(); - $a->append($ri); - $results = iterator_to_array($a, false); - $this->assertEquals(4, $ri->calledNext); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/PhpStreamRequestFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/PhpStreamRequestFactoryTest.php deleted file mode 100644 index 083aaa0d9..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/PhpStreamRequestFactoryTest.php +++ /dev/null @@ -1,172 +0,0 @@ -client = new Client($this->getServer()->getUrl()); - $this->factory = new PhpStreamRequestFactory(); - } - - public function testOpensValidStreamByCreatingContext() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - $request = $this->client->get('/'); - $stream = $this->factory->fromRequest($request); - $this->assertEquals('hi', (string) $stream); - $headers = $this->factory->getLastResponseHeaders(); - $this->assertContains('HTTP/1.1 200 OK', $headers); - $this->assertContains('Content-Length: 2', $headers); - $this->assertSame($headers, $stream->getCustomData('response_headers')); - $this->assertEquals(2, $stream->getSize()); - } - - public function testOpensValidStreamByPassingContextAndMerging() - { - $request = $this->client->get('/'); - $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory') - ->setMethods(array('createContext', 'createStream')) - ->getMock(); - $this->factory->expects($this->never()) - ->method('createContext'); - $this->factory->expects($this->once()) - ->method('createStream') - ->will($this->returnValue(new Stream(fopen('php://temp', 'r')))); - - $context = array('http' => array('method' => 'HEAD', 'ignore_errors' => false)); - $this->factory->fromRequest($request, stream_context_create($context)); - $options = stream_context_get_options($this->readAttribute($this->factory, 'context')); - $this->assertEquals('HEAD', $options['http']['method']); - $this->assertFalse($options['http']['ignore_errors']); - $this->assertEquals('1.1', $options['http']['protocol_version']); - } - - public function testAppliesProxySettings() - { - $request = $this->client->get('/'); - $request->getCurlOptions()->set(CURLOPT_PROXY, 'tcp://foo.com'); - $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory') - ->setMethods(array('createStream')) - ->getMock(); - $this->factory->expects($this->once()) - ->method('createStream') - ->will($this->returnValue(new Stream(fopen('php://temp', 'r')))); - $this->factory->fromRequest($request); - $options = stream_context_get_options($this->readAttribute($this->factory, 'context')); - $this->assertEquals('tcp://foo.com', $options['http']['proxy']); - } - - public function testAddsPostFields() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - $request = $this->client->post('/', array('Foo' => 'Bar'), array('foo' => 'baz bar')); - $stream = $this->factory->fromRequest($request); - $this->assertEquals('hi', (string) $stream); - - $headers = $this->factory->getLastResponseHeaders(); - $this->assertContains('HTTP/1.1 200 OK', $headers); - $this->assertContains('Content-Length: 2', $headers); - $this->assertSame($headers, $stream->getCustomData('response_headers')); - - $received = $this->getServer()->getReceivedRequests(); - $this->assertEquals(1, count($received)); - $this->assertContains('POST / HTTP/1.1', $received[0]); - $this->assertContains('host: ', $received[0]); - $this->assertContains('user-agent: Guzzle/', $received[0]); - $this->assertContains('foo: Bar', $received[0]); - $this->assertContains('content-length: 13', $received[0]); - $this->assertContains('foo=baz%20bar', $received[0]); - } - - public function testAddsBody() - { - $this->getServer()->flush(); - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - $request = $this->client->put('/', array('Foo' => 'Bar'), 'Testing...123'); - $stream = $this->factory->fromRequest($request); - $this->assertEquals('hi', (string) $stream); - - $headers = $this->factory->getLastResponseHeaders(); - $this->assertContains('HTTP/1.1 200 OK', $headers); - $this->assertContains('Content-Length: 2', $headers); - $this->assertSame($headers, $stream->getCustomData('response_headers')); - - $received = $this->getServer()->getReceivedRequests(); - $this->assertEquals(1, count($received)); - $this->assertContains('PUT / HTTP/1.1', $received[0]); - $this->assertContains('host: ', $received[0]); - $this->assertContains('user-agent: Guzzle/', $received[0]); - $this->assertContains('foo: Bar', $received[0]); - $this->assertContains('content-length: 13', $received[0]); - $this->assertContains('Testing...123', $received[0]); - } - - public function testCanDisableSslValidation() - { - $request = $this->client->get('/'); - $request->getCurlOptions()->set(CURLOPT_SSL_VERIFYPEER, false); - $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory') - ->setMethods(array('createStream')) - ->getMock(); - $this->factory->expects($this->once()) - ->method('createStream') - ->will($this->returnValue(new Stream(fopen('php://temp', 'r')))); - $this->factory->fromRequest($request); - $options = stream_context_get_options($this->readAttribute($this->factory, 'context')); - $this->assertFalse($options['ssl']['verify_peer']); - } - - public function testUsesSslValidationByDefault() - { - $request = $this->client->get('/'); - $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory') - ->setMethods(array('createStream')) - ->getMock(); - $this->factory->expects($this->once()) - ->method('createStream') - ->will($this->returnValue(new Stream(fopen('php://temp', 'r')))); - $this->factory->fromRequest($request); - $options = stream_context_get_options($this->readAttribute($this->factory, 'context')); - $this->assertTrue($options['ssl']['verify_peer']); - $this->assertSame($request->getCurlOptions()->get(CURLOPT_CAINFO), $options['ssl']['cafile']); - } - - public function testBasicAuthAddsUserAndPassToUrl() - { - $request = $this->client->get('/'); - $request->setAuth('Foo', 'Bar'); - $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory') - ->setMethods(array('createStream')) - ->getMock(); - $this->factory->expects($this->once()) - ->method('createStream') - ->will($this->returnValue(new Stream(fopen('php://temp', 'r')))); - $this->factory->fromRequest($request); - $this->assertContains('Foo:Bar@', (string) $this->readAttribute($this->factory, 'url')); - } - - public function testCanCreateCustomStreamClass() - { - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi"); - $request = $this->client->get('/'); - $stream = $this->factory->fromRequest($request, array(), array('stream_class' => 'Guzzle\Http\EntityBody')); - $this->assertInstanceOf('Guzzle\Http\EntityBody', $stream); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/StreamTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/StreamTest.php deleted file mode 100644 index 4858accae..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/StreamTest.php +++ /dev/null @@ -1,189 +0,0 @@ -assertEquals($handle, $stream->getStream()); - $this->assertTrue($stream->isReadable()); - $this->assertTrue($stream->isWritable()); - $this->assertTrue($stream->isLocal()); - $this->assertTrue($stream->isSeekable()); - $this->assertEquals('PHP', $stream->getWrapper()); - $this->assertEquals('TEMP', $stream->getStreamType()); - $this->assertEquals(4, $stream->getSize()); - $this->assertEquals('php://temp', $stream->getUri()); - $this->assertEquals(array(), $stream->getWrapperData()); - $this->assertFalse($stream->isConsumed()); - unset($stream); - } - - public function testCanModifyStream() - { - $handle1 = fopen('php://temp', 'r+'); - $handle2 = fopen('php://temp', 'r+'); - $stream = new Stream($handle1); - $this->assertSame($handle1, $stream->getStream()); - $stream->setStream($handle2, 10); - $this->assertEquals(10, $stream->getSize()); - $this->assertSame($handle2, $stream->getStream()); - } - - public function testStreamClosesHandleOnDestruct() - { - $handle = fopen('php://temp', 'r'); - $stream = new Stream($handle); - unset($stream); - $this->assertFalse(is_resource($handle)); - } - - public function testConvertsToString() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $this->assertEquals('data', (string) $stream); - unset($stream); - - $handle = fopen(__DIR__ . '/../TestData/FileBody.txt', 'r'); - $stream = new Stream($handle); - $this->assertEquals('', (string) $stream); - unset($stream); - } - - public function testConvertsToStringAndRestoresCursorPos() - { - $handle = fopen('php://temp', 'w+'); - $stream = new Stream($handle); - $stream->write('foobazbar'); - $stream->seek(3); - $this->assertEquals('foobazbar', (string) $stream); - $this->assertEquals(3, $stream->ftell()); - } - - public function testIsConsumed() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $this->assertFalse($stream->isConsumed()); - $stream->read(4); - $this->assertTrue($stream->isConsumed()); - } - - public function testAllowsSettingManualSize() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $stream->setSize(10); - $this->assertEquals(10, $stream->getSize()); - unset($stream); - } - - public function testWrapsStream() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $this->assertTrue($stream->isSeekable()); - $this->assertTrue($stream->isReadable()); - $this->assertTrue($stream->seek(0)); - $this->assertEquals('da', $stream->read(2)); - $this->assertEquals('ta', $stream->read(2)); - $this->assertTrue($stream->seek(0)); - $this->assertEquals('data', $stream->read(4)); - $stream->write('_appended'); - $stream->seek(0); - $this->assertEquals('data_appended', $stream->read(13)); - } - - public function testGetSize() - { - $size = filesize(__DIR__ . '/../../../bootstrap.php'); - $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r'); - $stream = new Stream($handle); - $this->assertEquals($handle, $stream->getStream()); - $this->assertEquals($size, $stream->getSize()); - $this->assertEquals($size, $stream->getSize()); - unset($stream); - - // Make sure that false is returned when the size cannot be determined - $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - $handle = fopen('http://localhost:' . $this->getServer()->getPort(), 'r'); - $stream = new Stream($handle); - $this->assertEquals(false, $stream->getSize()); - unset($stream); - } - - public function testEnsuresSizeIsConsistent() - { - $h = fopen('php://temp', 'r+'); - fwrite($h, 'foo'); - $stream = new Stream($h); - $this->assertEquals(3, $stream->getSize()); - $stream->write('test'); - $this->assertEquals(7, $stream->getSize()); - fclose($h); - } - - public function testAbstractsMetaData() - { - $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r'); - $stream = new Stream($handle); - $this->assertEquals('plainfile', $stream->getMetaData('wrapper_type')); - $this->assertEquals(null, $stream->getMetaData('wrapper_data')); - $this->assertInternalType('array', $stream->getMetaData()); - } - - public function testDoesNotAttemptToWriteToReadonlyStream() - { - $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r'); - $stream = new Stream($handle); - $this->assertEquals(0, $stream->write('foo')); - } - - public function testProvidesStreamPosition() - { - $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r'); - $stream = new Stream($handle); - $stream->read(2); - $this->assertSame(ftell($handle), $stream->ftell()); - $this->assertEquals(2, $stream->ftell()); - } - - public function testRewindIsSeekZero() - { - $stream = new Stream(fopen('php://temp', 'w+')); - $stream->write('foobazbar'); - $this->assertTrue($stream->rewind()); - $this->assertEquals('foobazbar', $stream->read(9)); - } - - public function testCanDetachStream() - { - $r = fopen('php://temp', 'w+'); - $stream = new Stream($r); - $stream->detachStream(); - $this->assertNull($stream->getStream()); - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/FileBody.txt b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/FileBody.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json deleted file mode 100644 index c354ed788..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "includes": ["foo.json"] -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json deleted file mode 100644 index 765237b3e..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "includes": ["foo.json", "bar.json"] -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/foo.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/foo.json deleted file mode 100644 index cee5005b8..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/foo.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "includes": ["recursive.json"], - "operations": { - "abstract": { - "httpMethod": "POST" - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json deleted file mode 100644 index c354ed788..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "includes": ["foo.json"] -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response deleted file mode 100644 index b6938a28c..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response +++ /dev/null @@ -1,3 +0,0 @@ -HTTP/1.1 200 OK -Content-Length: 0 - diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json deleted file mode 100644 index 7b2a9dad4..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "includes": [ "json2.json" ], - "services": { - "abstract": { - "access_key": "xyz", - "secret": "abc" - }, - "mock": { - "class": "Guzzle\\Tests\\Service\\Mock\\MockClient", - "extends": "abstract", - "params": { - "username": "foo", - "password": "baz", - "subdomain": "bar" - } - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json deleted file mode 100644 index 08e5566f0..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "services": { - "foo": { - "class": "Guzzle\\Tests\\Service\\Mock\\MockClient", - "extends": "abstract", - "params": { - "baz": "bar" - } - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/services.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/services.json deleted file mode 100644 index 25452e4a4..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/services.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "abstract": { - "access_key": "xyz", - "secret": "abc" - }, - "mock": { - "class": "Guzzle\\Tests\\Service\\Mock\\MockClient", - "extends": "abstract", - "params": { - "username": "foo", - "password": "baz", - "subdomain": "bar" - } - }, - - "test.abstract.aws": { - "params": { - "access_key": "12345", - "secret_key": "abcd" - } - }, - - "test.s3": { - "class": "Guzzle\\Service\\Aws\\S3Client", - "extends": "test.abstract.aws", - "params": { - "devpay_product_token": "", - "devpay_user_token": "" - } - }, - - "test.simple_db": { - "class": "Guzzle\\Service\\Aws\\SimpleDb\\SimpleDbClient", - "extends": "test.abstract.aws" - }, - - "test.sqs": { - "class": "Guzzle\\Service\\Aws\\Sqs\\SqsClient", - "extends": "test.abstract.aws" - }, - - "test.centinel": { - "class": "Guzzle\\Service\\CardinalCommerce\\Centinel.CentinelClient", - "params": { - "password": "test", - "processor_id": "123", - "merchant_id": "456" - } - }, - - "test.mws": { - "class": "Guzzle\\Service\\Mws\\MwsClient", - "extends": "test.abstract.aws", - "params": { - "merchant_id": "ABCDE", - "marketplace_id": "FGHIJ", - "application_name": "GuzzleTest", - "application_version": "0.1", - "base_url": "https://mws.amazonservices.com" - } - }, - - "mock": { - "class": "Guzzle\\Tests\\Service\\Mock\\MockClient", - "params": { - "username": "test_user", - "password": "****", - "subdomain": "test" - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json deleted file mode 100644 index 01557ca11..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "includes": [ "test_service2.json" ], - "operations": { - "test": { - "uri": "/path" - }, - "concrete": { - "extends": "abstract" - }, - "foo_bar": { - "uri": "/testing", - "parameters": { - "other": { - "location": "json", - "location_key": "Other" - }, - "test": { - "type": "object", - "location": "json", - "properties": { - "baz": { - "type": "boolean", - "default": true - }, - "bar": { - "type": "string", - "filters": [ - { - "method": "strtolower", - "args": ["test", "@value"] - }, - "strtoupper" - ] - } - } - } - } - } - } -} diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service2.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service2.json deleted file mode 100644 index 66dd9ef7e..000000000 --- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "operations": { - "abstract": { - "uri": "/abstract" - } - } -} diff --git a/vendor/guzzle/guzzle/tests/bootstrap.php b/vendor/guzzle/guzzle/tests/bootstrap.php deleted file mode 100644 index d5f8cb627..000000000 --- a/vendor/guzzle/guzzle/tests/bootstrap.php +++ /dev/null @@ -1,10 +0,0 @@ -` instead of `` ([#726](https://github.com/laravel/dusk/pull/726)) - - -## [v5.8.2 (2020-01-21)](https://github.com/laravel/dusk/compare/v5.8.1...v5.8.2) - -### Changed -- Rename php-webdriver package ([#720](https://github.com/laravel/dusk/pull/720)) -- Update jQuery file ([#721](https://github.com/laravel/dusk/pull/721)) - -### Fixed -- Update `fitContent()` ([#717](https://github.com/laravel/dusk/pull/717)) - - -## [v5.8.1 (2020-01-07)](https://github.com/laravel/dusk/compare/v5.8.0...v5.8.1) - -### Fixed -- Cast boolean values to appropriate string ([#713](https://github.com/laravel/dusk/pull/713)) - - -## [v5.8.0 (2019-12-30)](https://github.com/laravel/dusk/compare/v5.7.0...v5.8.0) - -### Added -- Add "waitUntilMissingText" ([#706](https://github.com/laravel/dusk/pull/706)) -- Add ability to store source from browser ([#707](https://github.com/laravel/dusk/pull/707), [9c90e2a](https://github.com/laravel/dusk/commit/9c90e2a716030c9a36e6306c3f67d606a254bbb7), [1d5bc20](https://github.com/laravel/dusk/commit/1d5bc203b67ffc5a17eb1b89f3e22547e3ea174b)) - - -## [v5.7.0 (2019-12-17)](https://github.com/laravel/dusk/compare/v5.6.3...v5.7.0) - -### Added -- Automatically fit content on failures ([#704](https://github.com/laravel/dusk/pull/704)) - - -## [v5.6.3 (2019-12-03)](https://github.com/laravel/dusk/compare/v5.6.2...v5.6.3) - -### Added -- Support phpdotenv v4 ([#699](https://github.com/laravel/dusk/pull/699)) - -### Fixed -- scrollTo: add support for selectors with quotes ([#697](https://github.com/laravel/dusk/pull/697)) - - -## [v5.6.2 (2019-11-26)](https://github.com/laravel/dusk/compare/v5.6.1...v5.6.2) - -### Changed -- Allow for Symfony 5 ([#696](https://github.com/laravel/dusk/pull/696)) - - -## [v5.6.1 (2019-11-12)](https://github.com/laravel/dusk/compare/v5.6.0...v5.6.1) - -### Fixed -- Ensure jQuery for scrollTo ([#686](https://github.com/laravel/dusk/pull/686)) -- Added missing return statement in withDuskEnvironment ([#691](https://github.com/laravel/dusk/pull/691)) -- Prevent using pcntl when not installed ([#692](https://github.com/laravel/dusk/pull/692)) - - -## [v5.6.0 (2019-10-29)](https://github.com/laravel/dusk/compare/v5.5.2...v5.6.0) - -### Added -- Add scrollTo method ([#684](https://github.com/laravel/dusk/pull/684)) - -### Fixed -- Add graceful handler for `SIGINT` for .env restoration ([#682](https://github.com/laravel/dusk/pull/682), [f843b8a](https://github.com/laravel/dusk/commit/f843b8a51ae96933cefcc74dec515377d3135611)) - - -## [v5.5.2 (2019-09-24)](https://github.com/laravel/dusk/compare/v5.5.1...v5.5.2) - -### Fixed -- Improve detection of latest stable ChromeDriver release ([#677](https://github.com/laravel/dusk/pull/677)) - - -## [v5.5.1 (2019-09-12)](https://github.com/laravel/dusk/compare/v5.5.0...v5.5.1) - -### Fixed -- Update regular expression base on website changes ([#674](https://github.com/laravel/dusk/pull/674)) - - -## [v5.5.0 (2019-08-06)](https://github.com/laravel/dusk/compare/v5.4.0...v5.5.0) - -### Added -- Allow saving screenshots in a subdirectory ([#662](https://github.com/laravel/dusk/pull/662)) - - -## [v5.4.0 (2019-07-30)](https://github.com/laravel/dusk/compare/v5.3.0...v5.4.0) - -### Added -- Add assertion checks if a button is disabled or enabled ([#661](https://github.com/laravel/dusk/pull/661)) - -### Fixed -- Update constraints for Laravel 6.0 ([e4b4d63](https://github.com/laravel/dusk/commit/e4b4d63c179bb1f228db22852bd776db750d1ec6)) - - -## [v5.3.0 (2019-07-11)](https://github.com/laravel/dusk/compare/v5.2.0...v5.3.0) - -### Added -- Add proxy support to the `dusk:install` command ([#659](https://github.com/laravel/dusk/pull/659)) - - -## [v5.2.0 (2019-06-25)](https://github.com/laravel/dusk/compare/v5.1.1...v5.2.0) - -### Added -- Add option to fullsize the browser ([#655](https://github.com/laravel/dusk/pull/655)) - - -## [v5.1.1 (2019-06-14)](https://github.com/laravel/dusk/compare/v5.1.0...v5.1.1) - -### Fixed -- Add latest version of Facebook Webdriver ([#654](https://github.com/laravel/dusk/pull/654)) - - -## [v5.1.0 (2019-05-02)](https://github.com/laravel/dusk/compare/v5.0.3...v5.1.0) - -### Added -- Implement ChromeDriverCommand ([#643](https://github.com/laravel/dusk/pull/643), [60339a5](https://github.com/laravel/dusk/commit/60339a521a1b05e55af7c90b3151557100a0db4d), [#644](https://github.com/laravel/dusk/pull/644)) - - -## [v5.0.3 (2019-04-02)](https://github.com/laravel/dusk/compare/v5.0.2...v5.0.3) - -### Fixed -- Fix `assertVueContains` and `assertVueDoesNotContain` ([#638](https://github.com/laravel/dusk/pull/638)) - - -## [v5.0.2 (2019-03-12)](https://github.com/laravel/dusk/compare/v5.0.1...v5.0.2) - -### Fixed -- Fix cookies with falsey values ([#617](https://github.com/laravel/dusk/pull/617)) -- Fix `with()` and page assertions ([#625](https://github.com/laravel/dusk/pull/625)) -- Avoid deprecation messages on PHPUnit 8 ([#620](https://github.com/laravel/dusk/pull/620)) - - -## [v5.0.1 (2019-02-27)](https://github.com/laravel/dusk/compare/v5.0.0...v5.0.1) - -### Added -- Added support for `phpunit.dusk.xml.dist` ([#610](https://github.com/laravel/dusk/pull/610)) -- Use custom DISPLAY variable when set on Linux ([#613](https://github.com/laravel/dusk/pull/613), [2480495](https://github.com/laravel/dusk/commit/24804953c5b521415a717afbf82ff4b938c10535)) - -### Fixed -- Added missing dependencies ([98eccfd](https://github.com/laravel/dusk/commit/98eccfd56e9b2b23b093b801f62c766aaf67589f)) -- Fix installation of Dotenv on Laravel 5.8 ([1f67bf2](https://github.com/laravel/dusk/commit/1f67bf204fab65a212975683b5391c2f55dd3bcf)) - - -## [v5.0.0 (2019-02-12)](https://github.com/laravel/dusk/compare/v4.0.5...v5.0.0) - -### Added -- Support PHPUnit 8 ([788e79c](https://github.com/laravel/dusk/commit/788e79c4713a5706eeafaf7270986a71a4ed43be)) -- Support Carbon 2 ([85cfc50](https://github.com/laravel/dusk/commit/85cfc50e126a3835428577052cc0660d1c3b639e)) -- Support Laravel 5.8 ([5b2e9aa](https://github.com/laravel/dusk/commit/5b2e9aa9e4a124f4c4878f65fb644101de1644e7)) - -### Changed -- Update minimum Laravel version ([fcb2226](https://github.com/laravel/dusk/commit/fcb2226a524f47b51b9b49316d87bc51738733d7)) -- Update Symfony dependencies to latest version ([788e79c](https://github.com/laravel/dusk/commit/788e79c4713a5706eeafaf7270986a71a4ed43be)) -- Prefer stable dependencies ([fdb2fd4](https://github.com/laravel/dusk/commit/fdb2fd4b2a2e787b08cf44649c4eef84837324ca)) - - -## [v4.0.0 (2018-08-11)](https://github.com/laravel/dusk/compare/v3.0.10...v4.0.0) - -Dusk 4.0.0 disables cookie serialization and is intended for use with Laravel 5.6.30 or later. If you are using a previous version of Laravel, please continue using Dusk 3.0.0. - - -## v1.0.13 (2017-04-20) - -### Added -- Added `illuminate/console` as dependency ([#232](https://github.com/laravel/dusk/pull/232)) -- Added security measurement against registering Dusk on production ([#229](https://github.com/laravel/dusk/pull/229)) -- Added `PHP_BINARY` constant to the list of PHP's executable binaries ([#240](https://github.com/laravel/dusk/pull/240)) - -### Changed -- Changed `propagateScaffoldingToBrowser()` to `setUp()` for compatibility with PHPUnit ~6.0 ([#227](https://github.com/laravel/dusk/pull/227)) -- Changed `selected()` comparison to always cast the value to string ([#239](https://github.com/laravel/dusk/pull/239)) - -### Fixed -- No longer throws exception when Tty is not available ([#226](https://github.com/laravel/dusk/pull/226)) -- Use `getAttribute('value')` instead of `getText()` for `textarea` elements ([#237](https://github.com/laravel/dusk/pull/237)) -- Fixed bug when giving strings with apostrophe to `clickLink()` ([#228](https://github.com/laravel/dusk/pull/228)) - - -## v1.0.12 (2017-04-07) - -### Added -- Added automated tests for HTML elements identified by strings with a colon ([#214](https://github.com/laravel/dusk/pull/214)) - -### Fixed -- Support for colon on HTML id tag ([#214](https://github.com/laravel/dusk/pull/214)) - - -## v1.0.11 (2017-03-20) - -### Added -- Added `assertSelectHasOptions()`, `assertSelectMissingOptions()`, `assertSelectHasOption()` and `and assertSelectMissingOption()` ([#195](https://github.com/laravel/dusk/pull/195)) -- Added purge console logs before starting tests ([#193](https://github.com/laravel/dusk/pull/193)) -- Added `assertPathIsNot()` ([#183](https://github.com/laravel/dusk/pull/183)) -- Added support for back button ([#187](https://github.com/laravel/dusk/pull/187)) -- Added `waitForLocation()` to allow waiting on `window.location` to be changed ([#176](https://github.com/laravel/dusk/pull/176)) - -### Changed -- Updated ChromeDriver to v2.28 so that it works with Chrome 57 ([#199](https://github.com/laravel/dusk/pull/199)) -- Comparison to `option` inside `select` will no longer be strict ([#178](https://github.com/laravel/dusk/pull/178)) -- Type-hint Browser for auto-complete support ([#174](https://github.com/laravel/dusk/pull/174)) diff --git a/vendor/laravel/dusk/README.md b/vendor/laravel/dusk/README.md index be6e2fd55..d634a8bc3 100644 --- a/vendor/laravel/dusk/README.md +++ b/vendor/laravel/dusk/README.md @@ -1,10 +1,10 @@ -

    +

    Logo Laravel Dusk

    Build Status -Total Downloads -Latest Stable Version -License +Total Downloads +Latest Stable Version +License

    ## Introduction diff --git a/vendor/laravel/dusk/UPGRADE.md b/vendor/laravel/dusk/UPGRADE.md deleted file mode 100644 index 15109a41d..000000000 --- a/vendor/laravel/dusk/UPGRADE.md +++ /dev/null @@ -1,17 +0,0 @@ -# Upgrade Guide - -## Upgrading To 5.0 From 4.0 - -### PHPUnit 8 - -Dusk now provides optional support for PHPUnit 8, which requires PHP >= 7.2 Please read through the entire list of changes in [the PHPUnit 8 release announcement](https://phpunit.de/announcements/phpunit-8.html). Using PHPUnit 8 will require Laravel 5.8, which will be released at the end of February 2019. - -You may also continue using PHPUnit 7, which requires a minimum of PHP 7.1. - -### Minimum Laravel version - -Laravel 5.7 is now the minimum supported version of the framework and you should upgrade to continue using Dusk. - -### `setUp` and `tearDown` changes - -The `setUp` and `tearDown` methods now require the `void` return type. If you were overwriting these methods you should add it to the method signatures. diff --git a/vendor/laravel/dusk/art/logo.svg b/vendor/laravel/dusk/art/logo.svg new file mode 100644 index 000000000..7e8f7ae77 --- /dev/null +++ b/vendor/laravel/dusk/art/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vendor/laravel/dusk/composer.json b/vendor/laravel/dusk/composer.json index 34b53d655..b84c44c0a 100644 --- a/vendor/laravel/dusk/composer.json +++ b/vendor/laravel/dusk/composer.json @@ -10,21 +10,22 @@ } ], "require": { - "php": ">=7.1.0", + "php": "^7.2|^8.0", "ext-json": "*", "ext-zip": "*", - "php-webdriver/webdriver": "^1.8.1", - "nesbot/carbon": "^1.20|^2.0", - "illuminate/console": "~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", - "symfony/console": "^4.0|^5.0", - "symfony/finder": "^4.0|^5.0", - "symfony/process": "^4.0|^5.0", - "vlucas/phpdotenv": "^2.2|^3.0|^4.0" + "php-webdriver/webdriver": "^1.9.0", + "nesbot/carbon": "^2.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "symfony/console": "^4.3|^5.0|^6.0", + "symfony/finder": "^4.3|^5.0|^6.0", + "symfony/process": "^4.3|^5.0|^6.0", + "vlucas/phpdotenv": "^3.0|^4.0|^5.2" }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.5|^8.0" + "phpunit/phpunit": "^7.5.15|^8.4|^9.0", + "orchestra/testbench": "^4.16|^5.17.1|^6.12.1|^7.0" }, "suggest": { "ext-pcntl": "Used to gracefully terminate Dusk when tests are running." @@ -41,7 +42,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.x-dev" }, "laravel": { "providers": [ diff --git a/vendor/laravel/dusk/src/Browser.php b/vendor/laravel/dusk/src/Browser.php index 182f4a896..51f2420dd 100644 --- a/vendor/laravel/dusk/src/Browser.php +++ b/vendor/laravel/dusk/src/Browser.php @@ -39,6 +39,38 @@ class Browser */ public static $storeScreenshotsAt; + /** + * The common screen sizes to use for responsive screenshots. + * + * @var array + */ + public static $responsiveScreenSizes = [ + 'xs' => [ + 'width' => 360, + 'height' => 640, + ], + 'sm' => [ + 'width' => 640, + 'height' => 360, + ], + 'md' => [ + 'width' => 768, + 'height' => 1024, + ], + 'lg' => [ + 'width' => 1024, + 'height' => 768, + ], + 'xl' => [ + 'width' => 1280, + 'height' => 1024, + ], + '2xl' => [ + 'width' => 1536, + 'height' => 864, + ], + ]; + /** * The directory that will contain any console logs. * @@ -116,7 +148,7 @@ class Browser * Create a browser instance. * * @param \Facebook\WebDriver\Remote\RemoteWebDriver $driver - * @param \Laravel\Dusk\ElementResolver $resolver + * @param \Laravel\Dusk\ElementResolver|null $resolver * @return void */ public function __construct($driver, $resolver = null) @@ -174,6 +206,18 @@ class Browser return $this->visit(route($route, $parameters)); } + /** + * Browse to the "about:blank" page. + * + * @return $this + */ + public function blank() + { + $this->driver->navigate()->to('about:blank'); + + return $this; + } + /** * Set the current page object. * @@ -233,6 +277,18 @@ class Browser return $this; } + /** + * Navigate to the next page. + * + * @return $this + */ + public function forward() + { + $this->driver->navigate()->forward(); + + return $this; + } + /** * Maximize the browser window. * @@ -272,7 +328,7 @@ class Browser $html = $this->driver->findElement(WebDriverBy::tagName('html')); - if (! empty($html) && ($html->getSize()->getWidth() <= 0 || $html->getSize()->getHeight() <= 0)) { + if (! empty($html) && $html->getSize()->getWidth() > 0 && $html->getSize()->getHeight() > 0) { $this->resize($html->getSize()->getWidth(), $html->getSize()->getHeight()); } @@ -319,6 +375,21 @@ class Browser return $this; } + /** + * Scroll element into view at the given selector. + * + * @param string $selector + * @return $this + */ + public function scrollIntoView($selector) + { + $selector = addslashes($this->resolver->format($selector)); + + $this->driver->executeScript("document.querySelector(\"$selector\").scrollIntoView();"); + + return $this; + } + /** * Scroll screen to element at the given selector. * @@ -357,6 +428,26 @@ class Browser return $this; } + /** + * Take a series of screenshots at different browser sizes to emulate different devices. + * + * @param string $name + * @return $this + */ + public function responsiveScreenshots($name) + { + if (substr($name, -1) !== '/') { + $name .= '-'; + } + + foreach (static::$responsiveScreenSizes as $device => $size) { + $this->resize($size['width'], $size['height']) + ->screenshot("$name$device"); + } + + return $this; + } + /** * Store the console output with the given name. * @@ -418,7 +509,7 @@ class Browser /** * Execute a Closure with a scoped browser instance. * - * @param string $selector + * @param string|\Laravel\Dusk\Component $selector * @param \Closure $callback * @return $this */ @@ -430,7 +521,7 @@ class Browser /** * Execute a Closure with a scoped browser instance. * - * @param string $selector + * @param string|\Laravel\Dusk\Component $selector * @param \Closure $callback * @return $this */ @@ -453,6 +544,47 @@ class Browser return $this; } + /** + * Execute a Closure outside of the current browser scope. + * + * @param string|\Laravel\Dusk\Component $selector + * @param \Closure $callback + * @return $this + */ + public function elsewhere($selector, Closure $callback) + { + $browser = new static( + $this->driver, new ElementResolver($this->driver, 'body '.$selector) + ); + + if ($this->page) { + $browser->onWithoutAssert($this->page); + } + + if ($selector instanceof Component) { + $browser->onComponent($selector, $this->resolver); + } + + call_user_func($callback, $browser); + + return $this; + } + + /** + * Execute a Closure outside of the current browser scope when the selector is available. + * + * @param string $selector + * @param \Closure $callback + * @param int|null $seconds + * @return $this + */ + public function elsewhereWhenAvailable($selector, Closure $callback, $seconds = null) + { + return $this->elsewhere('', function ($browser) use ($selector, $callback, $seconds) { + $browser->whenAvailable($selector, $callback, $seconds); + }); + } + /** * Set the current component state. * diff --git a/vendor/laravel/dusk/src/Chrome/ChromeProcess.php b/vendor/laravel/dusk/src/Chrome/ChromeProcess.php index 031cc3b6d..4d9c45074 100644 --- a/vendor/laravel/dusk/src/Chrome/ChromeProcess.php +++ b/vendor/laravel/dusk/src/Chrome/ChromeProcess.php @@ -18,7 +18,7 @@ class ChromeProcess /** * Create a new ChromeProcess instance. * - * @param string $driver + * @param string|null $driver * @return void * * @throws \RuntimeException @@ -44,13 +44,15 @@ class ChromeProcess return $this->process($arguments); } - if ($this->onWindows()) { - $this->driver = realpath(__DIR__.'/../../bin/chromedriver-win.exe'); - } elseif ($this->onMac()) { - $this->driver = realpath(__DIR__.'/../../bin/chromedriver-mac'); - } else { - $this->driver = realpath(__DIR__.'/../../bin/chromedriver-linux'); - } + $filenames = [ + 'linux' => 'chromedriver-linux', + 'mac' => 'chromedriver-mac', + 'mac-intel' => 'chromedriver-mac-intel', + 'mac-arm' => 'chromedriver-mac-arm', + 'win' => 'chromedriver-win.exe', + ]; + + $this->driver = realpath(__DIR__.'/../../bin').DIRECTORY_SEPARATOR.$filenames[$this->operatingSystemId()]; return $this->process($arguments); } @@ -64,7 +66,7 @@ class ChromeProcess protected function process(array $arguments = []) { return new Process( - array_merge([realpath($this->driver)], $arguments), null, $this->chromeEnvironment() + array_merge([$this->driver], $arguments), null, $this->chromeEnvironment() ); } @@ -101,4 +103,14 @@ class ChromeProcess { return OperatingSystem::onMac(); } + + /** + * Determine OS ID. + * + * @return string + */ + protected function operatingSystemId() + { + return OperatingSystem::id(); + } } diff --git a/vendor/laravel/dusk/src/Concerns/InteractsWithAuthentication.php b/vendor/laravel/dusk/src/Concerns/InteractsWithAuthentication.php index 7068f797b..1f259b183 100644 --- a/vendor/laravel/dusk/src/Concerns/InteractsWithAuthentication.php +++ b/vendor/laravel/dusk/src/Concerns/InteractsWithAuthentication.php @@ -21,25 +21,25 @@ trait InteractsWithAuthentication * Log into the application using a given user ID or email. * * @param object|string $userId - * @param string $guard + * @param string|null $guard * @return $this */ public function loginAs($userId, $guard = null) { - $userId = method_exists($userId, 'getKey') ? $userId->getKey() : $userId; + $userId = is_object($userId) && method_exists($userId, 'getKey') ? $userId->getKey() : $userId; - return $this->visit(rtrim('/_dusk/login/'.$userId.'/'.$guard, '/')); + return $this->visit(rtrim(route('dusk.login', ['userId' => $userId, 'guard' => $guard], $this->shouldUseAbsoluteRouteForAuthentication()))); } /** * Log out of the application. * - * @param string $guard + * @param string|null $guard * @return $this */ public function logout($guard = null) { - return $this->visit(rtrim('/_dusk/logout/'.$guard, '/')); + return $this->visit(rtrim(route('dusk.logout', ['guard' => $guard], $this->shouldUseAbsoluteRouteForAuthentication()), '/')); } /** @@ -50,7 +50,7 @@ trait InteractsWithAuthentication */ protected function currentUserInfo($guard = null) { - $response = $this->visit("/_dusk/user/{$guard}"); + $response = $this->visit(route('dusk.user', ['guard' => $guard], $this->shouldUseAbsoluteRouteForAuthentication())); return json_decode(strip_tags($response->driver->getPageSource()), true); } @@ -63,9 +63,11 @@ trait InteractsWithAuthentication */ public function assertAuthenticated($guard = null) { + $currentUrl = $this->driver->getCurrentURL(); + PHPUnit::assertNotEmpty($this->currentUserInfo($guard), 'The user is not authenticated.'); - return $this; + return $this->visit($currentUrl); } /** @@ -76,11 +78,13 @@ trait InteractsWithAuthentication */ public function assertGuest($guard = null) { + $currentUrl = $this->driver->getCurrentURL(); + PHPUnit::assertEmpty( $this->currentUserInfo($guard), 'The user is unexpectedly authenticated.' ); - return $this; + return $this->visit($currentUrl); } /** @@ -92,6 +96,8 @@ trait InteractsWithAuthentication */ public function assertAuthenticatedAs($user, $guard = null) { + $currentUrl = $this->driver->getCurrentURL(); + $expected = [ 'id' => $user->getAuthIdentifier(), 'className' => get_class($user), @@ -102,6 +108,16 @@ trait InteractsWithAuthentication 'The currently authenticated user is not who was expected.' ); - return $this; + return $this->visit($currentUrl); + } + + /** + * Determine if route() should use an absolute path. + * + * @return bool + */ + private function shouldUseAbsoluteRouteForAuthentication() + { + return config('dusk.domain') !== null; } } diff --git a/vendor/laravel/dusk/src/Concerns/InteractsWithCookies.php b/vendor/laravel/dusk/src/Concerns/InteractsWithCookies.php index 7d31162da..a051829b6 100644 --- a/vendor/laravel/dusk/src/Concerns/InteractsWithCookies.php +++ b/vendor/laravel/dusk/src/Concerns/InteractsWithCookies.php @@ -3,6 +3,9 @@ namespace Laravel\Dusk\Concerns; use DateTimeInterface; +use Facebook\WebDriver\Exception\NoSuchCookieException; +use Illuminate\Cookie\CookieValuePrefix; +use Illuminate\Support\Facades\Crypt; trait InteractsWithCookies { @@ -13,7 +16,7 @@ trait InteractsWithCookies * @param string|null $value * @param int|DateTimeInterface|null $expiry * @param array $options - * @return string + * @return $this|string */ public function cookie($name, $value = null, $expiry = null, array $options = []) { @@ -21,19 +24,29 @@ trait InteractsWithCookies return $this->addCookie($name, $value, $expiry, $options); } - if ($cookie = $this->driver->manage()->getCookieNamed($name)) { - return decrypt(rawurldecode($cookie['value']), $unserialize = false); + try { + $cookie = $this->driver->manage()->getCookieNamed($name); + } catch (NoSuchCookieException $e) { + $cookie = null; + } + + if ($cookie) { + $decryptedValue = decrypt(rawurldecode($cookie['value']), $unserialize = false); + + $hasValuePrefix = strpos($decryptedValue, CookieValuePrefix::create($name, Crypt::getKey())) === 0; + + return $hasValuePrefix ? CookieValuePrefix::remove($decryptedValue) : $decryptedValue; } } /** - * Get or set a plain cookie's value. + * Get or set an unencrypted cookie's value. * * @param string $name * @param string|null $value * @param int|DateTimeInterface|null $expiry * @param array $options - * @return string + * @return $this|string */ public function plainCookie($name, $value = null, $expiry = null, array $options = []) { @@ -41,7 +54,13 @@ trait InteractsWithCookies return $this->addCookie($name, $value, $expiry, $options, false); } - if ($cookie = $this->driver->manage()->getCookieNamed($name)) { + try { + $cookie = $this->driver->manage()->getCookieNamed($name); + } catch (NoSuchCookieException $e) { + $cookie = null; + } + + if ($cookie) { return rawurldecode($cookie['value']); } } @@ -59,7 +78,9 @@ trait InteractsWithCookies public function addCookie($name, $value, $expiry = null, array $options = [], $encrypt = true) { if ($encrypt) { - $value = encrypt($value, $serialize = false); + $prefix = CookieValuePrefix::create($name, Crypt::getKey()); + + $value = encrypt($prefix.$value, $serialize = false); } if ($expiry instanceof DateTimeInterface) { diff --git a/vendor/laravel/dusk/src/Concerns/InteractsWithElements.php b/vendor/laravel/dusk/src/Concerns/InteractsWithElements.php index 96e6ec94a..a50171a38 100644 --- a/vendor/laravel/dusk/src/Concerns/InteractsWithElements.php +++ b/vendor/laravel/dusk/src/Concerns/InteractsWithElements.php @@ -6,6 +6,8 @@ use Facebook\WebDriver\Interactions\WebDriverActions; use Facebook\WebDriver\Remote\LocalFileDetector; use Facebook\WebDriver\WebDriverBy; use Facebook\WebDriver\WebDriverKeys; +use Facebook\WebDriver\WebDriverSelect; +use Illuminate\Support\Arr; use Illuminate\Support\Str; trait InteractsWithElements @@ -43,9 +45,11 @@ trait InteractsWithElements { $this->ensurejQueryIsAvailable(); - $selector = addslashes(trim($this->resolver->format("{$element}:contains({$link}):visible"))); + $selector = addslashes(trim($this->resolver->format("{$element}"))); - $this->driver->executeScript("jQuery.find(\"{$selector}\")[0].click();"); + $link = str_replace("'", "\\\\'", $link); + + $this->driver->executeScript("jQuery.find(`{$selector}:contains('{$link}'):visible`)[0].click();"); return $this; } @@ -99,7 +103,7 @@ trait InteractsWithElements * Send the given keys to the element matching the given selector. * * @param string $selector - * @param dynamic $keys + * @param mixed $keys * @return $this */ public function keys($selector, ...$keys) @@ -183,7 +187,7 @@ trait InteractsWithElements */ public function appendSlowly($field, $value, $pause = 100) { - foreach (str_split($value) as $char) { + foreach (preg_split('//u', $value, -1, PREG_SPLIT_NO_EMPTY) as $char) { $this->append($field, $char)->pause($pause); } @@ -207,7 +211,7 @@ trait InteractsWithElements * Select the given value or random value of a drop-down field. * * @param string $field - * @param string $value + * @param string|array|null $value * @return $this */ public function select($field, $value = null) @@ -216,18 +220,34 @@ trait InteractsWithElements $options = $element->findElements(WebDriverBy::cssSelector('option:not([disabled])')); - if (is_null($value)) { + $select = $element->getTagName() === 'select' ? new WebDriverSelect($element) : null; + + $isMultiple = false; + + if (! is_null($select)) { + if ($isMultiple = $select->isMultiple()) { + $select->deselectAll(); + } + } + + if (func_num_args() === 1) { $options[array_rand($options)]->click(); } else { - if (is_bool($value)) { - $value = $value ? '1' : '0'; - } + $value = collect(Arr::wrap($value))->transform(function ($value) { + if (is_bool($value)) { + return $value ? '1' : '0'; + } + + return (string) $value; + })->all(); foreach ($options as $option) { - if ((string) $option->getAttribute('value') === (string) $value) { + if (in_array((string) $option->getAttribute('value'), $value)) { $option->click(); - break; + if (! $isMultiple) { + break; + } } } } @@ -253,7 +273,7 @@ trait InteractsWithElements * Check the given checkbox. * * @param string $field - * @param string $value + * @param string|null $value * @return $this */ public function check($field, $value = null) @@ -271,7 +291,7 @@ trait InteractsWithElements * Uncheck the given checkbox. * * @param string $field - * @param string $value + * @param string|null $value * @return $this */ public function uncheck($field, $value = null) diff --git a/vendor/laravel/dusk/src/Concerns/InteractsWithJavascript.php b/vendor/laravel/dusk/src/Concerns/InteractsWithJavascript.php index 4c100a5e0..5a7c7eed4 100644 --- a/vendor/laravel/dusk/src/Concerns/InteractsWithJavascript.php +++ b/vendor/laravel/dusk/src/Concerns/InteractsWithJavascript.php @@ -7,7 +7,7 @@ trait InteractsWithJavascript /** * Execute JavaScript within the browser. * - * @param string|array $scripts + * @param string|array $scripts * @return array */ public function script($scripts) diff --git a/vendor/laravel/dusk/src/Concerns/InteractsWithMouse.php b/vendor/laravel/dusk/src/Concerns/InteractsWithMouse.php index 16fd503c0..68612c14f 100644 --- a/vendor/laravel/dusk/src/Concerns/InteractsWithMouse.php +++ b/vendor/laravel/dusk/src/Concerns/InteractsWithMouse.php @@ -2,6 +2,8 @@ namespace Laravel\Dusk\Concerns; +use Facebook\WebDriver\Exception\ElementClickInterceptedException; +use Facebook\WebDriver\Exception\NoSuchElementException; use Facebook\WebDriver\Interactions\WebDriverActions; use Facebook\WebDriver\WebDriverBy; @@ -48,17 +50,41 @@ trait InteractsWithMouse { if (is_null($selector)) { (new WebDriverActions($this->driver))->click()->perform(); - } else { - $this->resolver->findOrFail($selector)->click(); + + return $this; } + foreach ($this->resolver->all($selector) as $element) { + try { + $element->click(); + + return $this; + } catch (ElementClickInterceptedException $e) { + // + } + } + + throw $e ?? new NoSuchElementException("Unable to locate element with selector [{$selector}]."); + } + + /** + * Click the topmost element at the given pair of coordinates. + * + * @param int $x + * @param int $y + * @return $this + */ + public function clickAtPoint($x, $y) + { + $this->driver->executeScript("document.elementFromPoint({$x}, {$y}).click()"); + return $this; } /** * Click the element at the given XPath expression. * - * @param string $selector + * @param string $expression * @return $this */ public function clickAtXPath($expression) diff --git a/vendor/laravel/dusk/src/Concerns/MakesAssertions.php b/vendor/laravel/dusk/src/Concerns/MakesAssertions.php index 0e17b8ad0..d6175c201 100644 --- a/vendor/laravel/dusk/src/Concerns/MakesAssertions.php +++ b/vendor/laravel/dusk/src/Concerns/MakesAssertions.php @@ -10,7 +10,14 @@ use PHPUnit\Framework\Assert as PHPUnit; trait MakesAssertions { /** - * Assert that the page title is the given value. + * Indicates the browser has made an assertion about the source code of the page. + * + * @var bool + */ + public $madeSourceAssertion = false; + + /** + * Assert that the page title matches the given text. * * @param string $title * @return $this @@ -26,7 +33,7 @@ trait MakesAssertions } /** - * Assert that the page title contains the given value. + * Assert that the page title contains the given text. * * @param string $title * @return $this @@ -35,16 +42,16 @@ trait MakesAssertions { PHPUnit::assertTrue( Str::contains($this->driver->getTitle(), $title), - "Did not see expected value [{$title}] within title [{$this->driver->getTitle()}]." + "Did not see expected text [{$title}] within title [{$this->driver->getTitle()}]." ); return $this; } /** - * Assert that the given cookie is present. + * Assert that the given encrypted cookie is present. * - * @param string $name + * @param string $name * @param bool $decrypt * @return $this */ @@ -61,7 +68,7 @@ trait MakesAssertions } /** - * Assert that the given plain cookie is present. + * Assert that the given unencrypted cookie is present. * * @param string $name * @return $this @@ -72,9 +79,9 @@ trait MakesAssertions } /** - * Assert that the given cookie is not present. + * Assert that the given encrypted cookie is not present. * - * @param string $name + * @param string $name * @param bool $decrypt * @return $this */ @@ -91,7 +98,7 @@ trait MakesAssertions } /** - * Assert that the given plain cookie is not present. + * Assert that the given unencrypted cookie is not present. * * @param string $name * @return $this @@ -114,7 +121,8 @@ trait MakesAssertions $actual = $decrypt ? $this->cookie($name) : $this->plainCookie($name); PHPUnit::assertEquals( - $value, $actual, + $value, + $actual, "Cookie [{$name}] had value [{$actual}], but expected [{$value}]." ); @@ -122,7 +130,7 @@ trait MakesAssertions } /** - * Assert that a cookie has a given value. + * Assert that an unencrypted cookie has a given value. * * @param string $name * @param string $value @@ -134,7 +142,7 @@ trait MakesAssertions } /** - * Assert that the given text appears on the page. + * Assert that the given text is present on the page. * * @param string $text * @return $this @@ -145,7 +153,7 @@ trait MakesAssertions } /** - * Assert that the given text does not appear on the page. + * Assert that the given text is not present on the page. * * @param string $text * @return $this @@ -156,7 +164,7 @@ trait MakesAssertions } /** - * Assert that the given text appears within the given selector. + * Assert that the given text is present within the selector. * * @param string $selector * @param string $text @@ -177,7 +185,7 @@ trait MakesAssertions } /** - * Assert that the given text does not appear within the given selector. + * Assert that the given text is not present within the selector. * * @param string $selector * @param string $text @@ -197,6 +205,66 @@ trait MakesAssertions return $this; } + /** + * Assert that any text is present within the selector. + * + * @param string $selector + * @return $this + */ + public function assertSeeAnythingIn($selector) + { + $fullSelector = $this->resolver->format($selector); + + $element = $this->resolver->findOrFail($selector); + + PHPUnit::assertTrue( + $element->getText() !== '', + "Saw unexpected text [''] within element [{$fullSelector}]." + ); + + return $this; + } + + /** + * Assert that no text is present within the selector. + * + * @param string $selector + * @return $this + */ + public function assertSeeNothingIn($selector) + { + $fullSelector = $this->resolver->format($selector); + + $element = $this->resolver->findOrFail($selector); + + PHPUnit::assertTrue( + $element->getText() === '', + "Did not see expected text [''] within element [{$fullSelector}]." + ); + + return $this; + } + + /** + * Assert that the given JavaScript expression evaluates to the given value. + * + * @param string $expression + * @param mixed $expected + * @return $this + */ + public function assertScript($expression, $expected = true) + { + $expression = Str::start($expression, 'return '); + + PHPUnit::assertEquals( + $expected, + $this->driver->executeScript($expression), + "JavaScript expression [{$expression}] mismatched." + ); + + return $this; + } + /** * Assert that the given source code is present on the page. * @@ -205,9 +273,11 @@ trait MakesAssertions */ public function assertSourceHas($code) { + $this->madeSourceAssertion = true; + PHPUnit::assertTrue( Str::contains($this->driver->getPageSource(), $code), - "Did not find expected source code [{$code}]" + "Did not find expected source code [{$code}]." ); return $this; @@ -221,16 +291,18 @@ trait MakesAssertions */ public function assertSourceMissing($code) { + $this->madeSourceAssertion = true; + PHPUnit::assertFalse( Str::contains($this->driver->getPageSource(), $code), - "Found unexpected source code [{$code}]" + "Found unexpected source code [{$code}]." ); return $this; } /** - * Assert that the given link is visible. + * Assert that the given link is present on the page. * * @param string $link * @return $this @@ -252,7 +324,7 @@ trait MakesAssertions } /** - * Assert that the given link is not visible. + * Assert that the given link is not present on the page. * * @param string $link * @return $this @@ -283,10 +355,12 @@ trait MakesAssertions { $this->ensurejQueryIsAvailable(); - $selector = addslashes(trim($this->resolver->format("a:contains('{$link}')"))); + $selector = addslashes(trim($this->resolver->format('a'))); + + $link = str_replace("'", "\\\\'", $link); $script = << 0 && jQuery(link).is(':visible'); JS; @@ -294,7 +368,7 @@ JS; } /** - * Assert that the given input or text area contains the given value. + * Assert that the given input field has the given value. * * @param string $field * @param string $value @@ -303,7 +377,8 @@ JS; public function assertInputValue($field, $value) { PHPUnit::assertEquals( - $value, $this->inputValue($field), + $value, + $this->inputValue($field), "Expected value [{$value}] for the [{$field}] input does not equal the actual value [{$this->inputValue($field)}]." ); @@ -311,7 +386,7 @@ JS; } /** - * Assert that the given input or text area does not contain the given value. + * Assert that the given input field does not have the given value. * * @param string $field * @param string $value @@ -320,7 +395,8 @@ JS; public function assertInputValueIsNot($field, $value) { PHPUnit::assertNotEquals( - $value, $this->inputValue($field), + $value, + $this->inputValue($field), "Value [{$value}] for the [{$field}] input should not equal the actual value." ); @@ -343,10 +419,40 @@ JS; } /** - * Assert that the given checkbox field is checked. + * Assert that the given input field is present. * * @param string $field - * @param string $value + * @return $this + */ + public function assertInputPresent($field) + { + $this->assertPresent( + "input[name='{$field}'], textarea[name='{$field}'], select[name='{$field}']" + ); + + return $this; + } + + /** + * Assert that the given input field is not visible. + * + * @param string $field + * @return $this + */ + public function assertInputMissing($field) + { + $this->assertMissing( + "input[name='{$field}'], textarea[name='{$field}'], select[name='{$field}']" + ); + + return $this; + } + + /** + * Assert that the given checkbox is checked. + * + * @param string $field + * @param string|null $value * @return $this */ public function assertChecked($field, $value = null) @@ -362,10 +468,10 @@ JS; } /** - * Assert that the given checkbox field is not checked. + * Assert that the given checkbox is not checked. * * @param string $field - * @param string $value + * @param string|null $value * @return $this */ public function assertNotChecked($field, $value = null) @@ -380,6 +486,26 @@ JS; return $this; } + /** + * Assert that the given checkbox is in an indeterminate state. + * + * @param string $field + * @param string|null $value + * @return $this + */ + public function assertIndeterminate($field, $value = null) + { + $this->assertNotChecked($field, $value); + + PHPUnit::assertSame( + 'true', + $this->resolver->findOrFail($field)->getAttribute('indeterminate'), + "Checkbox [{$field}] was not in indeterminate state." + ); + + return $this; + } + /** * Assert that the given radio field is selected. * @@ -403,7 +529,7 @@ JS; * Assert that the given radio field is not selected. * * @param string $field - * @param string $value + * @param string|null $value * @return $this */ public function assertRadioNotSelected($field, $value = null) @@ -419,7 +545,7 @@ JS; } /** - * Assert that the given select field has the given value selected. + * Assert that the given dropdown has the given value selected. * * @param string $field * @param string $value @@ -436,7 +562,7 @@ JS; } /** - * Assert that the given select field does not have the given value selected. + * Assert that the given dropdown does not have the given value selected. * * @param string $field * @param string $value @@ -468,7 +594,8 @@ JS; })->all(); PHPUnit::assertCount( - count($values), $options, + count($values), + $options, 'Expected options ['.implode(',', $values)."] for selection field [{$field}] to be available." ); @@ -485,7 +612,8 @@ JS; public function assertSelectMissingOptions($field, array $values) { PHPUnit::assertCount( - 0, $this->resolver->resolveSelectOptions($field, $values), + 0, + $this->resolver->resolveSelectOptions($field, $values), 'Unexpected options ['.implode(',', $values)."] for selection field [{$field}]." ); @@ -505,7 +633,7 @@ JS; } /** - * Assert that the given value is not available to be selected on the given field. + * Assert that the given value is not available to be selected. * * @param string $field * @param string $value @@ -533,7 +661,7 @@ JS; } /** - * Assert that the element at the given selector has the given value. + * Assert that the element matching the given selector has the given value. * * @param string $selector * @param string $value @@ -541,15 +669,75 @@ JS; */ public function assertValue($selector, $value) { - $actual = $this->resolver->findOrFail($selector)->getAttribute('value'); + $fullSelector = $this->resolver->format($selector); - PHPUnit::assertEquals($value, $actual); + $this->ensureElementSupportsValueAttribute( + $element = $this->resolver->findOrFail($selector), + $fullSelector + ); + + $actual = $element->getAttribute('value'); + + PHPUnit::assertEquals( + $value, + $actual, + "Did not see expected value [{$value}] within element [{$fullSelector}]." + ); return $this; } /** - * Assert that the element at the given selector has the given attribute value. + * Assert that the element matching the given selector does not have the given value. + * + * @param string $selector + * @param string $value + * @return $this + */ + public function assertValueIsNot($selector, $value) + { + $fullSelector = $this->resolver->format($selector); + + $this->ensureElementSupportsValueAttribute( + $element = $this->resolver->findOrFail($selector), + $fullSelector + ); + + $actual = $element->getAttribute('value'); + + PHPUnit::assertNotEquals( + $value, + $actual, + "Saw unexpected value [{$value}] within element [{$fullSelector}]." + ); + + return $this; + } + + /** + * Ensure the given element supports the 'value' attribute. + * + * @param mixed $element + * @param string $fullSelector + * @return void + */ + public function ensureElementSupportsValueAttribute($element, $fullSelector) + { + PHPUnit::assertTrue(in_array($element->getTagName(), [ + 'textarea', + 'select', + 'button', + 'input', + 'li', + 'meter', + 'option', + 'param', + 'progress', + ]), "This assertion cannot be used with the element [{$fullSelector}]."); + } + + /** + * Assert that the element matching the given selector has the given value in the provided attribute. * * @param string $selector * @param string $attribute @@ -568,7 +756,8 @@ JS; ); PHPUnit::assertEquals( - $value, $actual, + $value, + $actual, "Expected '$attribute' attribute [{$value}] does not equal actual value [$actual]." ); @@ -576,20 +765,35 @@ JS; } /** - * Assert that the element at the given selector has the given data attribute value. + * Assert that the element matching the given selector contains the given value in the provided attribute. * * @param string $selector * @param string $attribute * @param string $value * @return $this */ - public function assertDataAttribute($selector, $attribute, $value) + public function assertAttributeContains($selector, $attribute, $value) { - return $this->assertAttribute($selector, 'data-'.$attribute, $value); + $fullSelector = $this->resolver->format($selector); + + $actual = $this->resolver->findOrFail($selector)->getAttribute($attribute); + + PHPUnit::assertNotNull( + $actual, + "Did not see expected attribute [{$attribute}] within element [{$fullSelector}]." + ); + + PHPUnit::assertStringContainsString( + $value, + $actual, + "Attribute '$attribute' does not contain [{$value}]. Full attribute value was [$actual]." + ); + + return $this; } /** - * Assert that the element at the given selector has the given aria attribute value. + * Assert that the element matching the given selector has the given value in the provided aria attribute. * * @param string $selector * @param string $attribute @@ -602,7 +806,20 @@ JS; } /** - * Assert that the element with the given selector is visible. + * Assert that the element matching the given selector has the given value in the provided data attribute. + * + * @param string $selector + * @param string $attribute + * @param string $value + * @return $this + */ + public function assertDataAttribute($selector, $attribute, $value) + { + return $this->assertAttribute($selector, 'data-'.$attribute, $value); + } + + /** + * Assert that the element matching the given selector is visible. * * @param string $selector * @return $this @@ -620,7 +837,7 @@ JS; } /** - * Assert that the element with the given selector is present in the DOM. + * Assert that the element matching the given selector is present. * * @param string $selector * @return $this @@ -638,7 +855,25 @@ JS; } /** - * Assert that the element with the given selector is not on the page. + * Assert that the element matching the given selector is not present in the source. + * + * @param string $selector + * @return $this + */ + public function assertNotPresent($selector) + { + $fullSelector = $this->resolver->format($selector); + + PHPUnit::assertTrue( + is_null($this->resolver->find($selector)), + "Element [{$fullSelector}] is present." + ); + + return $this; + } + + /** + * Assert that the element matching the given selector is not visible. * * @param string $selector * @return $this @@ -653,13 +888,16 @@ JS; $missing = true; } - PHPUnit::assertTrue($missing, "Saw unexpected element [{$fullSelector}]."); + PHPUnit::assertTrue( + $missing, + "Saw unexpected element [{$fullSelector}]." + ); return $this; } /** - * Assert that a JavaScript dialog with given message has been opened. + * Assert that a JavaScript dialog with the given message has been opened. * * @param string $message * @return $this @@ -669,7 +907,8 @@ JS; $actualMessage = $this->driver->switchTo()->alert()->getText(); PHPUnit::assertEquals( - $message, $actualMessage, + $message, + $actualMessage, "Expected dialog message [{$message}] does not equal actual message [{$actualMessage}]." ); @@ -788,36 +1027,46 @@ JS; * Assert that the Vue component's attribute at the given key has the given value. * * @param string $key - * @param string $value + * @param mixed $value * @param string|null $componentSelector * @return $this */ public function assertVue($key, $value, $componentSelector = null) { - PHPUnit::assertEquals($value, $this->vueAttribute($componentSelector, $key)); + $formattedValue = json_encode($value); + + PHPUnit::assertEquals( + $value, + $this->vueAttribute($componentSelector, $key), + "Did not see expected value [{$formattedValue}] at the key [{$key}]." + ); return $this; } /** - * Assert that the Vue component's attribute at the given key - * does not have the given value. + * Assert that a given Vue component data property does not match the given value. * * @param string $key - * @param string $value + * @param mixed $value * @param string|null $componentSelector * @return $this */ public function assertVueIsNot($key, $value, $componentSelector = null) { - PHPUnit::assertNotEquals($value, $this->vueAttribute($componentSelector, $key)); + $formattedValue = json_encode($value); + + PHPUnit::assertNotEquals( + $value, + $this->vueAttribute($componentSelector, $key), + "Saw unexpected value [{$formattedValue}] at the key [{$key}]." + ); return $this; } /** - * Assert that the Vue component's attribute at the given key - * is an array that contains the given value. + * Assert that a given Vue component data propertys is an array and contains the given value. * * @param string $key * @param string $value @@ -828,15 +1077,18 @@ JS; { $attribute = $this->vueAttribute($componentSelector, $key); - PHPUnit::assertIsArray($attribute, "The attribute for key [$key] is not an array."); + PHPUnit::assertIsArray( + $attribute, + "The attribute for key [{$key}] is not an array." + ); + PHPUnit::assertContains($value, $attribute); return $this; } /** - * Assert that the Vue component's attribute at the given key - * is an array that does not contain the given value. + * Assert that a given Vue component data property is an array and does not contain the given value. * * @param string $key * @param string $value @@ -847,7 +1099,11 @@ JS; { $attribute = $this->vueAttribute($componentSelector, $key); - PHPUnit::assertIsArray($attribute, "The attribute for key [$key] is not an array."); + PHPUnit::assertIsArray( + $attribute, + "The attribute for key [{$key}] is not an array." + ); + PHPUnit::assertNotContains($value, $attribute); return $this; @@ -865,7 +1121,15 @@ JS; $fullSelector = $this->resolver->format($componentSelector); return $this->driver->executeScript( - "return document.querySelector('".$fullSelector."').__vue__.".$key + "var el = document.querySelector('".$fullSelector."');". + "if (typeof el.__vue__ !== 'undefined')". + ' return el.__vue__.'.$key.';'. + 'try {'. + ' var attr = el.__vueParentComponent.ctx.'.$key.';'. + " if (typeof attr !== 'undefined')". + ' return attr;'. + '} catch (e) {}'. + 'return el.__vueParentComponent.setupState.'.$key.';' ); } } diff --git a/vendor/laravel/dusk/src/Concerns/MakesUrlAssertions.php b/vendor/laravel/dusk/src/Concerns/MakesUrlAssertions.php index 29871aa0f..dba124859 100644 --- a/vendor/laravel/dusk/src/Concerns/MakesUrlAssertions.php +++ b/vendor/laravel/dusk/src/Concerns/MakesUrlAssertions.php @@ -4,11 +4,12 @@ namespace Laravel\Dusk\Concerns; use Illuminate\Support\Arr; use PHPUnit\Framework\Assert as PHPUnit; +use PHPUnit\Framework\Constraint\RegularExpression; trait MakesUrlAssertions { /** - * Assert that the current URL matches the given URL. + * Assert that the current URL (without the query string) matches the given string. * * @param string $url * @return $this @@ -27,8 +28,8 @@ trait MakesUrlAssertions Arr::get($segments, 'path', '') ); - PHPUnit::assertRegExp( - '/^'.$pattern.'$/u', $currentUrl, + PHPUnit::assertThat( + $currentUrl, new RegularExpression('/^'.$pattern.'$/u'), "Actual URL [{$this->driver->getCurrentURL()}] does not equal expected URL [{$url}]." ); @@ -36,7 +37,7 @@ trait MakesUrlAssertions } /** - * Assert that the current scheme matches the given scheme. + * Assert that the current URL scheme matches the given scheme. * * @param string $scheme * @return $this @@ -47,8 +48,8 @@ trait MakesUrlAssertions $actual = parse_url($this->driver->getCurrentURL(), PHP_URL_SCHEME) ?? ''; - PHPUnit::assertRegExp( - '/^'.$pattern.'$/u', $actual, + PHPUnit::assertThat( + $actual, new RegularExpression('/^'.$pattern.'$/u'), "Actual scheme [{$actual}] does not equal expected scheme [{$pattern}]." ); @@ -56,7 +57,7 @@ trait MakesUrlAssertions } /** - * Assert that the current scheme does not match the given scheme. + * Assert that the current URL scheme does not match the given scheme. * * @param string $scheme * @return $this @@ -74,7 +75,7 @@ trait MakesUrlAssertions } /** - * Assert that the current host matches the given host. + * Assert that the current URL host matches the given host. * * @param string $host * @return $this @@ -85,8 +86,8 @@ trait MakesUrlAssertions $actual = parse_url($this->driver->getCurrentURL(), PHP_URL_HOST) ?? ''; - PHPUnit::assertRegExp( - '/^'.$pattern.'$/u', $actual, + PHPUnit::assertThat( + $actual, new RegularExpression('/^'.$pattern.'$/u'), "Actual host [{$actual}] does not equal expected host [{$pattern}]." ); @@ -94,7 +95,7 @@ trait MakesUrlAssertions } /** - * Assert that the current host does not match the given host. + * Assert that the current URL host does not match the given host. * * @param string $host * @return $this @@ -112,7 +113,7 @@ trait MakesUrlAssertions } /** - * Assert that the current port matches the given port. + * Assert that the current URL port matches the given port. * * @param string $port * @return $this @@ -121,10 +122,10 @@ trait MakesUrlAssertions { $pattern = str_replace('\*', '.*', preg_quote($port, '/')); - $actual = parse_url($this->driver->getCurrentURL(), PHP_URL_PORT) ?? ''; + $actual = (string) parse_url($this->driver->getCurrentURL(), PHP_URL_PORT) ?? ''; - PHPUnit::assertRegExp( - '/^'.$pattern.'$/u', $actual, + PHPUnit::assertThat( + $actual, new RegularExpression('/^'.$pattern.'$/u'), "Actual port [{$actual}] does not equal expected port [{$pattern}]." ); @@ -132,7 +133,7 @@ trait MakesUrlAssertions } /** - * Assert that the current host does not match the given host. + * Assert that the current URL port does not match the given port. * * @param string $port * @return $this @@ -150,27 +151,7 @@ trait MakesUrlAssertions } /** - * Assert that the current URL path matches the given pattern. - * - * @param string $path - * @return $this - */ - public function assertPathIs($path) - { - $pattern = str_replace('\*', '.*', preg_quote($path, '/')); - - $actualPath = parse_url($this->driver->getCurrentURL(), PHP_URL_PATH) ?? ''; - - PHPUnit::assertRegExp( - '/^'.$pattern.'$/u', $actualPath, - "Actual path [{$actualPath}] does not equal expected path [{$path}]." - ); - - return $this; - } - - /** - * Assert that the current URL path begins with given path. + * Assert that the current URL path begins with the given path. * * @param string $path * @return $this @@ -188,7 +169,27 @@ trait MakesUrlAssertions } /** - * Assert that the current URL path does not match the given path. + * Assert that the current path matches the given path. + * + * @param string $path + * @return $this + */ + public function assertPathIs($path) + { + $pattern = str_replace('\*', '.*', preg_quote($path, '/')); + + $actualPath = parse_url($this->driver->getCurrentURL(), PHP_URL_PATH) ?? ''; + + PHPUnit::assertThat( + $actualPath, new RegularExpression('/^'.$pattern.'$/u'), + "Actual path [{$actualPath}] does not equal expected path [{$path}]." + ); + + return $this; + } + + /** + * Assert that the current path does not match the given path. * * @param string $path * @return $this @@ -206,63 +207,7 @@ trait MakesUrlAssertions } /** - * Assert that the current URL fragment matches the given pattern. - * - * @param string $fragment - * @return $this - */ - public function assertFragmentIs($fragment) - { - $pattern = preg_quote($fragment, '/'); - - $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT); - - PHPUnit::assertRegExp( - '/^'.str_replace('\*', '.*', $pattern).'$/u', $actualFragment, - "Actual fragment [{$actualFragment}] does not equal expected fragment [{$fragment}]." - ); - - return $this; - } - - /** - * Assert that the current URL fragment begins with given fragment. - * - * @param string $fragment - * @return $this - */ - public function assertFragmentBeginsWith($fragment) - { - $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT); - - PHPUnit::assertStringStartsWith( - $fragment, $actualFragment, - "Actual fragment [$actualFragment] does not begin with expected fragment [$fragment]." - ); - - return $this; - } - - /** - * Assert that the current URL fragment does not match the given fragment. - * - * @param string $fragment - * @return $this - */ - public function assertFragmentIsNot($fragment) - { - $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT); - - PHPUnit::assertNotEquals( - $fragment, $actualFragment, - "Fragment [{$fragment}] should not equal the actual value." - ); - - return $this; - } - - /** - * Assert that the current URL path matches the given route. + * Assert that the current URL matches the given named route's URL. * * @param string $route * @param array $parameters @@ -274,10 +219,10 @@ trait MakesUrlAssertions } /** - * Assert that a query string parameter is present and has a given value. + * Assert that the given query string parameter is present and has a given value. * * @param string $name - * @param string $value + * @param string|null $value * @return $this */ public function assertQueryStringHas($name, $value = null) @@ -326,6 +271,62 @@ trait MakesUrlAssertions return $this; } + /** + * Assert that the URL's current hash fragment matches the given fragment. + * + * @param string $fragment + * @return $this + */ + public function assertFragmentIs($fragment) + { + $pattern = preg_quote($fragment, '/'); + + $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT); + + PHPUnit::assertThat( + $actualFragment, new RegularExpression('/^'.str_replace('\*', '.*', $pattern).'$/u'), + "Actual fragment [{$actualFragment}] does not equal expected fragment [{$fragment}]." + ); + + return $this; + } + + /** + * Assert that the URL's current hash fragment begins with the given fragment. + * + * @param string $fragment + * @return $this + */ + public function assertFragmentBeginsWith($fragment) + { + $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT); + + PHPUnit::assertStringStartsWith( + $fragment, $actualFragment, + "Actual fragment [$actualFragment] does not begin with expected fragment [$fragment]." + ); + + return $this; + } + + /** + * Assert that the URL's current hash fragment does not match the given fragment. + * + * @param string $fragment + * @return $this + */ + public function assertFragmentIsNot($fragment) + { + $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT); + + PHPUnit::assertNotEquals( + $fragment, $actualFragment, + "Fragment [{$fragment}] should not equal the actual value." + ); + + return $this; + } + /** * Assert that the given query string parameter is present. * diff --git a/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php b/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php index d08ae5a45..0b0275789 100644 --- a/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php +++ b/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php @@ -29,6 +29,7 @@ trait ProvidesBrowser * Tear down the Dusk test case class. * * @afterClass + * * @return void */ public static function tearDownDuskClass() @@ -68,10 +69,12 @@ trait ProvidesBrowser $callback(...$browsers->all()); } catch (Exception $e) { $this->captureFailuresFor($browsers); + $this->storeSourceLogsFor($browsers); throw $e; } catch (Throwable $e) { $this->captureFailuresFor($browsers); + $this->storeSourceLogsFor($browsers); throw $e; } finally { @@ -162,6 +165,22 @@ trait ProvidesBrowser }); } + /** + * Store the source code for the given browsers (if necessary). + * + * @param \Illuminate\Support\Collection $browsers + * @return void + */ + protected function storeSourceLogsFor($browsers) + { + $browsers->each(function ($browser, $key) { + if (property_exists($browser, 'madeSourceAssertion') && + $browser->madeSourceAssertion) { + $browser->storeSource($this->getCallerName().'-'.$key); + } + }); + } + /** * Close all of the browsers except the primary (first) one. * diff --git a/vendor/laravel/dusk/src/Concerns/WaitsForElements.php b/vendor/laravel/dusk/src/Concerns/WaitsForElements.php index 5c72c3fb3..d79c2bcd3 100644 --- a/vendor/laravel/dusk/src/Concerns/WaitsForElements.php +++ b/vendor/laravel/dusk/src/Concerns/WaitsForElements.php @@ -6,6 +6,7 @@ use Carbon\Carbon; use Closure; use Exception; use Facebook\WebDriver\Exception\NoSuchElementException; +use Facebook\WebDriver\Exception\ScriptTimeoutException; use Facebook\WebDriver\Exception\TimeOutException; use Facebook\WebDriver\WebDriverExpectedCondition; use Illuminate\Support\Arr; @@ -18,7 +19,7 @@ trait WaitsForElements * * @param string $selector * @param \Closure $callback - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -29,10 +30,10 @@ trait WaitsForElements } /** - * Wait for the given selector to be visible. + * Wait for the given selector to become visible. * * @param string $selector - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -50,7 +51,7 @@ trait WaitsForElements * Wait for the given selector to be removed. * * @param string $selector - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -74,7 +75,7 @@ trait WaitsForElements * Wait for the given text to be removed. * * @param string $text - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -91,10 +92,10 @@ trait WaitsForElements } /** - * Wait for the given text to be visible. + * Wait for the given text to become visible. * * @param array|string $text - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -111,10 +112,29 @@ trait WaitsForElements } /** - * Wait for the given link to be visible. + * Wait for the given text to become visible inside the given selector. + * + * @param string $selector + * @param array|string $text + * @param int|null $seconds + * @return $this + * + * @throws \Facebook\WebDriver\Exception\TimeOutException + */ + public function waitForTextIn($selector, $text, $seconds = null) + { + $message = 'Waited %s seconds for text "'.$text.'" in selector '.$selector; + + return $this->waitUsing($seconds, 100, function () use ($selector, $text) { + return $this->assertSeeIn($selector, $text); + }, $message); + } + + /** + * Wait for the given link to become visible. * * @param string $link - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -128,11 +148,23 @@ trait WaitsForElements }, $message); } + /** + * Wait for an input field to become visible. + * + * @param string $field + * @param int|null $seconds + * @return $this + */ + public function waitForInput($field, $seconds = null) + { + return $this->waitFor("input[name='{$field}'], textarea[name='{$field}'], select[name='{$field}']", $seconds); + } + /** * Wait for the given location. * * @param string $path - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -141,7 +173,9 @@ trait WaitsForElements { $message = $this->formatTimeOutMessage('Waited %s seconds for location', $path); - return $this->waitUntil("window.location.pathname == '{$path}'", $seconds, $message); + return Str::startsWith($path, ['http://', 'https://']) + ? $this->waitUntil('`${location.protocol}//${location.host}${location.pathname}` == \''.$path.'\'', $seconds, $message) + : $this->waitUntil("window.location.pathname == '{$path}'", $seconds, $message); } /** @@ -149,7 +183,7 @@ trait WaitsForElements * * @param string $route * @param array $parameters - * @param int $seconds + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -159,12 +193,48 @@ trait WaitsForElements return $this->waitForLocation(route($route, $parameters, false), $seconds); } + /** + * Wait until an element is enabled. + * + * @param string $selector + * @param int|null $seconds + * @return $this + */ + public function waitUntilEnabled($selector, $seconds = null) + { + $message = $this->formatTimeOutMessage('Waited %s seconds for element to be enabled', $selector); + + $this->waitUsing($seconds, 100, function () use ($selector) { + return $this->resolver->findOrFail($selector)->isEnabled(); + }, $message); + + return $this; + } + + /** + * Wait until an element is disabled. + * + * @param string $selector + * @param int|null $seconds + * @return $this + */ + public function waitUntilDisabled($selector, $seconds = null) + { + $message = $this->formatTimeOutMessage('Waited %s seconds for element to be disabled', $selector); + + $this->waitUsing($seconds, 100, function () use ($selector) { + return ! $this->resolver->findOrFail($selector)->isEnabled(); + }, $message); + + return $this; + } + /** * Wait until the given script returns true. * * @param string $script - * @param int $seconds - * @param string $message + * @param int|null $seconds + * @param string|null $message * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -190,6 +260,7 @@ trait WaitsForElements * @param string $key * @param string $value * @param string|null $componentSelector + * @param int|null $seconds * @return $this */ public function waitUntilVue($key, $value, $componentSelector = null, $seconds = null) @@ -207,6 +278,7 @@ trait WaitsForElements * @param string $key * @param string $value * @param string|null $componentSelector + * @param int|null $seconds * @return $this */ public function waitUntilVueIsNot($key, $value, $componentSelector = null, $seconds = null) @@ -221,7 +293,7 @@ trait WaitsForElements /** * Wait for a JavaScript dialog to open. * - * @param int $seconds + * @param int|null $seconds * @return $this */ public function waitForDialog($seconds = null) @@ -238,8 +310,8 @@ trait WaitsForElements /** * Wait for the current page to reload. * - * @param \Closure $callback - * @param int $seconds + * @param \Closure|null $callback + * @param int|null $seconds * @return $this * * @throws \Facebook\WebDriver\Exception\TimeOutException @@ -259,10 +331,55 @@ trait WaitsForElements }, 'Waited %s seconds for page reload.'); } + /** + * Click an element and wait for the page to reload. + * + * @param string|null $selector + * @return $this + */ + public function clickAndWaitForReload($selector = null) + { + return $this->waitForReload(function ($browser) use ($selector) { + $browser->click($selector); + }); + } + + /** + * Wait for the given event type to occur on a target. + * + * @param string $type + * @param string|null $target + * @param int|null $seconds + * @return $this + * + * @throws \Facebook\WebDriver\Exception\TimeOutException + */ + public function waitForEvent($type, $target = null, $seconds = null) + { + $seconds = is_null($seconds) ? static::$waitSeconds : $seconds; + + if ($target !== 'document' && $target !== 'window') { + $target = $this->resolver->findOrFail($target ?? ''); + } + + $this->driver->manage()->timeouts()->setScriptTimeout($seconds); + + try { + $this->driver->executeAsyncScript( + 'eval(arguments[0]).addEventListener(arguments[1], () => arguments[2](), { once: true });', + [$target, $type] + ); + } catch (ScriptTimeoutException $e) { + throw new TimeoutException("Waited {$seconds} seconds for event [{$type}]."); + } + + return $this; + } + /** * Wait for the given callback to be true. * - * @param int $seconds + * @param int|null $seconds * @param int $interval * @param \Closure $callback * @param string|null $message diff --git a/vendor/laravel/dusk/src/Console/ChromeDriverCommand.php b/vendor/laravel/dusk/src/Console/ChromeDriverCommand.php index 87541bf38..ed0cabcd8 100644 --- a/vendor/laravel/dusk/src/Console/ChromeDriverCommand.php +++ b/vendor/laravel/dusk/src/Console/ChromeDriverCommand.php @@ -4,6 +4,7 @@ namespace Laravel\Dusk\Console; use Illuminate\Console\Command; use Laravel\Dusk\OperatingSystem; +use Symfony\Component\Process\Process; use ZipArchive; /** @@ -18,6 +19,7 @@ class ChromeDriverCommand extends Command */ protected $signature = 'dusk:chrome-driver {version?} {--all : Install a ChromeDriver binary for every OS} + {--detect : Detect the installed Chrome / Chromium version} {--proxy= : The proxy to download the binary through (example: "tcp://127.0.0.1:9000")} {--ssl-no-verify : Bypass SSL certificate verification when installing through a proxy}'; @@ -57,6 +59,8 @@ class ChromeDriverCommand extends Command protected $slugs = [ 'linux' => 'linux64', 'mac' => 'mac64', + 'mac-intel' => 'mac64', + 'mac-arm' => 'mac_arm64', 'win' => 'win32', ]; @@ -102,6 +106,32 @@ class ChromeDriverCommand extends Command */ protected $directory = __DIR__.'/../../bin/'; + /** + * The default commands to detect the installed Chrome / Chromium version. + * + * @var array + */ + protected $chromeVersionCommands = [ + 'linux' => [ + '/usr/bin/google-chrome --version', + '/usr/bin/chromium-browser --version', + '/usr/bin/chromium --version', + '/usr/bin/google-chrome-stable --version', + ], + 'mac' => [ + '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version', + ], + 'mac-intel' => [ + '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version', + ], + 'mac-arm' => [ + '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version', + ], + 'win' => [ + 'reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version', + ], + ]; + /** * Execute the console command. * @@ -139,6 +169,10 @@ class ChromeDriverCommand extends Command { $version = $this->argument('version'); + if ($this->option('detect')) { + $version = $this->detectChromeVersion(OperatingSystem::id()); + } + if (! $version) { return $this->latestVersion(); } @@ -165,7 +199,49 @@ class ChromeDriverCommand extends Command */ protected function latestVersion() { - return trim(file_get_contents($this->latestVersionUrl)); + $streamOptions = []; + + if ($this->option('ssl-no-verify')) { + $streamOptions = [ + 'ssl' => [ + 'verify_peer' => false, + 'verify_peer_name' => false, + ], + ]; + } + + if ($this->option('proxy')) { + $streamOptions['http'] = ['proxy' => $this->option('proxy'), 'request_fulluri' => true]; + } + + return trim(file_get_contents($this->latestVersionUrl, false, stream_context_create($streamOptions))); + } + + /** + * Detect the installed Chrome / Chromium major version. + * + * @param string $os + * @return int|bool + */ + protected function detectChromeVersion($os) + { + foreach ($this->chromeVersionCommands[$os] as $command) { + $process = Process::fromShellCommandline($command); + + $process->run(); + + preg_match('/(\d+)(\.\d+){3}/', $process->getOutput(), $matches); + + if (! isset($matches[1])) { + continue; + } + + return $matches[1]; + } + + $this->error('Chrome version could not be detected.'); + + return false; } /** diff --git a/vendor/laravel/dusk/src/Console/DuskCommand.php b/vendor/laravel/dusk/src/Console/DuskCommand.php index df99e77d2..6cfbc31fe 100644 --- a/vendor/laravel/dusk/src/Console/DuskCommand.php +++ b/vendor/laravel/dusk/src/Console/DuskCommand.php @@ -17,7 +17,10 @@ class DuskCommand extends Command * * @var string */ - protected $signature = 'dusk {--without-tty : Disable output to TTY}'; + protected $signature = 'dusk + {--browse : Open a browser instead of using headless mode} + {--without-tty : Disable output to TTY} + {--pest : Run the tests using Pest}'; /** * The console command description. @@ -56,12 +59,18 @@ class DuskCommand extends Command $this->purgeConsoleLogs(); - $options = array_slice($_SERVER['argv'], $this->option('without-tty') ? 3 : 2); + $this->purgeSourceLogs(); + + $options = collect($_SERVER['argv']) + ->slice(2) + ->diff(['--browse', '--without-tty']) + ->values() + ->all(); return $this->withDuskEnvironment(function () use ($options) { $process = (new Process(array_merge( $this->binary(), $this->phpunitArguments($options) - )))->setTimeout(null); + ), null, $this->env()))->setTimeout(null); try { $process->setTty(! $this->option('without-tty')); @@ -88,11 +97,17 @@ class DuskCommand extends Command */ protected function binary() { - if ('phpdbg' === PHP_SAPI) { - return [PHP_BINARY, '-qrr', 'vendor/phpunit/phpunit/phpunit']; + $binaryPath = 'vendor/phpunit/phpunit/phpunit'; + + if ($this->option('pest')) { + $binaryPath = 'vendor/pestphp/pest/bin/pest'; } - return [PHP_BINARY, 'vendor/phpunit/phpunit/phpunit']; + if ('phpdbg' === PHP_SAPI) { + return [PHP_BINARY, '-qrr', $binaryPath]; + } + + return [PHP_BINARY, $binaryPath]; } /** @@ -104,7 +119,7 @@ class DuskCommand extends Command protected function phpunitArguments($options) { $options = array_values(array_filter($options, function ($option) { - return ! Str::startsWith($option, '--env='); + return ! Str::startsWith($option, ['--env=', '--pest']); })); if (! file_exists($file = base_path('phpunit.dusk.xml'))) { @@ -114,6 +129,18 @@ class DuskCommand extends Command return array_merge(['-c', $file], $options); } + /** + * Get the PHP binary environment variables. + * + * @return array|null + */ + protected function env() + { + if ($this->option('browse') && ! isset($_ENV['CI']) && ! isset($_SERVER['CI'])) { + return ['DUSK_HEADLESS_DISABLED' => true]; + } + } + /** * Purge the failure screenshots. * @@ -121,19 +148,9 @@ class DuskCommand extends Command */ protected function purgeScreenshots() { - $path = base_path('tests/Browser/screenshots'); - - if (! is_dir($path)) { - return; - } - - $files = Finder::create()->files() - ->in($path) - ->name('failure-*'); - - foreach ($files as $file) { - @unlink($file->getRealPath()); - } + $this->purgeDebuggingFiles( + base_path('tests/Browser/screenshots'), 'failure-*' + ); } /** @@ -143,15 +160,39 @@ class DuskCommand extends Command */ protected function purgeConsoleLogs() { - $path = base_path('tests/Browser/console'); + $this->purgeDebuggingFiles( + base_path('tests/Browser/console'), '*.log' + ); + } + /** + * Purge the source logs. + * + * @return void + */ + protected function purgeSourceLogs() + { + $this->purgeDebuggingFiles( + base_path('tests/Browser/source'), '*.txt' + ); + } + + /** + * Purge debugging files based on path and patterns. + * + * @param string $path + * @param string $patterns + * @return void + */ + protected function purgeDebuggingFiles($path, $patterns) + { if (! is_dir($path)) { return; } $files = Finder::create()->files() - ->in($path) - ->name('*.log'); + ->in($path) + ->name($patterns); foreach ($files as $file) { @unlink($file->getRealPath()); diff --git a/vendor/laravel/dusk/src/Console/DuskFailsCommand.php b/vendor/laravel/dusk/src/Console/DuskFailsCommand.php index 09ad36614..90c0909f6 100644 --- a/vendor/laravel/dusk/src/Console/DuskFailsCommand.php +++ b/vendor/laravel/dusk/src/Console/DuskFailsCommand.php @@ -9,7 +9,10 @@ class DuskFailsCommand extends DuskCommand * * @var string */ - protected $signature = 'dusk:fails {--without-tty : Disable output to TTY}'; + protected $signature = 'dusk:fails + {--browse : Open a browser instead of using headless mode} + {--without-tty : Disable output to TTY} + {--pest : Run the tests using Pest}'; /** * The console command description. diff --git a/vendor/laravel/dusk/src/Console/InstallCommand.php b/vendor/laravel/dusk/src/Console/InstallCommand.php index b0f96b721..72a8c56d9 100644 --- a/vendor/laravel/dusk/src/Console/InstallCommand.php +++ b/vendor/laravel/dusk/src/Console/InstallCommand.php @@ -45,6 +45,10 @@ class InstallCommand extends Command $this->createConsoleDirectory(); } + if (! is_dir(base_path('tests/Browser/source'))) { + $this->createSourceDirectory(); + } + $stubs = [ 'ExampleTest.stub' => base_path('tests/Browser/ExampleTest.php'), 'HomePage.stub' => base_path('tests/Browser/Pages/HomePage.php'), @@ -100,6 +104,20 @@ class InstallCommand extends Command file_put_contents(base_path('tests/Browser/console/.gitignore'), '* !.gitignore +'); + } + + /** + * Create the source directory. + * + * @return void + */ + protected function createSourceDirectory() + { + mkdir(base_path('tests/Browser/source'), 0755, true); + + file_put_contents(base_path('tests/Browser/source/.gitignore'), '* +!.gitignore '); } } diff --git a/vendor/laravel/dusk/src/Console/PurgeCommand.php b/vendor/laravel/dusk/src/Console/PurgeCommand.php new file mode 100644 index 000000000..94d5776c9 --- /dev/null +++ b/vendor/laravel/dusk/src/Console/PurgeCommand.php @@ -0,0 +1,114 @@ +ignoreValidationErrors(); + } + + /** + * Execute the console command. + * + * @return mixed + */ + public function handle() + { + $this->purgeScreenshots(); + $this->purgeConsoleLogs(); + $this->purgeSourceLogs(); + } + + /** + * Purge the failure screenshots. + * + * @return void + */ + protected function purgeScreenshots() + { + $this->purgeDebuggingFiles( + 'tests/Browser/screenshots', 'failure-*' + ); + } + + /** + * Purge the console logs. + * + * @return void + */ + protected function purgeConsoleLogs() + { + $this->purgeDebuggingFiles( + 'tests/Browser/console', '*.log' + ); + } + + /** + * Purge the source logs. + * + * @return void + */ + protected function purgeSourceLogs() + { + $this->purgeDebuggingFiles( + 'tests/Browser/source', '*.txt' + ); + } + + /** + * Purge debugging files based on path and patterns. + * + * @param string $relativePath + * @param string $patterns + * @return void + */ + protected function purgeDebuggingFiles($relativePath, $patterns) + { + $path = base_path($relativePath); + + if (! is_dir($path)) { + $this->warn( + "Unable to purge missing directory [{$relativePath}].", OutputInterface::VERBOSITY_DEBUG + ); + + return; + } + + $files = Finder::create()->files() + ->in($path) + ->name($patterns); + + foreach ($files as $file) { + @unlink($file->getRealPath()); + } + + $this->info("Purged \"{$patterns}\" from [{$relativePath}]."); + } +} diff --git a/vendor/laravel/dusk/src/Console/stubs/page.stub b/vendor/laravel/dusk/src/Console/stubs/page.stub index 31cf74cc7..dc0839c79 100644 --- a/vendor/laravel/dusk/src/Console/stubs/page.stub +++ b/vendor/laravel/dusk/src/Console/stubs/page.stub @@ -3,6 +3,7 @@ namespace DummyNamespace; use Laravel\Dusk\Browser; +use Laravel\Dusk\Page; class DummyClass extends Page { diff --git a/vendor/laravel/dusk/src/DuskServiceProvider.php b/vendor/laravel/dusk/src/DuskServiceProvider.php index d969ba1dd..cd3bb145c 100644 --- a/vendor/laravel/dusk/src/DuskServiceProvider.php +++ b/vendor/laravel/dusk/src/DuskServiceProvider.php @@ -15,32 +15,28 @@ class DuskServiceProvider extends ServiceProvider public function boot() { if (! $this->app->environment('production')) { - Route::get('/_dusk/login/{userId}/{guard?}', [ - 'middleware' => 'web', - 'uses' => 'Laravel\Dusk\Http\Controllers\UserController@login', - ]); + Route::group(array_filter([ + 'prefix' => config('dusk.path', '_dusk'), + 'domain' => config('dusk.domain', null), + 'middleware' => config('dusk.middleware', 'web'), + ]), function () { + Route::get('/login/{userId}/{guard?}', [ + 'uses' => 'Laravel\Dusk\Http\Controllers\UserController@login', + 'as' => 'dusk.login', + ]); - Route::get('/_dusk/logout/{guard?}', [ - 'middleware' => 'web', - 'uses' => 'Laravel\Dusk\Http\Controllers\UserController@logout', - ]); + Route::get('/logout/{guard?}', [ + 'uses' => 'Laravel\Dusk\Http\Controllers\UserController@logout', + 'as' => 'dusk.logout', + ]); - Route::get('/_dusk/user/{guard?}', [ - 'middleware' => 'web', - 'uses' => 'Laravel\Dusk\Http\Controllers\UserController@user', - ]); + Route::get('/user/{guard?}', [ + 'uses' => 'Laravel\Dusk\Http\Controllers\UserController@user', + 'as' => 'dusk.user', + ]); + }); } - } - /** - * Register any package services. - * - * @return void - * - * @throws \Exception - */ - public function register() - { if ($this->app->runningInConsole()) { $this->commands([ Console\InstallCommand::class, @@ -48,6 +44,7 @@ class DuskServiceProvider extends ServiceProvider Console\DuskFailsCommand::class, Console\MakeCommand::class, Console\PageCommand::class, + Console\PurgeCommand::class, Console\ComponentCommand::class, Console\ChromeDriverCommand::class, ]); diff --git a/vendor/laravel/dusk/src/ElementResolver.php b/vendor/laravel/dusk/src/ElementResolver.php index 7182b5255..92b1d1c71 100644 --- a/vendor/laravel/dusk/src/ElementResolver.php +++ b/vendor/laravel/dusk/src/ElementResolver.php @@ -87,7 +87,7 @@ class ElementResolver } return $this->firstOrFail([ - $field, "input[name='{$field}']", "textarea[name='{$field}']", + "input[name='{$field}']", "textarea[name='{$field}']", $field, ]); } @@ -106,7 +106,7 @@ class ElementResolver } return $this->firstOrFail([ - $field, "select[name='{$field}']", + "select[name='{$field}']", $field, ]); } @@ -137,7 +137,7 @@ class ElementResolver * Resolve the element for a given radio "field" / value. * * @param string $field - * @param string $value + * @param string|null $value * @return \Facebook\WebDriver\Remote\RemoteWebElement * * @throws \Exception @@ -156,7 +156,7 @@ class ElementResolver } return $this->firstOrFail([ - $field, "input[type=radio][name='{$field}'][value='{$value}']", + "input[type=radio][name='{$field}'][value='{$value}']", $field, ]); } @@ -164,7 +164,7 @@ class ElementResolver * Resolve the element for a given checkbox "field". * * @param string|null $field - * @param string $value + * @param string|null $value * @return \Facebook\WebDriver\Remote\RemoteWebElement * * @throws \Exception @@ -186,7 +186,7 @@ class ElementResolver } return $this->firstOrFail([ - $field, $selector, + $selector, $field, ]); } @@ -205,7 +205,7 @@ class ElementResolver } return $this->firstOrFail([ - $field, "input[type=file][name='{$field}']", + "input[type=file][name='{$field}']", $field, ]); } @@ -224,8 +224,8 @@ class ElementResolver } return $this->firstOrFail([ - $field, "input[name='{$field}']", "textarea[name='{$field}']", - "select[name='{$field}']", "button[name='{$field}']", + "input[name='{$field}']", "textarea[name='{$field}']", + "select[name='{$field}']", "button[name='{$field}']", $field, ]); } diff --git a/vendor/laravel/dusk/src/Http/Controllers/UserController.php b/vendor/laravel/dusk/src/Http/Controllers/UserController.php index 4daedd9df..353ed0c00 100644 --- a/vendor/laravel/dusk/src/Http/Controllers/UserController.php +++ b/vendor/laravel/dusk/src/Http/Controllers/UserController.php @@ -3,6 +3,7 @@ namespace Laravel\Dusk\Http\Controllers; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class UserController @@ -31,7 +32,7 @@ class UserController * Login using the given user ID / email. * * @param string $userId - * @param string $guard + * @param string|null $guard * @return void */ public function login($userId, $guard = null) @@ -50,12 +51,16 @@ class UserController /** * Log the user out of the application. * - * @param string $guard + * @param string|null $guard * @return void */ public function logout($guard = null) { - Auth::guard($guard ?: config('auth.defaults.guard'))->logout(); + $guard = $guard ?: config('auth.defaults.guard'); + + Auth::guard($guard)->logout(); + + Session::forget('password_hash_'.$guard); } /** diff --git a/vendor/laravel/dusk/src/OperatingSystem.php b/vendor/laravel/dusk/src/OperatingSystem.php index d32a99c84..bd6021a85 100644 --- a/vendor/laravel/dusk/src/OperatingSystem.php +++ b/vendor/laravel/dusk/src/OperatingSystem.php @@ -13,7 +13,13 @@ class OperatingSystem */ public static function id() { - return static::onWindows() ? 'win' : (static::onMac() ? 'mac' : 'linux'); + if (static::onWindows()) { + return 'win'; + } elseif (static::onMac()) { + return static::macArchitectureId(); + } + + return 'linux'; } /** @@ -35,4 +41,21 @@ class OperatingSystem { return PHP_OS === 'Darwin'; } + + /** + * Mac platform architecture. + * + * @return string + */ + public static function macArchitectureId() + { + switch (php_uname('m')) { + case 'arm64': + return 'mac-arm'; + case 'x86_64': + return 'mac-intel'; + default: + return 'mac'; + } + } } diff --git a/vendor/laravel/dusk/src/TestCase.php b/vendor/laravel/dusk/src/TestCase.php index 12522c6cd..9f8535849 100644 --- a/vendor/laravel/dusk/src/TestCase.php +++ b/vendor/laravel/dusk/src/TestCase.php @@ -54,7 +54,7 @@ abstract class TestCase extends FoundationTestCase */ protected function baseUrl() { - return config('app.url'); + return rtrim(config('app.url'), '/'); } /** @@ -68,4 +68,14 @@ abstract class TestCase extends FoundationTestCase { throw new Exception('User resolver has not been set.'); } + + /** + * Determine if the tests are running within Laravel Sail. + * + * @return bool + */ + protected static function runningInSail() + { + return isset($_ENV['LARAVEL_SAIL']) && $_ENV['LARAVEL_SAIL'] == '1'; + } } diff --git a/vendor/laravel/dusk/stubs/DuskTestCase.stub b/vendor/laravel/dusk/stubs/DuskTestCase.stub index b1dd1bcdf..c564246fc 100644 --- a/vendor/laravel/dusk/stubs/DuskTestCase.stub +++ b/vendor/laravel/dusk/stubs/DuskTestCase.stub @@ -19,7 +19,9 @@ abstract class DuskTestCase extends BaseTestCase */ public static function prepare() { - static::startChromeDriver(); + if (! static::runningInSail()) { + static::startChromeDriver(); + } } /** @@ -29,16 +31,42 @@ abstract class DuskTestCase extends BaseTestCase */ protected function driver() { - $options = (new ChromeOptions)->addArguments([ - '--disable-gpu', - '--headless', - '--window-size=1920,1080', - ]); + $options = (new ChromeOptions)->addArguments(collect([ + $this->shouldStartMaximized() ? '--start-maximized' : '--window-size=1920,1080', + ])->unless($this->hasHeadlessDisabled(), function ($items) { + return $items->merge([ + '--disable-gpu', + '--headless', + ]); + })->all()); return RemoteWebDriver::create( - 'http://localhost:9515', DesiredCapabilities::chrome()->setCapability( + $_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515', + DesiredCapabilities::chrome()->setCapability( ChromeOptions::CAPABILITY, $options ) ); } + + /** + * Determine whether the Dusk command has disabled headless mode. + * + * @return bool + */ + protected function hasHeadlessDisabled() + { + return isset($_SERVER['DUSK_HEADLESS_DISABLED']) || + isset($_ENV['DUSK_HEADLESS_DISABLED']); + } + + /** + * Determine if the browser window should start maximized. + * + * @return bool + */ + protected function shouldStartMaximized() + { + return isset($_SERVER['DUSK_START_MAXIMIZED']) || + isset($_ENV['DUSK_START_MAXIMIZED']); + } } diff --git a/vendor/laravel/dusk/stubs/phpunit.xml b/vendor/laravel/dusk/stubs/phpunit.xml index 60392c932..07f70bd12 100644 --- a/vendor/laravel/dusk/stubs/phpunit.xml +++ b/vendor/laravel/dusk/stubs/phpunit.xml @@ -13,9 +13,4 @@ ./tests/Browser - - - ./app - - diff --git a/vendor/laravel/framework/README.md b/vendor/laravel/framework/README.md index ef4bc1844..6e9702b3a 100644 --- a/vendor/laravel/framework/README.md +++ b/vendor/laravel/framework/README.md @@ -2,9 +2,9 @@

    Build Status -Total Downloads -Latest Stable Version -License +Total Downloads +Latest Stable Version +License

    ## About Laravel diff --git a/vendor/laravel/framework/composer.json b/vendor/laravel/framework/composer.json index dea51b9ab..ea014010f 100644 --- a/vendor/laravel/framework/composer.json +++ b/vendor/laravel/framework/composer.json @@ -15,41 +15,43 @@ } ], "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^2.3.1", + "dragonmantank/cron-expression": "^3.0.2", "egulias/email-validator": "^2.1.10", - "league/commonmark": "^1.3", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^1.3|^2.0.2", "league/flysystem": "^1.1", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.31", + "nesbot/carbon": "^2.53.1", "opis/closure": "^3.6", "psr/container": "^1.0", + "psr/log": "^1.0|^2.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7|^4.0", - "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.0", - "symfony/error-handler": "^5.0", - "symfony/finder": "^5.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0", - "symfony/polyfill-php73": "^1.17", - "symfony/process": "^5.0", - "symfony/routing": "^5.0", - "symfony/var-dumper": "^5.0", + "ramsey/uuid": "^4.2.2", + "swiftmailer/swiftmailer": "^6.3", + "symfony/console": "^5.4", + "symfony/error-handler": "^5.4", + "symfony/finder": "^5.4", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/mime": "^5.4", + "symfony/process": "^5.4", + "symfony/routing": "^5.4", + "symfony/var-dumper": "^5.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", - "vlucas/phpdotenv": "^4.0", - "voku/portable-ascii": "^1.4.8" + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^1.6.1" }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", + "illuminate/collections": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -62,6 +64,7 @@ "illuminate/hashing": "self.version", "illuminate/http": "self.version", "illuminate/log": "self.version", + "illuminate/macroable": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", @@ -77,32 +80,35 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.155", - "doctrine/dbal": "^2.6", - "filp/whoops": "^2.8", - "guzzlehttp/guzzle": "^6.3.1|^7.0.1", + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.4", + "filp/whoops": "^2.14.3", + "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "~1.3.3|^1.4.2", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "^5.8", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^6.27", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.4|^9.3.3", - "predis/predis": "^1.1.1", - "symfony/cache": "^5.0" + "phpunit/phpunit": "^8.5.19|^9.5.8", + "predis/predis": "^1.1.9", + "symfony/cache": "^5.4" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "conflict": { "tightenco/collect": "<5.5.33" }, "autoload": { "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { - "Illuminate\\": "src/Illuminate/" + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": ["src/Illuminate/Macroable/", "src/Illuminate/Collections/"] } }, "autoload-dev": { @@ -115,40 +121,45 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { + "ext-bcmath": "Required to use the multiple_of validation rule.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", - "filp/whoops": "Required for friendly error pages in development (^2.8).", + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "mockery/mockery": "Required to use mocking (~1.3.3|^1.4.2).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.3.3).", - "predis/predis": "Required to use the predis connector (^1.1.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", - "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "composer/package-versions-deprecated": true + } }, "minimum-stability": "dev", "prefer-stable": true diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/Events/GateEvaluated.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/Events/GateEvaluated.php new file mode 100644 index 000000000..f77a9c84c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/Events/GateEvaluated.php @@ -0,0 +1,51 @@ +user = $user; + $this->ability = $ability; + $this->result = $result; + $this->arguments = $arguments; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php index 8c955b462..fe8d93fcb 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php @@ -2,10 +2,13 @@ namespace Illuminate\Auth\Access; +use Closure; use Exception; use Illuminate\Contracts\Auth\Access\Gate as GateContract; use Illuminate\Contracts\Container\Container; +use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Arr; +use Illuminate\Support\Collection; use Illuminate\Support\Str; use InvalidArgumentException; use ReflectionClass; @@ -115,6 +118,64 @@ class Gate implements GateContract return true; } + /** + * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is false. + * + * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition + * @param string|null $message + * @param string|null $code + * @return \Illuminate\Auth\Access\Response + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + public function allowIf($condition, $message = null, $code = null) + { + return $this->authorizeOnDemand($condition, $message, $code, true); + } + + /** + * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is true. + * + * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition + * @param string|null $message + * @param string|null $code + * @return \Illuminate\Auth\Access\Response + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + public function denyIf($condition, $message = null, $code = null) + { + return $this->authorizeOnDemand($condition, $message, $code, false); + } + + /** + * Authorize a given condition or callback. + * + * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition + * @param string|null $message + * @param string|null $code + * @param bool $allowWhenResponseIs + * @return \Illuminate\Auth\Access\Response + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + protected function authorizeOnDemand($condition, $message, $code, $allowWhenResponseIs) + { + $user = $this->resolveUser(); + + if ($condition instanceof Closure) { + $response = $this->canBeCalledWithUser($user, $condition) + ? $condition($user) + : new Response(false, $message, $code); + } else { + $response = $condition; + } + + return with($response instanceof Response ? $response : new Response( + (bool) $response === $allowWhenResponseIs, $message, $code + ))->authorize(); + } + /** * Define a new ability. * @@ -155,10 +216,10 @@ class Gate implements GateContract { $abilities = $abilities ?: [ 'viewAny' => 'viewAny', - 'view' => 'view', - 'create' => 'create', - 'update' => 'update', - 'delete' => 'delete', + 'view' => 'view', + 'create' => 'create', + 'update' => 'update', + 'delete' => 'delete', ]; foreach ($abilities as $ability => $method) { @@ -373,9 +434,11 @@ class Gate implements GateContract // After calling the authorization callback, we will call the "after" callbacks // that are registered with the Gate, which allows a developer to do logging // if that is required for this application. Then we'll return the result. - return $this->callAfterCallbacks( + return tap($this->callAfterCallbacks( $user, $ability, $arguments, $result - ); + ), function ($result) use ($user, $ability, $arguments) { + $this->dispatchGateEvaluatedEvent($user, $ability, $arguments, $result); + }); } /** @@ -518,6 +581,24 @@ class Gate implements GateContract return $result; } + /** + * Dispatch a gate evaluation event. + * + * @param \Illuminate\Contracts\Auth\Authenticatable|null $user + * @param string $ability + * @param array $arguments + * @param bool|null $result + * @return void + */ + protected function dispatchGateEvaluatedEvent($user, $ability, array $arguments, $result) + { + if ($this->container->bound(Dispatcher::class)) { + $this->container->make(Dispatcher::class)->dispatch( + new Events\GateEvaluated($user, $ability, $result, $arguments) + ); + } + } + /** * Resolve the callable for the given ability and arguments. * @@ -599,7 +680,15 @@ class Gate implements GateContract $classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class))); - return [$classDirname.'\\Policies\\'.class_basename($class).'Policy']; + $classDirnameSegments = explode('\\', $classDirname); + + return Arr::wrap(Collection::times(count($classDirnameSegments), function ($index) use ($class, $classDirnameSegments) { + $classDirname = implode('\\', array_slice($classDirnameSegments, 0, $index)); + + return $classDirname.'\\Policies\\'.class_basename($class).'Policy'; + })->reverse()->values()->first(function ($class) { + return class_exists($class); + }) ?: [$classDirname.'\\Policies\\'.class_basename($class).'Policy']); } /** @@ -770,4 +859,17 @@ class Gate implements GateContract { return $this->policies; } + + /** + * Set the container instance used by the gate. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return $this + */ + public function setContainer(Container $container) + { + $this->container = $container; + + return $this; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php index ebbd7f5f1..b72f391f9 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php @@ -122,7 +122,11 @@ class AuthManager implements FactoryContract { $provider = $this->createUserProvider($config['provider'] ?? null); - $guard = new SessionGuard($name, $provider, $this->app['session.store']); + $guard = new SessionGuard( + $name, + $provider, + $this->app['session.store'], + ); // When using the remember me functionality of the authentication services we // will need to be set the encryption instance of the guard, which allows @@ -139,6 +143,10 @@ class AuthManager implements FactoryContract $guard->setRequest($this->app->refresh('request', $guard, 'setRequest')); } + if (isset($config['remember'])) { + $guard->setRememberDuration($config['remember']); + } + return $guard; } @@ -295,6 +303,31 @@ class AuthManager implements FactoryContract return count($this->guards) > 0; } + /** + * Forget all of the resolved guard instances. + * + * @return $this + */ + public function forgetGuards() + { + $this->guards = []; + + return $this; + } + + /** + * Set the application instance used by the manager. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return $this + */ + public function setApplication($app) + { + $this->app = $app; + + return $this; + } + /** * Dynamically call the default driver instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php index 7a6b41212..9c17edfa1 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php @@ -35,11 +35,6 @@ class AuthServiceProvider extends ServiceProvider protected function registerAuthenticator() { $this->app->singleton('auth', function ($app) { - // Once the authentication service has actually been requested by the developer - // we will set a variable in the application indicating such. This helps us - // know that we need to set any queued cookies in the after event later. - $app['auth.loaded'] = true; - return new AuthManager($app); }); @@ -55,11 +50,9 @@ class AuthServiceProvider extends ServiceProvider */ protected function registerUserResolver() { - $this->app->bind( - AuthenticatableContract::class, function ($app) { - return call_user_func($app['auth']->userResolver()); - } - ); + $this->app->bind(AuthenticatableContract::class, function ($app) { + return call_user_func($app['auth']->userResolver()); + }); } /** @@ -83,15 +76,13 @@ class AuthServiceProvider extends ServiceProvider */ protected function registerRequirePassword() { - $this->app->bind( - RequirePassword::class, function ($app) { - return new RequirePassword( - $app[ResponseFactory::class], - $app[UrlGenerator::class], - $app['config']->get('auth.password_timeout') - ); - } - ); + $this->app->bind(RequirePassword::class, function ($app) { + return new RequirePassword( + $app[ResponseFactory::class], + $app[UrlGenerator::class], + $app['config']->get('auth.password_timeout') + ); + }); } /** @@ -116,11 +107,8 @@ class AuthServiceProvider extends ServiceProvider protected function registerEventRebindHandler() { $this->app->rebinding('events', function ($app, $dispatcher) { - if (! $app->resolved('auth')) { - return; - } - - if ($app['auth']->hasResolvedGuards() === false) { + if (! $app->resolved('auth') || + $app['auth']->hasResolvedGuards() === false) { return; } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php b/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php index d7578a3dc..f1c011591 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php @@ -31,6 +31,16 @@ trait Authenticatable return $this->{$this->getAuthIdentifierName()}; } + /** + * Get the unique broadcast identifier for the user. + * + * @return mixed + */ + public function getAuthIdentifierForBroadcasting() + { + return $this->getAuthIdentifier(); + } + /** * Get the password for the user. * diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php index ef7dbee63..66808c3b8 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php @@ -16,7 +16,7 @@ class AuthenticationException extends Exception /** * The path the user should be redirected to. * - * @var string + * @var string|null */ protected $redirectTo; @@ -49,7 +49,7 @@ class AuthenticationException extends Exception /** * Get the path the user should be redirected to. * - * @return string + * @return string|null */ public function redirectTo() { diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub index 9224ba381..d1822366d 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub @@ -13,8 +13,8 @@ - - + + diff --git a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php index 8aa563d82..111e55225 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\Auth; +use Closure; use Illuminate\Contracts\Auth\Authenticatable as UserContract; use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Hashing\Hasher as HasherContract; @@ -117,6 +118,8 @@ class DatabaseUserProvider implements UserProvider if (is_array($value) || $value instanceof Arrayable) { $query->whereIn($key, $value); + } elseif ($value instanceof Closure) { + $value($query); } else { $query->where($key, $value); } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php index f175298ce..54dff6b87 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\Auth; +use Closure; use Illuminate\Contracts\Auth\Authenticatable as UserContract; use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Hashing\Hasher as HasherContract; @@ -123,6 +124,8 @@ class EloquentUserProvider implements UserProvider if (is_array($value) || $value instanceof Arrayable) { $query->whereIn($key, $value); + } elseif ($value instanceof Closure) { + $value($query); } else { $query->where($key, $value); } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php index 4d5328c6b..aa9ebf9ec 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php @@ -25,7 +25,7 @@ trait GuardHelpers protected $provider; /** - * Determine if current user is authenticated. If not, throw an exception. + * Determine if the current user is authenticated. If not, throw an exception. * * @return \Illuminate\Contracts\Auth\Authenticatable * diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php index 1f73e576a..8f2b33ae5 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php @@ -5,6 +5,7 @@ namespace Illuminate\Auth\Middleware; use Closure; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\URL; class EnsureEmailIsVerified { @@ -14,7 +15,7 @@ class EnsureEmailIsVerified * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $redirectToRoute - * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse|null */ public function handle($request, Closure $next, $redirectToRoute = null) { @@ -23,7 +24,7 @@ class EnsureEmailIsVerified ! $request->user()->hasVerifiedEmail())) { return $request->expectsJson() ? abort(403, 'Your email address is not verified.') - : Redirect::route($redirectToRoute ?: 'verification.notice'); + : Redirect::guest(URL::route($redirectToRoute ?: 'verification.notice')); } return $next($request); diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php index 05d010436..f1c13f4d7 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php @@ -63,15 +63,17 @@ class ResetPassword extends Notification return call_user_func(static::$toMailCallback, $notifiable, $this->token); } - if (static::$createUrlCallback) { - $url = call_user_func(static::$createUrlCallback, $notifiable, $this->token); - } else { - $url = url(route('password.reset', [ - 'token' => $this->token, - 'email' => $notifiable->getEmailForPasswordReset(), - ], false)); - } + return $this->buildMailMessage($this->resetUrl($notifiable)); + } + /** + * Get the reset password notification mail message for the given URL. + * + * @param string $url + * @return \Illuminate\Notifications\Messages\MailMessage + */ + protected function buildMailMessage($url) + { return (new MailMessage) ->subject(Lang::get('Reset Password Notification')) ->line(Lang::get('You are receiving this email because we received a password reset request for your account.')) @@ -80,6 +82,24 @@ class ResetPassword extends Notification ->line(Lang::get('If you did not request a password reset, no further action is required.')); } + /** + * Get the reset URL for the given notifiable. + * + * @param mixed $notifiable + * @return string + */ + protected function resetUrl($notifiable) + { + if (static::$createUrlCallback) { + return call_user_func(static::$createUrlCallback, $notifiable, $this->token); + } + + return url(route('password.reset', [ + 'token' => $this->token, + 'email' => $notifiable->getEmailForPasswordReset(), + ], false)); + } + /** * Set a callback that should be used when creating the reset password button URL. * diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php index f746685fc..7a5cf9164 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php @@ -11,6 +11,13 @@ use Illuminate\Support\Facades\URL; class VerifyEmail extends Notification { + /** + * The callback that should be used to create the verify email URL. + * + * @var \Closure|null + */ + public static $createUrlCallback; + /** * The callback that should be used to build the mail message. * @@ -43,10 +50,21 @@ class VerifyEmail extends Notification return call_user_func(static::$toMailCallback, $notifiable, $verificationUrl); } + return $this->buildMailMessage($verificationUrl); + } + + /** + * Get the verify email notification mail message for the given URL. + * + * @param string $url + * @return \Illuminate\Notifications\Messages\MailMessage + */ + protected function buildMailMessage($url) + { return (new MailMessage) ->subject(Lang::get('Verify Email Address')) ->line(Lang::get('Please click the button below to verify your email address.')) - ->action(Lang::get('Verify Email Address'), $verificationUrl) + ->action(Lang::get('Verify Email Address'), $url) ->line(Lang::get('If you did not create an account, no further action is required.')); } @@ -58,6 +76,10 @@ class VerifyEmail extends Notification */ protected function verificationUrl($notifiable) { + if (static::$createUrlCallback) { + return call_user_func(static::$createUrlCallback, $notifiable); + } + return URL::temporarySignedRoute( 'verification.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), @@ -68,6 +90,17 @@ class VerifyEmail extends Notification ); } + /** + * Set a callback that should be used when creating the email verification URL. + * + * @param \Closure $callback + * @return void + */ + public static function createUrlUsing($callback) + { + static::$createUrlCallback = $callback; + } + /** * Set a callback that should be used when building the notification mail message. * diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php index 662f71e27..cbbc897ab 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php @@ -42,9 +42,10 @@ class PasswordBroker implements PasswordBrokerContract * Send a password reset link to a user. * * @param array $credentials + * @param \Closure|null $callback * @return string */ - public function sendResetLink(array $credentials) + public function sendResetLink(array $credentials, Closure $callback = null) { // First we will check to see if we found a user at the given credentials and // if we did not we will redirect back to this current URI with a piece of @@ -59,12 +60,16 @@ class PasswordBroker implements PasswordBrokerContract return static::RESET_THROTTLED; } - // Once we have the reset token, we are ready to send the message out to this - // user with a link to reset their password. We will then redirect back to - // the current URI having nothing set in the session to indicate errors. - $user->sendPasswordResetNotification( - $this->tokens->create($user) - ); + $token = $this->tokens->create($user); + + if ($callback) { + $callback($user, $token); + } else { + // Once we have the reset token, we are ready to send the message out to this + // user with a link to reset their password. We will then redirect back to + // the current URI having nothing set in the session to indicate errors. + $user->sendPasswordResetNotification($token); + } return static::RESET_LINK_SENT; } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php index 4db498784..cd9ec98d7 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php @@ -17,9 +17,12 @@ use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Session\Session; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Str; +use Illuminate\Support\Timebox; use Illuminate\Support\Traits\Macroable; +use InvalidArgumentException; use RuntimeException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; @@ -29,7 +32,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth use GuardHelpers, Macroable; /** - * The name of the Guard. Typically "session". + * The name of the guard. Typically "web". * * Corresponds to guard name in authentication configuration. * @@ -51,6 +54,13 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth */ protected $viaRemember = false; + /** + * The number of minutes that the "remember me" cookie should be valid for. + * + * @var int + */ + protected $rememberDuration = 2628000; + /** * The session used by the guard. * @@ -79,6 +89,13 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth */ protected $events; + /** + * The timebox instance. + * + * @var \Illuminate\Support\Timebox + */ + protected $timebox; + /** * Indicates if the logout method has been called. * @@ -100,17 +117,20 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth * @param \Illuminate\Contracts\Auth\UserProvider $provider * @param \Illuminate\Contracts\Session\Session $session * @param \Symfony\Component\HttpFoundation\Request|null $request + * @param \Illuminate\Support\Timebox|null $timebox * @return void */ public function __construct($name, UserProvider $provider, Session $session, - Request $request = null) + Request $request = null, + Timebox $timebox = null) { $this->name = $name; $this->session = $session; $this->request = $request; $this->provider = $provider; + $this->timebox = $timebox ?: new Timebox; } /** @@ -320,7 +340,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth } /** - * Get the credential array for a HTTP Basic request. + * Get the credential array for an HTTP Basic request. * * @param \Symfony\Component\HttpFoundation\Request $request * @param string $field @@ -373,6 +393,34 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth return false; } + /** + * Attempt to authenticate a user with credentials and additional callbacks. + * + * @param array $credentials + * @param array|callable $callbacks + * @param false $remember + * @return bool + */ + public function attemptWhen(array $credentials = [], $callbacks = null, $remember = false) + { + $this->fireAttemptEvent($credentials, $remember); + + $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials); + + // This method does the exact same thing as attempt, but also executes callbacks after + // the user is retrieved and validated. If one of the callbacks returns falsy we do + // not login the user. Instead, we will fail the specific authentication attempt. + if ($this->hasValidCredentials($user, $credentials) && $this->shouldLogin($callbacks, $user)) { + $this->login($user, $remember); + + return true; + } + + $this->fireFailedEvent($user, $credentials); + + return false; + } + /** * Determine if the user matches the credentials. * @@ -382,13 +430,35 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth */ protected function hasValidCredentials($user, $credentials) { - $validated = ! is_null($user) && $this->provider->validateCredentials($user, $credentials); + return $this->timebox->call(function ($timebox) use ($user, $credentials) { + $validated = ! is_null($user) && $this->provider->validateCredentials($user, $credentials); - if ($validated) { - $this->fireValidatedEvent($user); + if ($validated) { + $timebox->returnEarly(); + + $this->fireValidatedEvent($user); + } + + return $validated; + }, 200 * 1000); + } + + /** + * Determine if the user should login by executing the given callbacks. + * + * @param array|callable|null $callbacks + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return bool + */ + protected function shouldLogin($callbacks, AuthenticatableContract $user) + { + foreach (Arr::wrap($callbacks) as $callback) { + if (! $callback($user, $this)) { + return false; + } } - return $validated; + return true; } /** @@ -484,7 +554,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth */ protected function createRecaller($value) { - return $this->getCookieJar()->forever($this->getRecallerName(), $value); + return $this->getCookieJar()->make($this->getRecallerName(), $value, $this->getRememberDuration()); } /** @@ -517,6 +587,34 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth $this->loggedOut = true; } + /** + * Log the user out of the application on their current device only. + * + * This method does not cycle the "remember" token. + * + * @return void + */ + public function logoutCurrentDevice() + { + $user = $this->user(); + + $this->clearUserDataFromStorage(); + + // If we have an event dispatcher instance, we can fire off the logout event + // so any further processing can be done. This allows the developer to be + // listening for anytime a user signs out of this application manually. + if (isset($this->events)) { + $this->events->dispatch(new CurrentDeviceLogout($this->name, $user)); + } + + // Once we have fired the logout event we will clear the users out of memory + // so they are no longer available as the user is no longer considered as + // being signed into this application and should not be available here. + $this->user = null; + + $this->loggedOut = true; + } + /** * Remove the user data from the session and cookies. * @@ -545,32 +643,6 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth $this->provider->updateRememberToken($user, $token); } - /** - * Log the user out of the application on their current device only. - * - * @return void - */ - public function logoutCurrentDevice() - { - $user = $this->user(); - - $this->clearUserDataFromStorage(); - - // If we have an event dispatcher instance, we can fire off the logout event - // so any further processing can be done. This allows the developer to be - // listening for anytime a user signs out of this application manually. - if (isset($this->events)) { - $this->events->dispatch(new CurrentDeviceLogout($this->name, $user)); - } - - // Once we have fired the logout event we will clear the users out of memory - // so they are no longer available as the user is no longer considered as - // being signed into this application and should not be available here. - $this->user = null; - - $this->loggedOut = true; - } - /** * Invalidate other sessions for the current user. * @@ -578,7 +650,9 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth * * @param string $password * @param string $attribute - * @return bool|null + * @return \Illuminate\Contracts\Auth\Authenticatable|null + * + * @throws \Illuminate\Auth\AuthenticationException */ public function logoutOtherDevices($password, $attribute = 'password') { @@ -586,9 +660,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth return; } - $result = tap($this->user()->forceFill([ - $attribute => Hash::make($password), - ]))->save(); + $result = $this->rehashUserPassword($password, $attribute); if ($this->recaller() || $this->getCookieJar()->hasQueued($this->getRecallerName())) { @@ -600,6 +672,26 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth return $result; } + /** + * Rehash the current user's password. + * + * @param string $password + * @param string $attribute + * @return \Illuminate\Contracts\Auth\Authenticatable|null + * + * @throws \InvalidArgumentException + */ + protected function rehashUserPassword($password, $attribute) + { + if (! Hash::check($password, $this->user()->{$attribute})) { + throw new InvalidArgumentException('The given password does not match the current password.'); + } + + return tap($this->user()->forceFill([ + $attribute => Hash::make($password), + ]))->save(); + } + /** * Register an authentication attempt event listener. * @@ -746,6 +838,29 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth return $this->viaRemember; } + /** + * Get the number of minutes the remember me cookie should be valid for. + * + * @return int + */ + protected function getRememberDuration() + { + return $this->rememberDuration; + } + + /** + * Set the number of minutes the remember me cookie should be valid for. + * + * @param int $minutes + * @return $this + */ + public function setRememberDuration($minutes) + { + $this->rememberDuration = $minutes; + + return $this; + } + /** * Get the cookie creator instance used by the guard. * @@ -853,4 +968,14 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth return $this; } + + /** + * Get the timebox instance used by the guard. + * + * @return \Illuminate\Support\Timebox + */ + public function getTimebox() + { + return $this->timebox; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json index 7ef7fccbc..842066cde 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Auth/composer.json @@ -14,11 +14,13 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/http": "^7.0", - "illuminate/queue": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/http": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/queue": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { @@ -27,13 +29,13 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { - "illuminate/console": "Required to use the auth:clear-resets command (^7.0).", - "illuminate/queue": "Required to fire login / logout events (^7.0).", - "illuminate/session": "Required to use the session based guard (^7.0)." + "illuminate/console": "Required to use the auth:clear-resets command (^8.0).", + "illuminate/queue": "Required to fire login / logout events (^8.0).", + "illuminate/session": "Required to use the session based guard (^8.0)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php index 775df7805..24a1c3367 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php @@ -3,7 +3,7 @@ namespace Illuminate\Broadcasting; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Broadcasting\Broadcaster; +use Illuminate\Contracts\Broadcasting\Factory as BroadcastingFactory; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Arr; @@ -46,23 +46,37 @@ class BroadcastEvent implements ShouldQueue $this->event = $event; $this->tries = property_exists($event, 'tries') ? $event->tries : null; $this->timeout = property_exists($event, 'timeout') ? $event->timeout : null; + $this->afterCommit = property_exists($event, 'afterCommit') ? $event->afterCommit : null; } /** * Handle the queued job. * - * @param \Illuminate\Contracts\Broadcasting\Broadcaster $broadcaster + * @param \Illuminate\Contracts\Broadcasting\Factory $manager * @return void */ - public function handle(Broadcaster $broadcaster) + public function handle(BroadcastingFactory $manager) { $name = method_exists($this->event, 'broadcastAs') ? $this->event->broadcastAs() : get_class($this->event); - $broadcaster->broadcast( - Arr::wrap($this->event->broadcastOn()), $name, - $this->getPayloadFromEvent($this->event) - ); + $channels = Arr::wrap($this->event->broadcastOn()); + + if (empty($channels)) { + return; + } + + $connections = method_exists($this->event, 'broadcastConnections') + ? $this->event->broadcastConnections() + : [null]; + + $payload = $this->getPayloadFromEvent($this->event); + + foreach ($connections as $connection) { + $manager->connection($connection)->broadcast( + $channels, $name, $payload + ); + } } /** @@ -73,10 +87,9 @@ class BroadcastEvent implements ShouldQueue */ protected function getPayloadFromEvent($event) { - if (method_exists($event, 'broadcastWith')) { - return array_merge( - $event->broadcastWith(), ['socket' => data_get($event, 'socket')] - ); + if (method_exists($event, 'broadcastWith') && + ! is_null($payload = $event->broadcastWith())) { + return array_merge($payload, ['socket' => data_get($event, 'socket')]); } $payload = []; diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php index 3be0500d9..a4957cde9 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php @@ -2,7 +2,9 @@ namespace Illuminate\Broadcasting; +use Ably\AblyRest; use Closure; +use Illuminate\Broadcasting\Broadcasters\AblyBroadcaster; use Illuminate\Broadcasting\Broadcasters\LogBroadcaster; use Illuminate\Broadcasting\Broadcasters\NullBroadcaster; use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster; @@ -70,7 +72,7 @@ class BroadcastManager implements FactoryContract $router->match( ['get', 'post'], '/broadcasting/auth', '\\'.BroadcastController::class.'@authenticate' - ); + )->withoutMiddleware([\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class]); }); } @@ -110,7 +112,10 @@ class BroadcastManager implements FactoryContract */ public function queue($event) { - if ($event instanceof ShouldBroadcastNow) { + if ($event instanceof ShouldBroadcastNow || + (is_object($event) && + method_exists($event, 'shouldBroadcastNow') && + $event->shouldBroadcastNow())) { return $this->app->make(BusDispatcherContract::class)->dispatchNow(new BroadcastEvent(clone $event)); } @@ -220,6 +225,17 @@ class BroadcastManager implements FactoryContract return new PusherBroadcaster($pusher); } + /** + * Create an instance of the driver. + * + * @param array $config + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + */ + protected function createAblyDriver(array $config) + { + return new AblyBroadcaster(new AblyRest($config)); + } + /** * Create an instance of the driver. * @@ -294,6 +310,19 @@ class BroadcastManager implements FactoryContract $this->app['config']['broadcasting.default'] = $name; } + /** + * Disconnect the given disk and remove from local cache. + * + * @param string|null $name + * @return void + */ + public function purge($name = null) + { + $name = $name ?? $this->getDefaultDriver(); + + unset($this->drivers[$name]); + } + /** * Register a custom driver creator Closure. * @@ -308,6 +337,41 @@ class BroadcastManager implements FactoryContract return $this; } + /** + * Get the application instance used by the manager. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public function getApplication() + { + return $this->app; + } + + /** + * Set the application instance used by the manager. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return $this + */ + public function setApplication($app) + { + $this->app = $app; + + return $this; + } + + /** + * Forget all of the resolved driver instances. + * + * @return $this + */ + public function forgetDrivers() + { + $this->drivers = []; + + return $this; + } + /** * Dynamically call the default driver instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/AblyBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/AblyBroadcaster.php new file mode 100644 index 000000000..ead68a184 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/AblyBroadcaster.php @@ -0,0 +1,225 @@ +ably = $ably; + } + + /** + * Authenticate the incoming request for a given channel. + * + * @param \Illuminate\Http\Request $request + * @return mixed + * + * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException + */ + public function auth($request) + { + $channelName = $this->normalizeChannelName($request->channel_name); + + if (empty($request->channel_name) || + ($this->isGuardedChannel($request->channel_name) && + ! $this->retrieveUser($request, $channelName))) { + throw new AccessDeniedHttpException; + } + + return parent::verifyUserCanAccessChannel( + $request, $channelName + ); + } + + /** + * Return the valid authentication response. + * + * @param \Illuminate\Http\Request $request + * @param mixed $result + * @return mixed + */ + public function validAuthenticationResponse($request, $result) + { + if (Str::startsWith($request->channel_name, 'private')) { + $signature = $this->generateAblySignature( + $request->channel_name, $request->socket_id + ); + + return ['auth' => $this->getPublicToken().':'.$signature]; + } + + $channelName = $this->normalizeChannelName($request->channel_name); + + $user = $this->retrieveUser($request, $channelName); + + $broadcastIdentifier = method_exists($user, 'getAuthIdentifierForBroadcasting') + ? $user->getAuthIdentifierForBroadcasting() + : $user->getAuthIdentifier(); + + $signature = $this->generateAblySignature( + $request->channel_name, + $request->socket_id, + $userData = array_filter([ + 'user_id' => (string) $broadcastIdentifier, + 'user_info' => $result, + ]) + ); + + return [ + 'auth' => $this->getPublicToken().':'.$signature, + 'channel_data' => json_encode($userData), + ]; + } + + /** + * Generate the signature needed for Ably authentication headers. + * + * @param string $channelName + * @param string $socketId + * @param array|null $userData + * @return string + */ + public function generateAblySignature($channelName, $socketId, $userData = null) + { + return hash_hmac( + 'sha256', + sprintf('%s:%s%s', $socketId, $channelName, $userData ? ':'.json_encode($userData) : ''), + $this->getPrivateToken(), + ); + } + + /** + * Broadcast the given event. + * + * @param array $channels + * @param string $event + * @param array $payload + * @return void + */ + public function broadcast(array $channels, $event, array $payload = []) + { + foreach ($this->formatChannels($channels) as $channel) { + $this->ably->channels->get($channel)->publish( + $this->buildAblyMessage($event, $payload) + ); + } + } + + /** + * Build an Ably message object for broadcasting. + * + * @param string $event + * @param array $payload + * @return \Ably\Models\Message + */ + protected function buildAblyMessage($event, array $payload = []) + { + return tap(new AblyMessage, function ($message) use ($event, $payload) { + $message->name = $event; + $message->data = $payload; + $message->connectionKey = data_get($payload, 'socket'); + }); + } + + /** + * Return true if the channel is protected by authentication. + * + * @param string $channel + * @return bool + */ + public function isGuardedChannel($channel) + { + return Str::startsWith($channel, ['private-', 'presence-']); + } + + /** + * Remove prefix from channel name. + * + * @param string $channel + * @return string + */ + public function normalizeChannelName($channel) + { + if ($this->isGuardedChannel($channel)) { + return Str::startsWith($channel, 'private-') + ? Str::replaceFirst('private-', '', $channel) + : Str::replaceFirst('presence-', '', $channel); + } + + return $channel; + } + + /** + * Format the channel array into an array of strings. + * + * @param array $channels + * @return array + */ + protected function formatChannels(array $channels) + { + return array_map(function ($channel) { + $channel = (string) $channel; + + if (Str::startsWith($channel, ['private-', 'presence-'])) { + return Str::startsWith($channel, 'private-') + ? Str::replaceFirst('private-', 'private:', $channel) + : Str::replaceFirst('presence-', 'presence:', $channel); + } + + return 'public:'.$channel; + }, $channels); + } + + /** + * Get the public token value from the Ably key. + * + * @return mixed + */ + protected function getPublicToken() + { + return Str::before($this->ably->options->key, ':'); + } + + /** + * Get the private token value from the Ably key. + * + * @return mixed + */ + protected function getPrivateToken() + { + return Str::after($this->ably->options->key, ':'); + } + + /** + * Get the underlying Ably SDK instance. + * + * @return \Ably\AblyRest + */ + public function getAbly() + { + return $this->ably; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php index d39258ff5..a25b2ff2f 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php @@ -5,6 +5,7 @@ namespace Illuminate\Broadcasting\Broadcasters; use Exception; use Illuminate\Container\Container; use Illuminate\Contracts\Broadcasting\Broadcaster as BroadcasterContract; +use Illuminate\Contracts\Broadcasting\HasBroadcastChannel; use Illuminate\Contracts\Routing\BindingRegistrar; use Illuminate\Contracts\Routing\UrlRoutable; use Illuminate\Support\Arr; @@ -40,13 +41,19 @@ abstract class Broadcaster implements BroadcasterContract /** * Register a channel authenticator. * - * @param string $channel + * @param \Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string $channel * @param callable|string $callback * @param array $options * @return $this */ public function channel($channel, $callback, $options = []) { + if ($channel instanceof HasBroadcastChannel) { + $channel = $channel->broadcastChannelRoute(); + } elseif (is_string($channel) && class_exists($channel) && is_a($channel, HasBroadcastChannel::class, true)) { + $channel = (new $channel)->broadcastChannelRoute(); + } + $this->channels[$channel] = $callback; $this->channelOptions[$channel] = $options; @@ -317,7 +324,7 @@ abstract class Broadcaster implements BroadcasterContract } /** - * Check if channel name from request match a pattern from registered channels. + * Check if the channel name from the request matches a pattern from registered channels. * * @param string $channel * @param string $pattern diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php index c39abbd6f..6b41bc740 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php @@ -5,6 +5,7 @@ namespace Illuminate\Broadcasting\Broadcasters; use Illuminate\Broadcasting\BroadcastException; use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Pusher\ApiErrorException; use Pusher\Pusher; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; @@ -42,8 +43,9 @@ class PusherBroadcaster extends Broadcaster { $channelName = $this->normalizeChannelName($request->channel_name); - if ($this->isGuardedChannel($request->channel_name) && - ! $this->retrieveUser($request, $channelName)) { + if (empty($request->channel_name) || + ($this->isGuardedChannel($request->channel_name) && + ! $this->retrieveUser($request, $channelName))) { throw new AccessDeniedHttpException; } @@ -69,11 +71,17 @@ class PusherBroadcaster extends Broadcaster $channelName = $this->normalizeChannelName($request->channel_name); + $user = $this->retrieveUser($request, $channelName); + + $broadcastIdentifier = method_exists($user, 'getAuthIdentifierForBroadcasting') + ? $user->getAuthIdentifierForBroadcasting() + : $user->getAuthIdentifier(); + return $this->decodePusherResponse( $request, $this->pusher->presence_auth( $request->channel_name, $request->socket_id, - $this->retrieveUser($request, $channelName)->getAuthIdentifier(), $result + $broadcastIdentifier, $result ) ); } @@ -109,20 +117,44 @@ class PusherBroadcaster extends Broadcaster { $socket = Arr::pull($payload, 'socket'); - $response = $this->pusher->trigger( - $this->formatChannels($channels), $event, $payload, $socket, true - ); + if ($this->pusherServerIsVersionFiveOrGreater()) { + $parameters = $socket !== null ? ['socket_id' => $socket] : []; - if ((is_array($response) && $response['status'] >= 200 && $response['status'] <= 299) - || $response === true) { - return; + try { + $this->pusher->trigger( + $this->formatChannels($channels), $event, $payload, $parameters + ); + } catch (ApiErrorException $e) { + throw new BroadcastException( + sprintf('Pusher error: %s.', $e->getMessage()) + ); + } + } else { + $response = $this->pusher->trigger( + $this->formatChannels($channels), $event, $payload, $socket, true + ); + + if ((is_array($response) && $response['status'] >= 200 && $response['status'] <= 299) + || $response === true) { + return; + } + + throw new BroadcastException( + ! empty($response['body']) + ? sprintf('Pusher error: %s.', $response['body']) + : 'Failed to connect to Pusher.' + ); } + } - throw new BroadcastException( - ! empty($response['body']) - ? sprintf('Pusher error: %s.', $response['body']) - : 'Failed to connect to Pusher.' - ); + /** + * Determine if the Pusher PHP server is version 5.0 or greater. + * + * @return bool + */ + protected function pusherServerIsVersionFiveOrGreater() + { + return class_exists(ApiErrorException::class); } /** @@ -134,4 +166,15 @@ class PusherBroadcaster extends Broadcaster { return $this->pusher; } + + /** + * Set the Pusher SDK instance. + * + * @param \Pusher\Pusher $pusher + * @return void + */ + public function setPusher($pusher) + { + $this->pusher = $pusher; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php index 18cb0fef3..2c2dc88c3 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php @@ -20,16 +20,16 @@ class RedisBroadcaster extends Broadcaster /** * The Redis connection to use for broadcasting. * - * @var string + * @var ?string */ - protected $connection; + protected $connection = null; /** * The Redis key prefix. * * @var string */ - protected $prefix; + protected $prefix = ''; /** * Create a new broadcaster instance. @@ -60,8 +60,9 @@ class RedisBroadcaster extends Broadcaster str_replace($this->prefix, '', $request->channel_name) ); - if ($this->isGuardedChannel($request->channel_name) && - ! $this->retrieveUser($request, $channelName)) { + if (empty($request->channel_name) || + ($this->isGuardedChannel($request->channel_name) && + ! $this->retrieveUser($request, $channelName))) { throw new AccessDeniedHttpException; } @@ -85,8 +86,14 @@ class RedisBroadcaster extends Broadcaster $channelName = $this->normalizeChannelName($request->channel_name); + $user = $this->retrieveUser($request, $channelName); + + $broadcastIdentifier = method_exists($user, 'getAuthIdentifierForBroadcasting') + ? $user->getAuthIdentifierForBroadcasting() + : $user->getAuthIdentifier(); + return json_encode(['channel_data' => [ - 'user_id' => $this->retrieveUser($request, $channelName)->getAuthIdentifier(), + 'user_id' => $broadcastIdentifier, 'user_info' => $result, ]]); } diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php index 07c707ceb..690cf3d4a 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php @@ -7,7 +7,7 @@ use Illuminate\Support\Str; trait UsePusherChannelConventions { /** - * Return true if channel is protected by authentication. + * Return true if the channel is protected by authentication. * * @param string $channel * @return bool diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php index 798d6026a..02b1a5caa 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php @@ -2,6 +2,8 @@ namespace Illuminate\Broadcasting; +use Illuminate\Contracts\Broadcasting\HasBroadcastChannel; + class Channel { /** @@ -14,12 +16,12 @@ class Channel /** * Create a new channel instance. * - * @param string $name + * @param \Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string $name * @return void */ public function __construct($name) { - $this->name = $name; + $this->name = $name instanceof HasBroadcastChannel ? $name->broadcastChannel() : $name; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithBroadcasting.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithBroadcasting.php new file mode 100644 index 000000000..fd27a8cab --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithBroadcasting.php @@ -0,0 +1,40 @@ +broadcastConnection = is_null($connection) + ? [null] + : Arr::wrap($connection); + + return $this; + } + + /** + * Get the broadcaster connections the event should be broadcast on. + * + * @return array + */ + public function broadcastConnections() + { + return $this->broadcastConnection; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php index b75502902..191b905f5 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php @@ -33,6 +33,21 @@ class PendingBroadcast $this->events = $events; } + /** + * Broadcast the event using a specific broadcaster. + * + * @param string|null $connection + * @return $this + */ + public function via($connection = null) + { + if (method_exists($this->event, 'broadcastVia')) { + $this->event->broadcastVia($connection); + } + + return $this; + } + /** * Broadcast the event to everyone except the current user. * diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php index 045e630b1..e53094b25 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php @@ -2,16 +2,20 @@ namespace Illuminate\Broadcasting; +use Illuminate\Contracts\Broadcasting\HasBroadcastChannel; + class PrivateChannel extends Channel { /** * Create a new channel instance. * - * @param string $name + * @param \Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string $name * @return void */ public function __construct($name) { + $name = $name instanceof HasBroadcastChannel ? $name->broadcastChannel() : $name; + parent::__construct('private-'.$name); } } diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/composer.json b/vendor/laravel/framework/src/Illuminate/Broadcasting/composer.json index ecfc18c32..42852c2fa 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/composer.json @@ -14,13 +14,14 @@ } ], "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", - "psr/log": "^1.0", - "illuminate/bus": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/queue": "^7.0", - "illuminate/support": "^7.0" + "psr/log": "^1.0|^2.0", + "illuminate/bus": "^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/queue": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { @@ -29,11 +30,12 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0)." + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Batch.php b/vendor/laravel/framework/src/Illuminate/Bus/Batch.php new file mode 100644 index 000000000..d1464e442 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/Batch.php @@ -0,0 +1,481 @@ +queue = $queue; + $this->repository = $repository; + $this->id = $id; + $this->name = $name; + $this->totalJobs = $totalJobs; + $this->pendingJobs = $pendingJobs; + $this->failedJobs = $failedJobs; + $this->failedJobIds = $failedJobIds; + $this->options = $options; + $this->createdAt = $createdAt; + $this->cancelledAt = $cancelledAt; + $this->finishedAt = $finishedAt; + } + + /** + * Get a fresh instance of the batch represented by this ID. + * + * @return self + */ + public function fresh() + { + return $this->repository->find($this->id); + } + + /** + * Add additional jobs to the batch. + * + * @param \Illuminate\Support\Enumerable|array $jobs + * @return self + */ + public function add($jobs) + { + $count = 0; + + $jobs = Collection::wrap($jobs)->map(function ($job) use (&$count) { + $job = $job instanceof Closure ? CallQueuedClosure::create($job) : $job; + + if (is_array($job)) { + $count += count($job); + + return with($this->prepareBatchedChain($job), function ($chain) { + return $chain->first() + ->allOnQueue($this->options['queue'] ?? null) + ->allOnConnection($this->options['connection'] ?? null) + ->chain($chain->slice(1)->values()->all()); + }); + } else { + $job->withBatchId($this->id); + + $count++; + } + + return $job; + }); + + $this->repository->transaction(function () use ($jobs, $count) { + $this->repository->incrementTotalJobs($this->id, $count); + + $this->queue->connection($this->options['connection'] ?? null)->bulk( + $jobs->all(), + $data = '', + $this->options['queue'] ?? null + ); + }); + + return $this->fresh(); + } + + /** + * Prepare a chain that exists within the jobs being added. + * + * @param array $chain + * @return \Illuminate\Support\Collection + */ + protected function prepareBatchedChain(array $chain) + { + return collect($chain)->map(function ($job) { + $job = $job instanceof Closure ? CallQueuedClosure::create($job) : $job; + + return $job->withBatchId($this->id); + }); + } + + /** + * Get the total number of jobs that have been processed by the batch thus far. + * + * @return int + */ + public function processedJobs() + { + return $this->totalJobs - $this->pendingJobs; + } + + /** + * Get the percentage of jobs that have been processed (between 0-100). + * + * @return int + */ + public function progress() + { + return $this->totalJobs > 0 ? round(($this->processedJobs() / $this->totalJobs) * 100) : 0; + } + + /** + * Record that a job within the batch finished successfully, executing any callbacks if necessary. + * + * @param string $jobId + * @return void + */ + public function recordSuccessfulJob(string $jobId) + { + $counts = $this->decrementPendingJobs($jobId); + + if ($counts->pendingJobs === 0) { + $this->repository->markAsFinished($this->id); + } + + if ($counts->pendingJobs === 0 && $this->hasThenCallbacks()) { + $batch = $this->fresh(); + + collect($this->options['then'])->each(function ($handler) use ($batch) { + $this->invokeHandlerCallback($handler, $batch); + }); + } + + if ($counts->allJobsHaveRanExactlyOnce() && $this->hasFinallyCallbacks()) { + $batch = $this->fresh(); + + collect($this->options['finally'])->each(function ($handler) use ($batch) { + $this->invokeHandlerCallback($handler, $batch); + }); + } + } + + /** + * Decrement the pending jobs for the batch. + * + * @param string $jobId + * @return \Illuminate\Bus\UpdatedBatchJobCounts + */ + public function decrementPendingJobs(string $jobId) + { + return $this->repository->decrementPendingJobs($this->id, $jobId); + } + + /** + * Determine if the batch has finished executing. + * + * @return bool + */ + public function finished() + { + return ! is_null($this->finishedAt); + } + + /** + * Determine if the batch has "success" callbacks. + * + * @return bool + */ + public function hasThenCallbacks() + { + return isset($this->options['then']) && ! empty($this->options['then']); + } + + /** + * Determine if the batch allows jobs to fail without cancelling the batch. + * + * @return bool + */ + public function allowsFailures() + { + return Arr::get($this->options, 'allowFailures', false) === true; + } + + /** + * Determine if the batch has job failures. + * + * @return bool + */ + public function hasFailures() + { + return $this->failedJobs > 0; + } + + /** + * Record that a job within the batch failed to finish successfully, executing any callbacks if necessary. + * + * @param string $jobId + * @param \Throwable $e + * @return void + */ + public function recordFailedJob(string $jobId, $e) + { + $counts = $this->incrementFailedJobs($jobId); + + if ($counts->failedJobs === 1 && ! $this->allowsFailures()) { + $this->cancel(); + } + + if ($counts->failedJobs === 1 && $this->hasCatchCallbacks()) { + $batch = $this->fresh(); + + collect($this->options['catch'])->each(function ($handler) use ($batch, $e) { + $this->invokeHandlerCallback($handler, $batch, $e); + }); + } + + if ($counts->allJobsHaveRanExactlyOnce() && $this->hasFinallyCallbacks()) { + $batch = $this->fresh(); + + collect($this->options['finally'])->each(function ($handler) use ($batch, $e) { + $this->invokeHandlerCallback($handler, $batch, $e); + }); + } + } + + /** + * Increment the failed jobs for the batch. + * + * @param string $jobId + * @return \Illuminate\Bus\UpdatedBatchJobCounts + */ + public function incrementFailedJobs(string $jobId) + { + return $this->repository->incrementFailedJobs($this->id, $jobId); + } + + /** + * Determine if the batch has "catch" callbacks. + * + * @return bool + */ + public function hasCatchCallbacks() + { + return isset($this->options['catch']) && ! empty($this->options['catch']); + } + + /** + * Determine if the batch has "finally" callbacks. + * + * @return bool + */ + public function hasFinallyCallbacks() + { + return isset($this->options['finally']) && ! empty($this->options['finally']); + } + + /** + * Cancel the batch. + * + * @return void + */ + public function cancel() + { + $this->repository->cancel($this->id); + } + + /** + * Determine if the batch has been cancelled. + * + * @return bool + */ + public function canceled() + { + return $this->cancelled(); + } + + /** + * Determine if the batch has been cancelled. + * + * @return bool + */ + public function cancelled() + { + return ! is_null($this->cancelledAt); + } + + /** + * Delete the batch from storage. + * + * @return void + */ + public function delete() + { + $this->repository->delete($this->id); + } + + /** + * Invoke a batch callback handler. + * + * @param callable $handler + * @param \Illuminate\Bus\Batch $batch + * @param \Throwable|null $e + * @return void + */ + protected function invokeHandlerCallback($handler, Batch $batch, Throwable $e = null) + { + try { + return $handler($batch, $e); + } catch (Throwable $e) { + if (function_exists('report')) { + report($e); + } + } + } + + /** + * Convert the batch to an array. + * + * @return array + */ + public function toArray() + { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'totalJobs' => $this->totalJobs, + 'pendingJobs' => $this->pendingJobs, + 'processedJobs' => $this->processedJobs(), + 'progress' => $this->progress(), + 'failedJobs' => $this->failedJobs, + 'options' => $this->options, + 'createdAt' => $this->createdAt, + 'cancelledAt' => $this->cancelledAt, + 'finishedAt' => $this->finishedAt, + ]; + } + + /** + * Get the JSON serializable representation of the object. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Dynamically access the batch's "options" via properties. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->options[$key] ?? null; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/BatchFactory.php b/vendor/laravel/framework/src/Illuminate/Bus/BatchFactory.php new file mode 100644 index 000000000..2c3a4e96c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/BatchFactory.php @@ -0,0 +1,58 @@ +queue = $queue; + } + + /** + * Create a new batch instance. + * + * @param \Illuminate\Bus\BatchRepository $repository + * @param string $id + * @param string $name + * @param int $totalJobs + * @param int $pendingJobs + * @param int $failedJobs + * @param array $failedJobIds + * @param array $options + * @param \Carbon\CarbonImmutable $createdAt + * @param \Carbon\CarbonImmutable|null $cancelledAt + * @param \Carbon\CarbonImmutable|null $finishedAt + * @return \Illuminate\Bus\Batch + */ + public function make(BatchRepository $repository, + string $id, + string $name, + int $totalJobs, + int $pendingJobs, + int $failedJobs, + array $failedJobIds, + array $options, + CarbonImmutable $createdAt, + ?CarbonImmutable $cancelledAt, + ?CarbonImmutable $finishedAt) + { + return new Batch($this->queue, $repository, $id, $name, $totalJobs, $pendingJobs, $failedJobs, $failedJobIds, $options, $createdAt, $cancelledAt, $finishedAt); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/BatchRepository.php b/vendor/laravel/framework/src/Illuminate/Bus/BatchRepository.php new file mode 100644 index 000000000..098ccef20 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/BatchRepository.php @@ -0,0 +1,92 @@ +batchId) { + return Container::getInstance()->make(BatchRepository::class)->find($this->batchId); + } + } + + /** + * Determine if the batch is still active and processing. + * + * @return bool + */ + public function batching() + { + $batch = $this->batch(); + + return $batch && ! $batch->cancelled(); + } + + /** + * Set the batch ID on the job. + * + * @param string $batchId + * @return $this + */ + public function withBatchId(string $batchId) + { + $this->batchId = $batchId; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php index 0b56aab56..ff3eef81b 100644 --- a/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php @@ -23,6 +23,8 @@ class BusServiceProvider extends ServiceProvider implements DeferrableProvider }); }); + $this->registerBatchServices(); + $this->app->alias( Dispatcher::class, DispatcherContract::class ); @@ -32,6 +34,24 @@ class BusServiceProvider extends ServiceProvider implements DeferrableProvider ); } + /** + * Register the batch handling services. + * + * @return void + */ + protected function registerBatchServices() + { + $this->app->singleton(BatchRepository::class, DatabaseBatchRepository::class); + + $this->app->singleton(DatabaseBatchRepository::class, function ($app) { + return new DatabaseBatchRepository( + $app->make(BatchFactory::class), + $app->make('db')->connection($app->config->get('queue.batching.database')), + $app->config->get('queue.batching.table', 'job_batches') + ); + }); + } + /** * Get the services provided by the provider. * @@ -43,6 +63,7 @@ class BusServiceProvider extends ServiceProvider implements DeferrableProvider Dispatcher::class, DispatcherContract::class, QueueingDispatcherContract::class, + BatchRepository::class, ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Bus/DatabaseBatchRepository.php b/vendor/laravel/framework/src/Illuminate/Bus/DatabaseBatchRepository.php new file mode 100644 index 000000000..ee544b042 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/DatabaseBatchRepository.php @@ -0,0 +1,347 @@ +factory = $factory; + $this->connection = $connection; + $this->table = $table; + } + + /** + * Retrieve a list of batches. + * + * @param int $limit + * @param mixed $before + * @return \Illuminate\Bus\Batch[] + */ + public function get($limit = 50, $before = null) + { + return $this->connection->table($this->table) + ->orderByDesc('id') + ->take($limit) + ->when($before, function ($q) use ($before) { + return $q->where('id', '<', $before); + }) + ->get() + ->map(function ($batch) { + return $this->toBatch($batch); + }) + ->all(); + } + + /** + * Retrieve information about an existing batch. + * + * @param string $batchId + * @return \Illuminate\Bus\Batch|null + */ + public function find(string $batchId) + { + $batch = $this->connection->table($this->table) + ->where('id', $batchId) + ->first(); + + if ($batch) { + return $this->toBatch($batch); + } + } + + /** + * Store a new pending batch. + * + * @param \Illuminate\Bus\PendingBatch $batch + * @return \Illuminate\Bus\Batch + */ + public function store(PendingBatch $batch) + { + $id = (string) Str::orderedUuid(); + + $this->connection->table($this->table)->insert([ + 'id' => $id, + 'name' => $batch->name, + 'total_jobs' => 0, + 'pending_jobs' => 0, + 'failed_jobs' => 0, + 'failed_job_ids' => '[]', + 'options' => $this->serialize($batch->options), + 'created_at' => time(), + 'cancelled_at' => null, + 'finished_at' => null, + ]); + + return $this->find($id); + } + + /** + * Increment the total number of jobs within the batch. + * + * @param string $batchId + * @param int $amount + * @return void + */ + public function incrementTotalJobs(string $batchId, int $amount) + { + $this->connection->table($this->table)->where('id', $batchId)->update([ + 'total_jobs' => new Expression('total_jobs + '.$amount), + 'pending_jobs' => new Expression('pending_jobs + '.$amount), + 'finished_at' => null, + ]); + } + + /** + * Decrement the total number of pending jobs for the batch. + * + * @param string $batchId + * @param string $jobId + * @return \Illuminate\Bus\UpdatedBatchJobCounts + */ + public function decrementPendingJobs(string $batchId, string $jobId) + { + $values = $this->updateAtomicValues($batchId, function ($batch) use ($jobId) { + return [ + 'pending_jobs' => $batch->pending_jobs - 1, + 'failed_jobs' => $batch->failed_jobs, + 'failed_job_ids' => json_encode(array_values(array_diff(json_decode($batch->failed_job_ids, true), [$jobId]))), + ]; + }); + + return new UpdatedBatchJobCounts( + $values['pending_jobs'], + $values['failed_jobs'] + ); + } + + /** + * Increment the total number of failed jobs for the batch. + * + * @param string $batchId + * @param string $jobId + * @return \Illuminate\Bus\UpdatedBatchJobCounts + */ + public function incrementFailedJobs(string $batchId, string $jobId) + { + $values = $this->updateAtomicValues($batchId, function ($batch) use ($jobId) { + return [ + 'pending_jobs' => $batch->pending_jobs, + 'failed_jobs' => $batch->failed_jobs + 1, + 'failed_job_ids' => json_encode(array_values(array_unique(array_merge(json_decode($batch->failed_job_ids, true), [$jobId])))), + ]; + }); + + return new UpdatedBatchJobCounts( + $values['pending_jobs'], + $values['failed_jobs'] + ); + } + + /** + * Update an atomic value within the batch. + * + * @param string $batchId + * @param \Closure $callback + * @return int|null + */ + protected function updateAtomicValues(string $batchId, Closure $callback) + { + return $this->connection->transaction(function () use ($batchId, $callback) { + $batch = $this->connection->table($this->table)->where('id', $batchId) + ->lockForUpdate() + ->first(); + + return is_null($batch) ? [] : tap($callback($batch), function ($values) use ($batchId) { + $this->connection->table($this->table)->where('id', $batchId)->update($values); + }); + }); + } + + /** + * Mark the batch that has the given ID as finished. + * + * @param string $batchId + * @return void + */ + public function markAsFinished(string $batchId) + { + $this->connection->table($this->table)->where('id', $batchId)->update([ + 'finished_at' => time(), + ]); + } + + /** + * Cancel the batch that has the given ID. + * + * @param string $batchId + * @return void + */ + public function cancel(string $batchId) + { + $this->connection->table($this->table)->where('id', $batchId)->update([ + 'cancelled_at' => time(), + 'finished_at' => time(), + ]); + } + + /** + * Delete the batch that has the given ID. + * + * @param string $batchId + * @return void + */ + public function delete(string $batchId) + { + $this->connection->table($this->table)->where('id', $batchId)->delete(); + } + + /** + * Prune all of the entries older than the given date. + * + * @param \DateTimeInterface $before + * @return int + */ + public function prune(DateTimeInterface $before) + { + $query = $this->connection->table($this->table) + ->whereNotNull('finished_at') + ->where('finished_at', '<', $before->getTimestamp()); + + $totalDeleted = 0; + + do { + $deleted = $query->take(1000)->delete(); + + $totalDeleted += $deleted; + } while ($deleted !== 0); + + return $totalDeleted; + } + + /** + * Prune all of the unfinished entries older than the given date. + * + * @param \DateTimeInterface $before + * @return int + */ + public function pruneUnfinished(DateTimeInterface $before) + { + $query = $this->connection->table($this->table) + ->whereNull('finished_at') + ->where('created_at', '<', $before->getTimestamp()); + + $totalDeleted = 0; + + do { + $deleted = $query->take(1000)->delete(); + + $totalDeleted += $deleted; + } while ($deleted !== 0); + + return $totalDeleted; + } + + /** + * Execute the given Closure within a storage specific transaction. + * + * @param \Closure $callback + * @return mixed + */ + public function transaction(Closure $callback) + { + return $this->connection->transaction(function () use ($callback) { + return $callback(); + }); + } + + /** + * Serialize the given value. + * + * @param mixed $value + * @return string + */ + protected function serialize($value) + { + $serialized = serialize($value); + + return $this->connection instanceof PostgresConnection + ? base64_encode($serialized) + : $serialized; + } + + /** + * Unserialize the given value. + * + * @param string $serialized + * @return mixed + */ + protected function unserialize($serialized) + { + if ($this->connection instanceof PostgresConnection && + ! Str::contains($serialized, [':', ';'])) { + $serialized = base64_decode($serialized); + } + + return unserialize($serialized); + } + + /** + * Convert the given raw batch to a Batch object. + * + * @param object $batch + * @return \Illuminate\Bus\Batch + */ + protected function toBatch($batch) + { + return $this->factory->make( + $this, + $batch->id, + $batch->name, + (int) $batch->total_jobs, + (int) $batch->pending_jobs, + (int) $batch->failed_jobs, + json_decode($batch->failed_job_ids, true), + $this->unserialize($batch->options), + CarbonImmutable::createFromTimestamp($batch->created_at), + $batch->cancelled_at ? CarbonImmutable::createFromTimestamp($batch->cancelled_at) : $batch->cancelled_at, + $batch->finished_at ? CarbonImmutable::createFromTimestamp($batch->finished_at) : $batch->finished_at + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php index 9d8096209..4dc390e65 100644 --- a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php +++ b/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php @@ -7,7 +7,11 @@ use Illuminate\Contracts\Bus\QueueingDispatcher; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Queue\Queue; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Foundation\Bus\PendingChain; use Illuminate\Pipeline\Pipeline; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\Jobs\SyncJob; +use Illuminate\Support\Collection; use RuntimeException; class Dispatcher implements QueueingDispatcher @@ -69,35 +73,100 @@ class Dispatcher implements QueueingDispatcher */ public function dispatch($command) { - if ($this->queueResolver && $this->commandShouldBeQueued($command)) { - return $this->dispatchToQueue($command); - } - - return $this->dispatchNow($command); + return $this->queueResolver && $this->commandShouldBeQueued($command) + ? $this->dispatchToQueue($command) + : $this->dispatchNow($command); } /** * Dispatch a command to its appropriate handler in the current process. * + * Queueable jobs will be dispatched to the "sync" queue. + * + * @param mixed $command + * @param mixed $handler + * @return mixed + */ + public function dispatchSync($command, $handler = null) + { + if ($this->queueResolver && + $this->commandShouldBeQueued($command) && + method_exists($command, 'onConnection')) { + return $this->dispatchToQueue($command->onConnection('sync')); + } + + return $this->dispatchNow($command, $handler); + } + + /** + * Dispatch a command to its appropriate handler in the current process without using the synchronous queue. + * * @param mixed $command * @param mixed $handler * @return mixed */ public function dispatchNow($command, $handler = null) { + $uses = class_uses_recursive($command); + + if (in_array(InteractsWithQueue::class, $uses) && + in_array(Queueable::class, $uses) && + ! $command->job) { + $command->setJob(new SyncJob($this->container, json_encode([]), 'sync', 'sync')); + } + if ($handler || $handler = $this->getCommandHandler($command)) { $callback = function ($command) use ($handler) { - return $handler->handle($command); + $method = method_exists($handler, 'handle') ? 'handle' : '__invoke'; + + return $handler->{$method}($command); }; } else { $callback = function ($command) { - return $this->container->call([$command, 'handle']); + $method = method_exists($command, 'handle') ? 'handle' : '__invoke'; + + return $this->container->call([$command, $method]); }; } return $this->pipeline->send($command)->through($this->pipes)->then($callback); } + /** + * Attempt to find the batch with the given ID. + * + * @param string $batchId + * @return \Illuminate\Bus\Batch|null + */ + public function findBatch(string $batchId) + { + return $this->container->make(BatchRepository::class)->find($batchId); + } + + /** + * Create a new batch of queueable jobs. + * + * @param \Illuminate\Support\Collection|array|mixed $jobs + * @return \Illuminate\Bus\PendingBatch + */ + public function batch($jobs) + { + return new PendingBatch($this->container, Collection::wrap($jobs)); + } + + /** + * Create a new chain of queueable jobs. + * + * @param \Illuminate\Support\Collection|array $jobs + * @return \Illuminate\Foundation\Bus\PendingChain + */ + public function chain($jobs) + { + $jobs = Collection::wrap($jobs); + + return new PendingChain($jobs->shift(), $jobs->toArray()); + } + /** * Determine if the given command has a handler. * @@ -140,6 +209,8 @@ class Dispatcher implements QueueingDispatcher * * @param mixed $command * @return mixed + * + * @throws \RuntimeException */ public function dispatchToQueue($command) { diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Events/BatchDispatched.php b/vendor/laravel/framework/src/Illuminate/Bus/Events/BatchDispatched.php new file mode 100644 index 000000000..b9a161adb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/Events/BatchDispatched.php @@ -0,0 +1,26 @@ +batch = $batch; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php b/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php new file mode 100644 index 000000000..77cb7fa88 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php @@ -0,0 +1,272 @@ +container = $container; + $this->jobs = $jobs; + } + + /** + * Add jobs to the batch. + * + * @param iterable $jobs + * @return $this + */ + public function add($jobs) + { + foreach ($jobs as $job) { + $this->jobs->push($job); + } + + return $this; + } + + /** + * Add a callback to be executed after all jobs in the batch have executed successfully. + * + * @param callable $callback + * @return $this + */ + public function then($callback) + { + $this->options['then'][] = $callback instanceof Closure + ? SerializableClosureFactory::make($callback) + : $callback; + + return $this; + } + + /** + * Get the "then" callbacks that have been registered with the pending batch. + * + * @return array + */ + public function thenCallbacks() + { + return $this->options['then'] ?? []; + } + + /** + * Add a callback to be executed after the first failing job in the batch. + * + * @param callable $callback + * @return $this + */ + public function catch($callback) + { + $this->options['catch'][] = $callback instanceof Closure + ? SerializableClosureFactory::make($callback) + : $callback; + + return $this; + } + + /** + * Get the "catch" callbacks that have been registered with the pending batch. + * + * @return array + */ + public function catchCallbacks() + { + return $this->options['catch'] ?? []; + } + + /** + * Add a callback to be executed after the batch has finished executing. + * + * @param callable $callback + * @return $this + */ + public function finally($callback) + { + $this->options['finally'][] = $callback instanceof Closure + ? SerializableClosureFactory::make($callback) + : $callback; + + return $this; + } + + /** + * Get the "finally" callbacks that have been registered with the pending batch. + * + * @return array + */ + public function finallyCallbacks() + { + return $this->options['finally'] ?? []; + } + + /** + * Indicate that the batch should not be cancelled when a job within the batch fails. + * + * @param bool $allowFailures + * @return $this + */ + public function allowFailures($allowFailures = true) + { + $this->options['allowFailures'] = $allowFailures; + + return $this; + } + + /** + * Determine if the pending batch allows jobs to fail without cancelling the batch. + * + * @return bool + */ + public function allowsFailures() + { + return Arr::get($this->options, 'allowFailures', false) === true; + } + + /** + * Set the name for the batch. + * + * @param string $name + * @return $this + */ + public function name(string $name) + { + $this->name = $name; + + return $this; + } + + /** + * Specify the queue connection that the batched jobs should run on. + * + * @param string $connection + * @return $this + */ + public function onConnection(string $connection) + { + $this->options['connection'] = $connection; + + return $this; + } + + /** + * Get the connection used by the pending batch. + * + * @return string|null + */ + public function connection() + { + return $this->options['connection'] ?? null; + } + + /** + * Specify the queue that the batched jobs should run on. + * + * @param string $queue + * @return $this + */ + public function onQueue(string $queue) + { + $this->options['queue'] = $queue; + + return $this; + } + + /** + * Get the queue used by the pending batch. + * + * @return string|null + */ + public function queue() + { + return $this->options['queue'] ?? null; + } + + /** + * Add additional data into the batch's options array. + * + * @param string $key + * @param mixed $value + * @return $this + */ + public function withOption(string $key, $value) + { + $this->options[$key] = $value; + + return $this; + } + + /** + * Dispatch the batch. + * + * @return \Illuminate\Bus\Batch + * + * @throws \Throwable + */ + public function dispatch() + { + $repository = $this->container->make(BatchRepository::class); + + try { + $batch = $repository->store($this); + + $batch = $batch->add($this->jobs); + } catch (Throwable $e) { + if (isset($batch)) { + $repository->delete($batch->id); + } + + throw $e; + } + + $this->container->make(EventDispatcher::class)->dispatch( + new BatchDispatched($batch) + ); + + return $batch; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/PrunableBatchRepository.php b/vendor/laravel/framework/src/Illuminate/Bus/PrunableBatchRepository.php new file mode 100644 index 000000000..3f972553b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/PrunableBatchRepository.php @@ -0,0 +1,16 @@ +afterCommit = true; + + return $this; + } + + /** + * Indicate that the job should not wait until database transactions have been committed before dispatching. + * + * @return $this + */ + public function beforeCommit() + { + $this->afterCommit = false; + + return $this; + } + /** * Specify the middleware the job should be dispatched through. * @@ -158,6 +196,8 @@ trait Queueable * * @param mixed $job * @return string + * + * @throws \RuntimeException */ protected function serializeJob($job) { @@ -190,7 +230,21 @@ trait Queueable $next->chainConnection = $this->chainConnection; $next->chainQueue = $this->chainQueue; + $next->chainCatchCallbacks = $this->chainCatchCallbacks; })); } } + + /** + * Invoke all of the chain's failed job callbacks. + * + * @param \Throwable $e + * @return void + */ + public function invokeChainCatchCallbacks($e) + { + collect($this->chainCatchCallbacks)->each(function ($callback) use ($e) { + $callback($e); + }); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Bus/UniqueLock.php b/vendor/laravel/framework/src/Illuminate/Bus/UniqueLock.php new file mode 100644 index 000000000..a937b1869 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/UniqueLock.php @@ -0,0 +1,48 @@ +cache = $cache; + } + + /** + * Attempt to acquire a lock for the given job. + * + * @param mixed $job + * @return bool + */ + public function acquire($job) + { + $uniqueId = method_exists($job, 'uniqueId') + ? $job->uniqueId() + : ($job->uniqueId ?? ''); + + $cache = method_exists($job, 'uniqueVia') + ? $job->uniqueVia() + : $this->cache; + + return (bool) $cache->lock( + $key = 'laravel_unique_job:'.get_class($job).$uniqueId, + $job->uniqueFor ?? 0 + )->get(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/UpdatedBatchJobCounts.php b/vendor/laravel/framework/src/Illuminate/Bus/UpdatedBatchJobCounts.php new file mode 100644 index 000000000..83d33a44f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/UpdatedBatchJobCounts.php @@ -0,0 +1,43 @@ +pendingJobs = $pendingJobs; + $this->failedJobs = $failedJobs; + } + + /** + * Determine if all jobs have run exactly once. + * + * @return bool + */ + public function allJobsHaveRanExactlyOnce() + { + return ($this->pendingJobs - $this->failedJobs) === 0; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/composer.json b/vendor/laravel/framework/src/Illuminate/Bus/composer.json index 7d4a72d3d..12713a61c 100644 --- a/vendor/laravel/framework/src/Illuminate/Bus/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Bus/composer.json @@ -14,10 +14,11 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/pipeline": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/pipeline": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { @@ -26,7 +27,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheLock.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheLock.php new file mode 100644 index 000000000..310d9fb5d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheLock.php @@ -0,0 +1,85 @@ +store = $store; + } + + /** + * Attempt to acquire the lock. + * + * @return bool + */ + public function acquire() + { + if (method_exists($this->store, 'add') && $this->seconds > 0) { + return $this->store->add( + $this->name, $this->owner, $this->seconds + ); + } + + if (! is_null($this->store->get($this->name))) { + return false; + } + + return ($this->seconds > 0) + ? $this->store->put($this->name, $this->owner, $this->seconds) + : $this->store->forever($this->name, $this->owner, $this->seconds); + } + + /** + * Release the lock. + * + * @return bool + */ + public function release() + { + if ($this->isOwnedByCurrentProcess()) { + return $this->store->forget($this->name); + } + + return false; + } + + /** + * Releases this lock regardless of ownership. + * + * @return void + */ + public function forceRelease() + { + $this->store->forget($this->name); + } + + /** + * Returns the owner value written into the driver for this lock. + * + * @return mixed + */ + protected function getCurrentOwner() + { + return $this->store->get($this->name); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php index 73f4acc35..145b3e617 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php @@ -199,7 +199,11 @@ class CacheManager implements FactoryContract $connection = $config['connection'] ?? 'default'; - return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection)); + $store = new RedisStore($redis, $this->getPrefix($config), $connection); + + return $this->repository( + $store->setLockConnection($config['lock_connection'] ?? $connection) + ); } /** @@ -212,15 +216,17 @@ class CacheManager implements FactoryContract { $connection = $this->app['db']->connection($config['connection'] ?? null); - return $this->repository( - new DatabaseStore( - $connection, - $config['table'], - $this->getPrefix($config), - $config['lock_table'] ?? 'cache_locks', - $config['lock_lottery'] ?? [2, 100] - ) + $store = new DatabaseStore( + $connection, + $config['table'], + $this->getPrefix($config), + $config['lock_table'] ?? 'cache_locks', + $config['lock_lottery'] ?? [2, 100] ); + + return $this->repository($store->setLockConnection( + $this->app['db']->connection($config['lock_connection'] ?? $config['connection'] ?? null) + )); } /** @@ -231,21 +237,11 @@ class CacheManager implements FactoryContract */ protected function createDynamodbDriver(array $config) { - $dynamoConfig = [ - 'region' => $config['region'], - 'version' => 'latest', - 'endpoint' => $config['endpoint'] ?? null, - ]; - - if ($config['key'] && $config['secret']) { - $dynamoConfig['credentials'] = Arr::only( - $config, ['key', 'secret', 'token'] - ); - } + $client = $this->newDynamodbClient($config); return $this->repository( new DynamoDbStore( - new DynamoDbClient($dynamoConfig), + $client, $config['table'], $config['attributes']['key'] ?? 'key', $config['attributes']['value'] ?? 'value', @@ -255,6 +251,28 @@ class CacheManager implements FactoryContract ); } + /** + * Create new DynamoDb Client instance. + * + * @return DynamoDbClient + */ + protected function newDynamodbClient(array $config) + { + $dynamoConfig = [ + 'region' => $config['region'], + 'version' => 'latest', + 'endpoint' => $config['endpoint'] ?? null, + ]; + + if (isset($config['key']) && isset($config['secret'])) { + $dynamoConfig['credentials'] = Arr::only( + $config, ['key', 'secret', 'token'] + ); + } + + return new DynamoDbClient($dynamoConfig); + } + /** * Create a new cache repository with the given implementation. * @@ -314,7 +332,11 @@ class CacheManager implements FactoryContract */ protected function getConfig($name) { - return $this->app['config']["cache.stores.{$name}"]; + if (! is_null($name) && $name !== 'null') { + return $this->app['config']["cache.stores.{$name}"]; + } + + return ['driver' => 'null']; } /** @@ -357,6 +379,19 @@ class CacheManager implements FactoryContract return $this; } + /** + * Disconnect the given driver and remove from local cache. + * + * @param string|null $name + * @return void + */ + public function purge($name = null) + { + $name = $name ?? $this->getDefaultDriver(); + + unset($this->stores[$name]); + } + /** * Register a custom driver creator Closure. * diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php index 46fa0ae26..662d556a5 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php @@ -30,6 +30,12 @@ class CacheServiceProvider extends ServiceProvider implements DeferrableProvider $this->app->singleton('memcached.connector', function () { return new MemcachedConnector; }); + + $this->app->singleton(RateLimiter::class, function ($app) { + return new RateLimiter($app->make('cache')->driver( + $app['config']->get('cache.limiter') + )); + }); } /** @@ -40,7 +46,7 @@ class CacheServiceProvider extends ServiceProvider implements DeferrableProvider public function provides() { return [ - 'cache', 'cache.store', 'cache.psr6', 'memcached.connector', + 'cache', 'cache.store', 'cache.psr6', 'memcached.connector', RateLimiter::class, ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php index aa88964d7..8a37b8b29 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php @@ -116,7 +116,7 @@ class ClearCommand extends Command */ protected function tags() { - return array_filter(explode(',', $this->option('tags'))); + return array_filter(explode(',', $this->option('tags') ?? '')); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub index 7b73e5fd1..88cd44590 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub @@ -14,10 +14,16 @@ class CreateCacheTable extends Migration public function up() { Schema::create('cache', function (Blueprint $table) { - $table->string('key')->unique(); + $table->string('key')->primary(); $table->mediumText('value'); $table->integer('expiration'); }); + + Schema::create('cache_locks', function (Blueprint $table) { + $table->string('key')->primary(); + $table->string('owner'); + $table->integer('expiration'); + }); } /** @@ -28,5 +34,6 @@ class CreateCacheTable extends Migration public function down() { Schema::dropIfExists('cache'); + Schema::dropIfExists('cache_locks'); } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseLock.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseLock.php index 296f973bd..7fd05c191 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseLock.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseLock.php @@ -136,4 +136,14 @@ class DatabaseLock extends Lock { return optional($this->connection->table($this->table)->where('key', $this->name)->first())->owner; } + + /** + * Get the name of the database connection being used to manage the lock. + * + * @return string + */ + public function getConnectionName() + { + return $this->connection->getName(); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php index c868b145e..32d7a9fc0 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php @@ -23,6 +23,13 @@ class DatabaseStore implements LockProvider, Store */ protected $connection; + /** + * The database connection instance that should be used to manage locks. + * + * @var \Illuminate\Database\ConnectionInterface + */ + protected $lockConnection; + /** * The name of the cache table. * @@ -155,8 +162,6 @@ class DatabaseStore implements LockProvider, Store 'expiration' => $expiration, ]) >= 1; } - - return false; } /** @@ -267,7 +272,7 @@ class DatabaseStore implements LockProvider, Store public function lock($name, $seconds = 0, $owner = null) { return new DatabaseLock( - $this->connection, + $this->lockConnection ?? $this->connection, $this->lockTable, $this->prefix.$name, $seconds, @@ -333,6 +338,19 @@ class DatabaseStore implements LockProvider, Store return $this->connection; } + /** + * Specify the name of the connection that should be used to manage locks. + * + * @param \Illuminate\Database\ConnectionInterface $connection + * @return $this + */ + public function setLockConnection($connection) + { + $this->lockConnection = $connection; + + return $this; + } + /** * Get the cache key prefix. * diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php index 54eec53f7..922260792 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php @@ -34,9 +34,11 @@ class DynamoDbLock extends Lock */ public function acquire() { - return $this->dynamo->add( - $this->name, $this->owner, $this->seconds - ); + if ($this->seconds > 0) { + return $this->dynamo->add($this->name, $this->owner, $this->seconds); + } else { + return $this->dynamo->add($this->name, $this->owner, 86400); + } } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php index 4e663db41..aa28a789f 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php @@ -525,4 +525,14 @@ class DynamoDbStore implements LockProvider, Store { $this->prefix = ! empty($prefix) ? $prefix.':' : ''; } + + /** + * Get the DynamoDb Client instance. + * + * @return DynamoDbClient + */ + public function getClient() + { + return $this->dynamo; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php index 7295d9e6d..42292295f 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php @@ -3,13 +3,16 @@ namespace Illuminate\Cache; use Exception; +use Illuminate\Contracts\Cache\LockProvider; use Illuminate\Contracts\Cache\Store; +use Illuminate\Contracts\Filesystem\LockTimeoutException; use Illuminate\Filesystem\Filesystem; +use Illuminate\Filesystem\LockableFile; use Illuminate\Support\InteractsWithTime; -class FileStore implements Store +class FileStore implements Store, LockProvider { - use InteractsWithTime, RetrievesMultipleKeys; + use InteractsWithTime, HasCacheLock, RetrievesMultipleKeys; /** * The Illuminate Filesystem instance. @@ -75,7 +78,7 @@ class FileStore implements Store ); if ($result !== false && $result > 0) { - $this->ensureFileHasCorrectPermissions($path); + $this->ensurePermissionsAreCorrect($path); return true; } @@ -83,6 +86,45 @@ class FileStore implements Store return false; } + /** + * Store an item in the cache if the key doesn't exist. + * + * @param string $key + * @param mixed $value + * @param int $seconds + * @return bool + */ + public function add($key, $value, $seconds) + { + $this->ensureCacheDirectoryExists($path = $this->path($key)); + + $file = new LockableFile($path, 'c+'); + + try { + $file->getExclusiveLock(); + } catch (LockTimeoutException $e) { + $file->close(); + + return false; + } + + $expire = $file->read(10); + + if (empty($expire) || $this->currentTime() >= $expire) { + $file->truncate() + ->write($this->expiration($seconds).serialize($value)) + ->close(); + + $this->ensurePermissionsAreCorrect($path); + + return true; + } + + $file->close(); + + return false; + } + /** * Create the file cache directory if necessary. * @@ -91,18 +133,24 @@ class FileStore implements Store */ protected function ensureCacheDirectoryExists($path) { - if (! $this->files->exists(dirname($path))) { - $this->files->makeDirectory(dirname($path), 0777, true, true); + $directory = dirname($path); + + if (! $this->files->exists($directory)) { + $this->files->makeDirectory($directory, 0777, true, true); + + // We're creating two levels of directories (e.g. 7e/24), so we check them both... + $this->ensurePermissionsAreCorrect($directory); + $this->ensurePermissionsAreCorrect(dirname($directory)); } } /** - * Ensure the cache file has the correct permissions. + * Ensure the created node has the correct permissions. * * @param string $path * @return void */ - protected function ensureFileHasCorrectPermissions($path) + protected function ensurePermissionsAreCorrect($path) { if (is_null($this->filePermission) || intval($this->files->chmod($path), 8) == $this->filePermission) { diff --git a/vendor/laravel/framework/src/Illuminate/Cache/HasCacheLock.php b/vendor/laravel/framework/src/Illuminate/Cache/HasCacheLock.php new file mode 100644 index 000000000..82ad9c2b3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/HasCacheLock.php @@ -0,0 +1,31 @@ +lock($name, 0, $owner); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Lock.php b/vendor/laravel/framework/src/Illuminate/Cache/Lock.php index 271cba50f..bed170507 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/Lock.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Lock.php @@ -105,7 +105,7 @@ abstract class Lock implements LockContract * * @param int $seconds * @param callable|null $callback - * @return bool + * @return mixed * * @throws \Illuminate\Contracts\Cache\LockTimeoutException */ @@ -153,7 +153,7 @@ abstract class Lock implements LockContract } /** - * Specify the number of milliseconds to sleep in between blocked lock aquisition attempts. + * Specify the number of milliseconds to sleep in between blocked lock acquisition attempts. * * @param int $milliseconds * @return $this diff --git a/vendor/laravel/framework/src/Illuminate/Cache/NoLock.php b/vendor/laravel/framework/src/Illuminate/Cache/NoLock.php new file mode 100644 index 000000000..68560f8f8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/NoLock.php @@ -0,0 +1,46 @@ +owner; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php index 43231b492..5694e6c67 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php @@ -2,7 +2,9 @@ namespace Illuminate\Cache; -class NullStore extends TaggableStore +use Illuminate\Contracts\Cache\LockProvider; + +class NullStore extends TaggableStore implements LockProvider { use RetrievesMultipleKeys; @@ -10,7 +12,7 @@ class NullStore extends TaggableStore * Retrieve an item from the cache by key. * * @param string $key - * @return mixed + * @return void */ public function get($key) { @@ -35,7 +37,7 @@ class NullStore extends TaggableStore * * @param string $key * @param mixed $value - * @return int|bool + * @return bool */ public function increment($key, $value = 1) { @@ -47,7 +49,7 @@ class NullStore extends TaggableStore * * @param string $key * @param mixed $value - * @return int|bool + * @return bool */ public function decrement($key, $value = 1) { @@ -66,6 +68,31 @@ class NullStore extends TaggableStore return false; } + /** + * Get a lock instance. + * + * @param string $name + * @param int $seconds + * @param string|null $owner + * @return \Illuminate\Contracts\Cache\Lock + */ + public function lock($name, $seconds = 0, $owner = null) + { + return new NoLock($name, $seconds, $owner); + } + + /** + * Restore a lock instance using the owner identifier. + * + * @param string $name + * @param string $owner + * @return \Illuminate\Contracts\Cache\Lock + */ + public function restoreLock($name, $owner) + { + return $this->lock($name, 0, $owner); + } + /** * Remove an item from the cache. * diff --git a/vendor/laravel/framework/src/Illuminate/Cache/PhpRedisLock.php b/vendor/laravel/framework/src/Illuminate/Cache/PhpRedisLock.php new file mode 100644 index 000000000..6cfce7938 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/PhpRedisLock.php @@ -0,0 +1,35 @@ +redis->eval( + LuaScripts::releaseLock(), + 1, + $this->name, + ...$this->redis->pack([$this->owner]) + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php index efa83d4fc..3786e90cf 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php @@ -2,6 +2,7 @@ namespace Illuminate\Cache; +use Closure; use Illuminate\Contracts\Cache\Repository as Cache; use Illuminate\Support\InteractsWithTime; @@ -16,6 +17,13 @@ class RateLimiter */ protected $cache; + /** + * The configured limit object resolvers. + * + * @var array + */ + protected $limiters = []; + /** * Create a new rate limiter instance. * @@ -27,6 +35,51 @@ class RateLimiter $this->cache = $cache; } + /** + * Register a named limiter configuration. + * + * @param string $name + * @param \Closure $callback + * @return $this + */ + public function for(string $name, Closure $callback) + { + $this->limiters[$name] = $callback; + + return $this; + } + + /** + * Get the given named rate limiter. + * + * @param string $name + * @return \Closure + */ + public function limiter(string $name) + { + return $this->limiters[$name] ?? null; + } + + /** + * Attempts to execute a callback if it's not limited. + * + * @param string $key + * @param int $maxAttempts + * @param \Closure $callback + * @param int $decaySeconds + * @return mixed + */ + public function attempt($key, $maxAttempts, Closure $callback, $decaySeconds = 60) + { + if ($this->tooManyAttempts($key, $maxAttempts)) { + return false; + } + + return tap($callback() ?: true, function () use ($key, $decaySeconds) { + $this->hit($key, $decaySeconds); + }); + } + /** * Determine if the given key has been "accessed" too many times. * @@ -36,6 +89,8 @@ class RateLimiter */ public function tooManyAttempts($key, $maxAttempts) { + $key = $this->cleanRateLimiterKey($key); + if ($this->attempts($key) >= $maxAttempts) { if ($this->cache->has($key.':timer')) { return true; @@ -56,6 +111,8 @@ class RateLimiter */ public function hit($key, $decaySeconds = 60) { + $key = $this->cleanRateLimiterKey($key); + $this->cache->add( $key.':timer', $this->availableAt($decaySeconds), $decaySeconds ); @@ -79,6 +136,8 @@ class RateLimiter */ public function attempts($key) { + $key = $this->cleanRateLimiterKey($key); + return $this->cache->get($key, 0); } @@ -90,9 +149,27 @@ class RateLimiter */ public function resetAttempts($key) { + $key = $this->cleanRateLimiterKey($key); + return $this->cache->forget($key); } + /** + * Get the number of retries left for the given key. + * + * @param string $key + * @param int $maxAttempts + * @return int + */ + public function remaining($key, $maxAttempts) + { + $key = $this->cleanRateLimiterKey($key); + + $attempts = $this->attempts($key); + + return $maxAttempts - $attempts; + } + /** * Get the number of retries left for the given key. * @@ -102,9 +179,7 @@ class RateLimiter */ public function retriesLeft($key, $maxAttempts) { - $attempts = $this->attempts($key); - - return $maxAttempts - $attempts; + return $this->remaining($key, $maxAttempts); } /** @@ -115,6 +190,8 @@ class RateLimiter */ public function clear($key) { + $key = $this->cleanRateLimiterKey($key); + $this->resetAttempts($key); $this->cache->forget($key.':timer'); @@ -128,6 +205,19 @@ class RateLimiter */ public function availableIn($key) { - return $this->cache->get($key.':timer') - $this->currentTime(); + $key = $this->cleanRateLimiterKey($key); + + return max(0, $this->cache->get($key.':timer') - $this->currentTime()); + } + + /** + * Clean the rate limiter key from unicode characters. + * + * @param string $key + * @return string + */ + public function cleanRateLimiterKey($key) + { + return preg_replace('/&([a-z])[a-z]+;/i', '$1', htmlentities($key)); } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RateLimiting/GlobalLimit.php b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiting/GlobalLimit.php new file mode 100644 index 000000000..4f084eb10 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiting/GlobalLimit.php @@ -0,0 +1,18 @@ +key = $key; + $this->maxAttempts = $maxAttempts; + $this->decayMinutes = $decayMinutes; + } + + /** + * Create a new rate limit. + * + * @param int $maxAttempts + * @return static + */ + public static function perMinute($maxAttempts) + { + return new static('', $maxAttempts); + } + + /** + * Create a new rate limit using minutes as decay time. + * + * @param int $decayMinutes + * @param int $maxAttempts + * @return static + */ + public static function perMinutes($decayMinutes, $maxAttempts) + { + return new static('', $maxAttempts, $decayMinutes); + } + + /** + * Create a new rate limit using hours as decay time. + * + * @param int $maxAttempts + * @param int $decayHours + * @return static + */ + public static function perHour($maxAttempts, $decayHours = 1) + { + return new static('', $maxAttempts, 60 * $decayHours); + } + + /** + * Create a new rate limit using days as decay time. + * + * @param int $maxAttempts + * @param int $decayDays + * @return static + */ + public static function perDay($maxAttempts, $decayDays = 1) + { + return new static('', $maxAttempts, 60 * 24 * $decayDays); + } + + /** + * Create a new unlimited rate limit. + * + * @return static + */ + public static function none() + { + return new Unlimited; + } + + /** + * Set the key of the rate limit. + * + * @param string $key + * @return $this + */ + public function by($key) + { + $this->key = $key; + + return $this; + } + + /** + * Set the callback that should generate the response when the limit is exceeded. + * + * @param callable $callback + * @return $this + */ + public function response(callable $callback) + { + $this->responseCallback = $callback; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RateLimiting/Unlimited.php b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiting/Unlimited.php new file mode 100644 index 000000000..fcfaa3178 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiting/Unlimited.php @@ -0,0 +1,16 @@ +redis->get($this->name); } + + /** + * Get the name of the Redis connection being used to manage the lock. + * + * @return string + */ + public function getConnectionName() + { + return $this->redis->getName(); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php index f3aa8a3dc..4896c9183 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php @@ -4,6 +4,7 @@ namespace Illuminate\Cache; use Illuminate\Contracts\Cache\LockProvider; use Illuminate\Contracts\Redis\Factory as Redis; +use Illuminate\Redis\Connections\PhpRedisConnection; class RedisStore extends TaggableStore implements LockProvider { @@ -22,12 +23,19 @@ class RedisStore extends TaggableStore implements LockProvider protected $prefix; /** - * The Redis connection that should be used. + * The Redis connection instance that should be used to manage locks. * * @var string */ protected $connection; + /** + * The name of the connection that should be used for locks. + * + * @var string + */ + protected $lockConnection; + /** * Create a new Redis store. * @@ -181,7 +189,15 @@ class RedisStore extends TaggableStore implements LockProvider */ public function lock($name, $seconds = 0, $owner = null) { - return new RedisLock($this->connection(), $this->prefix.$name, $seconds, $owner); + $lockName = $this->prefix.$name; + + $lockConnection = $this->lockConnection(); + + if ($lockConnection instanceof PhpRedisConnection) { + return new PhpRedisLock($lockConnection, $lockName, $seconds, $owner); + } + + return new RedisLock($lockConnection, $lockName, $seconds, $owner); } /** @@ -243,7 +259,17 @@ class RedisStore extends TaggableStore implements LockProvider } /** - * Set the connection name to be used. + * Get the Redis connection instance that should be used to manage locks. + * + * @return \Illuminate\Redis\Connections\Connection + */ + public function lockConnection() + { + return $this->redis->connection($this->lockConnection ?? $this->connection); + } + + /** + * Specify the name of the connection that should be used to store data. * * @param string $connection * @return void @@ -253,6 +279,19 @@ class RedisStore extends TaggableStore implements LockProvider $this->connection = $connection; } + /** + * Specify the name of the connection that should be used to manage locks. + * + * @param string $connection + * @return $this + */ + public function setLockConnection($connection) + { + $this->lockConnection = $connection; + + return $this; + } + /** * Get the Redis database instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php index ad50ce9ad..7863dbc0a 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php @@ -10,6 +10,7 @@ class RedisTaggedCache extends TaggedCache * @var string */ const REFERENCE_KEY_FOREVER = 'forever_ref'; + /** * Standard reference key. * @@ -41,13 +42,13 @@ class RedisTaggedCache extends TaggedCache * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function increment($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); - parent::increment($key, $value); + return parent::increment($key, $value); } /** @@ -55,13 +56,13 @@ class RedisTaggedCache extends TaggedCache * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function decrement($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); - parent::decrement($key, $value); + return parent::decrement($key, $value); } /** @@ -88,7 +89,9 @@ class RedisTaggedCache extends TaggedCache $this->deleteForeverKeys(); $this->deleteStandardKeys(); - return parent::flush(); + $this->tags->flush(); + + return true; } /** @@ -175,13 +178,26 @@ class RedisTaggedCache extends TaggedCache */ protected function deleteValues($referenceKey) { - $values = array_unique($this->store->connection()->smembers($referenceKey)); + $cursor = $defaultCursorValue = '0'; - if (count($values) > 0) { - foreach (array_chunk($values, 1000) as $valuesChunk) { + do { + [$cursor, $valuesChunk] = $this->store->connection()->sscan( + $referenceKey, $cursor, ['match' => '*', 'count' => 1000] + ); + + // PhpRedis client returns false if set does not exist or empty. Array destruction + // on false stores null in each variable. If valuesChunk is null, it means that + // there were not results from the previously executed "sscan" Redis command. + if (is_null($valuesChunk)) { + break; + } + + $valuesChunk = array_unique($valuesChunk); + + if (count($valuesChunk) > 0) { $this->store->connection()->del(...$valuesChunk); } - } + } while (((string) $cursor) !== $defaultCursorValue); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php index a242e8afc..c7934c034 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php @@ -131,6 +131,8 @@ class Repository implements ArrayAccess, CacheContract /** * {@inheritdoc} + * + * @return iterable */ public function getMultiple($keys, $default = null) { @@ -219,6 +221,8 @@ class Repository implements ArrayAccess, CacheContract /** * {@inheritdoc} + * + * @return bool */ public function set($key, $value, $ttl = null) { @@ -276,6 +280,8 @@ class Repository implements ArrayAccess, CacheContract /** * {@inheritdoc} + * + * @return bool */ public function setMultiple($values, $ttl = null) { @@ -292,8 +298,12 @@ class Repository implements ArrayAccess, CacheContract */ public function add($key, $value, $ttl = null) { + $seconds = null; + if ($ttl !== null) { - if ($this->getSeconds($ttl) <= 0) { + $seconds = $this->getSeconds($ttl); + + if ($seconds <= 0) { return false; } @@ -301,8 +311,6 @@ class Repository implements ArrayAccess, CacheContract // has a chance to override this logic. Some drivers better support the way // this operation should work with a total "atomic" implementation of it. if (method_exists($this->store, 'add')) { - $seconds = $this->getSeconds($ttl); - return $this->store->add( $this->itemKey($key), $value, $seconds ); @@ -313,7 +321,7 @@ class Repository implements ArrayAccess, CacheContract // so it exists for subsequent requests. Then, we will return true so it is // easy to know if the value gets added. Otherwise, we will return false. if (is_null($this->get($key))) { - return $this->put($key, $value, $ttl); + return $this->put($key, $value, $seconds); } return false; @@ -365,7 +373,7 @@ class Repository implements ArrayAccess, CacheContract * Get an item from the cache, or execute the given Closure and store the result. * * @param string $key - * @param \DateTimeInterface|\DateInterval|int|null $ttl + * @param \Closure|\DateTimeInterface|\DateInterval|int|null $ttl * @param \Closure $callback * @return mixed */ @@ -380,7 +388,7 @@ class Repository implements ArrayAccess, CacheContract return $value; } - $this->put($key, $value = $callback(), $ttl); + $this->put($key, $value = $callback(), value($ttl)); return $value; } @@ -437,6 +445,8 @@ class Repository implements ArrayAccess, CacheContract /** * {@inheritdoc} + * + * @return bool */ public function delete($key) { @@ -445,6 +455,8 @@ class Repository implements ArrayAccess, CacheContract /** * {@inheritdoc} + * + * @return bool */ public function deleteMultiple($keys) { @@ -461,6 +473,8 @@ class Repository implements ArrayAccess, CacheContract /** * {@inheritdoc} + * + * @return bool */ public function clear() { @@ -477,7 +491,7 @@ class Repository implements ArrayAccess, CacheContract */ public function tags($names) { - if (! method_exists($this->store, 'tags')) { + if (! $this->supportsTags()) { throw new BadMethodCallException('This cache store does not support tagging.'); } @@ -501,6 +515,33 @@ class Repository implements ArrayAccess, CacheContract return $key; } + /** + * Calculate the number of seconds for the given TTL. + * + * @param \DateTimeInterface|\DateInterval|int $ttl + * @return int + */ + protected function getSeconds($ttl) + { + $duration = $this->parseDateInterval($ttl); + + if ($duration instanceof DateTimeInterface) { + $duration = Carbon::now()->diffInRealSeconds($duration, false); + } + + return (int) ($duration > 0 ? $duration : 0); + } + + /** + * Determine if the current store supports tags. + * + * @return bool + */ + public function supportsTags() + { + return method_exists($this->store, 'tags'); + } + /** * Get the default cache time. * @@ -537,7 +578,7 @@ class Repository implements ArrayAccess, CacheContract /** * Fire an event for this cache instance. * - * @param string $event + * @param object|string $event * @return void */ protected function event($event) @@ -574,6 +615,7 @@ class Repository implements ArrayAccess, CacheContract * @param string $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->has($key); @@ -585,6 +627,7 @@ class Repository implements ArrayAccess, CacheContract * @param string $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->get($key); @@ -597,6 +640,7 @@ class Repository implements ArrayAccess, CacheContract * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { $this->put($key, $value, $this->default); @@ -608,28 +652,12 @@ class Repository implements ArrayAccess, CacheContract * @param string $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { $this->forget($key); } - /** - * Calculate the number of seconds for the given TTL. - * - * @param \DateTimeInterface|\DateInterval|int $ttl - * @return int - */ - protected function getSeconds($ttl) - { - $duration = $this->parseDateInterval($ttl); - - if ($duration instanceof DateTimeInterface) { - $duration = Carbon::now()->diffInRealSeconds($duration, false); - } - - return (int) $duration > 0 ? $duration : 0; - } - /** * Handle dynamic calls into macros or pass missing methods to the store. * diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php b/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php index 5dd41edb5..7db7a0aa5 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php @@ -16,8 +16,12 @@ trait RetrievesMultipleKeys { $return = []; - foreach ($keys as $key) { - $return[$key] = $this->get($key); + $keys = collect($keys)->mapWithKeys(function ($value, $key) { + return [is_string($key) ? $key : $value => is_string($key) ? $value : null]; + })->all(); + + foreach ($keys as $key => $default) { + $return[$key] = $this->get($key, $default); } return $return; diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php b/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php index 214d64815..471dc679c 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php @@ -56,6 +56,26 @@ class TagSet return $id; } + /** + * Flush all the tags in the set. + * + * @return void + */ + public function flush() + { + array_walk($this->names, [$this, 'flushTag']); + } + + /** + * Flush the tag from the cache. + * + * @param string $name + */ + public function flushTag($name) + { + $this->store->forget($this->tagKey($name)); + } + /** * Get a unique namespace that changes when any of the tags are flushed. * diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php index 01e483b6e..7cd123038 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php @@ -52,11 +52,11 @@ class TaggedCache extends Repository * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function increment($key, $value = 1) { - $this->store->increment($this->itemKey($key), $value); + return $this->store->increment($this->itemKey($key), $value); } /** @@ -64,11 +64,11 @@ class TaggedCache extends Repository * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function decrement($key, $value = 1) { - $this->store->decrement($this->itemKey($key), $value); + return $this->store->decrement($this->itemKey($key), $value); } /** @@ -105,7 +105,7 @@ class TaggedCache extends Repository /** * Fire an event for this cache instance. * - * @param string $event + * @param \Illuminate\Cache\Events\CacheEvent $event * @return void */ protected function event($event) diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json index adce54e6a..69f553fa6 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Cache/composer.json @@ -14,9 +14,14 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0" + }, + "provide": { + "psr/simple-cache-implementation": "1.0" }, "autoload": { "psr-4": { @@ -25,15 +30,15 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { "ext-memcached": "Required to use the memcache cache driver.", - "illuminate/database": "Required to use the database cache driver (^7.0).", - "illuminate/filesystem": "Required to use the file cache driver (^7.0).", - "illuminate/redis": "Required to use the redis cache driver (^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0)." + "illuminate/database": "Required to use the database cache driver (^8.0).", + "illuminate/filesystem": "Required to use the file cache driver (^8.0).", + "illuminate/redis": "Required to use the redis cache driver (^8.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.4)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Support/Arr.php b/vendor/laravel/framework/src/Illuminate/Collections/Arr.php old mode 100755 new mode 100644 similarity index 85% rename from vendor/laravel/framework/src/Illuminate/Support/Arr.php rename to vendor/laravel/framework/src/Illuminate/Collections/Arr.php index 8681e98a2..fd7dca8a5 --- a/vendor/laravel/framework/src/Illuminate/Support/Arr.php +++ b/vendor/laravel/framework/src/Illuminate/Collections/Arr.php @@ -121,6 +121,23 @@ class Arr return $results; } + /** + * Convert a flatten "dot" notation array into an expanded array. + * + * @param iterable $array + * @return array + */ + public static function undot($array) + { + $results = []; + + foreach ($array as $key => $value) { + static::set($results, $key, $value); + } + + return $results; + } + /** * Get all of the given array except for a specified array of keys. * @@ -144,6 +161,10 @@ class Arr */ public static function exists($array, $key) { + if ($array instanceof Enumerable) { + return $array->has($key); + } + if ($array instanceof ArrayAccess) { return $array->offsetExists($key); } @@ -389,6 +410,19 @@ class Arr return array_keys($keys) !== $keys; } + /** + * Determines if an array is a list. + * + * An array is a "list" if all array keys are sequential integers starting from 0 with no gaps in between. + * + * @param array $array + * @return bool + */ + public static function isList($array) + { + return ! self::isAssoc($array); + } + /** * Get a subset of the items from the given array. * @@ -405,7 +439,7 @@ class Arr * Pluck an array of values from an array. * * @param iterable $array - * @param string|array $value + * @param string|array|int|null $value * @param string|array|null $key * @return array */ @@ -463,7 +497,7 @@ class Arr */ public static function prepend($array, $value, $key = null) { - if (is_null($key)) { + if (func_num_args() == 2) { array_unshift($array, $value); } else { $array = [$key => $value] + $array; @@ -476,7 +510,7 @@ class Arr * Get a value from the array, and remove it. * * @param array $array - * @param string $key + * @param string|int $key * @param mixed $default * @return mixed */ @@ -489,16 +523,28 @@ class Arr return $value; } + /** + * Convert the array into a query string. + * + * @param array $array + * @return string + */ + public static function query($array) + { + return http_build_query($array, '', '&', PHP_QUERY_RFC3986); + } + /** * Get one or a specified number of random values from an array. * * @param array $array * @param int|null $number + * @param bool|false $preserveKeys * @return mixed * * @throws \InvalidArgumentException */ - public static function random($array, $number = null) + public static function random($array, $number = null, $preserveKeys = false) { $requested = is_null($number) ? 1 : $number; @@ -522,8 +568,14 @@ class Arr $results = []; - foreach ((array) $keys as $key) { - $results[] = $array[$key]; + if ($preserveKeys) { + foreach ((array) $keys as $key) { + $results[$key] = $array[$key]; + } + } else { + foreach ((array) $keys as $key) { + $results[] = $array[$key]; + } } return $results; @@ -593,7 +645,7 @@ class Arr * Sort the array using the given callback or "dot" notation. * * @param array $array - * @param callable|string|null $callback + * @param callable|array|string|null $callback * @return array */ public static function sort($array, $callback = null) @@ -605,34 +657,52 @@ class Arr * Recursively sort an array by keys and values. * * @param array $array + * @param int $options + * @param bool $descending * @return array */ - public static function sortRecursive($array) + public static function sortRecursive($array, $options = SORT_REGULAR, $descending = false) { foreach ($array as &$value) { if (is_array($value)) { - $value = static::sortRecursive($value); + $value = static::sortRecursive($value, $options, $descending); } } if (static::isAssoc($array)) { - ksort($array); + $descending + ? krsort($array, $options) + : ksort($array, $options); } else { - sort($array); + $descending + ? rsort($array, $options) + : sort($array, $options); } return $array; } /** - * Convert the array into a query string. + * Conditionally compile classes from an array into a CSS class list. * * @param array $array * @return string */ - public static function query($array) + public static function toCssClasses($array) { - return http_build_query($array, '', '&', PHP_QUERY_RFC3986); + $classList = static::wrap($array); + + $classes = []; + + foreach ($classList as $class => $constraint) { + if (is_numeric($class)) { + $classes[] = $constraint; + } elseif ($constraint) { + $classes[] = $class; + } + } + + return implode(' ', $classes); } /** @@ -647,6 +717,19 @@ class Arr return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); } + /** + * Filter items where the value is not null. + * + * @param array $array + * @return array + */ + public static function whereNotNull($array) + { + return static::where($array, function ($value) { + return ! is_null($value); + }); + } + /** * If the given value is not an array and not null, wrap it in one. * diff --git a/vendor/laravel/framework/src/Illuminate/Support/Collection.php b/vendor/laravel/framework/src/Illuminate/Collections/Collection.php similarity index 77% rename from vendor/laravel/framework/src/Illuminate/Support/Collection.php rename to vendor/laravel/framework/src/Illuminate/Collections/Collection.php index 5aa8f6fb1..61a48841c 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Collections/Collection.php @@ -4,11 +4,12 @@ namespace Illuminate\Support; use ArrayAccess; use ArrayIterator; +use Illuminate\Contracts\Support\CanBeEscapedWhenCastToString; use Illuminate\Support\Traits\EnumeratesValues; use Illuminate\Support\Traits\Macroable; use stdClass; -class Collection implements ArrayAccess, Enumerable +class Collection implements ArrayAccess, CanBeEscapedWhenCastToString, Enumerable { use EnumeratesValues, Macroable; @@ -31,23 +32,15 @@ class Collection implements ArrayAccess, Enumerable } /** - * Create a new collection by invoking the callback a given amount of times. + * Create a collection with the given range. * - * @param int $number - * @param callable|null $callback + * @param int $from + * @param int $to * @return static */ - public static function times($number, callable $callback = null) + public static function range($from, $to) { - if ($number < 1) { - return new static; - } - - if (is_null($callback)) { - return new static(range(1, $number)); - } - - return (new static(range(1, $number)))->map($callback); + return new static(range($from, $to)); } /** @@ -135,7 +128,7 @@ class Collection implements ArrayAccess, Enumerable $collection = isset($key) ? $this->pluck($key) : $this; - $counts = new self; + $counts = new static; $collection->each(function ($value) use ($counts) { $counts[$value] = isset($counts[$value]) ? $counts[$value] + 1 : 1; @@ -183,6 +176,19 @@ class Collection implements ArrayAccess, Enumerable return $this->contains($this->operatorForWhere(...func_get_args())); } + /** + * Determine if an item is not contained in the collection. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function doesntContain($key, $operator = null, $value = null) + { + return ! $this->contains(...func_get_args()); + } + /** * Cross join with the given lists, returning all possible permutations. * @@ -268,7 +274,7 @@ class Collection implements ArrayAccess, Enumerable /** * Retrieve duplicate items from the collection. * - * @param callable|null $callback + * @param callable|string|null $callback * @param bool $strict * @return static */ @@ -296,7 +302,7 @@ class Collection implements ArrayAccess, Enumerable /** * Retrieve duplicate items from the collection using strict comparison. * - * @param callable|null $callback + * @param callable|string|null $callback * @return static */ public function duplicatesStrict($callback = null) @@ -391,7 +397,7 @@ class Collection implements ArrayAccess, Enumerable /** * Remove an item from the collection by key. * - * @param string|array $keys + * @param string|int|array $keys * @return $this */ public function forget($keys) @@ -412,13 +418,31 @@ class Collection implements ArrayAccess, Enumerable */ public function get($key, $default = null) { - if ($this->offsetExists($key)) { + if (array_key_exists($key, $this->items)) { return $this->items[$key]; } return value($default); } + /** + * Get an item from the collection by key or add it to collection if it does not exist. + * + * @param mixed $key + * @param mixed $value + * @return mixed + */ + public function getOrPut($key, $value) + { + if (array_key_exists($key, $this->items)) { + return $this->items[$key]; + } + + $this->offsetSet($key, $value = value($value)); + + return $value; + } + /** * Group an associative array by a field or using a callback. * @@ -501,7 +525,7 @@ class Collection implements ArrayAccess, Enumerable $keys = is_array($key) ? $key : func_get_args(); foreach ($keys as $value) { - if (! $this->offsetExists($value)) { + if (! array_key_exists($value, $this->items)) { return false; } } @@ -509,6 +533,29 @@ class Collection implements ArrayAccess, Enumerable return true; } + /** + * Determine if any of the keys exist in the collection. + * + * @param mixed $key + * @return bool + */ + public function hasAny($key) + { + if ($this->isEmpty()) { + return false; + } + + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $value) { + if ($this->has($value)) { + return true; + } + } + + return false; + } + /** * Concatenate values of a given key as a string. * @@ -520,11 +567,11 @@ class Collection implements ArrayAccess, Enumerable { $first = $this->first(); - if (is_array($first) || is_object($first)) { - return implode($glue, $this->pluck($value)->all()); + if (is_array($first) || (is_object($first) && ! $first instanceof Stringable)) { + return implode($glue ?? '', $this->pluck($value)->all()); } - return implode($value, $this->items); + return implode($value ?? '', $this->items); } /** @@ -561,6 +608,16 @@ class Collection implements ArrayAccess, Enumerable return empty($this->items); } + /** + * Determine if the collection contains a single item. + * + * @return bool + */ + public function containsOneItem() + { + return $this->count() === 1; + } + /** * Join all items from the collection using a string. The final items can use a separate glue string. * @@ -616,7 +673,7 @@ class Collection implements ArrayAccess, Enumerable /** * Get the values of a given key. * - * @param string|array $value + * @param string|array|int|null $value * @param string|null $key * @return static */ @@ -749,8 +806,8 @@ class Collection implements ArrayAccess, Enumerable $position = 0; - foreach ($this->items as $item) { - if ($position % $step === $offset) { + foreach ($this->slice($offset)->items as $item) { + if ($position % $step === 0) { $new[] = $item; } @@ -782,13 +839,30 @@ class Collection implements ArrayAccess, Enumerable } /** - * Get and remove the last item from the collection. + * Get and remove the last N items from the collection. * + * @param int $count * @return mixed */ - public function pop() + public function pop($count = 1) { - return array_pop($this->items); + if ($count === 1) { + return array_pop($this->items); + } + + if ($this->isEmpty()) { + return new static; + } + + $results = []; + + $collectionCount = $this->count(); + + foreach (range(1, min($count, $collectionCount)) as $item) { + array_push($results, array_pop($this->items)); + } + + return new static($results); } /** @@ -800,7 +874,7 @@ class Collection implements ArrayAccess, Enumerable */ public function prepend($value, $key = null) { - $this->items = Arr::prepend($this->items, $value, $key); + $this->items = Arr::prepend($this->items, ...func_get_args()); return $this; } @@ -880,18 +954,6 @@ class Collection implements ArrayAccess, Enumerable return new static(Arr::random($this->items, $number)); } - /** - * Reduce the collection to a single value. - * - * @param callable $callback - * @param mixed $initial - * @return mixed - */ - public function reduce(callable $callback, $initial = null) - { - return array_reduce($this->items, $callback, $initial); - } - /** * Replace the collection items with the given items. * @@ -947,13 +1009,30 @@ class Collection implements ArrayAccess, Enumerable } /** - * Get and remove the first item from the collection. + * Get and remove the first N items from the collection. * + * @param int $count * @return mixed */ - public function shift() + public function shift($count = 1) { - return array_shift($this->items); + if ($count === 1) { + return array_shift($this->items); + } + + if ($this->isEmpty()) { + return new static; + } + + $results = []; + + $collectionCount = $this->count(); + + foreach (range(1, min($count, $collectionCount)) as $item) { + array_push($results, array_shift($this->items)); + } + + return new static($results); } /** @@ -967,6 +1046,22 @@ class Collection implements ArrayAccess, Enumerable return new static(Arr::shuffle($this->items, $seed)); } + /** + * Create chunks representing a "sliding window" view of the items in the collection. + * + * @param int $size + * @param int $step + * @return static + */ + public function sliding($size = 2, $step = 1) + { + $chunks = floor(($this->count() - $size) / $step) + 1; + + return static::times($chunks, function ($number) use ($size, $step) { + return $this->slice(($number - 1) * $step, $size); + }); + } + /** * Skip the first {$count} items. * @@ -1049,6 +1144,74 @@ class Collection implements ArrayAccess, Enumerable return $groups; } + /** + * Split a collection into a certain number of groups, and fill the first groups completely. + * + * @param int $numberOfGroups + * @return static + */ + public function splitIn($numberOfGroups) + { + return $this->chunk(ceil($this->count() / $numberOfGroups)); + } + + /** + * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + * @throws \Illuminate\Support\MultipleItemsFoundException + */ + public function sole($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + $items = $this->when($filter)->filter($filter); + + if ($items->isEmpty()) { + throw new ItemNotFoundException; + } + + if ($items->count() > 1) { + throw new MultipleItemsFoundException; + } + + return $items->first(); + } + + /** + * Get the first item in the collection but throw an exception if no matching items exist. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + */ + public function firstOrFail($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + $placeholder = new stdClass(); + + $item = $this->first($filter, $placeholder); + + if ($item === $placeholder) { + throw new ItemNotFoundException; + } + + return $item; + } + /** * Chunk the collection into chunks of the given size. * @@ -1070,6 +1233,19 @@ class Collection implements ArrayAccess, Enumerable return new static($chunks); } + /** + * Chunk the collection into chunks with a callback. + * + * @param callable $callback + * @return static + */ + public function chunkWhile(callable $callback) + { + return new static( + $this->lazy()->chunkWhile($callback)->mapInto(static::class) + ); + } + /** * Sort through each item with a callback. * @@ -1082,7 +1258,7 @@ class Collection implements ArrayAccess, Enumerable $callback && is_callable($callback) ? uasort($items, $callback) - : asort($items, $callback); + : asort($items, $callback ?? SORT_REGULAR); return new static($items); } @@ -1105,20 +1281,24 @@ class Collection implements ArrayAccess, Enumerable /** * Sort the collection using the given callback. * - * @param callable|string $callback + * @param callable|array|string $callback * @param int $options * @param bool $descending * @return static */ public function sortBy($callback, $options = SORT_REGULAR, $descending = false) { + if (is_array($callback) && ! is_callable($callback)) { + return $this->sortByMany($callback); + } + $results = []; $callback = $this->valueRetriever($callback); // First we will loop through the items and get the comparator from a callback // function which we were given. Then, we will sort the returned values and - // and grab the corresponding values for the sorted keys from this array. + // grab all the corresponding values for the sorted keys from this array. foreach ($this->items as $key => $value) { $results[$key] = $callback($value, $key); } @@ -1136,6 +1316,50 @@ class Collection implements ArrayAccess, Enumerable return new static($results); } + /** + * Sort the collection using multiple comparisons. + * + * @param array $comparisons + * @return static + */ + protected function sortByMany(array $comparisons = []) + { + $items = $this->items; + + usort($items, function ($a, $b) use ($comparisons) { + foreach ($comparisons as $comparison) { + $comparison = Arr::wrap($comparison); + + $prop = $comparison[0]; + + $ascending = Arr::get($comparison, 1, true) === true || + Arr::get($comparison, 1, true) === 'asc'; + + $result = 0; + + if (! is_string($prop) && is_callable($prop)) { + $result = $prop($a, $b); + } else { + $values = [data_get($a, $prop), data_get($b, $prop)]; + + if (! $ascending) { + $values = array_reverse($values); + } + + $result = $values[0] <=> $values[1]; + } + + if ($result === 0) { + continue; + } + + return $result; + } + }); + + return new static($items); + } + /** * Sort the collection in descending order using the given callback. * @@ -1175,6 +1399,21 @@ class Collection implements ArrayAccess, Enumerable return $this->sortKeys($options, true); } + /** + * Sort the collection keys using a callback. + * + * @param callable $callback + * @return static + */ + public function sortKeysUsing(callable $callback) + { + $items = $this->items; + + uksort($items, $callback); + + return new static($items); + } + /** * Splice a portion of the underlying collection array. * @@ -1189,7 +1428,7 @@ class Collection implements ArrayAccess, Enumerable return new static(array_splice($this->items, $offset)); } - return new static(array_splice($this->items, $offset, $length, $replacement)); + return new static(array_splice($this->items, $offset, $length, $this->getArrayableItems($replacement))); } /** @@ -1242,6 +1481,42 @@ class Collection implements ArrayAccess, Enumerable return $this; } + /** + * Convert a flatten "dot" notation array into an expanded array. + * + * @return static + */ + public function undot() + { + return new static(Arr::undot($this->all())); + } + + /** + * Return only unique items from the collection array. + * + * @param string|callable|null $key + * @param bool $strict + * @return static + */ + public function unique($key = null, $strict = false) + { + if (is_null($key) && $strict === false) { + return new static(array_unique($this->items, SORT_REGULAR)); + } + + $callback = $this->valueRetriever($key); + + $exists = []; + + return $this->reject(function ($item, $key) use ($callback, $strict, &$exists) { + if (in_array($id = $callback($item, $key), $exists, $strict)) { + return true; + } + + $exists[] = $id; + }); + } + /** * Reset the keys on the underlying array. * @@ -1291,6 +1566,7 @@ class Collection implements ArrayAccess, Enumerable * * @return \ArrayIterator */ + #[\ReturnTypeWillChange] public function getIterator() { return new ArrayIterator($this->items); @@ -1301,6 +1577,7 @@ class Collection implements ArrayAccess, Enumerable * * @return int */ + #[\ReturnTypeWillChange] public function count() { return count($this->items); @@ -1346,9 +1623,10 @@ class Collection implements ArrayAccess, Enumerable * @param mixed $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { - return array_key_exists($key, $this->items); + return isset($this->items[$key]); } /** @@ -1357,6 +1635,7 @@ class Collection implements ArrayAccess, Enumerable * @param mixed $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->items[$key]; @@ -1369,6 +1648,7 @@ class Collection implements ArrayAccess, Enumerable * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { if (is_null($key)) { @@ -1381,9 +1661,10 @@ class Collection implements ArrayAccess, Enumerable /** * Unset the item at a given offset. * - * @param string $key + * @param mixed $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { unset($this->items[$key]); diff --git a/vendor/laravel/framework/src/Illuminate/Support/Enumerable.php b/vendor/laravel/framework/src/Illuminate/Collections/Enumerable.php similarity index 90% rename from vendor/laravel/framework/src/Illuminate/Support/Enumerable.php rename to vendor/laravel/framework/src/Illuminate/Collections/Enumerable.php index 5c512e46d..261a0c856 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Enumerable.php +++ b/vendor/laravel/framework/src/Illuminate/Collections/Enumerable.php @@ -27,6 +27,15 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public static function times($number, callable $callback = null); + /** + * Create a collection with the given range. + * + * @param int $from + * @param int $to + * @return static + */ + public static function range($from, $to); + /** * Wrap the given value in a collection if applicable. * @@ -43,6 +52,13 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public static function unwrap($value); + /** + * Create a new instance with no items. + * + * @return static + */ + public static function empty(); + /** * Get all items in the enumerable. * @@ -118,6 +134,14 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function contains($key, $operator = null, $value = null); + /** + * Cross join with the given lists, returning all possible permutations. + * + * @param mixed ...$lists + * @return static + */ + public function crossJoin(...$lists); + /** * Dump the collection and end the script. * @@ -187,7 +211,7 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, /** * Retrieve duplicate items. * - * @param callable|null $callback + * @param callable|string|null $callback * @param bool $strict * @return static */ @@ -196,7 +220,7 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, /** * Retrieve duplicate items using strict comparison. * - * @param callable|null $callback + * @param callable|string|null $callback * @return static */ public function duplicatesStrict($callback = null); @@ -309,6 +333,22 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function where($key, $operator = null, $value = null); + /** + * Filter items where the value for the given key is null. + * + * @param string|null $key + * @return static + */ + public function whereNull($key = null); + + /** + * Filter items where the value for the given key is not null. + * + * @param string|null $key + * @return static + */ + public function whereNotNull($key = null); + /** * Filter items by the given key value pair using strict comparison. * @@ -375,9 +415,9 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, public function whereNotInStrict($key, $values); /** - * Filter the items, removing any items that don't match the given type. + * Filter the items, removing any items that don't match the given type(s). * - * @param string $type + * @param string|string[] $type * @return static */ public function whereInstanceOf($type); @@ -401,6 +441,14 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function firstWhere($key, $operator = null, $value = null); + /** + * Get a flattened array of the items in the collection. + * + * @param int $depth + * @return static + */ + public function flatten($depth = INF); + /** * Flip the values with their keys. * @@ -727,6 +775,22 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function skip($count); + /** + * Skip items in the collection until the given condition is met. + * + * @param mixed $value + * @return static + */ + public function skipUntil($value); + + /** + * Skip items in the collection while the given condition is met. + * + * @param mixed $value + * @return static + */ + public function skipWhile($value); + /** * Get a slice of items from the enumerable. * @@ -752,6 +816,14 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function chunk($size); + /** + * Chunk the collection into chunks with a callback. + * + * @param callable $callback + * @return static + */ + public function chunkWhile(callable $callback); + /** * Sort through each item with a callback. * @@ -820,6 +892,22 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function take($limit); + /** + * Take items in the collection until the given condition is met. + * + * @param mixed $value + * @return static + */ + public function takeUntil($value); + + /** + * Take items in the collection while the given condition is met. + * + * @param mixed $value + * @return static + */ + public function takeWhile($value); + /** * Pass the collection to the given callback and then return it. * @@ -894,6 +982,17 @@ interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, */ public function countBy($callback = null); + /** + * Zip the collection together with one or more arrays. + * + * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]); + * => [[1, 4], [2, 5], [3, 6]] + * + * @param mixed ...$items + * @return static + */ + public function zip($items); + /** * Collect the values into a collection. * diff --git a/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php b/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php similarity index 100% rename from vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php rename to vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php diff --git a/vendor/laravel/framework/src/Illuminate/Support/HigherOrderWhenProxy.php b/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderWhenProxy.php similarity index 100% rename from vendor/laravel/framework/src/Illuminate/Support/HigherOrderWhenProxy.php rename to vendor/laravel/framework/src/Illuminate/Collections/HigherOrderWhenProxy.php diff --git a/vendor/laravel/framework/src/Illuminate/Collections/ItemNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Collections/ItemNotFoundException.php new file mode 100644 index 000000000..05a51d954 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Collections/ItemNotFoundException.php @@ -0,0 +1,9 @@ + +The MIT License (MIT) + +Copyright (c) Taylor Otwell 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/vendor/laravel/framework/src/Illuminate/Support/LazyCollection.php b/vendor/laravel/framework/src/Illuminate/Collections/LazyCollection.php similarity index 81% rename from vendor/laravel/framework/src/Illuminate/Support/LazyCollection.php rename to vendor/laravel/framework/src/Illuminate/Collections/LazyCollection.php index 8ddd5a8ca..e1cdcd99d 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/LazyCollection.php +++ b/vendor/laravel/framework/src/Illuminate/Collections/LazyCollection.php @@ -4,12 +4,14 @@ namespace Illuminate\Support; use ArrayIterator; use Closure; +use DateTimeInterface; +use Illuminate\Contracts\Support\CanBeEscapedWhenCastToString; use Illuminate\Support\Traits\EnumeratesValues; use Illuminate\Support\Traits\Macroable; use IteratorAggregate; use stdClass; -class LazyCollection implements Enumerable +class LazyCollection implements CanBeEscapedWhenCastToString, Enumerable { use EnumeratesValues, Macroable; @@ -38,39 +40,7 @@ class LazyCollection implements Enumerable } /** - * Create a new instance with no items. - * - * @return static - */ - public static function empty() - { - return new static([]); - } - - /** - * Create a new instance by invoking the callback a given amount of times. - * - * @param int $number - * @param callable|null $callback - * @return static - */ - public static function times($number, callable $callback = null) - { - if ($number < 1) { - return new static; - } - - $instance = new static(function () use ($number) { - for ($current = 1; $current <= $number; $current++) { - yield $current; - } - }); - - return is_null($callback) ? $instance : $instance->map($callback); - } - - /** - * Create an enumerable with the given range. + * Create a collection with the given range. * * @param int $from * @param int $to @@ -79,8 +49,14 @@ class LazyCollection implements Enumerable public static function range($from, $to) { return new static(function () use ($from, $to) { - for (; $from <= $to; $from++) { - yield $from; + if ($from <= $to) { + for (; $from <= $to; $from++) { + yield $from; + } + } else { + for (; $from >= $to; $from--) { + yield $from; + } } }); } @@ -229,6 +205,19 @@ class LazyCollection implements Enumerable return $this->contains($this->operatorForWhere(...func_get_args())); } + /** + * Determine if an item is not contained in the enumerable. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function doesntContain($key, $operator = null, $value = null) + { + return ! $this->contains(...func_get_args()); + } + /** * Cross join the given iterables, returning all possible permutations. * @@ -341,7 +330,7 @@ class LazyCollection implements Enumerable /** * Retrieve duplicate items. * - * @param callable|null $callback + * @param callable|string|null $callback * @param bool $strict * @return static */ @@ -353,7 +342,7 @@ class LazyCollection implements Enumerable /** * Retrieve duplicate items using strict comparison. * - * @param callable|null $callback + * @param callable|string|null $callback * @return static */ public function duplicatesStrict($callback = null) @@ -537,6 +526,25 @@ class LazyCollection implements Enumerable return false; } + /** + * Determine if any of the keys exist in the collection. + * + * @param mixed $key + * @return bool + */ + public function hasAny($key) + { + $keys = array_flip(is_array($key) ? $key : func_get_args()); + + foreach ($this as $key => $value) { + if (array_key_exists($key, $keys)) { + return true; + } + } + + return false; + } + /** * Concatenate values of a given key as a string. * @@ -572,7 +580,7 @@ class LazyCollection implements Enumerable } /** - * Determine if the items is empty or not. + * Determine if the items are empty or not. * * @return bool */ @@ -581,6 +589,16 @@ class LazyCollection implements Enumerable return ! $this->getIterator()->valid(); } + /** + * Determine if the collection contains a single item. + * + * @return bool + */ + public function containsOneItem() + { + return $this->take(2)->count() === 1; + } + /** * Join all items from the collection using a string. The final items can use a separate glue string. * @@ -778,8 +796,8 @@ class LazyCollection implements Enumerable return new static(function () use ($step, $offset) { $position = 0; - foreach ($this as $item) { - if ($position % $step === $offset) { + foreach ($this->slice($offset) as $item) { + if ($position % $step === 0) { yield $item; } @@ -852,24 +870,6 @@ class LazyCollection implements Enumerable return is_null($number) ? $result : new static($result); } - /** - * Reduce the collection to a single value. - * - * @param callable $callback - * @param mixed $initial - * @return mixed - */ - public function reduce(callable $callback, $initial = null) - { - $result = $initial; - - foreach ($this as $value) { - $result = $callback($result, $value); - } - - return $result; - } - /** * Replace the collection items with the given items. * @@ -953,6 +953,45 @@ class LazyCollection implements Enumerable return $this->passthru('shuffle', func_get_args()); } + /** + * Create chunks representing a "sliding window" view of the items in the collection. + * + * @param int $size + * @param int $step + * @return static + */ + public function sliding($size = 2, $step = 1) + { + return new static(function () use ($size, $step) { + $iterator = $this->getIterator(); + + $chunk = []; + + while ($iterator->valid()) { + $chunk[$iterator->key()] = $iterator->current(); + + if (count($chunk) == $size) { + yield tap(new static($chunk), function () use (&$chunk, $step) { + $chunk = array_slice($chunk, $step, null, true); + }); + + // If the $step between chunks is bigger than each chunk's $size + // we will skip the extra items (which should never be in any + // chunk) before we continue to the next chunk in the loop. + if ($step > $size) { + $skip = $step - $size; + + for ($i = 0; $i < $skip && $iterator->valid(); $i++) { + $iterator->next(); + } + } + } + + $iterator->next(); + } + }); + } + /** * Skip the first {$count} items. * @@ -1043,6 +1082,55 @@ class LazyCollection implements Enumerable return $this->passthru('split', func_get_args()); } + /** + * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + * @throws \Illuminate\Support\MultipleItemsFoundException + */ + public function sole($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + return $this + ->when($filter) + ->filter($filter) + ->take(2) + ->collect() + ->sole(); + } + + /** + * Get the first item in the collection but throw an exception if no matching items exist. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + */ + public function firstOrFail($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + return $this + ->when($filter) + ->filter($filter) + ->take(1) + ->collect() + ->firstOrFail(); + } + /** * Chunk the collection into chunks of the given size. * @@ -1082,6 +1170,54 @@ class LazyCollection implements Enumerable }); } + /** + * Split a collection into a certain number of groups, and fill the first groups completely. + * + * @param int $numberOfGroups + * @return static + */ + public function splitIn($numberOfGroups) + { + return $this->chunk(ceil($this->count() / $numberOfGroups)); + } + + /** + * Chunk the collection into chunks with a callback. + * + * @param callable $callback + * @return static + */ + public function chunkWhile(callable $callback) + { + return new static(function () use ($callback) { + $iterator = $this->getIterator(); + + $chunk = new Collection; + + if ($iterator->valid()) { + $chunk[$iterator->key()] = $iterator->current(); + + $iterator->next(); + } + + while ($iterator->valid()) { + if (! $callback($iterator->current(), $iterator->key(), $chunk)) { + yield new static($chunk); + + $chunk = new Collection; + } + + $chunk[$iterator->key()] = $iterator->current(); + + $iterator->next(); + } + + if ($chunk->isNotEmpty()) { + yield new static($chunk); + } + }); + } + /** * Sort through each item with a callback. * @@ -1152,6 +1288,17 @@ class LazyCollection implements Enumerable return $this->passthru('sortKeysDesc', func_get_args()); } + /** + * Sort the collection keys using a callback. + * + * @param callable $callback + * @return static + */ + public function sortKeysUsing(callable $callback) + { + return $this->passthru('sortKeysUsing', func_get_args()); + } + /** * Take the first or last {$limit} items. * @@ -1202,6 +1349,21 @@ class LazyCollection implements Enumerable }); } + /** + * Take items in the collection until a given point in time. + * + * @param \DateTimeInterface $timeout + * @return static + */ + public function takeUntilTimeout(DateTimeInterface $timeout) + { + $timeout = $timeout->getTimestamp(); + + return $this->takeWhile(function () use ($timeout) { + return $this->now() < $timeout; + }); + } + /** * Take items in the collection while the given condition is met. * @@ -1212,7 +1374,9 @@ class LazyCollection implements Enumerable { $callback = $this->useAsCallable($value) ? $value : $this->equality($value); - return $this->takeUntil($this->negate($callback)); + return $this->takeUntil(function ($item, $key) use ($callback) { + return ! $callback($item, $key); + }); } /** @@ -1232,6 +1396,40 @@ class LazyCollection implements Enumerable }); } + /** + * Convert a flatten "dot" notation array into an expanded array. + * + * @return static + */ + public function undot() + { + return $this->passthru('undot', []); + } + + /** + * Return only unique items from the collection array. + * + * @param string|callable|null $key + * @param bool $strict + * @return static + */ + public function unique($key = null, $strict = false) + { + $callback = $this->valueRetriever($key); + + return new static(function () use ($callback, $strict) { + $exists = []; + + foreach ($this as $key => $item) { + if (! in_array($id = $callback($item, $key), $exists, $strict)) { + yield $key => $item; + + $exists[] = $id; + } + } + }); + } + /** * Reset the keys on the underlying array. * @@ -1305,6 +1503,7 @@ class LazyCollection implements Enumerable * * @return \Traversable */ + #[\ReturnTypeWillChange] public function getIterator() { return $this->makeIterator($this->source); @@ -1315,6 +1514,7 @@ class LazyCollection implements Enumerable * * @return int */ + #[\ReturnTypeWillChange] public function count() { if (is_array($this->source)) { @@ -1372,4 +1572,14 @@ class LazyCollection implements Enumerable yield from $this->collect()->$method(...$params); }); } + + /** + * Get the current time. + * + * @return int + */ + protected function now() + { + return time(); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Collections/MultipleItemsFoundException.php b/vendor/laravel/framework/src/Illuminate/Collections/MultipleItemsFoundException.php new file mode 100644 index 000000000..944b2dc64 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Collections/MultipleItemsFoundException.php @@ -0,0 +1,9 @@ +all() : $value; } + /** + * Create a new instance with no items. + * + * @return static + */ + public static function empty() + { + return new static([]); + } + + /** + * Create a new collection by invoking the callback a given amount of times. + * + * @param int $number + * @param callable|null $callback + * @return static + */ + public static function times($number, callable $callback = null) + { + if ($number < 1) { + return new static; + } + + return static::range(1, $number) + ->when($callback) + ->map($callback); + } + /** * Alias for the "avg" method. * @@ -519,7 +562,7 @@ trait EnumeratesValues } /** - * Filter items where the given key is not null. + * Filter items where the value for the given key is null. * * @param string|null $key * @return static @@ -530,7 +573,7 @@ trait EnumeratesValues } /** - * Filter items where the given key is null. + * Filter items where the value for the given key is not null. * * @param string|null $key * @return static @@ -637,14 +680,24 @@ trait EnumeratesValues } /** - * Filter the items, removing any items that don't match the given type. + * Filter the items, removing any items that don't match the given type(s). * - * @param string $type + * @param string|string[] $type * @return static */ public function whereInstanceOf($type) { return $this->filter(function ($value) use ($type) { + if (is_array($type)) { + foreach ($type as $classType) { + if ($value instanceof $classType) { + return true; + } + } + + return false; + } + return $value instanceof $type; }); } @@ -660,6 +713,33 @@ trait EnumeratesValues return $callback($this); } + /** + * Pass the collection into a new class. + * + * @param string $class + * @return mixed + */ + public function pipeInto($class) + { + return new $class($this); + } + + /** + * Pass the collection through a series of callable pipes and return the result. + * + * @param array $pipes + * @return mixed + */ + public function pipeThrough($pipes) + { + return static::make($pipes)->reduce( + function ($carry, $pipe) { + return $pipe($carry); + }, + $this, + ); + } + /** * Pass the collection to the given callback and then return it. * @@ -673,6 +753,79 @@ trait EnumeratesValues return $this; } + /** + * Reduce the collection to a single value. + * + * @param callable $callback + * @param mixed $initial + * @return mixed + */ + public function reduce(callable $callback, $initial = null) + { + $result = $initial; + + foreach ($this as $key => $value) { + $result = $callback($result, $value, $key); + } + + return $result; + } + + /** + * Reduce the collection to multiple aggregate values. + * + * @param callable $callback + * @param mixed ...$initial + * @return array + * + * @deprecated Use "reduceSpread" instead + * + * @throws \UnexpectedValueException + */ + public function reduceMany(callable $callback, ...$initial) + { + return $this->reduceSpread($callback, ...$initial); + } + + /** + * Reduce the collection to multiple aggregate values. + * + * @param callable $callback + * @param mixed ...$initial + * @return array + * + * @throws \UnexpectedValueException + */ + public function reduceSpread(callable $callback, ...$initial) + { + $result = $initial; + + foreach ($this as $key => $value) { + $result = call_user_func_array($callback, array_merge($result, [$value, $key])); + + if (! is_array($result)) { + throw new UnexpectedValueException(sprintf( + "%s::reduceMany expects reducer to return an array, but got a '%s' instead.", + class_basename(static::class), gettype($result) + )); + } + } + + return $result; + } + + /** + * Reduce an associative collection to a single value. + * + * @param callable $callback + * @param mixed $initial + * @return mixed + */ + public function reduceWithKeys(callable $callback, $initial = null) + { + return $this->reduce($callback, $initial); + } + /** * Create a collection of all elements that do not pass a given truth test. * @@ -690,28 +843,6 @@ trait EnumeratesValues }); } - /** - * Return only unique items from the collection array. - * - * @param string|callable|null $key - * @param bool $strict - * @return static - */ - public function unique($key = null, $strict = false) - { - $callback = $this->valueRetriever($key); - - $exists = []; - - return $this->reject(function ($item, $key) use ($callback, $strict, &$exists) { - if (in_array($id = $callback($item, $key), $exists, $strict)) { - return true; - } - - $exists[] = $id; - }); - } - /** * Return only unique items from the collection array using strict comparison. * @@ -723,21 +854,6 @@ trait EnumeratesValues return $this->unique($key, true); } - /** - * Take items in the collection until the given condition is met. - * - * This is an alias to the "takeUntil" method. - * - * @param mixed $value - * @return static - * - * @deprecated Use the "takeUntil" method directly. - */ - public function until($value) - { - return $this->takeUntil($value); - } - /** * Collect the values into a collection. * @@ -765,6 +881,7 @@ trait EnumeratesValues * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return array_map(function ($value) { @@ -809,7 +926,22 @@ trait EnumeratesValues */ public function __toString() { - return $this->toJson(); + return $this->escapeWhenCastingToString + ? e($this->toJson()) + : $this->toJson(); + } + + /** + * Indicate that the model's string representation should be escaped when __toString is invoked. + * + * @param bool $escape + * @return $this + */ + public function escapeWhenCastingToString($escape = true) + { + $this->escapeWhenCastingToString = $escape; + + return $this; } /** @@ -860,6 +992,8 @@ trait EnumeratesValues return (array) $items->jsonSerialize(); } elseif ($items instanceof Traversable) { return iterator_to_array($items); + } elseif ($items instanceof UnitEnum) { + return [$items]; } return (array) $items; diff --git a/vendor/laravel/framework/src/Illuminate/Collections/composer.json b/vendor/laravel/framework/src/Illuminate/Collections/composer.json new file mode 100644 index 000000000..ecc453726 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Collections/composer.json @@ -0,0 +1,41 @@ +{ + "name": "illuminate/collections", + "description": "The Illuminate Collections package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": "^7.3|^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.4)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Collections/helpers.php b/vendor/laravel/framework/src/Illuminate/Collections/helpers.php new file mode 100644 index 000000000..67669e5ce --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Collections/helpers.php @@ -0,0 +1,186 @@ + $segment) { + unset($key[$i]); + + if (is_null($segment)) { + return $target; + } + + if ($segment === '*') { + if ($target instanceof Collection) { + $target = $target->all(); + } elseif (! is_array($target)) { + return value($default); + } + + $result = []; + + foreach ($target as $item) { + $result[] = data_get($item, $key); + } + + return in_array('*', $key) ? Arr::collapse($result) : $result; + } + + if (Arr::accessible($target) && Arr::exists($target, $segment)) { + $target = $target[$segment]; + } elseif (is_object($target) && isset($target->{$segment})) { + $target = $target->{$segment}; + } else { + return value($default); + } + } + + return $target; + } +} + +if (! function_exists('data_set')) { + /** + * Set an item on an array or object using dot notation. + * + * @param mixed $target + * @param string|array $key + * @param mixed $value + * @param bool $overwrite + * @return mixed + */ + function data_set(&$target, $key, $value, $overwrite = true) + { + $segments = is_array($key) ? $key : explode('.', $key); + + if (($segment = array_shift($segments)) === '*') { + if (! Arr::accessible($target)) { + $target = []; + } + + if ($segments) { + foreach ($target as &$inner) { + data_set($inner, $segments, $value, $overwrite); + } + } elseif ($overwrite) { + foreach ($target as &$inner) { + $inner = $value; + } + } + } elseif (Arr::accessible($target)) { + if ($segments) { + if (! Arr::exists($target, $segment)) { + $target[$segment] = []; + } + + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite || ! Arr::exists($target, $segment)) { + $target[$segment] = $value; + } + } elseif (is_object($target)) { + if ($segments) { + if (! isset($target->{$segment})) { + $target->{$segment} = []; + } + + data_set($target->{$segment}, $segments, $value, $overwrite); + } elseif ($overwrite || ! isset($target->{$segment})) { + $target->{$segment} = $value; + } + } else { + $target = []; + + if ($segments) { + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite) { + $target[$segment] = $value; + } + } + + return $target; + } +} + +if (! function_exists('head')) { + /** + * Get the first element of an array. Useful for method chaining. + * + * @param array $array + * @return mixed + */ + function head($array) + { + return reset($array); + } +} + +if (! function_exists('last')) { + /** + * Get the last element from an array. + * + * @param array $array + * @return mixed + */ + function last($array) + { + return end($array); + } +} + +if (! function_exists('value')) { + /** + * Return the default value of the given value. + * + * @param mixed $value + * @return mixed + */ + function value($value, ...$args) + { + return $value instanceof Closure ? $value(...$args) : $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Config/Repository.php b/vendor/laravel/framework/src/Illuminate/Config/Repository.php index 5bcdcbf48..1719e90a9 100644 --- a/vendor/laravel/framework/src/Illuminate/Config/Repository.php +++ b/vendor/laravel/framework/src/Illuminate/Config/Repository.php @@ -99,7 +99,7 @@ class Repository implements ArrayAccess, ConfigContract */ public function prepend($key, $value) { - $array = $this->get($key); + $array = $this->get($key, []); array_unshift($array, $value); @@ -115,7 +115,7 @@ class Repository implements ArrayAccess, ConfigContract */ public function push($key, $value) { - $array = $this->get($key); + $array = $this->get($key, []); $array[] = $value; @@ -138,6 +138,7 @@ class Repository implements ArrayAccess, ConfigContract * @param string $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->has($key); @@ -149,6 +150,7 @@ class Repository implements ArrayAccess, ConfigContract * @param string $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->get($key); @@ -161,6 +163,7 @@ class Repository implements ArrayAccess, ConfigContract * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { $this->set($key, $value); @@ -172,6 +175,7 @@ class Repository implements ArrayAccess, ConfigContract * @param string $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { $this->set($key, null); diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json index 3446109f2..9d577bb46 100755 --- a/vendor/laravel/framework/src/Illuminate/Config/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Config/composer.json @@ -14,9 +14,9 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0" }, "autoload": { "psr-4": { @@ -25,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php index 7066c8485..88c65c708 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Application.php @@ -19,7 +19,6 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\BufferedOutput; -use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\PhpExecutableFinder; @@ -77,6 +76,8 @@ class Application extends SymfonyApplication implements ApplicationContract /** * {@inheritdoc} + * + * @return int */ public function run(InputInterface $input = null, OutputInterface $output = null) { @@ -86,7 +87,7 @@ class Application extends SymfonyApplication implements ApplicationContract $this->events->dispatch( new CommandStarting( - $commandName, $input, $output = $output ?: new ConsoleOutput + $commandName, $input, $output = $output ?: new BufferedConsoleOutput ) ); @@ -116,7 +117,7 @@ class Application extends SymfonyApplication implements ApplicationContract */ public static function artisanBinary() { - return defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan'; + return ProcessUtils::escapeArgument(defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan'); } /** @@ -209,7 +210,7 @@ class Application extends SymfonyApplication implements ApplicationContract $input = new ArrayInput($parameters); } - return [$command, $input ?? null]; + return [$command, $input]; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Console/BufferedConsoleOutput.php b/vendor/laravel/framework/src/Illuminate/Console/BufferedConsoleOutput.php new file mode 100644 index 000000000..4bb5ca228 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/BufferedConsoleOutput.php @@ -0,0 +1,41 @@ +buffer, function () { + $this->buffer = ''; + }); + } + + /** + * {@inheritdoc} + */ + protected function doWrite(string $message, bool $newline) + { + $this->buffer .= $message; + + if ($newline) { + $this->buffer .= \PHP_EOL; + } + + return parent::doWrite($message, $newline); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php index d5836c00e..5c8c179f0 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Command.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php @@ -38,14 +38,14 @@ class Command extends SymfonyCommand /** * The console command description. * - * @var string|null + * @var string */ protected $description; /** * The console command help text. * - * @var string|null + * @var string */ protected $help; @@ -131,7 +131,9 @@ class Command extends SymfonyCommand */ protected function execute(InputInterface $input, OutputInterface $output) { - return (int) $this->laravel->call([$this, 'handle']); + $method = method_exists($this, 'handle') ? 'handle' : '__invoke'; + + return (int) $this->laravel->call([$this, $method]); } /** @@ -161,6 +163,8 @@ class Command extends SymfonyCommand /** * {@inheritdoc} + * + * @return bool */ public function isHidden() { @@ -169,6 +173,8 @@ class Command extends SymfonyCommand /** * {@inheritdoc} + * + * @return static */ public function setHidden(bool $hidden) { diff --git a/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php b/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php index e060c5562..7e69b9b78 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php @@ -29,7 +29,7 @@ trait CallsCommands } /** - * Call another console command silently. + * Call another console command without output. * * @param \Symfony\Component\Console\Command\Command|string $command * @param array $arguments @@ -40,6 +40,18 @@ trait CallsCommands return $this->runCommand($command, $arguments, new NullOutput); } + /** + * Call another console command without output. + * + * @param \Symfony\Component\Console\Command\Command|string $command + * @param array $arguments + * @return int + */ + public function callSilently($command, array $arguments = []) + { + return $this->callSilent($command, $arguments); + } + /** * Run the given the console command. * diff --git a/vendor/laravel/framework/src/Illuminate/Console/Concerns/CreatesMatchingTest.php b/vendor/laravel/framework/src/Illuminate/Console/Concerns/CreatesMatchingTest.php new file mode 100644 index 000000000..a360c281a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Concerns/CreatesMatchingTest.php @@ -0,0 +1,44 @@ + 'PHPUnit', 'pest' => 'Pest'] as $option => $name) { + $this->getDefinition()->addOption(new InputOption( + $option, + null, + InputOption::VALUE_NONE, + "Generate an accompanying {$name} test for the {$this->type}" + )); + } + } + + /** + * Create the matching test case if requested. + * + * @param string $path + * @return void + */ + protected function handleTestCreation($path) + { + if (! $this->option('test') && ! $this->option('pest')) { + return; + } + + $this->call('make:test', [ + 'name' => Str::of($path)->after($this->laravel['path'])->beforeLast('.php')->append('Test')->replace('\\', '/'), + '--pest' => $this->option('pest'), + ]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php b/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php index e61ef5604..69d295c1e 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php @@ -2,6 +2,7 @@ namespace Illuminate\Console\Concerns; +use Closure; use Illuminate\Console\OutputStyle; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Str; @@ -237,6 +238,38 @@ trait InteractsWithIO $table->render(); } + /** + * Execute a given callback while advancing a progress bar. + * + * @param iterable|int $totalSteps + * @param \Closure $callback + * @return mixed|void + */ + public function withProgressBar($totalSteps, Closure $callback) + { + $bar = $this->output->createProgressBar( + is_iterable($totalSteps) ? count($totalSteps) : $totalSteps + ); + + $bar->start(); + + if (is_iterable($totalSteps)) { + foreach ($totalSteps as $value) { + $callback($value, $bar); + + $bar->advance(); + } + } else { + $callback($bar); + } + + $bar->finish(); + + if (is_iterable($totalSteps)) { + return $totalSteps; + } + } + /** * Write a string as information output. * @@ -332,7 +365,18 @@ trait InteractsWithIO $this->comment('* '.$string.' *'); $this->comment(str_repeat('*', $length)); - $this->output->newLine(); + $this->newLine(); + } + + /** + * Write a blank line. + * + * @param int $count + * @return void + */ + public function newLine($count = 1) + { + $this->output->newLine($count); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledBackgroundTaskFinished.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledBackgroundTaskFinished.php new file mode 100644 index 000000000..d9e63c2e5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledBackgroundTaskFinished.php @@ -0,0 +1,26 @@ +task = $task; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php index f111ce54c..46857ad84 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php @@ -26,6 +26,7 @@ class ScheduledTaskFailed * * @param \Illuminate\Console\Scheduling\Event $task * @param \Throwable $exception + * @return void */ public function __construct(Event $task, Throwable $exception) { diff --git a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php index 8af456b1f..5c12e05ed 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php @@ -2,6 +2,7 @@ namespace Illuminate\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Str; use Symfony\Component\Console\Input\InputArgument; @@ -25,7 +26,7 @@ abstract class GeneratorCommand extends Command /** * Reserved names that cannot be used for generation. * - * @var array + * @var string[] */ protected $reservedNames = [ '__halt_compiler', @@ -108,6 +109,10 @@ abstract class GeneratorCommand extends Command { parent::__construct(); + if (in_array(CreatesMatchingTest::class, class_uses_recursive($this))) { + $this->addTestOptions(); + } + $this->files = $files; } @@ -159,6 +164,10 @@ abstract class GeneratorCommand extends Command $this->files->put($path, $this->sortImports($this->buildClass($name))); $this->info($this->type.' created successfully.'); + + if (in_array(CreatesMatchingTest::class, class_uses_recursive($this))) { + $this->handleTestCreation($path); + } } /** @@ -171,19 +180,42 @@ abstract class GeneratorCommand extends Command { $name = ltrim($name, '\\/'); + $name = str_replace('/', '\\', $name); + $rootNamespace = $this->rootNamespace(); if (Str::startsWith($name, $rootNamespace)) { return $name; } - $name = str_replace('/', '\\', $name); - return $this->qualifyClass( $this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name ); } + /** + * Qualify the given model class base name. + * + * @param string $model + * @return string + */ + protected function qualifyModel(string $model) + { + $model = ltrim($model, '\\/'); + + $model = str_replace('/', '\\', $model); + + $rootNamespace = $this->rootNamespace(); + + if (Str::startsWith($model, $rootNamespace)) { + return $model; + } + + return is_dir(app_path('Models')) + ? $rootNamespace.'Models\\'.$model + : $rootNamespace.$model; + } + /** * Get the default namespace for the class. * diff --git a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php index fe5dc450c..1e7c15314 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php +++ b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php @@ -68,4 +68,14 @@ class OutputStyle extends SymfonyStyle { return $this->output->isDebug(); } + + /** + * Get the underlying Symfony output implementation. + * + * @return \Symfony\Component\Console\Output\OutputInterface + */ + public function getOutput() + { + return $this->output; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php index 6af680d99..dde5d7dea 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php @@ -6,6 +6,7 @@ use Illuminate\Contracts\Container\Container; use Illuminate\Support\Reflector; use InvalidArgumentException; use LogicException; +use Throwable; class CallbackEvent extends Event { @@ -77,6 +78,12 @@ class CallbackEvent extends Event $response = is_object($this->callback) ? $container->call([$this->callback, '__invoke'], $this->parameters) : $container->call($this->callback, $this->parameters); + + $this->exitCode = $response === false ? 1 : 0; + } catch (Throwable $e) { + $this->exitCode = 1; + + throw $e; } finally { $this->removeMutex(); diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php index bc833bd27..ee13c5ee3 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php @@ -52,7 +52,7 @@ class CommandBuilder $finished = Application::formatCommandString('schedule:finish').' "'.$event->mutexName().'"'; if (windows_os()) { - return 'start /b cmd /c "('.$event->command.' & '.$finished.' "%errorlevel%")'.$redirect.$output.' 2>&1"'; + return 'start /b cmd /v:on /c "('.$event->command.' & '.$finished.' ^!ERRORLEVEL^!)'.$redirect.$output.' 2>&1"'; } return $this->ensureCorrectUser($event, diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php index 8869b8177..4de88f163 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php @@ -10,13 +10,14 @@ use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Support\Arr; -use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Date; use Illuminate\Support\Reflector; +use Illuminate\Support\Stringable; use Illuminate\Support\Traits\Macroable; use Illuminate\Support\Traits\ReflectsClosures; use Psr\Http\Client\ClientExceptionInterface; use Symfony\Component\Process\Process; +use Throwable; class Event { @@ -86,7 +87,7 @@ class Event public $expiresAt = 1440; /** - * Indicates if the command should run in background. + * Indicates if the command should run in the background. * * @var bool */ @@ -218,11 +219,17 @@ class Event */ protected function runCommandInForeground(Container $container) { - $this->callBeforeCallbacks($container); + try { + $this->callBeforeCallbacks($container); - $this->exitCode = Process::fromShellCommandline($this->buildCommand(), base_path(), null, null, null)->run(); + $this->exitCode = Process::fromShellCommandline( + $this->buildCommand(), base_path(), null, null, null + )->run(); - $this->callAfterCallbacks($container); + $this->callAfterCallbacks($container); + } finally { + $this->removeMutex(); + } } /** @@ -233,9 +240,15 @@ class Event */ protected function runCommandInBackground(Container $container) { - $this->callBeforeCallbacks($container); + try { + $this->callBeforeCallbacks($container); - Process::fromShellCommandline($this->buildCommand(), base_path(), null, null, null)->run(); + Process::fromShellCommandline($this->buildCommand(), base_path(), null, null, null)->run(); + } catch (Throwable $exception) { + $this->removeMutex(); + + throw $exception; + } } /** @@ -275,7 +288,11 @@ class Event { $this->exitCode = (int) $exitCode; - $this->callAfterCallbacks($container); + try { + $this->callAfterCallbacks($container); + } finally { + $this->removeMutex(); + } } /** @@ -321,13 +338,13 @@ class Event */ protected function expressionPasses() { - $date = Carbon::now(); + $date = Date::now(); if ($this->timezone) { - $date->setTimezone($this->timezone); + $date = $date->setTimezone($this->timezone); } - return CronExpression::factory($this->expression)->isDue($date->toDateTimeString()); + return (new CronExpression($this->expression))->isDue($date->toDateTimeString()); } /** @@ -475,7 +492,7 @@ class Event */ protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false) { - $text = file_exists($this->output) ? file_get_contents($this->output) : ''; + $text = is_file($this->output) ? file_get_contents($this->output) : ''; if ($onlyIfOutputExists && empty($text)) { return; @@ -586,7 +603,7 @@ class Event } /** - * State that the command should run in background. + * State that the command should run in the background. * * @return $this */ @@ -647,9 +664,7 @@ class Event $this->expiresAt = $expiresAt; - return $this->then(function () { - $this->mutex->forget($this); - })->skip(function () { + return $this->skip(function () { return $this->mutex->exists($this); }); } @@ -728,6 +743,12 @@ class Event */ public function then(Closure $callback) { + $parameters = $this->closureParameterTypes($callback); + + if (Arr::get($parameters, 'output') === Stringable::class) { + return $this->thenWithOutput($callback); + } + $this->afterCallbacks[] = $callback; return $this; @@ -755,6 +776,12 @@ class Event */ public function onSuccess(Closure $callback) { + $parameters = $this->closureParameterTypes($callback); + + if (Arr::get($parameters, 'output') === Stringable::class) { + return $this->onSuccessWithOutput($callback); + } + return $this->then(function (Container $container) use ($callback) { if (0 === $this->exitCode) { $container->call($callback); @@ -784,6 +811,12 @@ class Event */ public function onFailure(Closure $callback) { + $parameters = $this->closureParameterTypes($callback); + + if (Arr::get($parameters, 'output') === Stringable::class) { + return $this->onFailureWithOutput($callback); + } + return $this->then(function (Container $container) use ($callback) { if (0 !== $this->exitCode) { $container->call($callback); @@ -815,11 +848,11 @@ class Event protected function withOutputCallback(Closure $callback, $onlyIfOutputExists = false) { return function (Container $container) use ($callback, $onlyIfOutputExists) { - $output = $this->output && file_exists($this->output) ? file_get_contents($this->output) : ''; + $output = $this->output && is_file($this->output) ? file_get_contents($this->output) : ''; return $onlyIfOutputExists && empty($output) ? null - : $container->call($callback, ['output' => $output]); + : $container->call($callback, ['output' => new Stringable($output)]); }; } @@ -871,9 +904,8 @@ class Event */ public function nextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) { - return Date::instance(CronExpression::factory( - $this->getExpression() - )->getNextRunDate($currentTime, $nth, $allowCurrentDate, $this->timezone)); + return Date::instance((new CronExpression($this->getExpression())) + ->getNextRunDate($currentTime, $nth, $allowCurrentDate, $this->timezone)); } /** @@ -898,4 +930,16 @@ class Event return $this; } + + /** + * Delete the mutex for the event. + * + * @return void + */ + protected function removeMutex() + { + if ($this->withoutOverlapping) { + $this->mutex->forget($this); + } + } } diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php index 6972642c0..9226cec27 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php @@ -262,10 +262,23 @@ trait ManagesFrequencies * @return $this */ public function twiceDaily($first = 1, $second = 13) + { + return $this->twiceDailyAt($first, $second, 0); + } + + /** + * Schedule the event to run twice daily at a given offset. + * + * @param int $first + * @param int $second + * @param int $offset + * @return $this + */ + public function twiceDailyAt($first = 1, $second = 13, $offset = 0) { $hours = $first.','.$second; - return $this->spliceIntoPosition(1, 0) + return $this->spliceIntoPosition(1, $offset) ->spliceIntoPosition(2, $hours); } @@ -276,7 +289,7 @@ trait ManagesFrequencies */ public function weekdays() { - return $this->spliceIntoPosition(5, '1-5'); + return $this->days(Schedule::MONDAY.'-'.Schedule::FRIDAY); } /** @@ -286,7 +299,7 @@ trait ManagesFrequencies */ public function weekends() { - return $this->spliceIntoPosition(5, '0,6'); + return $this->days(Schedule::SATURDAY.','.Schedule::SUNDAY); } /** @@ -296,7 +309,7 @@ trait ManagesFrequencies */ public function mondays() { - return $this->days(1); + return $this->days(Schedule::MONDAY); } /** @@ -306,7 +319,7 @@ trait ManagesFrequencies */ public function tuesdays() { - return $this->days(2); + return $this->days(Schedule::TUESDAY); } /** @@ -316,7 +329,7 @@ trait ManagesFrequencies */ public function wednesdays() { - return $this->days(3); + return $this->days(Schedule::WEDNESDAY); } /** @@ -326,7 +339,7 @@ trait ManagesFrequencies */ public function thursdays() { - return $this->days(4); + return $this->days(Schedule::THURSDAY); } /** @@ -336,7 +349,7 @@ trait ManagesFrequencies */ public function fridays() { - return $this->days(5); + return $this->days(Schedule::FRIDAY); } /** @@ -346,7 +359,7 @@ trait ManagesFrequencies */ public function saturdays() { - return $this->days(6); + return $this->days(Schedule::SATURDAY); } /** @@ -356,7 +369,7 @@ trait ManagesFrequencies */ public function sundays() { - return $this->days(0); + return $this->days(Schedule::SUNDAY); } /** @@ -374,15 +387,15 @@ trait ManagesFrequencies /** * Schedule the event to run weekly on a given day and time. * - * @param int $day + * @param array|mixed $dayOfWeek * @param string $time * @return $this */ - public function weeklyOn($day, $time = '0:0') + public function weeklyOn($dayOfWeek, $time = '0:0') { $this->dailyAt($time); - return $this->spliceIntoPosition(5, $day); + return $this->days($dayOfWeek); } /** @@ -400,15 +413,15 @@ trait ManagesFrequencies /** * Schedule the event to run monthly on a given day and time. * - * @param int $day + * @param int $dayOfMonth * @param string $time * @return $this */ - public function monthlyOn($day = 1, $time = '0:0') + public function monthlyOn($dayOfMonth = 1, $time = '0:0') { $this->dailyAt($time); - return $this->spliceIntoPosition(3, $day); + return $this->spliceIntoPosition(3, $dayOfMonth); } /** @@ -421,13 +434,11 @@ trait ManagesFrequencies */ public function twiceMonthly($first = 1, $second = 16, $time = '0:0') { - $days = $first.','.$second; + $daysOfMonth = $first.','.$second; $this->dailyAt($time); - return $this->spliceIntoPosition(1, 0) - ->spliceIntoPosition(2, 0) - ->spliceIntoPosition(3, $days); + return $this->spliceIntoPosition(3, $daysOfMonth); } /** @@ -469,6 +480,22 @@ trait ManagesFrequencies ->spliceIntoPosition(4, 1); } + /** + * Schedule the event to run yearly on a given month, day, and time. + * + * @param int $month + * @param int|string $dayOfMonth + * @param string $time + * @return $this + */ + public function yearlyOn($month = 1, $dayOfMonth = 1, $time = '0:0') + { + $this->dailyAt($time); + + return $this->spliceIntoPosition(3, $dayOfMonth) + ->spliceIntoPosition(4, $month); + } + /** * Set the days of the week the command should run on. * diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php index 89ad97209..ee5412b7b 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php @@ -4,10 +4,13 @@ namespace Illuminate\Console\Scheduling; use Closure; use DateTimeInterface; +use Illuminate\Bus\UniqueLock; use Illuminate\Console\Application; use Illuminate\Container\Container; use Illuminate\Contracts\Bus\Dispatcher; +use Illuminate\Contracts\Cache\Repository as Cache; use Illuminate\Contracts\Container\BindingResolutionException; +use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\CallQueuedClosure; use Illuminate\Support\ProcessUtils; @@ -19,6 +22,14 @@ class Schedule { use Macroable; + const SUNDAY = 0; + const MONDAY = 1; + const TUESDAY = 2; + const WEDNESDAY = 3; + const THURSDAY = 4; + const FRIDAY = 5; + const SATURDAY = 6; + /** * All of the events on the schedule. * @@ -59,6 +70,8 @@ class Schedule * * @param \DateTimeZone|string|null $timezone * @return void + * + * @throws \RuntimeException */ public function __construct($timezone = null) { @@ -107,7 +120,11 @@ class Schedule public function command($command, array $parameters = []) { if (class_exists($command)) { - $command = Container::getInstance()->make($command)->getName(); + $command = Container::getInstance()->make($command); + + return $this->exec( + Application::formatCommandString($command->getName()), $parameters, + )->description($command->getDescription()); } return $this->exec( @@ -143,6 +160,8 @@ class Schedule * @param string|null $queue * @param string|null $connection * @return void + * + * @throws \RuntimeException */ protected function dispatchToQueue($job, $queue, $connection) { @@ -156,6 +175,35 @@ class Schedule $job = CallQueuedClosure::create($job); } + if ($job instanceof ShouldBeUnique) { + return $this->dispatchUniqueJobToQueue($job, $queue, $connection); + } + + $this->getDispatcher()->dispatch( + $job->onConnection($connection)->onQueue($queue) + ); + } + + /** + * Dispatch the given unique job to the queue. + * + * @param object $job + * @param string|null $queue + * @param string|null $connection + * @return void + * + * @throws \RuntimeException + */ + protected function dispatchUniqueJobToQueue($job, $queue, $connection) + { + if (! Container::getInstance()->bound(Cache::class)) { + throw new RuntimeException('Cache driver not available. Scheduling unique jobs not supported.'); + } + + if (! (new UniqueLock(Container::getInstance()->make(Cache::class)))->acquire($job)) { + return; + } + $this->getDispatcher()->dispatch( $job->onConnection($connection)->onQueue($queue) ); @@ -293,6 +341,8 @@ class Schedule * Get the job dispatcher, if available. * * @return \Illuminate\Contracts\Bus\Dispatcher + * + * @throws \RuntimeException */ protected function getDispatcher() { diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php new file mode 100644 index 000000000..0dd9424c4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php @@ -0,0 +1,47 @@ +events($this->laravel) as $event) { + if ($event->mutex->exists($event)) { + $this->line('Deleting mutex for: '.$event->command); + + $event->mutex->forget($event); + + $mutexCleared = true; + } + } + + if (! $mutexCleared) { + $this->info('No mutex files were found.'); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php index c19381f08..4857d695c 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php @@ -3,6 +3,8 @@ namespace Illuminate\Console\Scheduling; use Illuminate\Console\Command; +use Illuminate\Console\Events\ScheduledBackgroundTaskFinished; +use Illuminate\Contracts\Events\Dispatcher; class ScheduleFinishCommand extends Command { @@ -37,6 +39,10 @@ class ScheduleFinishCommand extends Command { collect($schedule->events())->filter(function ($value) { return $value->mutexName() == $this->argument('id'); - })->each->callAfterCallbacksWithExitCode($this->laravel, $this->argument('code')); + })->each(function ($event) { + $event->callafterCallbacksWithExitCode($this->laravel, $this->argument('code')); + + $this->laravel->make(Dispatcher::class)->dispatch(new ScheduledBackgroundTaskFinished($event)); + }); } } diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleListCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleListCommand.php new file mode 100644 index 000000000..b1b0bdde5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleListCommand.php @@ -0,0 +1,55 @@ +events() as $event) { + $rows[] = [ + $event->command, + $event->expression, + $event->description, + (new CronExpression($event->expression)) + ->getNextRunDate(Carbon::now()->setTimezone($event->timezone)) + ->setTimezone(new DateTimeZone($this->option('timezone') ?? config('app.timezone'))) + ->format('Y-m-d H:i:s P'), + ]; + } + + $this->table([ + 'Command', + 'Interval', + 'Description', + 'Next Due', + ], $rows ?? []); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php index 926585a7b..4193408fc 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php @@ -133,7 +133,7 @@ class ScheduleRunCommand extends Command */ protected function runEvent($event) { - $this->line('Running scheduled command: '.$event->getSummaryForDisplay()); + $this->line('['.date('c').'] Running scheduled command: '.$event->getSummaryForDisplay()); $this->dispatcher->dispatch(new ScheduledTaskStarting($event)); diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleTestCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleTestCommand.php new file mode 100644 index 000000000..281886439 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleTestCommand.php @@ -0,0 +1,47 @@ +events(); + + $commandNames = []; + + foreach ($commands as $command) { + $commandNames[] = $command->command ?? $command->getSummaryForDisplay(); + } + + $index = array_search($this->choice('Which command would you like to run?', $commandNames), $commandNames); + + $event = $commands[$index]; + + $this->line('['.date('c').'] Running scheduled command: '.$event->getSummaryForDisplay()); + + $event->run($this->laravel); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php new file mode 100644 index 000000000..165124a79 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php @@ -0,0 +1,72 @@ +info('Schedule worker started successfully.'); + + [$lastExecutionStartedAt, $keyOfLastExecutionWithOutput, $executions] = [null, null, []]; + + while (true) { + usleep(100 * 1000); + + if (Carbon::now()->second === 0 && + ! Carbon::now()->startOfMinute()->equalTo($lastExecutionStartedAt)) { + $executions[] = $execution = new Process([ + PHP_BINARY, + defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan', + 'schedule:run', + ]); + + $execution->start(); + + $lastExecutionStartedAt = Carbon::now()->startOfMinute(); + } + + foreach ($executions as $key => $execution) { + $output = trim($execution->getIncrementalOutput()). + trim($execution->getIncrementalErrorOutput()); + + if (! empty($output)) { + if ($key !== $keyOfLastExecutionWithOutput) { + $this->info(PHP_EOL.'['.date('c').'] Execution #'.($key + 1).' output:'); + + $keyOfLastExecutionWithOutput = $key; + } + + $this->output->writeln($output); + } + + if (! $execution->isRunning()) { + unset($executions[$key]); + } + } + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/composer.json b/vendor/laravel/framework/src/Illuminate/Console/composer.json index 41e0bad13..ba5366e3b 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Console/composer.json @@ -14,11 +14,13 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "symfony/console": "^5.0", - "symfony/process": "^5.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "symfony/console": "^5.4", + "symfony/process": "^5.4" }, "autoload": { "psr-4": { @@ -27,16 +29,16 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { - "dragonmantank/cron-expression": "Required to use scheduler (^2.3.1).", - "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.3.1|^7.0.1).", - "illuminate/bus": "Required to use the scheduled job dispatcher (^7.0).", - "illuminate/container": "Required to use the scheduler (^7.0).", - "illuminate/filesystem": "Required to use the generator command (^7.0).", - "illuminate/queue": "Required to use closures for scheduled jobs (^7.0)." + "dragonmantank/cron-expression": "Required to use scheduler (^3.0.2).", + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.5.5|^7.0.1).", + "illuminate/bus": "Required to use the scheduled job dispatcher (^8.0).", + "illuminate/container": "Required to use the scheduler (^8.0).", + "illuminate/filesystem": "Required to use the generator command (^8.0).", + "illuminate/queue": "Required to use closures for scheduled jobs (^8.0)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php b/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php index c617bf797..5c96c973e 100644 --- a/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php +++ b/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php @@ -156,6 +156,8 @@ class BoundMethod * @param array $parameters * @param array $dependencies * @return void + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException */ protected static function addDependencyForCallParameter($container, $parameter, array &$parameters, &$dependencies) @@ -170,7 +172,15 @@ class BoundMethod unset($parameters[$className]); } else { - $dependencies[] = $container->make($className); + if ($parameter->isVariadic()) { + $variadicDependencies = $container->make($className); + + $dependencies = array_merge($dependencies, is_array($variadicDependencies) + ? $variadicDependencies + : [$variadicDependencies]); + } else { + $dependencies[] = $container->make($className); + } } } elseif ($parameter->isDefaultValueAvailable()) { $dependencies[] = $parameter->getDefaultValue(); diff --git a/vendor/laravel/framework/src/Illuminate/Container/Container.php b/vendor/laravel/framework/src/Illuminate/Container/Container.php index 28ec63620..e6cd346fe 100755 --- a/vendor/laravel/framework/src/Illuminate/Container/Container.php +++ b/vendor/laravel/framework/src/Illuminate/Container/Container.php @@ -6,11 +6,13 @@ use ArrayAccess; use Closure; use Exception; use Illuminate\Contracts\Container\BindingResolutionException; +use Illuminate\Contracts\Container\CircularDependencyException; use Illuminate\Contracts\Container\Container as ContainerContract; use LogicException; use ReflectionClass; use ReflectionException; use ReflectionParameter; +use TypeError; class Container implements ArrayAccess, ContainerContract { @@ -49,6 +51,13 @@ class Container implements ArrayAccess, ContainerContract */ protected $instances = []; + /** + * The container's scoped instances. + * + * @var array + */ + protected $scopedInstances = []; + /** * The registered type aliases. * @@ -105,6 +114,13 @@ class Container implements ArrayAccess, ContainerContract */ protected $reboundCallbacks = []; + /** + * All of the global before resolving callbacks. + * + * @var \Closure[] + */ + protected $globalBeforeResolvingCallbacks = []; + /** * All of the global resolving callbacks. * @@ -119,6 +135,13 @@ class Container implements ArrayAccess, ContainerContract */ protected $globalAfterResolvingCallbacks = []; + /** + * All of the before resolving callbacks by class type. + * + * @var array[] + */ + protected $beforeResolvingCallbacks = []; + /** * All of the resolving callbacks by class type. * @@ -164,7 +187,9 @@ class Container implements ArrayAccess, ContainerContract } /** - * {@inheritdoc} + * {@inheritdoc} + * + * @return bool */ public function has($id) { @@ -218,6 +243,8 @@ class Container implements ArrayAccess, ContainerContract * @param \Closure|string|null $concrete * @param bool $shared * @return void + * + * @throws \TypeError */ public function bind($abstract, $concrete = null, $shared = false) { @@ -235,7 +262,7 @@ class Container implements ArrayAccess, ContainerContract // up inside its own Closure to give us more convenience when extending. if (! $concrete instanceof Closure) { if (! is_string($concrete)) { - throw new \TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null'); + throw new TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null'); } $concrete = $this->getClosure($abstract, $concrete); @@ -375,6 +402,36 @@ class Container implements ArrayAccess, ContainerContract } } + /** + * Register a scoped binding in the container. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @return void + */ + public function scoped($abstract, $concrete = null) + { + $this->scopedInstances[] = $abstract; + + $this->singleton($abstract, $concrete); + } + + /** + * Register a scoped binding if it hasn't already been registered. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @return void + */ + public function scopedIf($abstract, $concrete = null) + { + if (! $this->bound($abstract)) { + $this->scopedInstances[] = $abstract; + + $this->singleton($abstract, $concrete); + } + } + /** * "Extend" an abstract type in the container. * @@ -612,7 +669,7 @@ class Container implements ArrayAccess, ContainerContract /** * An alias function name for make(). * - * @param string $abstract + * @param string|callable $abstract * @param array $parameters * @return mixed * @@ -626,7 +683,7 @@ class Container implements ArrayAccess, ContainerContract /** * Resolve the given type from the container. * - * @param string $abstract + * @param string|callable $abstract * @param array $parameters * @return mixed * @@ -638,14 +695,16 @@ class Container implements ArrayAccess, ContainerContract } /** - * {@inheritdoc} + * {@inheritdoc} + * + * @return mixed */ public function get($id) { try { return $this->resolve($id); } catch (Exception $e) { - if ($this->has($id)) { + if ($this->has($id) || $e instanceof CircularDependencyException) { throw $e; } @@ -656,17 +715,25 @@ class Container implements ArrayAccess, ContainerContract /** * Resolve the given type from the container. * - * @param string $abstract + * @param string|callable $abstract * @param array $parameters * @param bool $raiseEvents * @return mixed * * @throws \Illuminate\Contracts\Container\BindingResolutionException + * @throws \Illuminate\Contracts\Container\CircularDependencyException */ protected function resolve($abstract, $parameters = [], $raiseEvents = true) { $abstract = $this->getAlias($abstract); + // First we'll fire any event handlers which handle the "before" resolving of + // specific types. This gives some hooks the chance to add various extends + // calls to change the resolution of objects that they're interested in. + if ($raiseEvents) { + $this->fireBeforeResolvingCallbacks($abstract, $parameters); + } + $concrete = $this->getContextualConcrete($abstract); $needsContextualBuild = ! empty($parameters) || ! is_null($concrete); @@ -724,7 +791,7 @@ class Container implements ArrayAccess, ContainerContract /** * Get the concrete type for a given abstract. * - * @param string $abstract + * @param string|callable $abstract * @return mixed */ protected function getConcrete($abstract) @@ -742,7 +809,7 @@ class Container implements ArrayAccess, ContainerContract /** * Get the contextual concrete binding for the given abstract. * - * @param string $abstract + * @param string|callable $abstract * @return \Closure|string|array|null */ protected function getContextualConcrete($abstract) @@ -768,7 +835,7 @@ class Container implements ArrayAccess, ContainerContract /** * Find the concrete binding for the given abstract in the contextual binding array. * - * @param string $abstract + * @param string|callable $abstract * @return \Closure|string|null */ protected function findInContextualBindings($abstract) @@ -795,6 +862,7 @@ class Container implements ArrayAccess, ContainerContract * @return mixed * * @throws \Illuminate\Contracts\Container\BindingResolutionException + * @throws \Illuminate\Contracts\Container\CircularDependencyException */ public function build($concrete) { @@ -964,10 +1032,14 @@ class Container implements ArrayAccess, ContainerContract // the value of the dependency, similarly to how we do this with scalars. catch (BindingResolutionException $e) { if ($parameter->isDefaultValueAvailable()) { + array_pop($this->with); + return $parameter->getDefaultValue(); } if ($parameter->isVariadic()) { + array_pop($this->with); + return []; } @@ -1032,6 +1104,26 @@ class Container implements ArrayAccess, ContainerContract throw new BindingResolutionException($message); } + /** + * Register a new before resolving callback for all types. + * + * @param \Closure|string $abstract + * @param \Closure|null $callback + * @return void + */ + public function beforeResolving($abstract, Closure $callback = null) + { + if (is_string($abstract)) { + $abstract = $this->getAlias($abstract); + } + + if ($abstract instanceof Closure && is_null($callback)) { + $this->globalBeforeResolvingCallbacks[] = $abstract; + } else { + $this->beforeResolvingCallbacks[$abstract][] = $callback; + } + } + /** * Register a new resolving callback. * @@ -1072,6 +1164,39 @@ class Container implements ArrayAccess, ContainerContract } } + /** + * Fire all of the before resolving callbacks. + * + * @param string $abstract + * @param array $parameters + * @return void + */ + protected function fireBeforeResolvingCallbacks($abstract, $parameters = []) + { + $this->fireBeforeCallbackArray($abstract, $parameters, $this->globalBeforeResolvingCallbacks); + + foreach ($this->beforeResolvingCallbacks as $type => $callbacks) { + if ($type === $abstract || is_subclass_of($abstract, $type)) { + $this->fireBeforeCallbackArray($abstract, $parameters, $callbacks); + } + } + } + + /** + * Fire an array of callbacks with an object. + * + * @param string $abstract + * @param array $parameters + * @param array $callbacks + * @return void + */ + protected function fireBeforeCallbackArray($abstract, $parameters, array $callbacks) + { + foreach ($callbacks as $callback) { + $callback($abstract, $parameters, $this); + } + } + /** * Fire all of the resolving callbacks. * @@ -1159,11 +1284,9 @@ class Container implements ArrayAccess, ContainerContract */ public function getAlias($abstract) { - if (! isset($this->aliases[$abstract])) { - return $abstract; - } - - return $this->getAlias($this->aliases[$abstract]); + return isset($this->aliases[$abstract]) + ? $this->getAlias($this->aliases[$abstract]) + : $abstract; } /** @@ -1174,9 +1297,7 @@ class Container implements ArrayAccess, ContainerContract */ protected function getExtenders($abstract) { - $abstract = $this->getAlias($abstract); - - return $this->extenders[$abstract] ?? []; + return $this->extenders[$this->getAlias($abstract)] ?? []; } /** @@ -1222,6 +1343,18 @@ class Container implements ArrayAccess, ContainerContract $this->instances = []; } + /** + * Clear all of the scoped instances from the container. + * + * @return void + */ + public function forgetScopedInstances() + { + foreach ($this->scopedInstances as $scoped) { + unset($this->instances[$scoped]); + } + } + /** * Flush the container of all bindings and resolved instances. * @@ -1234,6 +1367,7 @@ class Container implements ArrayAccess, ContainerContract $this->bindings = []; $this->instances = []; $this->abstractAliases = []; + $this->scopedInstances = []; } /** @@ -1267,6 +1401,7 @@ class Container implements ArrayAccess, ContainerContract * @param string $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->bound($key); @@ -1278,6 +1413,7 @@ class Container implements ArrayAccess, ContainerContract * @param string $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->make($key); @@ -1290,6 +1426,7 @@ class Container implements ArrayAccess, ContainerContract * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { $this->bind($key, $value instanceof Closure ? $value : function () use ($value) { @@ -1303,6 +1440,7 @@ class Container implements ArrayAccess, ContainerContract * @param string $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { unset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]); diff --git a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php index 5da6ccab3..1d15dcd3d 100644 --- a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php @@ -81,4 +81,18 @@ class ContextualBindingBuilder implements ContextualBindingBuilderContract return is_array($taggedServices) ? $taggedServices : iterator_to_array($taggedServices); }); } + + /** + * Specify the configuration item to bind as a primitive. + * + * @param string $key + * @param ?string $default + * @return void + */ + public function giveConfig($key, $default = null) + { + $this->give(function ($container) use ($key, $default) { + return $container->get('config')->get($key, $default); + }); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Container/RewindableGenerator.php b/vendor/laravel/framework/src/Illuminate/Container/RewindableGenerator.php index 675527d87..4ee7bb20c 100644 --- a/vendor/laravel/framework/src/Illuminate/Container/RewindableGenerator.php +++ b/vendor/laravel/framework/src/Illuminate/Container/RewindableGenerator.php @@ -39,6 +39,7 @@ class RewindableGenerator implements Countable, IteratorAggregate * * @return mixed */ + #[\ReturnTypeWillChange] public function getIterator() { return ($this->generator)(); @@ -49,6 +50,7 @@ class RewindableGenerator implements Countable, IteratorAggregate * * @return int */ + #[\ReturnTypeWillChange] public function count() { if (is_callable($count = $this->count)) { diff --git a/vendor/laravel/framework/src/Illuminate/Container/Util.php b/vendor/laravel/framework/src/Illuminate/Container/Util.php index 0b4bb1283..8f7e9171d 100644 --- a/vendor/laravel/framework/src/Illuminate/Container/Util.php +++ b/vendor/laravel/framework/src/Illuminate/Container/Util.php @@ -5,6 +5,9 @@ namespace Illuminate\Container; use Closure; use ReflectionNamedType; +/** + * @internal + */ class Util { /** @@ -50,7 +53,7 @@ class Util $type = $parameter->getType(); if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { - return; + return null; } $name = $type->getName(); diff --git a/vendor/laravel/framework/src/Illuminate/Container/composer.json b/vendor/laravel/framework/src/Illuminate/Container/composer.json index e65b8b84d..cf9316099 100755 --- a/vendor/laravel/framework/src/Illuminate/Container/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Container/composer.json @@ -14,8 +14,8 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", + "php": "^7.3|^8.0", + "illuminate/contracts": "^8.0", "psr/container": "^1.0" }, "provide": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBroker.php index 6bca9f36b..bbbe9b508 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBroker.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBroker.php @@ -45,9 +45,10 @@ interface PasswordBroker * Send a password reset link to a user. * * @param array $credentials + * @param \Closure|null $callback * @return string */ - public function sendResetLink(array $credentials); + public function sendResetLink(array $credentials, Closure $callback = null); /** * Reset the password for the given token. diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/StatefulGuard.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/StatefulGuard.php index eb6f8ddb3..faf1497d5 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/StatefulGuard.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/StatefulGuard.php @@ -35,7 +35,7 @@ interface StatefulGuard extends Guard * * @param mixed $id * @param bool $remember - * @return \Illuminate\Contracts\Auth\Authenticatable + * @return \Illuminate\Contracts\Auth\Authenticatable|bool */ public function loginUsingId($id, $remember = false); diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Broadcasting/HasBroadcastChannel.php b/vendor/laravel/framework/src/Illuminate/Contracts/Broadcasting/HasBroadcastChannel.php new file mode 100644 index 000000000..3b2c4018e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Broadcasting/HasBroadcastChannel.php @@ -0,0 +1,20 @@ +queued[$cookie->getName()][$cookie->getPath()] = $cookie; } + /** + * Queue a cookie to expire with the next response. + * + * @param string $name + * @param string|null $path + * @param string|null $domain + * @return void + */ + public function expire($name, $path = null, $domain = null) + { + $this->queue($this->forget($name, $path, $domain)); + } + /** * Remove a cookie from the queue. * @@ -214,4 +227,16 @@ class CookieJar implements JarContract { return Arr::flatten($this->queued); } + + /** + * Flush the cookies which have been queued for the next request. + * + * @return $this + */ + public function flushQueuedCookies() + { + $this->queued = []; + + return $this; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php index c28658847..4a116cfb3 100644 --- a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php +++ b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php @@ -76,7 +76,7 @@ class EncryptCookies protected function decrypt(Request $request) { foreach ($request->cookies as $key => $cookie) { - if ($this->isDisabled($key)) { + if ($this->isDisabled($key) || is_array($cookie)) { continue; } diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json index 6e3cb7208..fb587b754 100755 --- a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json @@ -14,11 +14,13 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4" }, "autoload": { "psr-4": { @@ -27,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Database/ClassMorphViolationException.php b/vendor/laravel/framework/src/Illuminate/Database/ClassMorphViolationException.php new file mode 100644 index 000000000..6594d2d90 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/ClassMorphViolationException.php @@ -0,0 +1,29 @@ +model = $class; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php index d8ec45c0c..7a49d7746 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php @@ -3,11 +3,23 @@ namespace Illuminate\Database\Concerns; use Illuminate\Container\Container; +use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\MultipleRecordsFoundException; +use Illuminate\Database\RecordsNotFoundException; +use Illuminate\Pagination\Cursor; +use Illuminate\Pagination\CursorPaginator; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\Paginator; +use Illuminate\Support\Collection; +use Illuminate\Support\LazyCollection; +use Illuminate\Support\Traits\Conditionable; +use InvalidArgumentException; +use RuntimeException; trait BuildsQueries { + use Conditionable; + /** * Chunk the results of the query. * @@ -48,12 +60,34 @@ trait BuildsQueries return true; } + /** + * Run a map over each item while chunking. + * + * @param callable $callback + * @param int $count + * @return \Illuminate\Support\Collection + */ + public function chunkMap(callable $callback, $count = 1000) + { + $collection = Collection::make(); + + $this->chunk($count, function ($items) use ($collection, $callback) { + $items->each(function ($item) use ($collection, $callback) { + $collection->push($callback($item)); + }); + }); + + return $collection; + } + /** * Execute a callback over each item while chunking. * * @param callable $callback * @param int $count * @return bool + * + * @throws \RuntimeException */ public function each(callable $callback, $count = 1000) { @@ -83,6 +117,8 @@ trait BuildsQueries $lastId = null; + $page = 1; + do { $clone = clone $this; @@ -100,13 +136,19 @@ trait BuildsQueries // On each chunk result set, we will pass them to the callback and then let the // developer take care of everything within the callback, which allows us to // keep the memory low for spinning through large result sets for working. - if ($callback($results) === false) { + if ($callback($results, $page) === false) { return false; } $lastId = $results->last()->{$alias}; + if ($lastId === null) { + throw new RuntimeException("The chunkById operation was aborted because the [{$alias}] column is not present in the query result."); + } + unset($results); + + $page++; } while ($countResults == $count); return true; @@ -123,15 +165,124 @@ trait BuildsQueries */ public function eachById(callable $callback, $count = 1000, $column = null, $alias = null) { - return $this->chunkById($count, function ($results) use ($callback) { + return $this->chunkById($count, function ($results, $page) use ($callback, $count) { foreach ($results as $key => $value) { - if ($callback($value, $key) === false) { + if ($callback($value, (($page - 1) * $count) + $key) === false) { return false; } } }, $column, $alias); } + /** + * Query lazily, by chunks of the given size. + * + * @param int $chunkSize + * @return \Illuminate\Support\LazyCollection + * + * @throws \InvalidArgumentException + */ + public function lazy($chunkSize = 1000) + { + if ($chunkSize < 1) { + throw new InvalidArgumentException('The chunk size should be at least 1'); + } + + $this->enforceOrderBy(); + + return LazyCollection::make(function () use ($chunkSize) { + $page = 1; + + while (true) { + $results = $this->forPage($page++, $chunkSize)->get(); + + foreach ($results as $result) { + yield $result; + } + + if ($results->count() < $chunkSize) { + return; + } + } + }); + } + + /** + * Query lazily, by chunking the results of a query by comparing IDs. + * + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @return \Illuminate\Support\LazyCollection + * + * @throws \InvalidArgumentException + */ + public function lazyById($chunkSize = 1000, $column = null, $alias = null) + { + return $this->orderedLazyById($chunkSize, $column, $alias); + } + + /** + * Query lazily, by chunking the results of a query by comparing IDs in descending order. + * + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @return \Illuminate\Support\LazyCollection + * + * @throws \InvalidArgumentException + */ + public function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null) + { + return $this->orderedLazyById($chunkSize, $column, $alias, true); + } + + /** + * Query lazily, by chunking the results of a query by comparing IDs in a given order. + * + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @param bool $descending + * @return \Illuminate\Support\LazyCollection + * + * @throws \InvalidArgumentException + */ + protected function orderedLazyById($chunkSize = 1000, $column = null, $alias = null, $descending = false) + { + if ($chunkSize < 1) { + throw new InvalidArgumentException('The chunk size should be at least 1'); + } + + $column = $column ?? $this->defaultKeyName(); + + $alias = $alias ?? $column; + + return LazyCollection::make(function () use ($chunkSize, $column, $alias, $descending) { + $lastId = null; + + while (true) { + $clone = clone $this; + + if ($descending) { + $results = $clone->forPageBeforeId($chunkSize, $lastId, $column)->get(); + } else { + $results = $clone->forPageAfterId($chunkSize, $lastId, $column)->get(); + } + + foreach ($results as $result) { + yield $result; + } + + if ($results->count() < $chunkSize) { + return; + } + + $lastId = $results->last()->{$alias}; + } + }); + } + /** * Execute the query and get the first result. * @@ -144,52 +295,143 @@ trait BuildsQueries } /** - * Apply the callback's query changes if the given "value" is true. + * Execute the query and get the first result if it's the sole matching record. * - * @param mixed $value - * @param callable $callback - * @param callable|null $default - * @return mixed|$this + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Model|object|static|null + * + * @throws \Illuminate\Database\RecordsNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException */ - public function when($value, $callback, $default = null) + public function sole($columns = ['*']) { - if ($value) { - return $callback($this, $value) ?: $this; - } elseif ($default) { - return $default($this, $value) ?: $this; + $result = $this->take(2)->get($columns); + + if ($result->isEmpty()) { + throw new RecordsNotFoundException; } - return $this; + if ($result->count() > 1) { + throw new MultipleRecordsFoundException; + } + + return $result->first(); } /** - * Pass the query to a given callback. + * Paginate the given query using a cursor paginator. * - * @param callable $callback - * @return $this + * @param int $perPage + * @param array $columns + * @param string $cursorName + * @param \Illuminate\Pagination\Cursor|string|null $cursor + * @return \Illuminate\Contracts\Pagination\CursorPaginator */ - public function tap($callback) + protected function paginateUsingCursor($perPage, $columns = ['*'], $cursorName = 'cursor', $cursor = null) { - return $this->when(true, $callback); + if (! $cursor instanceof Cursor) { + $cursor = is_string($cursor) + ? Cursor::fromEncoded($cursor) + : CursorPaginator::resolveCurrentCursor($cursorName, $cursor); + } + + $orders = $this->ensureOrderForCursorPagination(! is_null($cursor) && $cursor->pointsToPreviousItems()); + + if (! is_null($cursor)) { + $addCursorConditions = function (self $builder, $previousColumn, $i) use (&$addCursorConditions, $cursor, $orders) { + $unionBuilders = isset($builder->unions) ? collect($builder->unions)->pluck('query') : collect(); + + if (! is_null($previousColumn)) { + $builder->where( + $this->getOriginalColumnNameForCursorPagination($this, $previousColumn), + '=', + $cursor->parameter($previousColumn) + ); + + $unionBuilders->each(function ($unionBuilder) use ($previousColumn, $cursor) { + $unionBuilder->where( + $this->getOriginalColumnNameForCursorPagination($this, $previousColumn), + '=', + $cursor->parameter($previousColumn) + ); + + $this->addBinding($unionBuilder->getRawBindings()['where'], 'union'); + }); + } + + $builder->where(function (self $builder) use ($addCursorConditions, $cursor, $orders, $i, $unionBuilders) { + ['column' => $column, 'direction' => $direction] = $orders[$i]; + + $builder->where( + $this->getOriginalColumnNameForCursorPagination($this, $column), + $direction === 'asc' ? '>' : '<', + $cursor->parameter($column) + ); + + if ($i < $orders->count() - 1) { + $builder->orWhere(function (self $builder) use ($addCursorConditions, $column, $i) { + $addCursorConditions($builder, $column, $i + 1); + }); + } + + $unionBuilders->each(function ($unionBuilder) use ($column, $direction, $cursor, $i, $orders, $addCursorConditions) { + $unionBuilder->where(function ($unionBuilder) use ($column, $direction, $cursor, $i, $orders, $addCursorConditions) { + $unionBuilder->where( + $this->getOriginalColumnNameForCursorPagination($this, $column), + $direction === 'asc' ? '>' : '<', + $cursor->parameter($column) + ); + + if ($i < $orders->count() - 1) { + $unionBuilder->orWhere(function (self $builder) use ($addCursorConditions, $column, $i) { + $addCursorConditions($builder, $column, $i + 1); + }); + } + + $this->addBinding($unionBuilder->getRawBindings()['where'], 'union'); + }); + }); + }); + }; + + $addCursorConditions($this, null, 0); + } + + $this->limit($perPage + 1); + + return $this->cursorPaginator($this->get($columns), $perPage, $cursor, [ + 'path' => Paginator::resolveCurrentPath(), + 'cursorName' => $cursorName, + 'parameters' => $orders->pluck('column')->toArray(), + ]); } /** - * Apply the callback's query changes if the given "value" is false. + * Get the original column name of the given column, without any aliasing. * - * @param mixed $value - * @param callable $callback - * @param callable|null $default - * @return mixed|$this + * @param \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $builder + * @param string $parameter + * @return string */ - public function unless($value, $callback, $default = null) + protected function getOriginalColumnNameForCursorPagination($builder, string $parameter) { - if (! $value) { - return $callback($this, $value) ?: $this; - } elseif ($default) { - return $default($this, $value) ?: $this; + $columns = $builder instanceof Builder ? $builder->getQuery()->columns : $builder->columns; + + if (! is_null($columns)) { + foreach ($columns as $column) { + if (($position = stripos($column, ' as ')) !== false) { + $as = substr($column, $position, 4); + + [$original, $alias] = explode($as, $column); + + if ($parameter === $alias) { + return $original; + } + } + } } - return $this; + return $parameter; } /** @@ -224,4 +466,31 @@ trait BuildsQueries 'items', 'perPage', 'currentPage', 'options' )); } + + /** + * Create a new cursor paginator instance. + * + * @param \Illuminate\Support\Collection $items + * @param int $perPage + * @param \Illuminate\Pagination\Cursor $cursor + * @param array $options + * @return \Illuminate\Pagination\CursorPaginator + */ + protected function cursorPaginator($items, $perPage, $cursor, $options) + { + return Container::getInstance()->makeWith(CursorPaginator::class, compact( + 'items', 'perPage', 'cursor', 'options' + )); + } + + /** + * Pass the query to a given callback. + * + * @param callable $callback + * @return $this|mixed + */ + public function tap($callback) + { + return $this->when(true, $callback); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ExplainsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ExplainsQueries.php new file mode 100644 index 000000000..7168de1e5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ExplainsQueries.php @@ -0,0 +1,24 @@ +toSql(); + + $bindings = $this->getBindings(); + + $explanation = $this->getConnection()->select('EXPLAIN '.$sql, $bindings); + + return new Collection($explanation); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php index 1dd447529..fac70295d 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php @@ -3,6 +3,7 @@ namespace Illuminate\Database\Concerns; use Closure; +use RuntimeException; use Throwable; trait ManagesTransactions @@ -45,6 +46,10 @@ trait ManagesTransactions } $this->transactions = max(0, $this->transactions - 1); + + if ($this->transactions == 0) { + optional($this->transactionsManager)->commit($this->getName()); + } } catch (Throwable $e) { $this->handleCommitTransactionException( $e, $currentAttempt, $attempts @@ -78,6 +83,10 @@ trait ManagesTransactions $this->transactions > 1) { $this->transactions--; + optional($this->transactionsManager)->rollback( + $this->getName(), $this->transactions + ); + throw $e; } @@ -107,6 +116,10 @@ trait ManagesTransactions $this->transactions++; + optional($this->transactionsManager)->begin( + $this->getName(), $this->transactions + ); + $this->fireConnectionEvent('beganTransaction'); } @@ -180,6 +193,10 @@ trait ManagesTransactions $this->transactions = max(0, $this->transactions - 1); + if ($this->transactions == 0) { + optional($this->transactionsManager)->commit($this->getName()); + } + $this->fireConnectionEvent('committed'); } @@ -241,6 +258,10 @@ trait ManagesTransactions $this->transactions = $toLevel; + optional($this->transactionsManager)->rollback( + $this->getName(), $this->transactions + ); + $this->fireConnectionEvent('rollingBack'); } @@ -275,6 +296,10 @@ trait ManagesTransactions { if ($this->causedByLostConnection($e)) { $this->transactions = 0; + + optional($this->transactionsManager)->rollback( + $this->getName(), $this->transactions + ); } throw $e; @@ -289,4 +314,21 @@ trait ManagesTransactions { return $this->transactions; } + + /** + * Execute the callback after a transaction commits. + * + * @param callable $callback + * @return void + * + * @throws \RuntimeException + */ + public function afterCommit($callback) + { + if ($this->transactionsManager) { + return $this->transactionsManager->addCallback($callback); + } + + throw new RuntimeException('Transactions Manager has not been set.'); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php index 6c7569225..87c17f199 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connection.php @@ -5,6 +5,7 @@ namespace Illuminate\Database; use Closure; use DateTimeInterface; use Doctrine\DBAL\Connection as DoctrineConnection; +use Doctrine\DBAL\Types\Type; use Exception; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Database\Events\QueryExecuted; @@ -21,6 +22,7 @@ use Illuminate\Support\Arr; use LogicException; use PDO; use PDOStatement; +use RuntimeException; class Connection implements ConnectionInterface { @@ -49,6 +51,13 @@ class Connection implements ConnectionInterface */ protected $database; + /** + * The type of the connection. + * + * @var string|null + */ + protected $readWriteType; + /** * The table prefix for the connection. * @@ -112,13 +121,27 @@ class Connection implements ConnectionInterface */ protected $transactions = 0; + /** + * The transaction manager instance. + * + * @var \Illuminate\Database\DatabaseTransactionsManager + */ + protected $transactionsManager; + /** * Indicates if changes have been made to the database. * - * @var int + * @var bool */ protected $recordsModified = false; + /** + * Indicates if the connection should use the "write" PDO connection. + * + * @var bool + */ + protected $readOnWriteConnection = false; + /** * All of the queries run against the connection. * @@ -140,6 +163,13 @@ class Connection implements ConnectionInterface */ protected $pretending = false; + /** + * All of the callbacks that should be invoked before a query is executed. + * + * @var array + */ + protected $beforeExecutingCallbacks = []; + /** * The instance of Doctrine connection. * @@ -147,6 +177,13 @@ class Connection implements ConnectionInterface */ protected $doctrineConnection; + /** + * Type mappings that should be registered with new Doctrine connections. + * + * @var array + */ + protected $doctrineTypeMappings = []; + /** * The connection resolvers. * @@ -620,6 +657,10 @@ class Connection implements ConnectionInterface */ protected function run($query, $bindings, Closure $callback) { + foreach ($this->beforeExecutingCallbacks as $beforeExecutingCallback) { + $beforeExecutingCallback($query, $bindings, $this); + } + $this->reconnectIfMissingConnection(); $start = microtime(true); @@ -661,7 +702,7 @@ class Connection implements ConnectionInterface // run the SQL against the PDO connection. Then we can calculate the time it // took to execute and log the query SQL, bindings and time in our memory. try { - $result = $callback($query, $bindings); + return $callback($query, $bindings); } // If an exception occurs when attempting to run a query, we'll format the error @@ -672,8 +713,6 @@ class Connection implements ConnectionInterface $query, $this->prepareBindings($bindings), $e ); } - - return $result; } /** @@ -786,6 +825,21 @@ class Connection implements ConnectionInterface public function disconnect() { $this->setPdo(null)->setReadPdo(null); + + $this->doctrineConnection = null; + } + + /** + * Register a hook to be run just before a database query is executed. + * + * @param \Closure $callback + * @return $this + */ + public function beforeExecuting(Closure $callback) + { + $this->beforeExecutingCallbacks[] = $callback; + + return $this; } /** @@ -847,6 +901,16 @@ class Connection implements ConnectionInterface return new Expression($value); } + /** + * Determine if the database connection has modified any database records. + * + * @return bool + */ + public function hasModifiedRecords() + { + return $this->recordsModified; + } + /** * Indicate if any records have been modified. * @@ -860,6 +924,42 @@ class Connection implements ConnectionInterface } } + /** + * Set the record modification state. + * + * @param bool $value + * @return $this + */ + public function setRecordModificationState(bool $value) + { + $this->recordsModified = $value; + + return $this; + } + + /** + * Reset the record modification state. + * + * @return void + */ + public function forgetRecordModificationState() + { + $this->recordsModified = false; + } + + /** + * Indicate that the connection should use the write PDO connection for reads. + * + * @param bool $value + * @return $this + */ + public function useWriteConnectionWhenReading($value = true) + { + $this->readOnWriteConnection = $value; + + return $this; + } + /** * Is Doctrine available? * @@ -891,7 +991,13 @@ class Connection implements ConnectionInterface */ public function getDoctrineSchemaManager() { - return $this->getDoctrineDriver()->getSchemaManager($this->getDoctrineConnection()); + $connection = $this->getDoctrineConnection(); + + // Doctrine v2 expects one parameter while v3 expects two. 2nd will be ignored on v2... + return $this->getDoctrineDriver()->getSchemaManager( + $connection, + $connection->getDatabasePlatform() + ); } /** @@ -907,14 +1013,46 @@ class Connection implements ConnectionInterface $this->doctrineConnection = new DoctrineConnection(array_filter([ 'pdo' => $this->getPdo(), 'dbname' => $this->getDatabaseName(), - 'driver' => $driver->getName(), + 'driver' => method_exists($driver, 'getName') ? $driver->getName() : null, 'serverVersion' => $this->getConfig('server_version'), ]), $driver); + + foreach ($this->doctrineTypeMappings as $name => $type) { + $this->doctrineConnection + ->getDatabasePlatform() + ->registerDoctrineTypeMapping($type, $name); + } } return $this->doctrineConnection; } + /** + * Register a custom Doctrine mapping type. + * + * @param string $class + * @param string $name + * @param string $type + * @return void + * + * @throws \Doctrine\DBAL\DBALException + * @throws \RuntimeException + */ + public function registerDoctrineType(string $class, string $name, string $type): void + { + if (! $this->isDoctrineAvailable()) { + throw new RuntimeException( + 'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).' + ); + } + + if (! Type::hasType($name)) { + Type::addType($name, $class); + } + + $this->doctrineTypeMappings[$name] = $type; + } + /** * Get the current PDO connection. * @@ -950,7 +1088,8 @@ class Connection implements ConnectionInterface return $this->getPdo(); } - if ($this->recordsModified && $this->getConfig('sticky')) { + if ($this->readOnWriteConnection || + ($this->recordsModified && $this->getConfig('sticky'))) { return $this->getPdo(); } @@ -1022,6 +1161,16 @@ class Connection implements ConnectionInterface return $this->getConfig('name'); } + /** + * Get the database connection full name. + * + * @return string|null + */ + public function getNameWithReadWriteType() + { + return $this->getName().($this->readWriteType ? '::'.$this->readWriteType : ''); + } + /** * Get an option from the configuration options. * @@ -1145,6 +1294,29 @@ class Connection implements ConnectionInterface $this->events = null; } + /** + * Set the transaction manager instance on the connection. + * + * @param \Illuminate\Database\DatabaseTransactionsManager $manager + * @return $this + */ + public function setTransactionManager($manager) + { + $this->transactionsManager = $manager; + + return $this; + } + + /** + * Unset the transaction manager for this connection. + * + * @return void + */ + public function unsetTransactionManager() + { + $this->transactionsManager = null; + } + /** * Determine if the connection is in a "dry run". * @@ -1228,6 +1400,19 @@ class Connection implements ConnectionInterface return $this; } + /** + * Set the read / write type of the connection. + * + * @param string|null $readWriteType + * @return $this + */ + public function setReadWriteType($readWriteType) + { + $this->readWriteType = $readWriteType; + + return $this; + } + /** * Get the table prefix for the connection. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php index c7e24b1ab..00b23952a 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php +++ b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php @@ -160,4 +160,11 @@ interface ConnectionInterface * @return array */ public function pretend(Closure $callback); + + /** + * Get the name of the connected database. + * + * @return string + */ + public function getDatabaseName(); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php index a3ca25e96..a507d9ac3 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php @@ -33,6 +33,8 @@ class PostgresConnector extends Connector implements ConnectorInterface $this->getDsn($config), $config, $this->getOptions($config) ); + $this->configureIsolationLevel($connection, $config); + $this->configureEncoding($connection, $config); // Next, we will check to see if a timezone has been specified in this config @@ -52,6 +54,20 @@ class PostgresConnector extends Connector implements ConnectorInterface return $connection; } + /** + * Set the connection transaction isolation level. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureIsolationLevel($connection, array $config) + { + if (isset($config['isolation_level'])) { + $connection->prepare("set session characteristics as transaction isolation level {$config['isolation_level']}")->execute(); + } + } + /** * Set the connection character set and collation. * @@ -146,7 +162,7 @@ class PostgresConnector extends Connector implements ConnectorInterface $host = isset($host) ? "host={$host};" : ''; - $dsn = "pgsql:{$host}dbname={$database}"; + $dsn = "pgsql:{$host}dbname='{$database}'"; // If a port was specified, we will add it to this Postgres DSN connections // format. Once we have done that we are ready to return this connection diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/DbCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/DbCommand.php new file mode 100644 index 000000000..c2c459352 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/DbCommand.php @@ -0,0 +1,219 @@ +getConnection(); + + (new Process( + array_merge([$this->getCommand($connection)], $this->commandArguments($connection)), + null, + $this->commandEnvironment($connection) + ))->setTimeout(null)->setTty(true)->mustRun(function ($type, $buffer) { + $this->output->write($buffer); + }); + + return 0; + } + + /** + * Get the database connection configuration. + * + * @return array + * + * @throws \UnexpectedValueException + */ + public function getConnection() + { + $connection = $this->laravel['config']['database.connections.'. + (($db = $this->argument('connection')) ?? $this->laravel['config']['database.default']) + ]; + + if (empty($connection)) { + throw new UnexpectedValueException("Invalid database connection [{$db}]."); + } + + if (! empty($connection['url'])) { + $connection = (new ConfigurationUrlParser)->parseConfiguration($connection); + } + + if ($this->option('read')) { + if (is_array($connection['read']['host'])) { + $connection['read']['host'] = $connection['read']['host'][0]; + } + + $connection = array_merge($connection, $connection['read']); + } elseif ($this->option('write')) { + if (is_array($connection['write']['host'])) { + $connection['write']['host'] = $connection['write']['host'][0]; + } + + $connection = array_merge($connection, $connection['write']); + } + + return $connection; + } + + /** + * Get the arguments for the database client command. + * + * @param array $connection + * @return array + */ + public function commandArguments(array $connection) + { + $driver = ucfirst($connection['driver']); + + return $this->{"get{$driver}Arguments"}($connection); + } + + /** + * Get the environment variables for the database client command. + * + * @param array $connection + * @return array|null + */ + public function commandEnvironment(array $connection) + { + $driver = ucfirst($connection['driver']); + + if (method_exists($this, "get{$driver}Environment")) { + return $this->{"get{$driver}Environment"}($connection); + } + + return null; + } + + /** + * Get the database client command to run. + * + * @param array $connection + * @return string + */ + public function getCommand(array $connection) + { + return [ + 'mysql' => 'mysql', + 'pgsql' => 'psql', + 'sqlite' => 'sqlite3', + 'sqlsrv' => 'sqlcmd', + ][$connection['driver']]; + } + + /** + * Get the arguments for the MySQL CLI. + * + * @param array $connection + * @return array + */ + protected function getMysqlArguments(array $connection) + { + return array_merge([ + '--host='.$connection['host'], + '--port='.$connection['port'], + '--user='.$connection['username'], + ], $this->getOptionalArguments([ + 'password' => '--password='.$connection['password'], + 'unix_socket' => '--socket='.($connection['unix_socket'] ?? ''), + 'charset' => '--default-character-set='.($connection['charset'] ?? ''), + ], $connection), [$connection['database']]); + } + + /** + * Get the arguments for the Postgres CLI. + * + * @param array $connection + * @return array + */ + protected function getPgsqlArguments(array $connection) + { + return [$connection['database']]; + } + + /** + * Get the arguments for the SQLite CLI. + * + * @param array $connection + * @return array + */ + protected function getSqliteArguments(array $connection) + { + return [$connection['database']]; + } + + /** + * Get the arguments for the SQL Server CLI. + * + * @param array $connection + * @return array + */ + protected function getSqlsrvArguments(array $connection) + { + return array_merge(...$this->getOptionalArguments([ + 'database' => ['-d', $connection['database']], + 'username' => ['-U', $connection['username']], + 'password' => ['-P', $connection['password']], + 'host' => ['-S', 'tcp:'.$connection['host'] + .($connection['port'] ? ','.$connection['port'] : ''), ], + ], $connection)); + } + + /** + * Get the environment variables for the Postgres CLI. + * + * @param array $connection + * @return array|null + */ + protected function getPgsqlEnvironment(array $connection) + { + return array_merge(...$this->getOptionalArguments([ + 'username' => ['PGUSER' => $connection['username']], + 'host' => ['PGHOST' => $connection['host']], + 'port' => ['PGPORT' => $connection['port']], + 'password' => ['PGPASSWORD' => $connection['password']], + ], $connection)); + } + + /** + * Get the optional arguments based on the connection configuration. + * + * @param array $args + * @param array $connection + * @return array + */ + protected function getOptionalArguments(array $args, array $connection) + { + return array_values(array_filter($args, function ($key) use ($connection) { + return ! empty($connection[$key]); + }, ARRAY_FILTER_USE_KEY)); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/DumpCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/DumpCommand.php new file mode 100644 index 000000000..fe73fb2af --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/DumpCommand.php @@ -0,0 +1,86 @@ +connection($database = $this->input->getOption('database')); + + $this->schemaState($connection)->dump( + $connection, $path = $this->path($connection) + ); + + $dispatcher->dispatch(new SchemaDumped($connection, $path)); + + $this->info('Database schema dumped successfully.'); + + if ($this->option('prune')) { + (new Filesystem)->deleteDirectory( + database_path('migrations'), $preserve = false + ); + + $this->info('Migrations pruned successfully.'); + } + } + + /** + * Create a schema state instance for the given connection. + * + * @param \Illuminate\Database\Connection $connection + * @return mixed + */ + protected function schemaState(Connection $connection) + { + return $connection->getSchemaState() + ->withMigrationTable($connection->getTablePrefix().Config::get('database.migrations', 'migrations')) + ->handleOutputUsing(function ($type, $buffer) { + $this->output->write($buffer); + }); + } + + /** + * Get the path that the dump should be written to. + * + * @param \Illuminate\Database\Connection $connection + */ + protected function path(Connection $connection) + { + return tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.dump'), function ($path) { + (new Filesystem)->ensureDirectoryExists(dirname($path)); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php index 3c0951588..6233fe29f 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php @@ -3,6 +3,7 @@ namespace Illuminate\Database\Console\Factories; use Illuminate\Console\GeneratorCommand; +use Illuminate\Support\Str; use Symfony\Component\Console\Input\InputOption; class FactoryMakeCommand extends GeneratorCommand @@ -59,19 +60,30 @@ class FactoryMakeCommand extends GeneratorCommand */ protected function buildClass($name) { + $factory = class_basename(Str::ucfirst(str_replace('Factory', '', $name))); + $namespaceModel = $this->option('model') - ? $this->qualifyClass($this->option('model')) - : trim($this->rootNamespace(), '\\').'\\Model'; + ? $this->qualifyModel($this->option('model')) + : $this->qualifyModel($this->guessModelName($name)); $model = class_basename($namespaceModel); + if (Str::startsWith($namespaceModel, $this->rootNamespace().'Models')) { + $namespace = Str::beforeLast('Database\\Factories\\'.Str::after($namespaceModel, $this->rootNamespace().'Models\\'), '\\'); + } else { + $namespace = 'Database\\Factories'; + } + $replace = [ + '{{ factoryNamespace }}' => $namespace, 'NamespacedDummyModel' => $namespaceModel, '{{ namespacedModel }}' => $namespaceModel, '{{namespacedModel}}' => $namespaceModel, 'DummyModel' => $model, '{{ model }}' => $model, '{{model}}' => $model, + '{{ factory }}' => $factory, + '{{factory}}' => $factory, ]; return str_replace( @@ -87,11 +99,34 @@ class FactoryMakeCommand extends GeneratorCommand */ protected function getPath($name) { - $name = str_replace( - ['\\', '/'], '', $this->argument('name') - ); + $name = (string) Str::of($name)->replaceFirst($this->rootNamespace(), '')->finish('Factory'); - return $this->laravel->databasePath()."/factories/{$name}.php"; + return $this->laravel->databasePath().'/factories/'.str_replace('\\', '/', $name).'.php'; + } + + /** + * Guess the model name from the Factory name or return a default model name. + * + * @param string $name + * @return string + */ + protected function guessModelName($name) + { + if (Str::endsWith($name, 'Factory')) { + $name = substr($name, 0, -7); + } + + $modelName = $this->qualifyModel(Str::after($name, $this->rootNamespace())); + + if (class_exists($modelName)) { + return $modelName; + } + + if (is_dir(app_path('Models/'))) { + return $this->rootNamespace().'Models\Model'; + } + + return $this->rootNamespace().'Model'; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub index 5e1b10245..3e00f3659 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub @@ -1,12 +1,20 @@ define({{ model }}::class, function (Faker $faker) { - return [ - // - ]; -}); +class {{ factory }}Factory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + // + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php index 29021e0c3..7bfba0d78 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php @@ -4,6 +4,8 @@ namespace Illuminate\Database\Console\Migrations; use Illuminate\Console\Command; use Illuminate\Console\ConfirmableTrait; +use Illuminate\Contracts\Events\Dispatcher; +use Illuminate\Database\Events\DatabaseRefreshed; use Symfony\Component\Console\Input\InputOption; class FreshCommand extends Command @@ -48,10 +50,17 @@ class FreshCommand extends Command '--database' => $database, '--path' => $this->input->getOption('path'), '--realpath' => $this->input->getOption('realpath'), + '--schema-path' => $this->input->getOption('schema-path'), '--force' => true, '--step' => $this->option('step'), ])); + if ($this->laravel->bound(Dispatcher::class)) { + $this->laravel[Dispatcher::class]->dispatch( + new DatabaseRefreshed + ); + } + if ($this->needsSeeding()) { $this->runSeeder($database); } @@ -79,7 +88,7 @@ class FreshCommand extends Command { $this->call('db:seed', array_filter([ '--database' => $database, - '--class' => $this->option('seeder') ?: 'DatabaseSeeder', + '--class' => $this->option('seeder') ?: 'Database\\Seeders\\DatabaseSeeder', '--force' => true, ])); } @@ -98,6 +107,7 @@ class FreshCommand extends Command ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) to the migrations files to be executed'], ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'], + ['schema-path', null, InputOption::VALUE_OPTIONAL, 'The path to a schema dump file'], ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'], ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'], ['step', null, InputOption::VALUE_NONE, 'Force the migrations to be run so they can be rolled back individually'], diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php index 688b67da8..ea379e3f6 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php @@ -3,7 +3,10 @@ namespace Illuminate\Database\Console\Migrations; use Illuminate\Console\ConfirmableTrait; +use Illuminate\Contracts\Events\Dispatcher; +use Illuminate\Database\Events\SchemaLoaded; use Illuminate\Database\Migrations\Migrator; +use Illuminate\Database\SqlServerConnection; class MigrateCommand extends BaseCommand { @@ -18,8 +21,10 @@ class MigrateCommand extends BaseCommand {--force : Force the operation to run when in production} {--path=* : The path(s) to the migrations files to be executed} {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths} + {--schema-path= : The path to a schema dump file} {--pretend : Dump the SQL queries that would be run} {--seed : Indicates if the seed task should be re-run} + {--seeder= : The class name of the root seeder} {--step : Force the migrations to be run so they can be rolled back individually}'; /** @@ -36,17 +41,26 @@ class MigrateCommand extends BaseCommand */ protected $migrator; + /** + * The event dispatcher instance. + * + * @var \Illuminate\Contracts\Events\Dispatcher + */ + protected $dispatcher; + /** * Create a new migration command instance. * * @param \Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher * @return void */ - public function __construct(Migrator $migrator) + public function __construct(Migrator $migrator, Dispatcher $dispatcher) { parent::__construct(); $this->migrator = $migrator; + $this->dispatcher = $dispatcher; } /** @@ -76,7 +90,10 @@ class MigrateCommand extends BaseCommand // seed task to re-populate the database, which is convenient when adding // a migration and a seed at the same time, as it is only this command. if ($this->option('seed') && ! $this->option('pretend')) { - $this->call('db:seed', ['--force' => true]); + $this->call('db:seed', [ + '--class' => $this->option('seeder') ?: 'Database\\Seeders\\DatabaseSeeder', + '--force' => true, + ]); } }); @@ -95,5 +112,70 @@ class MigrateCommand extends BaseCommand '--database' => $this->option('database'), ])); } + + if (! $this->migrator->hasRunAnyMigrations() && ! $this->option('pretend')) { + $this->loadSchemaState(); + } + } + + /** + * Load the schema state to seed the initial database schema structure. + * + * @return void + */ + protected function loadSchemaState() + { + $connection = $this->migrator->resolveConnection($this->option('database')); + + // First, we will make sure that the connection supports schema loading and that + // the schema file exists before we proceed any further. If not, we will just + // continue with the standard migration operation as normal without errors. + if ($connection instanceof SqlServerConnection || + ! is_file($path = $this->schemaPath($connection))) { + return; + } + + $this->line('Loading stored database schema: '.$path); + + $startTime = microtime(true); + + // Since the schema file will create the "migrations" table and reload it to its + // proper state, we need to delete it here so we don't get an error that this + // table already exists when the stored database schema file gets executed. + $this->migrator->deleteRepository(); + + $connection->getSchemaState()->handleOutputUsing(function ($type, $buffer) { + $this->output->write($buffer); + })->load($path); + + $runTime = number_format((microtime(true) - $startTime) * 1000, 2); + + // Finally, we will fire an event that this schema has been loaded so developers + // can perform any post schema load tasks that are necessary in listeners for + // this event, which may seed the database tables with some necessary data. + $this->dispatcher->dispatch( + new SchemaLoaded($connection, $path) + ); + + $this->line('Loaded stored database schema. ('.$runTime.'ms)'); + } + + /** + * Get the path to the stored schema for the given connection. + * + * @param \Illuminate\Database\Connection $connection + * @return string + */ + protected function schemaPath($connection) + { + if ($this->option('schema-path')) { + return $this->option('schema-path'); + } + + if (file_exists($path = database_path('schema/'.$connection->getName().'-schema.dump'))) { + return $path; + } + + return database_path('schema/'.$connection->getName().'-schema.sql'); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php index 2c2a71155..95c3a206e 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php @@ -132,14 +132,4 @@ class MigrateMakeCommand extends BaseCommand return parent::getMigrationPath(); } - - /** - * Determine if the given path(s) are pre-resolved "real" paths. - * - * @return bool - */ - protected function usingRealPath() - { - return $this->input->hasOption('realpath') && $this->option('realpath'); - } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php index 9a799c521..2073cd997 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php @@ -4,6 +4,8 @@ namespace Illuminate\Database\Console\Migrations; use Illuminate\Console\Command; use Illuminate\Console\ConfirmableTrait; +use Illuminate\Contracts\Events\Dispatcher; +use Illuminate\Database\Events\DatabaseRefreshed; use Symfony\Component\Console\Input\InputOption; class RefreshCommand extends Command @@ -63,6 +65,12 @@ class RefreshCommand extends Command '--force' => true, ])); + if ($this->laravel->bound(Dispatcher::class)) { + $this->laravel[Dispatcher::class]->dispatch( + new DatabaseRefreshed + ); + } + if ($this->needsSeeding()) { $this->runSeeder($database); } @@ -126,7 +134,7 @@ class RefreshCommand extends Command { $this->call('db:seed', array_filter([ '--database' => $database, - '--class' => $this->option('seeder') ?: 'DatabaseSeeder', + '--class' => $this->option('seeder') ?: 'Database\\Seeders\\DatabaseSeeder', '--force' => true, ])); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php index 21b532979..1f2babbc8 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php @@ -67,8 +67,6 @@ class ResetCommand extends BaseCommand $this->getMigrationPaths(), $this->option('pretend') ); }); - - return 0; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php new file mode 100644 index 000000000..b69aa8684 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php @@ -0,0 +1,165 @@ +models(); + + if ($models->isEmpty()) { + $this->info('No prunable models found.'); + + return; + } + + if ($this->option('pretend')) { + $models->each(function ($model) { + $this->pretendToPrune($model); + }); + + return; + } + + $events->listen(ModelsPruned::class, function ($event) { + $this->info("{$event->count} [{$event->model}] records have been pruned."); + }); + + $models->each(function ($model) { + $instance = new $model; + + $chunkSize = property_exists($instance, 'prunableChunkSize') + ? $instance->prunableChunkSize + : $this->option('chunk'); + + $total = $this->isPrunable($model) + ? $instance->pruneAll($chunkSize) + : 0; + + if ($total == 0) { + $this->info("No prunable [$model] records found."); + } + }); + + $events->forget(ModelsPruned::class); + } + + /** + * Determine the models that should be pruned. + * + * @return \Illuminate\Support\Collection + */ + protected function models() + { + if (! empty($models = $this->option('model'))) { + return collect($models)->filter(function ($model) { + return class_exists($model); + })->values(); + } + + $except = $this->option('except'); + + if (! empty($models) && ! empty($except)) { + throw new InvalidArgumentException('The --models and --except options cannot be combined.'); + } + + return collect((new Finder)->in($this->getDefaultPath())->files()->name('*.php')) + ->map(function ($model) { + $namespace = $this->laravel->getNamespace(); + + return $namespace.str_replace( + ['/', '.php'], + ['\\', ''], + Str::after($model->getRealPath(), realpath(app_path()).DIRECTORY_SEPARATOR) + ); + })->when(! empty($except), function ($models) use ($except) { + return $models->reject(function ($model) use ($except) { + return in_array($model, $except); + }); + })->filter(function ($model) { + return $this->isPrunable($model); + })->filter(function ($model) { + return class_exists($model); + })->values(); + } + + /** + * Get the default path where models are located. + * + * @return string + */ + protected function getDefaultPath() + { + return app_path('Models'); + } + + /** + * Determine if the given model class is prunable. + * + * @param string $model + * @return bool + */ + protected function isPrunable($model) + { + $uses = class_uses_recursive($model); + + return in_array(Prunable::class, $uses) || in_array(MassPrunable::class, $uses); + } + + /** + * Display how many models will be pruned. + * + * @param string $model + * @return void + */ + protected function pretendToPrune($model) + { + $instance = new $model; + + $count = $instance->prunable() + ->when(in_array(SoftDeletes::class, class_uses_recursive(get_class($instance))), function ($query) { + $query->withTrashed(); + })->count(); + + if ($count === 0) { + $this->info("No prunable [$model] records found."); + } else { + $this->info("{$count} [{$model}] records will be pruned."); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php index 2e4fdd709..058e545c2 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php @@ -6,6 +6,7 @@ use Illuminate\Console\Command; use Illuminate\Console\ConfirmableTrait; use Illuminate\Database\ConnectionResolverInterface as Resolver; use Illuminate\Database\Eloquent\Model; +use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; class SeedCommand extends Command @@ -81,9 +82,20 @@ class SeedCommand extends Command */ protected function getSeeder() { - $class = $this->laravel->make($this->input->getOption('class')); + $class = $this->input->getArgument('class') ?? $this->input->getOption('class'); - return $class->setContainer($this->laravel)->setCommand($this); + if (strpos($class, '\\') === false) { + $class = 'Database\\Seeders\\'.$class; + } + + if ($class === 'Database\\Seeders\\DatabaseSeeder' && + ! class_exists($class)) { + $class = 'DatabaseSeeder'; + } + + return $this->laravel->make($class) + ->setContainer($this->laravel) + ->setCommand($this); } /** @@ -98,6 +110,18 @@ class SeedCommand extends Command return $database ?: $this->laravel['config']['database.default']; } + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['class', InputArgument::OPTIONAL, 'The class name of the root seeder', null], + ]; + } + /** * Get the console command options. * @@ -106,10 +130,8 @@ class SeedCommand extends Command protected function getOptions() { return [ - ['class', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder', 'DatabaseSeeder'], - + ['class', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder', 'Database\\Seeders\\DatabaseSeeder'], ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to seed'], - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'], ]; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php index 62ec1d46a..aef7a77e6 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php @@ -3,8 +3,6 @@ namespace Illuminate\Database\Console\Seeds; use Illuminate\Console\GeneratorCommand; -use Illuminate\Filesystem\Filesystem; -use Illuminate\Support\Composer; class SeederMakeCommand extends GeneratorCommand { @@ -29,27 +27,6 @@ class SeederMakeCommand extends GeneratorCommand */ protected $type = 'Seeder'; - /** - * The Composer instance. - * - * @var \Illuminate\Support\Composer - */ - protected $composer; - - /** - * Create a new command instance. - * - * @param \Illuminate\Filesystem\Filesystem $files - * @param \Illuminate\Support\Composer $composer - * @return void - */ - public function __construct(Filesystem $files, Composer $composer) - { - parent::__construct($files); - - $this->composer = $composer; - } - /** * Execute the console command. * @@ -58,8 +35,6 @@ class SeederMakeCommand extends GeneratorCommand public function handle() { parent::handle(); - - $this->composer->dumpAutoloads(); } /** @@ -80,7 +55,7 @@ class SeederMakeCommand extends GeneratorCommand */ protected function resolveStubPath($stub) { - return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + return is_file($customPath = $this->laravel->basePath(trim($stub, '/'))) ? $customPath : __DIR__.$stub; } @@ -93,7 +68,11 @@ class SeederMakeCommand extends GeneratorCommand */ protected function getPath($name) { - return $this->laravel->databasePath().'/seeds/'.$name.'.php'; + if (is_dir($this->laravel->databasePath().'/seeds')) { + return $this->laravel->databasePath().'/seeds/'.$name.'.php'; + } else { + return $this->laravel->databasePath().'/seeders/'.$name.'.php'; + } } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub index ee4d85d51..5662969c7 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub @@ -1,5 +1,7 @@ getName(); + + switch ($name) { + case 'mysql': + case 'mysql2': + return $this->getMySqlPlatformSQLDeclaration($fieldDeclaration); + + case 'postgresql': + case 'pgsql': + case 'postgres': + return $this->getPostgresPlatformSQLDeclaration($fieldDeclaration); + + case 'mssql': + return $this->getSqlServerPlatformSQLDeclaration($fieldDeclaration); + + case 'sqlite': + case 'sqlite3': + return $this->getSQLitePlatformSQLDeclaration($fieldDeclaration); + + default: + throw new RuntimeException('Invalid platform: '.$name); + } + } + + /** + * Get the SQL declaration for MySQL. + * + * @param array $fieldDeclaration + * @return string + */ + protected function getMySqlPlatformSQLDeclaration(array $fieldDeclaration) + { + $columnType = 'TIMESTAMP'; + + if ($fieldDeclaration['precision']) { + $columnType = 'TIMESTAMP('.$fieldDeclaration['precision'].')'; + } + + $notNull = $fieldDeclaration['notnull'] ?? false; + + if (! $notNull) { + return $columnType.' NULL'; + } + + return $columnType; + } + + /** + * Get the SQL declaration for PostgreSQL. + * + * @param array $fieldDeclaration + * @return string + */ + protected function getPostgresPlatformSQLDeclaration(array $fieldDeclaration) + { + return 'TIMESTAMP('.(int) $fieldDeclaration['precision'].')'; + } + + /** + * Get the SQL declaration for SQL Server. + * + * @param array $fieldDeclaration + * @return string + */ + protected function getSqlServerPlatformSQLDeclaration(array $fieldDeclaration) + { + return $fieldDeclaration['precision'] ?? false + ? 'DATETIME2('.$fieldDeclaration['precision'].')' + : 'DATETIME'; + } + + /** + * Get the SQL declaration for SQLite. + * + * @param array $fieldDeclaration + * @return string + */ + protected function getSQLitePlatformSQLDeclaration(array $fieldDeclaration) + { + return 'DATETIME'; + } + + /** + * {@inheritdoc} + * + * @return string + */ + public function getName() + { + return 'timestamp'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php index d558d1665..cb823bfa3 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php @@ -2,12 +2,14 @@ namespace Illuminate\Database; +use Doctrine\DBAL\Types\Type; use Illuminate\Database\Connectors\ConnectionFactory; use Illuminate\Support\Arr; use Illuminate\Support\ConfigurationUrlParser; use Illuminate\Support\Str; use InvalidArgumentException; use PDO; +use RuntimeException; /** * @mixin \Illuminate\Database\Connection @@ -49,6 +51,13 @@ class DatabaseManager implements ConnectionResolverInterface */ protected $reconnector; + /** + * The custom Doctrine column types. + * + * @var array + */ + protected $doctrineTypes = []; + /** * Create a new database manager instance. * @@ -62,7 +71,7 @@ class DatabaseManager implements ConnectionResolverInterface $this->factory = $factory; $this->reconnector = function ($connection) { - $this->reconnect($connection->getName()); + $this->reconnect($connection->getNameWithReadWriteType()); }; } @@ -165,7 +174,7 @@ class DatabaseManager implements ConnectionResolverInterface */ protected function configure(Connection $connection, $type) { - $connection = $this->setPdoForType($connection, $type); + $connection = $this->setPdoForType($connection, $type)->setReadWriteType($type); // First we'll set the fetch mode and a few other dependencies of the database // connection. This method basically just configures and prepares it to get @@ -174,11 +183,17 @@ class DatabaseManager implements ConnectionResolverInterface $connection->setEventDispatcher($this->app['events']); } + if ($this->app->bound('db.transactions')) { + $connection->setTransactionManager($this->app['db.transactions']); + } + // Here we'll set a reconnector callback. This reconnector can be any callable // so we will set a Closure to reconnect from this manager with the name of // the connection, which will allow us to reconnect from the connections. $connection->setReconnector($this->reconnector); + $this->registerConfiguredDoctrineTypes($connection); + return $connection; } @@ -200,6 +215,49 @@ class DatabaseManager implements ConnectionResolverInterface return $connection; } + /** + * Register custom Doctrine types with the connection. + * + * @param \Illuminate\Database\Connection $connection + * @return void + */ + protected function registerConfiguredDoctrineTypes(Connection $connection): void + { + foreach ($this->app['config']->get('database.dbal.types', []) as $name => $class) { + $this->registerDoctrineType($class, $name, $name); + } + + foreach ($this->doctrineTypes as $name => [$type, $class]) { + $connection->registerDoctrineType($class, $name, $type); + } + } + + /** + * Register a custom Doctrine type. + * + * @param string $class + * @param string $name + * @param string $type + * @return void + * + * @throws \Doctrine\DBAL\DBALException + * @throws \RuntimeException + */ + public function registerDoctrineType(string $class, string $name, string $type): void + { + if (! class_exists('Doctrine\DBAL\Connection')) { + throw new RuntimeException( + 'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).' + ); + } + + if (! Type::hasType($name)) { + Type::addType($name, $class); + } + + $this->doctrineTypes[$name] = [$type, $class]; + } + /** * Disconnect from the given database and remove from local cache. * @@ -271,11 +329,15 @@ class DatabaseManager implements ConnectionResolverInterface */ protected function refreshPdoConnections($name) { - $fresh = $this->makeConnection($name); + [$database, $type] = $this->parseConnectionName($name); + + $fresh = $this->configure( + $this->makeConnection($database), $type + ); return $this->connections[$name] - ->setPdo($fresh->getRawPdo()) - ->setReadPdo($fresh->getRawReadPdo()); + ->setPdo($fresh->getRawPdo()) + ->setReadPdo($fresh->getRawReadPdo()); } /** @@ -355,6 +417,19 @@ class DatabaseManager implements ConnectionResolverInterface $this->reconnector = $reconnector; } + /** + * Set the application instance used by the manager. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return $this + */ + public function setApplication($app) + { + $this->app = $app; + + return $this; + } + /** * Dynamically pass methods to the default connection. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php index 3008e5b6b..4b6521b70 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php @@ -6,7 +6,6 @@ use Faker\Factory as FakerFactory; use Faker\Generator as FakerGenerator; use Illuminate\Contracts\Queue\EntityResolver; use Illuminate\Database\Connectors\ConnectionFactory; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\QueueEntityResolver; use Illuminate\Support\ServiceProvider; @@ -42,9 +41,7 @@ class DatabaseServiceProvider extends ServiceProvider Model::clearBootedModels(); $this->registerConnectionServices(); - $this->registerEloquentFactory(); - $this->registerQueueableEntityResolver(); } @@ -72,6 +69,10 @@ class DatabaseServiceProvider extends ServiceProvider $this->app->bind('db.connection', function ($app) { return $app['db']->connection(); }); + + $this->app->singleton('db.transactions', function ($app) { + return new DatabaseTransactionsManager; + }); } /** @@ -92,12 +93,6 @@ class DatabaseServiceProvider extends ServiceProvider return static::$fakers[$locale]; }); - - $this->app->singleton(EloquentFactory::class, function ($app) { - return EloquentFactory::construct( - $app->make(FakerGenerator::class), $this->app->databasePath('factories') - ); - }); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseTransactionRecord.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseTransactionRecord.php new file mode 100755 index 000000000..3259552dc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseTransactionRecord.php @@ -0,0 +1,73 @@ +connection = $connection; + $this->level = $level; + } + + /** + * Register a callback to be executed after committing. + * + * @param callable $callback + * @return void + */ + public function addCallback($callback) + { + $this->callbacks[] = $callback; + } + + /** + * Execute all of the callbacks. + * + * @return void + */ + public function executeCallbacks() + { + foreach ($this->callbacks as $callback) { + call_user_func($callback); + } + } + + /** + * Get all of the callbacks. + * + * @return array + */ + public function getCallbacks() + { + return $this->callbacks; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseTransactionsManager.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseTransactionsManager.php new file mode 100755 index 000000000..add2f7c1a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseTransactionsManager.php @@ -0,0 +1,96 @@ +transactions = collect(); + } + + /** + * Start a new database transaction. + * + * @param string $connection + * @param int $level + * @return void + */ + public function begin($connection, $level) + { + $this->transactions->push( + new DatabaseTransactionRecord($connection, $level) + ); + } + + /** + * Rollback the active database transaction. + * + * @param string $connection + * @param int $level + * @return void + */ + public function rollback($connection, $level) + { + $this->transactions = $this->transactions->reject(function ($transaction) use ($connection, $level) { + return $transaction->connection == $connection && + $transaction->level > $level; + })->values(); + } + + /** + * Commit the active database transaction. + * + * @param string $connection + * @return void + */ + public function commit($connection) + { + [$forThisConnection, $forOtherConnections] = $this->transactions->partition( + function ($transaction) use ($connection) { + return $transaction->connection == $connection; + } + ); + + $this->transactions = $forOtherConnections->values(); + + $forThisConnection->map->executeCallbacks(); + } + + /** + * Register a transaction callback. + * + * @param callable $callback + * @return void + */ + public function addCallback($callback) + { + if ($current = $this->transactions->last()) { + return $current->addCallback($callback); + } + + call_user_func($callback); + } + + /** + * Get all the transactions. + * + * @return \Illuminate\Support\Collection + */ + public function getTransactions() + { + return $this->transactions; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php index adbe4dc48..c6c66f435 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php @@ -16,7 +16,7 @@ trait DetectsConcurrencyErrors */ protected function causedByConcurrencyError(Throwable $e) { - if ($e instanceof PDOException && $e->getCode() === '40001') { + if ($e instanceof PDOException && ($e->getCode() === 40001 || $e->getCode() === '40001')) { return true; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php index 1ecfc9614..16c868748 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php @@ -50,6 +50,13 @@ trait DetectsLostConnections 'SSL: Connection timed out', 'SQLSTATE[HY000]: General error: 1105 The last transaction was aborted due to Seamless Scaling. Please retry.', 'Temporary failure in name resolution', + 'SSL: Broken pipe', + 'SQLSTATE[08S01]: Communication link failure', + 'SQLSTATE[08006] [7] could not connect to server: Connection refused Is the server running on host', + 'SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: No route to host', + 'The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.', + 'SQLSTATE[08006] [7] could not translate host name', + 'TCP Provider: Error code 0x274C', ]); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/BroadcastableModelEventOccurred.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/BroadcastableModelEventOccurred.php new file mode 100644 index 000000000..14be425af --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/BroadcastableModelEventOccurred.php @@ -0,0 +1,137 @@ +model = $model; + $this->event = $event; + } + + /** + * The channels the event should broadcast on. + * + * @return array + */ + public function broadcastOn() + { + $channels = empty($this->channels) + ? ($this->model->broadcastOn($this->event) ?: []) + : $this->channels; + + return collect($channels)->map(function ($channel) { + return $channel instanceof Model ? new PrivateChannel($channel) : $channel; + })->all(); + } + + /** + * The name the event should broadcast as. + * + * @return string + */ + public function broadcastAs() + { + $default = class_basename($this->model).ucfirst($this->event); + + return method_exists($this->model, 'broadcastAs') + ? ($this->model->broadcastAs($this->event) ?: $default) + : $default; + } + + /** + * Get the data that should be sent with the broadcasted event. + * + * @return array|null + */ + public function broadcastWith() + { + return method_exists($this->model, 'broadcastWith') + ? $this->model->broadcastWith($this->event) + : null; + } + + /** + * Manually specify the channels the event should broadcast on. + * + * @param array $channels + * @return $this + */ + public function onChannels(array $channels) + { + $this->channels = $channels; + + return $this; + } + + /** + * Determine if the event should be broadcast synchronously. + * + * @return bool + */ + public function shouldBroadcastNow() + { + return $this->event === 'deleted' && + ! method_exists($this->model, 'bootSoftDeletes'); + } + + /** + * Get the event name. + * + * @return string + */ + public function event() + { + return $this->event; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/BroadcastsEvents.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/BroadcastsEvents.php new file mode 100644 index 000000000..79dc02d8a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/BroadcastsEvents.php @@ -0,0 +1,197 @@ +broadcastCreated(); + }); + + static::updated(function ($model) { + $model->broadcastUpdated(); + }); + + if (method_exists(static::class, 'bootSoftDeletes')) { + static::softDeleted(function ($model) { + $model->broadcastTrashed(); + }); + + static::restored(function ($model) { + $model->broadcastRestored(); + }); + } + + static::deleted(function ($model) { + $model->broadcastDeleted(); + }); + } + + /** + * Broadcast that the model was created. + * + * @param \Illuminate\Broadcasting\Channel|\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|array|null $channels + * @return \Illuminate\Broadcasting\PendingBroadcast + */ + public function broadcastCreated($channels = null) + { + return $this->broadcastIfBroadcastChannelsExistForEvent( + $this->newBroadcastableModelEvent('created'), 'created', $channels + ); + } + + /** + * Broadcast that the model was updated. + * + * @param \Illuminate\Broadcasting\Channel|\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|array|null $channels + * @return \Illuminate\Broadcasting\PendingBroadcast + */ + public function broadcastUpdated($channels = null) + { + return $this->broadcastIfBroadcastChannelsExistForEvent( + $this->newBroadcastableModelEvent('updated'), 'updated', $channels + ); + } + + /** + * Broadcast that the model was trashed. + * + * @param \Illuminate\Broadcasting\Channel|\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|array|null $channels + * @return \Illuminate\Broadcasting\PendingBroadcast + */ + public function broadcastTrashed($channels = null) + { + return $this->broadcastIfBroadcastChannelsExistForEvent( + $this->newBroadcastableModelEvent('trashed'), 'trashed', $channels + ); + } + + /** + * Broadcast that the model was restored. + * + * @param \Illuminate\Broadcasting\Channel|\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|array|null $channels + * @return \Illuminate\Broadcasting\PendingBroadcast + */ + public function broadcastRestored($channels = null) + { + return $this->broadcastIfBroadcastChannelsExistForEvent( + $this->newBroadcastableModelEvent('restored'), 'restored', $channels + ); + } + + /** + * Broadcast that the model was deleted. + * + * @param \Illuminate\Broadcasting\Channel|\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|array|null $channels + * @return \Illuminate\Broadcasting\PendingBroadcast + */ + public function broadcastDeleted($channels = null) + { + return $this->broadcastIfBroadcastChannelsExistForEvent( + $this->newBroadcastableModelEvent('deleted'), 'deleted', $channels + ); + } + + /** + * Broadcast the given event instance if channels are configured for the model event. + * + * @param mixed $instance + * @param string $event + * @param mixed $channels + * @return \Illuminate\Broadcasting\PendingBroadcast|null + */ + protected function broadcastIfBroadcastChannelsExistForEvent($instance, $event, $channels = null) + { + if (! static::$isBroadcasting) { + return; + } + + if (! empty($this->broadcastOn($event)) || ! empty($channels)) { + return broadcast($instance->onChannels(Arr::wrap($channels))); + } + } + + /** + * Create a new broadcastable model event event. + * + * @param string $event + * @return mixed + */ + public function newBroadcastableModelEvent($event) + { + return tap($this->newBroadcastableEvent($event), function ($event) { + $event->connection = property_exists($this, 'broadcastConnection') + ? $this->broadcastConnection + : $this->broadcastConnection(); + + $event->queue = property_exists($this, 'broadcastQueue') + ? $this->broadcastQueue + : $this->broadcastQueue(); + + $event->afterCommit = property_exists($this, 'broadcastAfterCommit') + ? $this->broadcastAfterCommit + : $this->broadcastAfterCommit(); + }); + } + + /** + * Create a new broadcastable model event for the model. + * + * @param string $event + * @return \Illuminate\Database\Eloquent\BroadcastableModelEventOccurred + */ + protected function newBroadcastableEvent($event) + { + return new BroadcastableModelEventOccurred($this, $event); + } + + /** + * Get the channels that model events should broadcast on. + * + * @param string $event + * @return \Illuminate\Broadcasting\Channel|array + */ + public function broadcastOn($event) + { + return [$this]; + } + + /** + * Get the queue connection that should be used to broadcast model events. + * + * @return string|null + */ + public function broadcastConnection() + { + // + } + + /** + * Get the queue that should be used to broadcast model events. + * + * @return string|null + */ + public function broadcastQueue() + { + // + } + + /** + * Determine if the model event broadcast queued job should be dispatched after all transactions are committed. + * + * @return bool + */ + public function broadcastAfterCommit() + { + return false; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php index 66cd2ded4..babd44b85 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php @@ -10,6 +10,7 @@ use Illuminate\Database\Concerns\BuildsQueries; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; +use Illuminate\Database\RecordsNotFoundException; use Illuminate\Pagination\Paginator; use Illuminate\Support\Arr; use Illuminate\Support\Str; @@ -24,7 +25,10 @@ use ReflectionMethod; */ class Builder { - use BuildsQueries, Concerns\QueriesRelationships, ForwardsCalls; + use Concerns\QueriesRelationships, ForwardsCalls; + use BuildsQueries { + sole as baseSole; + } /** * The base query builder instance. @@ -68,14 +72,42 @@ class Builder */ protected $onDelete; + /** + * The properties that should be returned from query builder. + * + * @var string[] + */ + protected $propertyPassthru = [ + 'from', + ]; + /** * The methods that should be returned from query builder. * - * @var array + * @var string[] */ protected $passthru = [ - 'insert', 'insertOrIgnore', 'insertGetId', 'insertUsing', 'getBindings', 'toSql', 'dump', 'dd', - 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection', 'raw', 'getGrammar', + 'aggregate', + 'average', + 'avg', + 'count', + 'dd', + 'doesntExist', + 'dump', + 'exists', + 'explain', + 'getBindings', + 'getConnection', + 'getGrammar', + 'insert', + 'insertGetId', + 'insertOrIgnore', + 'insertUsing', + 'max', + 'min', + 'raw', + 'sum', + 'toSql', ]; /** @@ -188,6 +220,10 @@ class Builder */ public function whereKey($id) { + if ($id instanceof Model) { + $id = $id->getKey(); + } + if (is_array($id) || $id instanceof Arrayable) { $this->query->whereIn($this->model->getQualifiedKeyName(), $id); @@ -209,6 +245,10 @@ class Builder */ public function whereKeyNot($id) { + if ($id instanceof Model) { + $id = $id->getKey(); + } + if (is_array($id) || $id instanceof Arrayable) { $this->query->whereNotIn($this->model->getQualifiedKeyName(), $id); @@ -251,7 +291,7 @@ class Builder * @param mixed $operator * @param mixed $value * @param string $boolean - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\Model|static|null */ public function firstWhere($column, $operator = null, $value = null, $boolean = 'and') { @@ -319,8 +359,14 @@ class Builder { $instance = $this->newModelInstance(); - return $instance->newCollection(array_map(function ($item) use ($instance) { - return $instance->newFromBuilder($item); + return $instance->newCollection(array_map(function ($item) use ($items, $instance) { + $model = $instance->newFromBuilder($item); + + if (count($items) > 1) { + $model->preventsLazyLoading = Model::preventsLazyLoading(); + } + + return $model; }, $items)); } @@ -429,7 +475,7 @@ class Builder return $instance; } - return $this->newModelInstance($attributes + $values); + return $this->newModelInstance(array_merge($attributes, $values)); } /** @@ -439,13 +485,13 @@ class Builder * @param array $values * @return \Illuminate\Database\Eloquent\Model|static */ - public function firstOrCreate(array $attributes, array $values = []) + public function firstOrCreate(array $attributes = [], array $values = []) { if (! is_null($instance = $this->where($attributes)->first())) { return $instance; } - return tap($this->newModelInstance($attributes + $values), function ($instance) { + return tap($this->newModelInstance(array_merge($attributes, $values)), function ($instance) { $instance->save(); }); } @@ -503,6 +549,24 @@ class Builder return $callback(); } + /** + * Execute the query and get the first result if it's the sole matching record. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Model + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException + */ + public function sole($columns = ['*']) + { + try { + return $this->baseSole($columns); + } catch (RecordsNotFoundException $exception) { + throw (new ModelNotFoundException)->setModel(get_class($this->model)); + } + } + /** * Get a single column's value from the first result of a query. * @@ -516,6 +580,19 @@ class Builder } } + /** + * Get a single column's value from the first result of the query or throw an exception. + * + * @param string|\Illuminate\Database\Query\Expression $column + * @return mixed + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function valueOrFail($column) + { + return $this->firstOrFail([$column])->{Str::afterLast($column, '.')}; + } + /** * Execute the query as a "select" statement. * @@ -764,6 +841,49 @@ class Builder ]); } + /** + * Paginate the given query into a cursor paginator. + * + * @param int|null $perPage + * @param array $columns + * @param string $cursorName + * @param \Illuminate\Pagination\Cursor|string|null $cursor + * @return \Illuminate\Contracts\Pagination\CursorPaginator + */ + public function cursorPaginate($perPage = null, $columns = ['*'], $cursorName = 'cursor', $cursor = null) + { + $perPage = $perPage ?: $this->model->getPerPage(); + + return $this->paginateUsingCursor($perPage, $columns, $cursorName, $cursor); + } + + /** + * Ensure the proper order by required for cursor pagination. + * + * @param bool $shouldReverse + * @return \Illuminate\Support\Collection + */ + protected function ensureOrderForCursorPagination($shouldReverse = false) + { + if (empty($this->query->orders) && empty($this->query->unionOrders)) { + $this->enforceOrderBy(); + } + + if ($shouldReverse) { + $this->query->orders = collect($this->query->orders)->map(function ($order) { + $order['direction'] = $order['direction'] === 'asc' ? 'desc' : 'asc'; + + return $order; + })->toArray(); + } + + if ($this->query->unionOrders) { + return collect($this->query->unionOrders); + } + + return collect($this->query->orders); + } + /** * Save a new model and return the instance. * @@ -791,7 +911,7 @@ class Builder } /** - * Update a record in the database. + * Update records in the database. * * @param array $values * @return int @@ -801,6 +921,35 @@ class Builder return $this->toBase()->update($this->addUpdatedAtColumn($values)); } + /** + * Insert new records or update the existing ones. + * + * @param array $values + * @param array|string $uniqueBy + * @param array|null $update + * @return int + */ + public function upsert(array $values, $uniqueBy, $update = null) + { + if (empty($values)) { + return 0; + } + + if (! is_array(reset($values))) { + $values = [$values]; + } + + if (is_null($update)) { + $update = array_keys(reset($values)); + } + + return $this->toBase()->upsert( + $this->addTimestampsToUpsertValues($values), + $uniqueBy, + $this->addUpdatedAtToUpsertColumns($update) + ); + } + /** * Increment a column's value by a given amount. * @@ -855,7 +1004,7 @@ class Builder $qualifiedColumn = end($segments).'.'.$column; - $values[$qualifiedColumn] = $values[$column]; + $values[$qualifiedColumn] = Arr::get($values, $qualifiedColumn, $values[$column]); unset($values[$column]); @@ -863,7 +1012,58 @@ class Builder } /** - * Delete a record from the database. + * Add timestamps to the inserted values. + * + * @param array $values + * @return array + */ + protected function addTimestampsToUpsertValues(array $values) + { + if (! $this->model->usesTimestamps()) { + return $values; + } + + $timestamp = $this->model->freshTimestampString(); + + $columns = array_filter([ + $this->model->getCreatedAtColumn(), + $this->model->getUpdatedAtColumn(), + ]); + + foreach ($columns as $column) { + foreach ($values as &$row) { + $row = array_merge([$column => $timestamp], $row); + } + } + + return $values; + } + + /** + * Add the "updated at" column to the updated columns. + * + * @param array $update + * @return array + */ + protected function addUpdatedAtToUpsertColumns(array $update) + { + if (! $this->model->usesTimestamps()) { + return $update; + } + + $column = $this->model->getUpdatedAtColumn(); + + if (! is_null($column) && + ! array_key_exists($column, $update) && + ! in_array($column, $update)) { + $update[] = $column; + } + + return $update; + } + + /** + * Delete records from the database. * * @return mixed */ @@ -931,7 +1131,9 @@ class Builder // Next we'll pass the scope callback to the callScope method which will take // care of grouping the "wheres" properly so the logical order doesn't get // messed up when adding scopes. Then we'll return back out the builder. - $builder = $builder->callNamedScope($scope, (array) $parameters); + $builder = $builder->callNamedScope( + $scope, Arr::wrap($parameters) + ); } return $builder; @@ -1084,12 +1286,17 @@ class Builder /** * Set the relationships that should be eager loaded. * - * @param mixed $relations + * @param string|array $relations + * @param string|\Closure|null $callback * @return $this */ - public function with($relations) + public function with($relations, $callback = null) { - $eagerLoad = $this->parseWithRelations(is_string($relations) ? func_get_args() : $relations); + if ($callback instanceof Closure) { + $eagerLoad = $this->parseWithRelations([$relations => $callback]); + } else { + $eagerLoad = $this->parseWithRelations(is_string($relations) ? func_get_args() : $relations); + } $this->eagerLoad = array_merge($this->eagerLoad, $eagerLoad); @@ -1111,6 +1318,19 @@ class Builder return $this; } + /** + * Set the relationships that should be eager loaded while removing any previously added eager loading specifications. + * + * @param mixed $relations + * @return $this + */ + public function withOnly($relations) + { + $this->eagerLoad = []; + + return $this->with($relations); + } + /** * Create a new instance of the model being queried. * @@ -1322,6 +1542,17 @@ class Builder return $this->model->qualifyColumn($column); } + /** + * Qualify the given columns with the model's table. + * + * @param array|\Illuminate\Database\Query\Expression $columns + * @return array + */ + public function qualifyColumns($columns) + { + return $this->model->qualifyColumns($columns); + } + /** * Get the given macro by name. * @@ -1380,6 +1611,10 @@ class Builder return new HigherOrderBuilderProxy($this, $key); } + if (in_array($key, $this->propertyPassthru)) { + return $this->toBase()->{$key}; + } + throw new Exception("Property [{$key}] does not exist on the Eloquent builder instance."); } @@ -1483,6 +1718,16 @@ class Builder } } + /** + * Clone the Eloquent query builder. + * + * @return static + */ + public function clone() + { + return clone $this; + } + /** * Force a clone of the underlying query builder when cloning. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php new file mode 100644 index 000000000..6f1713c94 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php @@ -0,0 +1,41 @@ +getArrayCopy()); + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return $this->getArrayCopy(); + } + + /** + * Get the array that should be JSON serialized. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->getArrayCopy(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php new file mode 100644 index 000000000..db9a21b46 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php @@ -0,0 +1,36 @@ + json_encode($value)]; + } + + public function serialize($model, string $key, $value, array $attributes) + { + return $value->getArrayCopy(); + } + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsCollection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsCollection.php new file mode 100644 index 000000000..585b6cfc7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsCollection.php @@ -0,0 +1,32 @@ + json_encode($value)]; + } + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsEncryptedArrayObject.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsEncryptedArrayObject.php new file mode 100644 index 000000000..cd6562465 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsEncryptedArrayObject.php @@ -0,0 +1,45 @@ + Crypt::encryptString(json_encode($value))]; + } + + return null; + } + + public function serialize($model, string $key, $value, array $attributes) + { + return ! is_null($value) ? $value->getArrayCopy() : null; + } + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsEncryptedCollection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsEncryptedCollection.php new file mode 100644 index 000000000..4d9fee7ec --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsEncryptedCollection.php @@ -0,0 +1,41 @@ + Crypt::encryptString(json_encode($value))]; + } + + return null; + } + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsStringable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsStringable.php new file mode 100644 index 000000000..912659f38 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsStringable.php @@ -0,0 +1,32 @@ +get = $get; + $this->set = $set; + } + + /** + * Create a new attribute accessor. + * + * @param callable $get + * @return static + */ + public static function get(callable $get) + { + return new static($get); + } + + /** + * Create a new attribute mutator. + * + * @param callable $set + * @return static + */ + public static function set(callable $set) + { + return new static(null, $set); + } + + /** + * Disable object caching for the attribute. + * + * @return static + */ + public function withoutObjectCaching() + { + $this->withObjectCaching = false; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php index 17199e8b3..cdd972c37 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php @@ -64,12 +64,14 @@ class Collection extends BaseCollection implements QueueableCollection } /** - * Load a set of relationship counts onto the collection. + * Load a set of aggregations over relationship's column onto the collection. * * @param array|string $relations + * @param string $column + * @param string $function * @return $this */ - public function loadCount($relations) + public function loadAggregate($relations, $column, $function = null) { if ($this->isEmpty()) { return $this; @@ -78,7 +80,7 @@ class Collection extends BaseCollection implements QueueableCollection $models = $this->first()->newModelQuery() ->whereKey($this->modelKeys()) ->select($this->first()->getKeyName()) - ->withCount(...func_get_args()) + ->withAggregate($relations, $column, $function) ->get() ->keyBy($this->first()->getKeyName()); @@ -90,12 +92,84 @@ class Collection extends BaseCollection implements QueueableCollection $this->each(function ($model) use ($models, $attributes) { $extraAttributes = Arr::only($models->get($model->getKey())->getAttributes(), $attributes); - $model->forceFill($extraAttributes)->syncOriginalAttributes($attributes); + $model->forceFill($extraAttributes) + ->syncOriginalAttributes($attributes) + ->mergeCasts($models->get($model->getKey())->getCasts()); }); return $this; } + /** + * Load a set of relationship counts onto the collection. + * + * @param array|string $relations + * @return $this + */ + public function loadCount($relations) + { + return $this->loadAggregate($relations, '*', 'count'); + } + + /** + * Load a set of relationship's max column values onto the collection. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadMax($relations, $column) + { + return $this->loadAggregate($relations, $column, 'max'); + } + + /** + * Load a set of relationship's min column values onto the collection. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadMin($relations, $column) + { + return $this->loadAggregate($relations, $column, 'min'); + } + + /** + * Load a set of relationship's column summations onto the collection. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadSum($relations, $column) + { + return $this->loadAggregate($relations, $column, 'sum'); + } + + /** + * Load a set of relationship's average column values onto the collection. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadAvg($relations, $column) + { + return $this->loadAggregate($relations, $column, 'avg'); + } + + /** + * Load a set of related existences onto the collection. + * + * @param array|string $relations + * @return $this + */ + public function loadExists($relations) + { + return $this->loadAggregate($relations, '*', 'exists'); + } + /** * Load a set of relationships onto the collection if they are not already eager loaded. * @@ -160,7 +234,7 @@ class Collection extends BaseCollection implements QueueableCollection return; } - $models = $models->pluck($name); + $models = $models->pluck($name)->whereNotNull(); if ($models->first() instanceof BaseCollection) { $models = $models->collapse(); @@ -317,9 +391,11 @@ class Collection extends BaseCollection implements QueueableCollection ->get() ->getDictionary(); - return $this->map(function ($model) use ($freshModels) { - return $model->exists && isset($freshModels[$model->getKey()]) - ? $freshModels[$model->getKey()] : null; + return $this->filter(function ($model) use ($freshModels) { + return $model->exists && isset($freshModels[$model->getKey()]); + }) + ->map(function ($model) use ($freshModels) { + return $freshModels[$model->getKey()]; }); } @@ -618,7 +694,7 @@ class Collection extends BaseCollection implements QueueableCollection } elseif (count($relations) === 1) { return reset($relations); } else { - return array_intersect(...$relations); + return array_intersect(...array_values($relations)); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php index d7e4ac8a4..3e85fb955 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php @@ -9,14 +9,14 @@ trait GuardsAttributes /** * The attributes that are mass assignable. * - * @var array + * @var string[] */ protected $fillable = []; /** * The attributes that aren't mass assignable. * - * @var array + * @var string[]|bool */ protected $guarded = ['*']; @@ -77,7 +77,9 @@ trait GuardsAttributes */ public function getGuarded() { - return $this->guarded; + return $this->guarded === false + ? [] + : $this->guarded; } /** @@ -128,7 +130,7 @@ trait GuardsAttributes } /** - * Determine if current state is "unguarded". + * Determine if the current state is "unguarded". * * @return bool */ @@ -215,9 +217,14 @@ trait GuardsAttributes protected function isGuardableColumn($key) { if (! isset(static::$guardableColumns[get_class($this)])) { - static::$guardableColumns[get_class($this)] = $this->getConnection() + $columns = $this->getConnection() ->getSchemaBuilder() ->getColumnListing($this->getTable()); + + if (empty($columns)) { + return true; + } + static::$guardableColumns[get_class($this)] = $columns; } return in_array($key, static::$guardableColumns[get_class($this)]); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php index 498e87195..95d07e75a 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php @@ -2,19 +2,30 @@ namespace Illuminate\Database\Eloquent\Concerns; +use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use DateTimeInterface; use Illuminate\Contracts\Database\Eloquent\Castable; use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes; use Illuminate\Contracts\Support\Arrayable; +use Illuminate\Database\Eloquent\Casts\AsArrayObject; +use Illuminate\Database\Eloquent\Casts\AsCollection; +use Illuminate\Database\Eloquent\Casts\Attribute; +use Illuminate\Database\Eloquent\InvalidCastException; use Illuminate\Database\Eloquent\JsonEncodingException; use Illuminate\Database\Eloquent\Relations\Relation; +use Illuminate\Database\LazyLoadingViolationException; use Illuminate\Support\Arr; use Illuminate\Support\Carbon; use Illuminate\Support\Collection as BaseCollection; +use Illuminate\Support\Facades\Crypt; use Illuminate\Support\Facades\Date; use Illuminate\Support\Str; +use InvalidArgumentException; use LogicException; +use ReflectionClass; +use ReflectionMethod; +use ReflectionNamedType; trait HasAttributes { @@ -54,10 +65,17 @@ trait HasAttributes protected $classCastCache = []; /** - * The built-in, primitive cast types supported by Eloquent. + * The attributes that have been cast using "Attribute" return type mutators. * * @var array */ + protected $attributeCastCache = []; + + /** + * The built-in, primitive cast types supported by Eloquent. + * + * @var string[] + */ protected static $primitiveCastTypes = [ 'array', 'bool', @@ -68,7 +86,15 @@ trait HasAttributes 'datetime', 'decimal', 'double', + 'encrypted', + 'encrypted:array', + 'encrypted:collection', + 'encrypted:json', + 'encrypted:object', 'float', + 'immutable_date', + 'immutable_datetime', + 'immutable_custom_datetime', 'int', 'integer', 'json', @@ -81,6 +107,8 @@ trait HasAttributes /** * The attributes that should be mutated to dates. * + * @deprecated Use the "casts" property + * * @var array */ protected $dates = []; @@ -113,6 +141,34 @@ trait HasAttributes */ protected static $mutatorCache = []; + /** + * The cache of the "Attribute" return type marked mutated attributes for each class. + * + * @var array + */ + protected static $attributeMutatorCache = []; + + /** + * The cache of the "Attribute" return type marked mutated, gettable attributes for each class. + * + * @var array + */ + protected static $getAttributeMutatorCache = []; + + /** + * The cache of the "Attribute" return type marked mutated, settable attributes for each class. + * + * @var array + */ + protected static $setAttributeMutatorCache = []; + + /** + * The encrypter instance that is used to encrypt attributes. + * + * @var \Illuminate\Contracts\Encryption\Encrypter + */ + public static $encrypter; + /** * Convert the model's attributes to an array. * @@ -222,12 +278,12 @@ trait HasAttributes // If the attribute cast was a date or a datetime, we will serialize the date as // a string. This allows the developers to customize how dates are serialized // into an array without affecting how they are persisted into the storage. - if ($attributes[$key] && - ($value === 'date' || $value === 'datetime')) { + if ($attributes[$key] && in_array($value, ['date', 'datetime', 'immutable_date', 'immutable_datetime'])) { $attributes[$key] = $this->serializeDate($attributes[$key]); } - if ($attributes[$key] && $this->isCustomDateTimeCast($value)) { + if ($attributes[$key] && ($this->isCustomDateTimeCast($value) || + $this->isImmutableCustomDateTimeCast($value))) { $attributes[$key] = $attributes[$key]->format(explode(':', $value, 2)[1]); } @@ -236,6 +292,14 @@ trait HasAttributes $attributes[$key] = $this->serializeDate($attributes[$key]); } + if ($attributes[$key] && $this->isClassSerializable($key)) { + $attributes[$key] = $this->serializeClassCastableAttribute($key, $attributes[$key]); + } + + if ($this->isEnumCastable($key) && (! ($attributes[$key] ?? null) instanceof Arrayable)) { + $attributes[$key] = isset($attributes[$key]) ? $attributes[$key]->value : null; + } + if ($attributes[$key] instanceof Arrayable) { $attributes[$key] = $attributes[$key]->toArray(); } @@ -361,6 +425,7 @@ trait HasAttributes if (array_key_exists($key, $this->attributes) || array_key_exists($key, $this->casts) || $this->hasGetMutator($key) || + $this->hasAttributeMutator($key) || $this->isClassCastable($key)) { return $this->getAttributeValue($key); } @@ -412,13 +477,53 @@ trait HasAttributes return $this->relations[$key]; } + if (! $this->isRelation($key)) { + return; + } + + if ($this->preventsLazyLoading) { + $this->handleLazyLoadingViolation($key); + } + // If the "attribute" exists as a method on the model, we will just assume // it is a relationship and will load and return results from the query // and hydrate the relationship's value on the "relationships" array. - if (method_exists($this, $key) || - (static::$relationResolvers[get_class($this)][$key] ?? null)) { - return $this->getRelationshipFromMethod($key); + return $this->getRelationshipFromMethod($key); + } + + /** + * Determine if the given key is a relationship method on the model. + * + * @param string $key + * @return bool + */ + public function isRelation($key) + { + if ($this->hasAttributeMutator($key)) { + return false; } + + return method_exists($this, $key) || + (static::$relationResolvers[get_class($this)][$key] ?? null); + } + + /** + * Handle a lazy loading violation. + * + * @param string $key + * @return mixed + */ + protected function handleLazyLoadingViolation($key) + { + if (isset(static::$lazyLoadingViolationCallback)) { + return call_user_func(static::$lazyLoadingViolationCallback, $this, $key); + } + + if (! $this->exists || $this->wasRecentlyCreated) { + return; + } + + throw new LazyLoadingViolationException($this, $key); } /** @@ -461,6 +566,48 @@ trait HasAttributes return method_exists($this, 'get'.Str::studly($key).'Attribute'); } + /** + * Determine if a "Attribute" return type marked mutator exists for an attribute. + * + * @param string $key + * @return bool + */ + public function hasAttributeMutator($key) + { + if (isset(static::$attributeMutatorCache[get_class($this)][$key])) { + return static::$attributeMutatorCache[get_class($this)][$key]; + } + + if (! method_exists($this, $method = Str::camel($key))) { + return static::$attributeMutatorCache[get_class($this)][$key] = false; + } + + $returnType = (new ReflectionMethod($this, $method))->getReturnType(); + + return static::$attributeMutatorCache[get_class($this)][$key] = $returnType && + $returnType instanceof ReflectionNamedType && + $returnType->getName() === Attribute::class; + } + + /** + * Determine if a "Attribute" return type marked get mutator exists for an attribute. + * + * @param string $key + * @return bool + */ + public function hasAttributeGetMutator($key) + { + if (isset(static::$getAttributeMutatorCache[get_class($this)][$key])) { + return static::$getAttributeMutatorCache[get_class($this)][$key]; + } + + if (! $this->hasAttributeMutator($key)) { + return static::$getAttributeMutatorCache[get_class($this)][$key] = false; + } + + return static::$getAttributeMutatorCache[get_class($this)][$key] = is_callable($this->{Str::camel($key)}()->get); + } + /** * Get the value of an attribute using its mutator. * @@ -473,6 +620,34 @@ trait HasAttributes return $this->{'get'.Str::studly($key).'Attribute'}($value); } + /** + * Get the value of an "Attribute" return type marked attribute using its mutator. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function mutateAttributeMarkedAttribute($key, $value) + { + if (isset($this->attributeCastCache[$key])) { + return $this->attributeCastCache[$key]; + } + + $attribute = $this->{Str::camel($key)}(); + + $value = call_user_func($attribute->get ?: function ($value) { + return $value; + }, $value, $this->attributes); + + if (! is_object($value) || ! $attribute->withObjectCaching) { + unset($this->attributeCastCache[$key]); + } else { + $this->attributeCastCache[$key] = $value; + } + + return $value; + } + /** * Get the value of an attribute using its mutator for array conversion. * @@ -482,9 +657,18 @@ trait HasAttributes */ protected function mutateAttributeForArray($key, $value) { - $value = $this->isClassCastable($key) - ? $this->getClassCastableAttributeValue($key, $value) - : $this->mutateAttribute($key, $value); + if ($this->isClassCastable($key)) { + $value = $this->getClassCastableAttributeValue($key, $value); + } elseif (isset(static::$getAttributeMutatorCache[get_class($this)][$key]) && + static::$getAttributeMutatorCache[get_class($this)][$key] === true) { + $value = $this->mutateAttributeMarkedAttribute($key, $value); + + $value = $value instanceof DateTimeInterface + ? $this->serializeDate($value) + : $value; + } else { + $value = $this->mutateAttribute($key, $value); + } return $value instanceof Arrayable ? $value->toArray() : $value; } @@ -493,11 +677,13 @@ trait HasAttributes * Merge new casts with existing casts on the model. * * @param array $casts - * @return void + * @return $this */ public function mergeCasts($casts) { $this->casts = array_merge($this->casts, $casts); + + return $this; } /** @@ -515,6 +701,15 @@ trait HasAttributes return $value; } + // If the key is one of the encrypted castable types, we'll first decrypt + // the value and update the cast type so we may leverage the following + // logic for casting this value to any additionally specified types. + if ($this->isEncryptedCastable($key)) { + $value = $this->fromEncryptedString($value); + + $castType = Str::after($castType, 'encrypted:'); + } + switch ($castType) { case 'int': case 'integer': @@ -542,10 +737,19 @@ trait HasAttributes case 'datetime': case 'custom_datetime': return $this->asDateTime($value); + case 'immutable_date': + return $this->asDate($value)->toImmutable(); + case 'immutable_custom_datetime': + case 'immutable_datetime': + return $this->asDateTime($value)->toImmutable(); case 'timestamp': return $this->asTimestamp($value); } + if ($this->isEnumCastable($key)) { + return $this->getEnumCastableAttributeValue($key, $value); + } + if ($this->isClassCastable($key)) { return $this->getClassCastableAttributeValue($key, $value); } @@ -568,8 +772,8 @@ trait HasAttributes $caster = $this->resolveCasterClass($key); $value = $caster instanceof CastsInboundAttributes - ? $value - : $caster->get($this, $key, $value, $this->attributes); + ? $value + : $caster->get($this, $key, $value, $this->attributes); if ($caster instanceof CastsInboundAttributes || ! is_object($value)) { unset($this->classCastCache[$key]); @@ -581,6 +785,28 @@ trait HasAttributes } } + /** + * Cast the given attribute to an enum. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function getEnumCastableAttributeValue($key, $value) + { + if (is_null($value)) { + return; + } + + $castType = $this->getCasts()[$key]; + + if ($value instanceof $castType) { + return $value; + } + + return $castType::from($value); + } + /** * Get the type of cast for a model attribute. * @@ -593,6 +819,10 @@ trait HasAttributes return 'custom_datetime'; } + if ($this->isImmutableCustomDateTimeCast($this->getCasts()[$key])) { + return 'immutable_custom_datetime'; + } + if ($this->isDecimalCast($this->getCasts()[$key])) { return 'decimal'; } @@ -600,6 +830,35 @@ trait HasAttributes return trim(strtolower($this->getCasts()[$key])); } + /** + * Increment or decrement the given attribute using the custom cast class. + * + * @param string $method + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function deviateClassCastableAttribute($method, $key, $value) + { + return $this->resolveCasterClass($key)->{$method}( + $this, $key, $value, $this->attributes + ); + } + + /** + * Serialize the given attribute using the custom cast class. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function serializeClassCastableAttribute($key, $value) + { + return $this->resolveCasterClass($key)->serialize( + $this, $key, $value, $this->attributes + ); + } + /** * Determine if the cast type is a custom date time cast. * @@ -612,6 +871,18 @@ trait HasAttributes strncmp($cast, 'datetime:', 9) === 0; } + /** + * Determine if the cast type is an immutable custom date time cast. + * + * @param string $cast + * @return bool + */ + protected function isImmutableCustomDateTimeCast($cast) + { + return strncmp($cast, 'immutable_date:', 15) === 0 || + strncmp($cast, 'immutable_datetime:', 19) === 0; + } + /** * Determine if the cast type is a decimal cast. * @@ -634,9 +905,11 @@ trait HasAttributes { // First we will check for the presence of a mutator for the set operation // which simply lets the developers tweak the attribute as it is set on - // the model, such as "json_encoding" an listing of data for storage. + // this model, such as "json_encoding" a listing of data for storage. if ($this->hasSetMutator($key)) { return $this->setMutatedAttributeValue($key, $value); + } elseif ($this->hasAttributeSetMutator($key)) { + return $this->setAttributeMarkedMutatedAttributeValue($key, $value); } // If an attribute is listed as a "date", we'll convert it from a DateTime @@ -646,13 +919,19 @@ trait HasAttributes $value = $this->fromDateTime($value); } + if ($this->isEnumCastable($key)) { + $this->setEnumCastableAttribute($key, $value); + + return $this; + } + if ($this->isClassCastable($key)) { $this->setClassCastableAttribute($key, $value); return $this; } - if ($this->isJsonCastable($key) && ! is_null($value)) { + if (! is_null($value) && $this->isJsonCastable($key)) { $value = $this->castAttributeAsJson($key, $value); } @@ -663,6 +942,10 @@ trait HasAttributes return $this->fillJsonAttribute($key, $value); } + if (! is_null($value) && $this->isEncryptedCastable($key)) { + $value = $this->castAttributeAsEncryptedString($key, $value); + } + $this->attributes[$key] = $value; return $this; @@ -679,6 +962,32 @@ trait HasAttributes return method_exists($this, 'set'.Str::studly($key).'Attribute'); } + /** + * Determine if an "Attribute" return type marked set mutator exists for an attribute. + * + * @param string $key + * @return bool + */ + public function hasAttributeSetMutator($key) + { + $class = get_class($this); + + if (isset(static::$setAttributeMutatorCache[$class][$key])) { + return static::$setAttributeMutatorCache[$class][$key]; + } + + if (! method_exists($this, $method = Str::camel($key))) { + return static::$setAttributeMutatorCache[$class][$key] = false; + } + + $returnType = (new ReflectionMethod($this, $method))->getReturnType(); + + return static::$setAttributeMutatorCache[$class][$key] = $returnType && + $returnType instanceof ReflectionNamedType && + $returnType->getName() === Attribute::class && + is_callable($this->{$method}()->set); + } + /** * Set the value of an attribute using its mutator. * @@ -691,6 +1000,35 @@ trait HasAttributes return $this->{'set'.Str::studly($key).'Attribute'}($value); } + /** + * Set the value of a "Attribute" return type marked attribute using its mutator. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function setAttributeMarkedMutatedAttributeValue($key, $value) + { + $attribute = $this->{Str::camel($key)}(); + + $callback = $attribute->set ?: function ($value) use ($key) { + $this->attributes[$key] = $value; + }; + + $this->attributes = array_merge( + $this->attributes, + $this->normalizeCastClassResponse( + $key, call_user_func($callback, $value, $this->attributes) + ) + ); + + if (! is_object($value) || ! $attribute->withObjectCaching) { + unset($this->attributeCastCache[$key]); + } else { + $this->attributeCastCache[$key] = $value; + } + } + /** * Determine if the given attribute is a date or date castable. * @@ -700,7 +1038,7 @@ trait HasAttributes protected function isDateAttribute($key) { return in_array($key, $this->getDates(), true) || - $this->isDateCastable($key); + $this->isDateCastable($key); } /** @@ -714,10 +1052,14 @@ trait HasAttributes { [$key, $path] = explode('->', $key, 2); - $this->attributes[$key] = $this->asJson($this->getArrayAttributeWithValue( + $value = $this->asJson($this->getArrayAttributeWithValue( $path, $key, $value )); + $this->attributes[$key] = $this->isEncryptedCastable($key) + ? $this->castAttributeAsEncryptedString($key, $value) + : $value; + return $this; } @@ -756,6 +1098,26 @@ trait HasAttributes } } + /** + * Set the value of an enum castable attribute. + * + * @param string $key + * @param \BackedEnum $value + * @return void + */ + protected function setEnumCastableAttribute($key, $value) + { + $enumClass = $this->getCasts()[$key]; + + if (! isset($value)) { + $this->attributes[$key] = null; + } elseif ($value instanceof $enumClass) { + $this->attributes[$key] = $value->value; + } else { + $this->attributes[$key] = $enumClass::from($value)->value; + } + } + /** * Get an array attribute with the given key and value set. * @@ -779,8 +1141,15 @@ trait HasAttributes */ protected function getArrayAttributeByKey($key) { - return isset($this->attributes[$key]) ? - $this->fromJson($this->attributes[$key]) : []; + if (! isset($this->attributes[$key])) { + return []; + } + + return $this->fromJson( + $this->isEncryptedCastable($key) + ? $this->fromEncryptedString($this->attributes[$key]) + : $this->attributes[$key] + ); } /** @@ -826,6 +1195,40 @@ trait HasAttributes return json_decode($value, ! $asObject); } + /** + * Decrypt the given encrypted string. + * + * @param string $value + * @return mixed + */ + public function fromEncryptedString($value) + { + return (static::$encrypter ?? Crypt::getFacadeRoot())->decrypt($value, false); + } + + /** + * Cast the given attribute to an encrypted string. + * + * @param string $key + * @param mixed $value + * @return string + */ + protected function castAttributeAsEncryptedString($key, $value) + { + return (static::$encrypter ?? Crypt::getFacadeRoot())->encrypt($value, false); + } + + /** + * Set the encrypter instance that will be used to encrypt attributes. + * + * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter + * @return void + */ + public static function encryptUsing($encrypter) + { + static::$encrypter = $encrypter; + } + /** * Decode the given float. * @@ -912,11 +1315,13 @@ trait HasAttributes // Finally, we will just assume this date is in the format used by default on // the database connection and use that format to create the Carbon object // that is returned back out to the developers after we convert it here. - if (Date::hasFormat($value, $format)) { - return Date::createFromFormat($format, $value); + try { + $date = Date::createFromFormat($format, $value); + } catch (InvalidArgumentException $e) { + $date = false; } - return Date::parse($value); + return $date ?: Date::parse($value); } /** @@ -962,7 +1367,9 @@ trait HasAttributes */ protected function serializeDate(DateTimeInterface $date) { - return Carbon::instance($date)->toJSON(); + return $date instanceof \DateTimeImmutable ? + CarbonImmutable::instance($date)->toJSON() : + Carbon::instance($date)->toJSON(); } /** @@ -1045,7 +1452,18 @@ trait HasAttributes */ protected function isDateCastable($key) { - return $this->hasCast($key, ['date', 'datetime']); + return $this->hasCast($key, ['date', 'datetime', 'immutable_date', 'immutable_datetime']); + } + + /** + * Determine whether a value is Date / DateTime custom-castable for inbound manipulation. + * + * @param string $key + * @return bool + */ + protected function isDateCastableWithCustomFormat($key) + { + return $this->hasCast($key, ['custom_datetime', 'immutable_custom_datetime']); } /** @@ -1056,7 +1474,18 @@ trait HasAttributes */ protected function isJsonCastable($key) { - return $this->hasCast($key, ['array', 'json', 'object', 'collection']); + return $this->hasCast($key, ['array', 'json', 'object', 'collection', 'encrypted:array', 'encrypted:collection', 'encrypted:json', 'encrypted:object']); + } + + /** + * Determine whether a value is an encrypted castable for inbound manipulation. + * + * @param string $key + * @return bool + */ + protected function isEncryptedCastable($key) + { + return $this->hasCast($key, ['encrypted', 'encrypted:array', 'encrypted:collection', 'encrypted:json', 'encrypted:object']); } /** @@ -1064,12 +1493,79 @@ trait HasAttributes * * @param string $key * @return bool + * + * @throws \Illuminate\Database\Eloquent\InvalidCastException */ protected function isClassCastable($key) { - return array_key_exists($key, $this->getCasts()) && - class_exists($class = $this->parseCasterClass($this->getCasts()[$key])) && - ! in_array($class, static::$primitiveCastTypes); + if (! array_key_exists($key, $this->getCasts())) { + return false; + } + + $castType = $this->parseCasterClass($this->getCasts()[$key]); + + if (in_array($castType, static::$primitiveCastTypes)) { + return false; + } + + if (class_exists($castType)) { + return true; + } + + throw new InvalidCastException($this->getModel(), $key, $castType); + } + + /** + * Determine if the given key is cast using an enum. + * + * @param string $key + * @return bool + */ + protected function isEnumCastable($key) + { + if (! array_key_exists($key, $this->getCasts())) { + return false; + } + + $castType = $this->getCasts()[$key]; + + if (in_array($castType, static::$primitiveCastTypes)) { + return false; + } + + if (function_exists('enum_exists') && enum_exists($castType)) { + return true; + } + } + + /** + * Determine if the key is deviable using a custom class. + * + * @param string $key + * @return bool + * + * @throws \Illuminate\Database\Eloquent\InvalidCastException + */ + protected function isClassDeviable($key) + { + return $this->isClassCastable($key) && + method_exists($castType = $this->parseCasterClass($this->getCasts()[$key]), 'increment') && + method_exists($castType, 'decrement'); + } + + /** + * Determine if the key is serializable using a custom class. + * + * @param string $key + * @return bool + * + * @throws \Illuminate\Database\Eloquent\InvalidCastException + */ + protected function isClassSerializable($key) + { + return ! $this->isEnumCastable($key) && + $this->isClassCastable($key) && + method_exists($this->resolveCasterClass($key), 'serialize'); } /** @@ -1092,7 +1588,7 @@ trait HasAttributes } if (is_subclass_of($castType, Castable::class)) { - $castType = $castType::castUsing(); + $castType = $castType::castUsing($arguments); } if (is_object($castType)) { @@ -1111,8 +1607,19 @@ trait HasAttributes protected function parseCasterClass($class) { return strpos($class, ':') === false - ? $class - : explode(':', $class, 2)[0]; + ? $class + : explode(':', $class, 2)[0]; + } + + /** + * Merge the cast class and attribute cast attributes back into the model. + * + * @return void + */ + protected function mergeAttributesFromCachedCasts() + { + $this->mergeAttributesFromClassCasts(); + $this->mergeAttributesFromAttributeCasts(); } /** @@ -1128,8 +1635,35 @@ trait HasAttributes $this->attributes = array_merge( $this->attributes, $caster instanceof CastsInboundAttributes - ? [$key => $value] - : $this->normalizeCastClassResponse($key, $caster->set($this, $key, $value, $this->attributes)) + ? [$key => $value] + : $this->normalizeCastClassResponse($key, $caster->set($this, $key, $value, $this->attributes)) + ); + } + } + + /** + * Merge the cast class attributes back into the model. + * + * @return void + */ + protected function mergeAttributesFromAttributeCasts() + { + foreach ($this->attributeCastCache as $key => $value) { + $attribute = $this->{Str::camel($key)}(); + + if ($attribute->get && ! $attribute->set) { + continue; + } + + $callback = $attribute->set ?: function ($value) use ($key) { + $this->attributes[$key] = $value; + }; + + $this->attributes = array_merge( + $this->attributes, + $this->normalizeCastClassResponse( + $key, call_user_func($callback, $value, $this->attributes) + ) ); } } @@ -1153,11 +1687,21 @@ trait HasAttributes */ public function getAttributes() { - $this->mergeAttributesFromClassCasts(); + $this->mergeAttributesFromCachedCasts(); return $this->attributes; } + /** + * Get all of the current attributes on the model for an insert operation. + * + * @return array + */ + protected function getAttributesForInsert() + { + return $this->getAttributes(); + } + /** * Set the array of model attributes. No checking is done. * @@ -1174,6 +1718,7 @@ trait HasAttributes } $this->classCastCache = []; + $this->attributeCastCache = []; return $this; } @@ -1309,7 +1854,7 @@ trait HasAttributes } /** - * Determine if the model and all the given attribute(s) have remained the same. + * Determine if the model or all the given attribute(s) have remained the same. * * @param array|string|null $attributes * @return bool @@ -1361,7 +1906,7 @@ trait HasAttributes } /** - * Get the attributes that have been changed since last sync. + * Get the attributes that have been changed since the last sync. * * @return array */ @@ -1407,12 +1952,12 @@ trait HasAttributes return true; } elseif (is_null($attribute)) { return false; - } elseif ($this->isDateAttribute($key)) { + } elseif ($this->isDateAttribute($key) || $this->isDateCastableWithCustomFormat($key)) { return $this->fromDateTime($attribute) === - $this->fromDateTime($original); + $this->fromDateTime($original); } elseif ($this->hasCast($key, ['object', 'collection'])) { - return $this->castAttribute($key, $attribute) == - $this->castAttribute($key, $original); + return $this->fromJson($attribute) === + $this->fromJson($original); } elseif ($this->hasCast($key, ['real', 'float', 'double'])) { if (($attribute === null && $original !== null) || ($attribute !== null && $original === null)) { return false; @@ -1421,11 +1966,13 @@ trait HasAttributes return abs($this->castAttribute($key, $attribute) - $this->castAttribute($key, $original)) < PHP_FLOAT_EPSILON * 4; } elseif ($this->hasCast($key, static::$primitiveCastTypes)) { return $this->castAttribute($key, $attribute) === - $this->castAttribute($key, $original); + $this->castAttribute($key, $original); + } elseif ($this->isClassCastable($key) && in_array($this->getCasts()[$key], [AsArrayObject::class, AsCollection::class])) { + return $this->fromJson($attribute) === $this->fromJson($original); } return is_numeric($attribute) && is_numeric($original) - && strcmp((string) $attribute, (string) $original) === 0; + && strcmp((string) $attribute, (string) $original) === 0; } /** @@ -1442,6 +1989,8 @@ trait HasAttributes // retrieval from the model to a form that is more useful for usage. if ($this->hasGetMutator($key)) { return $this->mutateAttribute($key, $value); + } elseif ($this->hasAttributeGetMutator($key)) { + return $this->mutateAttributeMarkedAttribute($key, $value); } // If the attribute exists within the cast array, we will convert it to @@ -1525,9 +2074,17 @@ trait HasAttributes */ public static function cacheMutatedAttributes($class) { - static::$mutatorCache[$class] = collect(static::getMutatorMethods($class))->map(function ($match) { - return lcfirst(static::$snakeAttributes ? Str::snake($match) : $match); - })->all(); + static::$getAttributeMutatorCache[$class] = + collect($attributeMutatorMethods = static::getAttributeMarkedMutatorMethods($class)) + ->mapWithKeys(function ($match) { + return [lcfirst(static::$snakeAttributes ? Str::snake($match) : $match) => true]; + })->all(); + + static::$mutatorCache[$class] = collect(static::getMutatorMethods($class)) + ->merge($attributeMutatorMethods) + ->map(function ($match) { + return lcfirst(static::$snakeAttributes ? Str::snake($match) : $match); + })->all(); } /** @@ -1542,4 +2099,31 @@ trait HasAttributes return $matches[1]; } + + /** + * Get all of the "Attribute" return typed attribute mutator methods. + * + * @param mixed $class + * @return array + */ + protected static function getAttributeMarkedMutatorMethods($class) + { + $instance = is_object($class) ? $class : new $class; + + return collect((new ReflectionClass($instance))->getMethods())->filter(function ($method) use ($instance) { + $returnType = $method->getReturnType(); + + if ($returnType && + $returnType instanceof ReflectionNamedType && + $returnType->getName() === Attribute::class) { + $method->setAccessible(true); + + if (is_callable($method->invoke($instance)->get)) { + return true; + } + } + + return false; + })->map->name->values()->all(); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php index 0dc54308f..eb6a97098 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php @@ -147,7 +147,7 @@ trait HasEvents * Register a model event with the dispatcher. * * @param string $event - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ protected static function registerModelEvent($event, $callback) @@ -230,7 +230,7 @@ trait HasEvents /** * Register a retrieved model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function retrieved($callback) @@ -241,7 +241,7 @@ trait HasEvents /** * Register a saving model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function saving($callback) @@ -252,7 +252,7 @@ trait HasEvents /** * Register a saved model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function saved($callback) @@ -263,7 +263,7 @@ trait HasEvents /** * Register an updating model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function updating($callback) @@ -274,7 +274,7 @@ trait HasEvents /** * Register an updated model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function updated($callback) @@ -285,7 +285,7 @@ trait HasEvents /** * Register a creating model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function creating($callback) @@ -296,7 +296,7 @@ trait HasEvents /** * Register a created model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function created($callback) @@ -307,7 +307,7 @@ trait HasEvents /** * Register a replicating model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function replicating($callback) @@ -318,7 +318,7 @@ trait HasEvents /** * Register a deleting model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function deleting($callback) @@ -329,7 +329,7 @@ trait HasEvents /** * Register a deleted model event with the dispatcher. * - * @param \Closure|string $callback + * @param \Illuminate\Events\QueuedClosure|\Closure|string $callback * @return void */ public static function deleted($callback) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php index 3406fe51e..a4612b462 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php @@ -3,6 +3,7 @@ namespace Illuminate\Database\Eloquent\Concerns; use Closure; +use Illuminate\Database\ClassMorphViolationException; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; @@ -39,7 +40,7 @@ trait HasRelationships /** * The many to many relationship methods. * - * @var array + * @var string[] */ public static $manyMethods = [ 'belongsToMany', 'morphToMany', 'morphedByMany', @@ -256,7 +257,7 @@ trait HasRelationships // If the type value is null it is probably safe to assume we're eager loading // the relationship. In this case we'll just pass in a dummy query where we // need to remove any eager loads that may already be defined on a model. - return is_null($class = $this->{$type}) || $class === '' + return is_null($class = $this->getAttributeFromArray($type)) || $class === '' ? $this->morphEagerTo($name, $type, $id, $ownerKey) : $this->morphInstanceTo($class, $name, $type, $id, $ownerKey); } @@ -731,6 +732,10 @@ trait HasRelationships return array_search(static::class, $morphMap, true); } + if (Relation::requiresMorphMap()) { + throw new ClassMorphViolationException($this); + } + return static::class; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php index b9c049b36..13ebd3174 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php @@ -34,7 +34,7 @@ trait HasTimestamps * * @return void */ - protected function updateTimestamps() + public function updateTimestamps() { $time = $this->freshTimestamp(); @@ -130,7 +130,7 @@ trait HasTimestamps /** * Get the fully qualified "created at" column. * - * @return string + * @return string|null */ public function getQualifiedCreatedAtColumn() { @@ -140,7 +140,7 @@ trait HasTimestamps /** * Get the fully qualified "updated at" column. * - * @return string + * @return string|null */ public function getQualifiedUpdatedAtColumn() { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php index 7f6ebfdbc..065d48a8d 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php @@ -94,9 +94,7 @@ trait HidesAttributes */ public function makeVisibleIf($condition, $attributes) { - $condition = $condition instanceof Closure ? $condition($this) : $condition; - - return $condition ? $this->makeVisible($attributes) : $this; + return value($condition, $this) ? $this->makeVisible($attributes) : $this; } /** @@ -123,8 +121,6 @@ trait HidesAttributes */ public function makeHiddenIf($condition, $attributes) { - $condition = $condition instanceof Closure ? $condition($this) : $condition; - - return value($condition) ? $this->makeHidden($attributes) : $this; + return value($condition, $this) ? $this->makeHidden($attributes) : $this; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php index c97c40330..c16af1fa0 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php @@ -2,14 +2,16 @@ namespace Illuminate\Database\Eloquent\Concerns; +use BadMethodCallException; use Closure; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\RelationNotFoundException; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; use Illuminate\Database\Query\Expression; use Illuminate\Support\Str; -use RuntimeException; trait QueriesRelationships { @@ -36,7 +38,7 @@ trait QueriesRelationships } if ($relation instanceof MorphTo) { - throw new RuntimeException('Please use whereHasMorph() for MorphTo relationships.'); + return $this->hasMorph($relation, ['*'], $operator, $count, $boolean, $callback); } // If we only need to check for the existence of the relation, then we can optimize @@ -189,7 +191,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param string $operator * @param int $count @@ -199,7 +201,9 @@ trait QueriesRelationships */ public function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', Closure $callback = null) { - $relation = $this->getRelationWithoutConstraints($relation); + if (is_string($relation)) { + $relation = $this->getRelationWithoutConstraints($relation); + } $types = (array) $types; @@ -222,7 +226,7 @@ trait QueriesRelationships }; } - $query->where($this->query->from.'.'.$relation->getMorphType(), '=', (new $type)->getMorphClass()) + $query->where($this->qualifyColumn($relation->getMorphType()), '=', (new $type)->getMorphClass()) ->whereHas($belongsTo, $callback, $operator, $count); }); } @@ -254,7 +258,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query with an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param string $operator * @param int $count @@ -268,7 +272,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param string $boolean * @param \Closure|null $callback @@ -282,7 +286,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query with an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @return \Illuminate\Database\Eloquent\Builder|static */ @@ -294,7 +298,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query with where clauses. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param \Closure|null $callback * @param string $operator @@ -309,7 +313,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param \Closure|null $callback * @param string $operator @@ -324,7 +328,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query with where clauses. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static @@ -337,7 +341,7 @@ trait QueriesRelationships /** * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation * @param string|array $types * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static @@ -348,12 +352,171 @@ trait QueriesRelationships } /** - * Add subselect queries to count the relations. + * Add a basic where clause to a relationship query. + * + * @param string $relation + * @param \Closure|string|array|\Illuminate\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function whereRelation($relation, $column, $operator = null, $value = null) + { + return $this->whereHas($relation, function ($query) use ($column, $operator, $value) { + $query->where($column, $operator, $value); + }); + } + + /** + * Add an "or where" clause to a relationship query. + * + * @param string $relation + * @param \Closure|string|array|\Illuminate\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orWhereRelation($relation, $column, $operator = null, $value = null) + { + return $this->orWhereHas($relation, function ($query) use ($column, $operator, $value) { + $query->where($column, $operator, $value); + }); + } + + /** + * Add a polymorphic relationship condition to the query with a where clause. + * + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param \Closure|string|array|\Illuminate\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function whereMorphRelation($relation, $types, $column, $operator = null, $value = null) + { + return $this->whereHasMorph($relation, $types, function ($query) use ($column, $operator, $value) { + $query->where($column, $operator, $value); + }); + } + + /** + * Add a polymorphic relationship condition to the query with an "or where" clause. + * + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param \Closure|string|array|\Illuminate\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null) + { + return $this->orWhereHasMorph($relation, $types, function ($query) use ($column, $operator, $value) { + $query->where($column, $operator, $value); + }); + } + + /** + * Add a morph-to relationship condition to the query. + * + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Model|string $model + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function whereMorphedTo($relation, $model, $boolean = 'and') + { + if (is_string($relation)) { + $relation = $this->getRelationWithoutConstraints($relation); + } + + if (is_string($model)) { + $morphMap = Relation::morphMap(); + + if (! empty($morphMap) && in_array($model, $morphMap)) { + $model = array_search($model, $morphMap, true); + } + + return $this->where($relation->getMorphType(), $model, null, $boolean); + } + + return $this->where(function ($query) use ($relation, $model) { + $query->where($relation->getMorphType(), $model->getMorphClass()) + ->where($relation->getForeignKeyName(), $model->getKey()); + }, null, null, $boolean); + } + + /** + * Add a morph-to relationship condition to the query with an "or where" clause. + * + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Model|string $model + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orWhereMorphedTo($relation, $model) + { + return $this->whereMorphedTo($relation, $model, 'or'); + } + + /** + * Add a "belongs to" relationship where clause to the query. + * + * @param \Illuminate\Database\Eloquent\Model $related + * @param string $relationship + * @param string $boolean + * @return $this + * + * @throws \RuntimeException + */ + public function whereBelongsTo($related, $relationshipName = null, $boolean = 'and') + { + if ($relationshipName === null) { + $relationshipName = Str::camel(class_basename($related)); + } + + try { + $relationship = $this->model->{$relationshipName}(); + } catch (BadMethodCallException $exception) { + throw RelationNotFoundException::make($this->model, $relationshipName); + } + + if (! $relationship instanceof BelongsTo) { + throw RelationNotFoundException::make($this->model, $relationshipName, BelongsTo::class); + } + + $this->where( + $relationship->getQualifiedForeignKeyName(), + '=', + $related->getAttributeValue($relationship->getOwnerKeyName()), + $boolean, + ); + + return $this; + } + + /** + * Add an "BelongsTo" relationship with an "or where" clause to the query. + * + * @param \Illuminate\Database\Eloquent\Model $related + * @param string $relationship + * @return $this + * + * @throws \RuntimeException + */ + public function orWhereBelongsTo($related, $relationshipName = null) + { + return $this->whereBelongsTo($related, $relationshipName, 'or'); + } + + /** + * Add subselect queries to include an aggregate value for a relationship. * * @param mixed $relations + * @param string $column + * @param string $function * @return $this */ - public function withCount($relations) + public function withAggregate($relations, $column, $function = null) { if (empty($relations)) { return $this; @@ -363,12 +526,12 @@ trait QueriesRelationships $this->query->select([$this->query->from.'.*']); } - $relations = is_array($relations) ? $relations : func_get_args(); + $relations = is_array($relations) ? $relations : [$relations]; foreach ($this->parseWithRelations($relations) as $name => $constraints) { // First we will determine if the name has been aliased using an "as" clause on the name // and if it has we will extract the actual relationship name and the desired name of - // the resulting column. This allows multiple counts on the same relationship name. + // the resulting column. This allows multiple aggregates on the same relationships. $segments = explode(' ', $name); unset($alias); @@ -379,38 +542,135 @@ trait QueriesRelationships $relation = $this->getRelationWithoutConstraints($name); - // Here we will get the relationship count query and prepare to add it to the main query + if ($function) { + $hashedColumn = $this->getQuery()->from === $relation->getQuery()->getQuery()->from + ? "{$relation->getRelationCountHash(false)}.$column" + : $column; + + $wrappedColumn = $this->getQuery()->getGrammar()->wrap( + $column === '*' ? $column : $relation->getRelated()->qualifyColumn($hashedColumn) + ); + + $expression = $function === 'exists' ? $wrappedColumn : sprintf('%s(%s)', $function, $wrappedColumn); + } else { + $expression = $column; + } + + // Here, we will grab the relationship sub-query and prepare to add it to the main query // as a sub-select. First, we'll get the "has" query and use that to get the relation - // count query. We will normalize the relation name then append _count as the name. - $query = $relation->getRelationExistenceCountQuery( - $relation->getRelated()->newQuery(), $this - ); + // sub-query. We'll format this relationship name and append this column if needed. + $query = $relation->getRelationExistenceQuery( + $relation->getRelated()->newQuery(), $this, new Expression($expression) + )->setBindings([], 'select'); $query->callScope($constraints); $query = $query->mergeConstraintsFrom($relation->getQuery())->toBase(); + // If the query contains certain elements like orderings / more than one column selected + // then we will remove those elements from the query so that it will execute properly + // when given to the database. Otherwise, we may receive SQL errors or poor syntax. $query->orders = null; - $query->setBindings([], 'order'); if (count($query->columns) > 1) { $query->columns = [$query->columns[0]]; - $query->bindings['select'] = []; } - // Finally we will add the proper result column alias to the query and run the subselect - // statement against the query builder. Then we will return the builder instance back - // to the developer for further constraint chaining that needs to take place on it. - $column = $alias ?? Str::snake($name.'_count'); + // Finally, we will make the proper column alias to the query and run this sub-select on + // the query builder. Then, we will return the builder instance back to the developer + // for further constraint chaining that needs to take place on the query as needed. + $alias = $alias ?? Str::snake( + preg_replace('/[^[:alnum:][:space:]_]/u', '', "$name $function $column") + ); - $this->selectSub($query, $column); + if ($function === 'exists') { + $this->selectRaw( + sprintf('exists(%s) as %s', $query->toSql(), $this->getQuery()->grammar->wrap($alias)), + $query->getBindings() + )->withCasts([$alias => 'bool']); + } else { + $this->selectSub( + $function ? $query : $query->limit(1), + $alias + ); + } } return $this; } + /** + * Add subselect queries to count the relations. + * + * @param mixed $relations + * @return $this + */ + public function withCount($relations) + { + return $this->withAggregate(is_array($relations) ? $relations : func_get_args(), '*', 'count'); + } + + /** + * Add subselect queries to include the max of the relation's column. + * + * @param string|array $relation + * @param string $column + * @return $this + */ + public function withMax($relation, $column) + { + return $this->withAggregate($relation, $column, 'max'); + } + + /** + * Add subselect queries to include the min of the relation's column. + * + * @param string|array $relation + * @param string $column + * @return $this + */ + public function withMin($relation, $column) + { + return $this->withAggregate($relation, $column, 'min'); + } + + /** + * Add subselect queries to include the sum of the relation's column. + * + * @param string|array $relation + * @param string $column + * @return $this + */ + public function withSum($relation, $column) + { + return $this->withAggregate($relation, $column, 'sum'); + } + + /** + * Add subselect queries to include the average of the relation's column. + * + * @param string|array $relation + * @param string $column + * @return $this + */ + public function withAvg($relation, $column) + { + return $this->withAggregate($relation, $column, 'avg'); + } + + /** + * Add subselect queries to include the existence of related models. + * + * @param string|array $relation + * @return $this + */ + public function withExists($relation) + { + return $this->withAggregate($relation, '*', 'exists'); + } + /** * Add the "has" condition where clause to the query. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToManyRelationship.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToManyRelationship.php new file mode 100644 index 000000000..e0c42c4c6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToManyRelationship.php @@ -0,0 +1,61 @@ +factory = $factory; + $this->pivot = $pivot; + $this->relationship = $relationship; + } + + /** + * Create the attached relationship for the given model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return void + */ + public function createFor(Model $model) + { + Collection::wrap($this->factory instanceof Factory ? $this->factory->create([], $model) : $this->factory)->each(function ($attachable) use ($model) { + $model->{$this->relationship}()->attach( + $attachable, + is_callable($this->pivot) ? call_user_func($this->pivot, $model) : $this->pivot + ); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToRelationship.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToRelationship.php new file mode 100644 index 000000000..55747fdc6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToRelationship.php @@ -0,0 +1,80 @@ +factory = $factory; + $this->relationship = $relationship; + } + + /** + * Get the parent model attributes and resolvers for the given child model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return array + */ + public function attributesFor(Model $model) + { + $relationship = $model->{$this->relationship}(); + + return $relationship instanceof MorphTo ? [ + $relationship->getMorphType() => $this->factory instanceof Factory ? $this->factory->newModel()->getMorphClass() : $this->factory->getMorphClass(), + $relationship->getForeignKeyName() => $this->resolver($relationship->getOwnerKeyName()), + ] : [ + $relationship->getForeignKeyName() => $this->resolver($relationship->getOwnerKeyName()), + ]; + } + + /** + * Get the deferred resolver for this relationship's parent ID. + * + * @param string|null $key + * @return \Closure + */ + protected function resolver($key) + { + return function () use ($key) { + if (! $this->resolved) { + $instance = $this->factory instanceof Factory ? $this->factory->create() : $this->factory; + + return $this->resolved = $key ? $instance->{$key} : $instance->getKey(); + } + + return $this->resolved; + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/CrossJoinSequence.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/CrossJoinSequence.php new file mode 100644 index 000000000..b0efbd0c8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/CrossJoinSequence.php @@ -0,0 +1,26 @@ +count = $count; + $this->states = $states ?: new Collection; + $this->has = $has ?: new Collection; + $this->for = $for ?: new Collection; + $this->afterMaking = $afterMaking ?: new Collection; + $this->afterCreating = $afterCreating ?: new Collection; + $this->connection = $connection; + $this->faker = $this->withFaker(); + } + + /** + * Define the model's default state. + * + * @return array + */ + abstract public function definition(); + + /** + * Get a new factory instance for the given attributes. + * + * @param callable|array $attributes + * @return static + */ + public static function new($attributes = []) + { + return (new static)->state($attributes)->configure(); + } + + /** + * Get a new factory instance for the given number of models. + * + * @param int $count + * @return static + */ + public static function times(int $count) + { + return static::new()->count($count); + } + + /** + * Configure the factory. + * + * @return $this + */ + public function configure() + { + return $this; + } + + /** + * Get the raw attributes generated by the factory. + * + * @param array $attributes + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return array + */ + public function raw($attributes = [], ?Model $parent = null) + { + if ($this->count === null) { + return $this->state($attributes)->getExpandedAttributes($parent); + } + + return array_map(function () use ($attributes, $parent) { + return $this->state($attributes)->getExpandedAttributes($parent); + }, range(1, $this->count)); + } + + /** + * Create a single model and persist it to the database. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function createOne($attributes = []) + { + return $this->count(null)->create($attributes); + } + + /** + * Create a single model and persist it to the database. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function createOneQuietly($attributes = []) + { + return $this->count(null)->createQuietly($attributes); + } + + /** + * Create a collection of models and persist them to the database. + * + * @param iterable $records + * @return \Illuminate\Database\Eloquent\Collection + */ + public function createMany(iterable $records) + { + return new EloquentCollection( + collect($records)->map(function ($record) { + return $this->state($record)->create(); + }) + ); + } + + /** + * Create a collection of models and persist them to the database. + * + * @param iterable $records + * @return \Illuminate\Database\Eloquent\Collection + */ + public function createManyQuietly(iterable $records) + { + return Model::withoutEvents(function () use ($records) { + return $this->createMany($records); + }); + } + + /** + * Create a collection of models and persist them to the database. + * + * @param array $attributes + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model + */ + public function create($attributes = [], ?Model $parent = null) + { + if (! empty($attributes)) { + return $this->state($attributes)->create([], $parent); + } + + $results = $this->make($attributes, $parent); + + if ($results instanceof Model) { + $this->store(collect([$results])); + + $this->callAfterCreating(collect([$results]), $parent); + } else { + $this->store($results); + + $this->callAfterCreating($results, $parent); + } + + return $results; + } + + /** + * Create a collection of models and persist them to the database. + * + * @param array $attributes + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model + */ + public function createQuietly($attributes = [], ?Model $parent = null) + { + return Model::withoutEvents(function () use ($attributes, $parent) { + return $this->create($attributes, $parent); + }); + } + + /** + * Create a callback that persists a model in the database when invoked. + * + * @param array $attributes + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return \Closure + */ + public function lazy(array $attributes = [], ?Model $parent = null) + { + return function () use ($attributes, $parent) { + return $this->create($attributes, $parent); + }; + } + + /** + * Set the connection name on the results and store them. + * + * @param \Illuminate\Support\Collection $results + * @return void + */ + protected function store(Collection $results) + { + $results->each(function ($model) { + if (! isset($this->connection)) { + $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName()); + } + + $model->save(); + + $this->createChildren($model); + }); + } + + /** + * Create the children for the given model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return void + */ + protected function createChildren(Model $model) + { + Model::unguarded(function () use ($model) { + $this->has->each(function ($has) use ($model) { + $has->createFor($model); + }); + }); + } + + /** + * Make a single instance of the model. + * + * @param callable|array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function makeOne($attributes = []) + { + return $this->count(null)->make($attributes); + } + + /** + * Create a collection of models. + * + * @param array $attributes + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model + */ + public function make($attributes = [], ?Model $parent = null) + { + if (! empty($attributes)) { + return $this->state($attributes)->make([], $parent); + } + + if ($this->count === null) { + return tap($this->makeInstance($parent), function ($instance) { + $this->callAfterMaking(collect([$instance])); + }); + } + + if ($this->count < 1) { + return $this->newModel()->newCollection(); + } + + $instances = $this->newModel()->newCollection(array_map(function () use ($parent) { + return $this->makeInstance($parent); + }, range(1, $this->count))); + + $this->callAfterMaking($instances); + + return $instances; + } + + /** + * Make an instance of the model with the given attributes. + * + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return \Illuminate\Database\Eloquent\Model + */ + protected function makeInstance(?Model $parent) + { + return Model::unguarded(function () use ($parent) { + return tap($this->newModel($this->getExpandedAttributes($parent)), function ($instance) { + if (isset($this->connection)) { + $instance->setConnection($this->connection); + } + }); + }); + } + + /** + * Get a raw attributes array for the model. + * + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return mixed + */ + protected function getExpandedAttributes(?Model $parent) + { + return $this->expandAttributes($this->getRawAttributes($parent)); + } + + /** + * Get the raw attributes for the model as an array. + * + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return array + */ + protected function getRawAttributes(?Model $parent) + { + return $this->states->pipe(function ($states) { + return $this->for->isEmpty() ? $states : new Collection(array_merge([function () { + return $this->parentResolvers(); + }], $states->all())); + })->reduce(function ($carry, $state) use ($parent) { + if ($state instanceof Closure) { + $state = $state->bindTo($this); + } + + return array_merge($carry, $state($carry, $parent)); + }, $this->definition()); + } + + /** + * Create the parent relationship resolvers (as deferred Closures). + * + * @return array + */ + protected function parentResolvers() + { + $model = $this->newModel(); + + return $this->for->map(function (BelongsToRelationship $for) use ($model) { + return $for->attributesFor($model); + })->collapse()->all(); + } + + /** + * Expand all attributes to their underlying values. + * + * @param array $definition + * @return array + */ + protected function expandAttributes(array $definition) + { + return collect($definition)->map(function ($attribute, $key) use (&$definition) { + if (is_callable($attribute) && ! is_string($attribute) && ! is_array($attribute)) { + $attribute = $attribute($definition); + } + + if ($attribute instanceof self) { + $attribute = $attribute->create()->getKey(); + } elseif ($attribute instanceof Model) { + $attribute = $attribute->getKey(); + } + + $definition[$key] = $attribute; + + return $attribute; + })->all(); + } + + /** + * Add a new state transformation to the model definition. + * + * @param callable|array $state + * @return static + */ + public function state($state) + { + return $this->newInstance([ + 'states' => $this->states->concat([ + is_callable($state) ? $state : function () use ($state) { + return $state; + }, + ]), + ]); + } + + /** + * Add a new sequenced state transformation to the model definition. + * + * @param array $sequence + * @return static + */ + public function sequence(...$sequence) + { + return $this->state(new Sequence(...$sequence)); + } + + /** + * Add a new cross joined sequenced state transformation to the model definition. + * + * @param array $sequence + * @return static + */ + public function crossJoinSequence(...$sequence) + { + return $this->state(new CrossJoinSequence(...$sequence)); + } + + /** + * Define a child relationship for the model. + * + * @param \Illuminate\Database\Eloquent\Factories\Factory $factory + * @param string|null $relationship + * @return static + */ + public function has(self $factory, $relationship = null) + { + return $this->newInstance([ + 'has' => $this->has->concat([new Relationship( + $factory, $relationship ?: $this->guessRelationship($factory->modelName()) + )]), + ]); + } + + /** + * Attempt to guess the relationship name for a "has" relationship. + * + * @param string $related + * @return string + */ + protected function guessRelationship(string $related) + { + $guess = Str::camel(Str::plural(class_basename($related))); + + return method_exists($this->modelName(), $guess) ? $guess : Str::singular($guess); + } + + /** + * Define an attached relationship for the model. + * + * @param \Illuminate\Database\Eloquent\Factories\Factory|\Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model $factory + * @param callable|array $pivot + * @param string|null $relationship + * @return static + */ + public function hasAttached($factory, $pivot = [], $relationship = null) + { + return $this->newInstance([ + 'has' => $this->has->concat([new BelongsToManyRelationship( + $factory, + $pivot, + $relationship ?: Str::camel(Str::plural(class_basename( + $factory instanceof Factory + ? $factory->modelName() + : Collection::wrap($factory)->first() + ))) + )]), + ]); + } + + /** + * Define a parent relationship for the model. + * + * @param \Illuminate\Database\Eloquent\Factories\Factory|\Illuminate\Database\Eloquent\Model $factory + * @param string|null $relationship + * @return static + */ + public function for($factory, $relationship = null) + { + return $this->newInstance(['for' => $this->for->concat([new BelongsToRelationship( + $factory, + $relationship ?: Str::camel(class_basename( + $factory instanceof Factory ? $factory->modelName() : $factory + )) + )])]); + } + + /** + * Add a new "after making" callback to the model definition. + * + * @param \Closure $callback + * @return static + */ + public function afterMaking(Closure $callback) + { + return $this->newInstance(['afterMaking' => $this->afterMaking->concat([$callback])]); + } + + /** + * Add a new "after creating" callback to the model definition. + * + * @param \Closure $callback + * @return static + */ + public function afterCreating(Closure $callback) + { + return $this->newInstance(['afterCreating' => $this->afterCreating->concat([$callback])]); + } + + /** + * Call the "after making" callbacks for the given model instances. + * + * @param \Illuminate\Support\Collection $instances + * @return void + */ + protected function callAfterMaking(Collection $instances) + { + $instances->each(function ($model) { + $this->afterMaking->each(function ($callback) use ($model) { + $callback($model); + }); + }); + } + + /** + * Call the "after creating" callbacks for the given model instances. + * + * @param \Illuminate\Support\Collection $instances + * @param \Illuminate\Database\Eloquent\Model|null $parent + * @return void + */ + protected function callAfterCreating(Collection $instances, ?Model $parent = null) + { + $instances->each(function ($model) use ($parent) { + $this->afterCreating->each(function ($callback) use ($model, $parent) { + $callback($model, $parent); + }); + }); + } + + /** + * Specify how many models should be generated. + * + * @param int|null $count + * @return static + */ + public function count(?int $count) + { + return $this->newInstance(['count' => $count]); + } + + /** + * Specify the database connection that should be used to generate models. + * + * @param string $connection + * @return static + */ + public function connection(string $connection) + { + return $this->newInstance(['connection' => $connection]); + } + + /** + * Create a new instance of the factory builder with the given mutated properties. + * + * @param array $arguments + * @return static + */ + protected function newInstance(array $arguments = []) + { + return new static(...array_values(array_merge([ + 'count' => $this->count, + 'states' => $this->states, + 'has' => $this->has, + 'for' => $this->for, + 'afterMaking' => $this->afterMaking, + 'afterCreating' => $this->afterCreating, + 'connection' => $this->connection, + ], $arguments))); + } + + /** + * Get a new model instance. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function newModel(array $attributes = []) + { + $model = $this->modelName(); + + return new $model($attributes); + } + + /** + * Get the name of the model that is generated by the factory. + * + * @return string + */ + public function modelName() + { + $resolver = static::$modelNameResolver ?: function (self $factory) { + $namespacedFactoryBasename = Str::replaceLast( + 'Factory', '', Str::replaceFirst(static::$namespace, '', get_class($factory)) + ); + + $factoryBasename = Str::replaceLast('Factory', '', class_basename($factory)); + + $appNamespace = static::appNamespace(); + + return class_exists($appNamespace.'Models\\'.$namespacedFactoryBasename) + ? $appNamespace.'Models\\'.$namespacedFactoryBasename + : $appNamespace.$factoryBasename; + }; + + return $this->model ?: $resolver($this); + } + + /** + * Specify the callback that should be invoked to guess model names based on factory names. + * + * @param callable $callback + * @return void + */ + public static function guessModelNamesUsing(callable $callback) + { + static::$modelNameResolver = $callback; + } + + /** + * Specify the default namespace that contains the application's model factories. + * + * @param string $namespace + * @return void + */ + public static function useNamespace(string $namespace) + { + static::$namespace = $namespace; + } + + /** + * Get a new factory instance for the given model name. + * + * @param string $modelName + * @return static + */ + public static function factoryForModel(string $modelName) + { + $factory = static::resolveFactoryName($modelName); + + return $factory::new(); + } + + /** + * Specify the callback that should be invoked to guess factory names based on dynamic relationship names. + * + * @param callable $callback + * @return void + */ + public static function guessFactoryNamesUsing(callable $callback) + { + static::$factoryNameResolver = $callback; + } + + /** + * Get a new Faker instance. + * + * @return \Faker\Generator + */ + protected function withFaker() + { + return Container::getInstance()->make(Generator::class); + } + + /** + * Get the factory name for the given model name. + * + * @param string $modelName + * @return string + */ + public static function resolveFactoryName(string $modelName) + { + $resolver = static::$factoryNameResolver ?: function (string $modelName) { + $appNamespace = static::appNamespace(); + + $modelName = Str::startsWith($modelName, $appNamespace.'Models\\') + ? Str::after($modelName, $appNamespace.'Models\\') + : Str::after($modelName, $appNamespace); + + return static::$namespace.$modelName.'Factory'; + }; + + return $resolver($modelName); + } + + /** + * Get the application namespace for the application. + * + * @return string + */ + protected static function appNamespace() + { + try { + return Container::getInstance() + ->make(Application::class) + ->getNamespace(); + } catch (Throwable $e) { + return 'App\\'; + } + } + + /** + * Proxy dynamic factory methods onto their proper methods. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + if (! Str::startsWith($method, ['for', 'has'])) { + static::throwBadMethodCallException($method); + } + + $relationship = Str::camel(Str::substr($method, 3)); + + $relatedModel = get_class($this->newModel()->{$relationship}()->getRelated()); + + if (method_exists($relatedModel, 'newFactory')) { + $factory = $relatedModel::newFactory() ?: static::factoryForModel($relatedModel); + } else { + $factory = static::factoryForModel($relatedModel); + } + + if (Str::startsWith($method, 'for')) { + return $this->for($factory->state($parameters[0] ?? []), $relationship); + } elseif (Str::startsWith($method, 'has')) { + return $this->has( + $factory + ->count(is_numeric($parameters[0] ?? null) ? $parameters[0] : 1) + ->state((is_callable($parameters[0] ?? null) || is_array($parameters[0] ?? null)) ? $parameters[0] : ($parameters[1] ?? [])), + $relationship + ); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/HasFactory.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/HasFactory.php new file mode 100644 index 000000000..7d2be2205 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/HasFactory.php @@ -0,0 +1,31 @@ +count(is_numeric($parameters[0] ?? null) ? $parameters[0] : null) + ->state(is_array($parameters[0] ?? null) ? $parameters[0] : ($parameters[1] ?? [])); + } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Relationship.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Relationship.php new file mode 100644 index 000000000..788f6bc82 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Relationship.php @@ -0,0 +1,62 @@ +factory = $factory; + $this->relationship = $relationship; + } + + /** + * Create the child relationship for the given parent model. + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @return void + */ + public function createFor(Model $parent) + { + $relationship = $parent->{$this->relationship}(); + + if ($relationship instanceof MorphOneOrMany) { + $this->factory->state([ + $relationship->getMorphType() => $relationship->getMorphClass(), + $relationship->getForeignKeyName() => $relationship->getParentKey(), + ])->create([], $parent); + } elseif ($relationship instanceof HasOneOrMany) { + $this->factory->state([ + $relationship->getForeignKeyName() => $relationship->getParentKey(), + ])->create([], $parent); + } elseif ($relationship instanceof BelongsToMany) { + $relationship->attach($this->factory->create([], $parent)); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Sequence.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Sequence.php new file mode 100644 index 000000000..064cc4a4e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Sequence.php @@ -0,0 +1,63 @@ +sequence = $sequence; + $this->count = count($sequence); + } + + /** + * Get the current count of the sequence items. + * + * @return int + */ + public function count(): int + { + return $this->count; + } + + /** + * Get the next value in the sequence. + * + * @return mixed + */ + public function __invoke() + { + return tap(value($this->sequence[$this->index % $this->count], $this), function () { + $this->index = $this->index + 1; + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php deleted file mode 100644 index 6c41bac58..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php +++ /dev/null @@ -1,271 +0,0 @@ -faker = $faker; - } - - /** - * Create a new factory container. - * - * @param \Faker\Generator $faker - * @param string|null $pathToFactories - * @return static - */ - public static function construct(Faker $faker, $pathToFactories = null) - { - $pathToFactories = $pathToFactories ?: database_path('factories'); - - return (new static($faker))->load($pathToFactories); - } - - /** - * Define a class with a given set of attributes. - * - * @param string $class - * @param callable $attributes - * @return $this - */ - public function define($class, callable $attributes) - { - $this->definitions[$class] = $attributes; - - return $this; - } - - /** - * Define a state with a given set of attributes. - * - * @param string $class - * @param string $state - * @param callable|array $attributes - * @return $this - */ - public function state($class, $state, $attributes) - { - $this->states[$class][$state] = $attributes; - - return $this; - } - - /** - * Define a callback to run after making a model. - * - * @param string $class - * @param callable $callback - * @param string $name - * @return $this - */ - public function afterMaking($class, callable $callback, $name = 'default') - { - $this->afterMaking[$class][$name][] = $callback; - - return $this; - } - - /** - * Define a callback to run after making a model with given state. - * - * @param string $class - * @param string $state - * @param callable $callback - * @return $this - */ - public function afterMakingState($class, $state, callable $callback) - { - return $this->afterMaking($class, $callback, $state); - } - - /** - * Define a callback to run after creating a model. - * - * @param string $class - * @param callable $callback - * @param string $name - * @return $this - */ - public function afterCreating($class, callable $callback, $name = 'default') - { - $this->afterCreating[$class][$name][] = $callback; - - return $this; - } - - /** - * Define a callback to run after creating a model with given state. - * - * @param string $class - * @param string $state - * @param callable $callback - * @return $this - */ - public function afterCreatingState($class, $state, callable $callback) - { - return $this->afterCreating($class, $callback, $state); - } - - /** - * Create an instance of the given model and persist it to the database. - * - * @param string $class - * @param array $attributes - * @return mixed - */ - public function create($class, array $attributes = []) - { - return $this->of($class)->create($attributes); - } - - /** - * Create an instance of the given model. - * - * @param string $class - * @param array $attributes - * @return mixed - */ - public function make($class, array $attributes = []) - { - return $this->of($class)->make($attributes); - } - - /** - * Get the raw attribute array for a given model. - * - * @param string $class - * @param array $attributes - * @return array - */ - public function raw($class, array $attributes = []) - { - return array_merge( - call_user_func($this->definitions[$class], $this->faker), $attributes - ); - } - - /** - * Create a builder for the given model. - * - * @param string $class - * @return \Illuminate\Database\Eloquent\FactoryBuilder - */ - public function of($class) - { - return new FactoryBuilder( - $class, $this->definitions, $this->states, - $this->afterMaking, $this->afterCreating, $this->faker - ); - } - - /** - * Load factories from path. - * - * @param string $path - * @return $this - */ - public function load($path) - { - $factory = $this; - - if (is_dir($path)) { - foreach (Finder::create()->files()->name('*.php')->in($path) as $file) { - require $file->getRealPath(); - } - } - - return $factory; - } - - /** - * Determine if the given offset exists. - * - * @param string $offset - * @return bool - */ - public function offsetExists($offset) - { - return isset($this->definitions[$offset]); - } - - /** - * Get the value of the given offset. - * - * @param string $offset - * @return mixed - */ - public function offsetGet($offset) - { - return $this->make($offset); - } - - /** - * Set the given offset to the given value. - * - * @param string $offset - * @param callable $value - * @return void - */ - public function offsetSet($offset, $value) - { - $this->define($offset, $value); - } - - /** - * Unset the value at the given offset. - * - * @param string $offset - * @return void - */ - public function offsetUnset($offset) - { - unset($this->definitions[$offset]); - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php deleted file mode 100644 index ccd82bf15..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php +++ /dev/null @@ -1,449 +0,0 @@ -class = $class; - $this->faker = $faker; - $this->states = $states; - $this->definitions = $definitions; - $this->afterMaking = $afterMaking; - $this->afterCreating = $afterCreating; - } - - /** - * Set the amount of models you wish to create / make. - * - * @param int $amount - * @return $this - */ - public function times($amount) - { - $this->amount = $amount; - - return $this; - } - - /** - * Set the state to be applied to the model. - * - * @param string $state - * @return $this - */ - public function state($state) - { - return $this->states([$state]); - } - - /** - * Set the states to be applied to the model. - * - * @param array|mixed $states - * @return $this - */ - public function states($states) - { - $this->activeStates = is_array($states) ? $states : func_get_args(); - - return $this; - } - - /** - * Set the database connection on which the model instance should be persisted. - * - * @param string $name - * @return $this - */ - public function connection($name) - { - $this->connection = $name; - - return $this; - } - - /** - * Create a model and persist it in the database if requested. - * - * @param array $attributes - * @return \Closure - */ - public function lazy(array $attributes = []) - { - return function () use ($attributes) { - return $this->create($attributes); - }; - } - - /** - * Create a collection of models and persist them to the database. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model|mixed - */ - public function create(array $attributes = []) - { - $results = $this->make($attributes); - - if ($results instanceof Model) { - $this->store(collect([$results])); - - $this->callAfterCreating(collect([$results])); - } else { - $this->store($results); - - $this->callAfterCreating($results); - } - - return $results; - } - - /** - * Create a collection of models and persist them to the database. - * - * @param iterable $records - * @return \Illuminate\Database\Eloquent\Collection|mixed - */ - public function createMany(iterable $records) - { - return (new $this->class)->newCollection(array_map(function ($attribute) { - return $this->create($attribute); - }, $records)); - } - - /** - * Set the connection name on the results and store them. - * - * @param \Illuminate\Support\Collection $results - * @return void - */ - protected function store($results) - { - $results->each(function ($model) { - if (! isset($this->connection)) { - $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName()); - } - - $model->save(); - }); - } - - /** - * Create a collection of models. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model|mixed - */ - public function make(array $attributes = []) - { - if ($this->amount === null) { - return tap($this->makeInstance($attributes), function ($instance) { - $this->callAfterMaking(collect([$instance])); - }); - } - - if ($this->amount < 1) { - return (new $this->class)->newCollection(); - } - - $instances = (new $this->class)->newCollection(array_map(function () use ($attributes) { - return $this->makeInstance($attributes); - }, range(1, $this->amount))); - - $this->callAfterMaking($instances); - - return $instances; - } - - /** - * Create an array of raw attribute arrays. - * - * @param array $attributes - * @return mixed - */ - public function raw(array $attributes = []) - { - if ($this->amount === null) { - return $this->getRawAttributes($attributes); - } - - if ($this->amount < 1) { - return []; - } - - return array_map(function () use ($attributes) { - return $this->getRawAttributes($attributes); - }, range(1, $this->amount)); - } - - /** - * Get a raw attributes array for the model. - * - * @param array $attributes - * @return mixed - * - * @throws \InvalidArgumentException - */ - protected function getRawAttributes(array $attributes = []) - { - if (! isset($this->definitions[$this->class])) { - throw new InvalidArgumentException("Unable to locate factory for [{$this->class}]."); - } - - $definition = call_user_func( - $this->definitions[$this->class], - $this->faker, $attributes - ); - - return $this->expandAttributes( - array_merge($this->applyStates($definition, $attributes), $attributes) - ); - } - - /** - * Make an instance of the model with the given attributes. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - */ - protected function makeInstance(array $attributes = []) - { - return Model::unguarded(function () use ($attributes) { - $instance = new $this->class( - $this->getRawAttributes($attributes) - ); - - if (isset($this->connection)) { - $instance->setConnection($this->connection); - } - - return $instance; - }); - } - - /** - * Apply the active states to the model definition array. - * - * @param array $definition - * @param array $attributes - * @return array - * - * @throws \InvalidArgumentException - */ - protected function applyStates(array $definition, array $attributes = []) - { - foreach ($this->activeStates as $state) { - if (! isset($this->states[$this->class][$state])) { - if ($this->stateHasAfterCallback($state)) { - continue; - } - - throw new InvalidArgumentException("Unable to locate [{$state}] state for [{$this->class}]."); - } - - $definition = array_merge( - $definition, - $this->stateAttributes($state, $attributes) - ); - } - - return $definition; - } - - /** - * Get the state attributes. - * - * @param string $state - * @param array $attributes - * @return array - */ - protected function stateAttributes($state, array $attributes) - { - $stateAttributes = $this->states[$this->class][$state]; - - if (! is_callable($stateAttributes)) { - return $stateAttributes; - } - - return $stateAttributes($this->faker, $attributes); - } - - /** - * Expand all attributes to their underlying values. - * - * @param array $attributes - * @return array - */ - protected function expandAttributes(array $attributes) - { - foreach ($attributes as &$attribute) { - if (is_callable($attribute) && ! is_string($attribute) && ! is_array($attribute)) { - $attribute = $attribute($attributes); - } - - if ($attribute instanceof static) { - $attribute = $attribute->create()->getKey(); - } - - if ($attribute instanceof Model) { - $attribute = $attribute->getKey(); - } - } - - return $attributes; - } - - /** - * Run after making callbacks on a collection of models. - * - * @param \Illuminate\Support\Collection $models - * @return void - */ - public function callAfterMaking($models) - { - $this->callAfter($this->afterMaking, $models); - } - - /** - * Run after creating callbacks on a collection of models. - * - * @param \Illuminate\Support\Collection $models - * @return void - */ - public function callAfterCreating($models) - { - $this->callAfter($this->afterCreating, $models); - } - - /** - * Call after callbacks for each model and state. - * - * @param array $afterCallbacks - * @param \Illuminate\Support\Collection $models - * @return void - */ - protected function callAfter(array $afterCallbacks, $models) - { - $states = array_merge(['default'], $this->activeStates); - - $models->each(function ($model) use ($states, $afterCallbacks) { - foreach ($states as $state) { - $this->callAfterCallbacks($afterCallbacks, $model, $state); - } - }); - } - - /** - * Call after callbacks for each model and state. - * - * @param array $afterCallbacks - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $state - * @return void - */ - protected function callAfterCallbacks(array $afterCallbacks, $model, $state) - { - if (! isset($afterCallbacks[$this->class][$state])) { - return; - } - - foreach ($afterCallbacks[$this->class][$state] as $callback) { - $callback($model, $this->faker); - } - } - - /** - * Determine if the given state has an "after" callback. - * - * @param string $state - * @return bool - */ - protected function stateHasAfterCallback($state) - { - return isset($this->afterMaking[$this->class][$state]) || - isset($this->afterCreating[$this->class][$state]); - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/InvalidCastException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/InvalidCastException.php new file mode 100644 index 000000000..9d00eb3e4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/InvalidCastException.php @@ -0,0 +1,48 @@ +model = $class; + $this->column = $column; + $this->castType = $castType; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassPrunable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassPrunable.php new file mode 100644 index 000000000..254ca9bd2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassPrunable.php @@ -0,0 +1,48 @@ +prunable(), function ($query) use ($chunkSize) { + $query->when(! $query->getQuery()->limit, function ($query) use ($chunkSize) { + $query->limit($chunkSize); + }); + }); + + $total = 0; + + do { + $total += $count = in_array(SoftDeletes::class, class_uses_recursive(get_class($this))) + ? $query->forceDelete() + : $query->delete(); + + if ($count > 0) { + event(new ModelsPruned(static::class, $total)); + } + } while ($count > 0); + + return $total; + } + + /** + * Get the prunable model query. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function prunable() + { + throw new LogicException('Please implement the prunable method on your model.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php index 9b9d72642..d1742bbeb 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php @@ -3,13 +3,15 @@ namespace Illuminate\Database\Eloquent; use ArrayAccess; -use Exception; +use Illuminate\Contracts\Broadcasting\HasBroadcastChannel; use Illuminate\Contracts\Queue\QueueableCollection; use Illuminate\Contracts\Queue\QueueableEntity; use Illuminate\Contracts\Routing\UrlRoutable; use Illuminate\Contracts\Support\Arrayable; +use Illuminate\Contracts\Support\CanBeEscapedWhenCastToString; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Database\ConnectionResolverInterface as Resolver; +use Illuminate\Database\Eloquent\Collection as EloquentCollection; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\Concerns\AsPivot; use Illuminate\Database\Eloquent\Relations\HasManyThrough; @@ -19,8 +21,9 @@ use Illuminate\Support\Collection as BaseCollection; use Illuminate\Support\Str; use Illuminate\Support\Traits\ForwardsCalls; use JsonSerializable; +use LogicException; -abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable +abstract class Model implements Arrayable, ArrayAccess, CanBeEscapedWhenCastToString, HasBroadcastChannel, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable { use Concerns\HasAttributes, Concerns\HasEvents, @@ -80,6 +83,13 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ protected $withCount = []; + /** + * Indicates whether lazy loading will be prevented on this model. + * + * @var bool + */ + public $preventsLazyLoading = false; + /** * The number of models to return for pagination. * @@ -101,6 +111,13 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public $wasRecentlyCreated = false; + /** + * Indicates that the object's string representation should be escaped when __toString is invoked. + * + * @var bool + */ + protected $escapeWhenCastingToString = false; + /** * The connection resolver instance. * @@ -143,6 +160,27 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ protected static $ignoreOnTouch = []; + /** + * Indicates whether lazy loading should be restricted on all models. + * + * @var bool + */ + protected static $modelsShouldPreventLazyLoading = false; + + /** + * The callback that is responsible for handling lazy loading violations. + * + * @var callable|null + */ + protected static $lazyLoadingViolationCallback; + + /** + * Indicates if broadcasting is currently enabled. + * + * @var bool + */ + protected static $isBroadcasting = true; + /** * The name of the "created at" column. * @@ -332,6 +370,47 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return false; } + /** + * Prevent model relationships from being lazy loaded. + * + * @param bool $value + * @return void + */ + public static function preventLazyLoading($value = true) + { + static::$modelsShouldPreventLazyLoading = $value; + } + + /** + * Register a callback that is responsible for handling lazy loading violations. + * + * @param callable|null $callback + * @return void + */ + public static function handleLazyLoadingViolationUsing(?callable $callback) + { + static::$lazyLoadingViolationCallback = $callback; + } + + /** + * Execute a callback without broadcasting any model events for all model types. + * + * @param callable $callback + * @return mixed + */ + public static function withoutBroadcasting(callable $callback) + { + $isBroadcasting = static::$isBroadcasting; + + static::$isBroadcasting = false; + + try { + return $callback(); + } finally { + static::$isBroadcasting = $isBroadcasting; + } + } + /** * Fill the model with an array of attributes. * @@ -345,8 +424,6 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab $totallyGuarded = $this->totallyGuarded(); foreach ($this->fillableFromArray($attributes) as $key => $value) { - $key = $this->removeTableFromKey($key); - // The developers may choose to place some attributes in the "fillable" array // which means only those attributes may be set through mass assignment to // the model, and all others will just get ignored for security reasons. @@ -392,16 +469,16 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab } /** - * Remove the table name from a given key. + * Qualify the given columns with the model's table. * - * @param string $key - * @return string - * - * @deprecated This method is deprecated and will be removed in a future Laravel version. + * @param array $columns + * @return array */ - protected function removeTableFromKey($key) + public function qualifyColumns($columns) { - return $key; + return collect($columns)->map(function ($column) { + return $this->qualifyColumn($column); + })->all(); } /** @@ -531,6 +608,10 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public function loadMorph($relation, $relations) { + if (! $this->{$relation}) { + return $this; + } + $className = get_class($this->{$relation}); $this->{$relation}->load($relations[$className] ?? []); @@ -553,6 +634,21 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return $this; } + /** + * Eager load relation's column aggregations on the model. + * + * @param array|string $relations + * @param string $column + * @param string $function + * @return $this + */ + public function loadAggregate($relations, $column, $function = null) + { + $this->newCollection([$this])->loadAggregate($relations, $column, $function); + + return $this; + } + /** * Eager load relation counts on the model. * @@ -563,7 +659,86 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab { $relations = is_string($relations) ? func_get_args() : $relations; - $this->newCollection([$this])->loadCount($relations); + return $this->loadAggregate($relations, '*', 'count'); + } + + /** + * Eager load relation max column values on the model. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadMax($relations, $column) + { + return $this->loadAggregate($relations, $column, 'max'); + } + + /** + * Eager load relation min column values on the model. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadMin($relations, $column) + { + return $this->loadAggregate($relations, $column, 'min'); + } + + /** + * Eager load relation's column summations on the model. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadSum($relations, $column) + { + return $this->loadAggregate($relations, $column, 'sum'); + } + + /** + * Eager load relation average column values on the model. + * + * @param array|string $relations + * @param string $column + * @return $this + */ + public function loadAvg($relations, $column) + { + return $this->loadAggregate($relations, $column, 'avg'); + } + + /** + * Eager load related model existence values on the model. + * + * @param array|string $relations + * @return $this + */ + public function loadExists($relations) + { + return $this->loadAggregate($relations, '*', 'exists'); + } + + /** + * Eager load relationship column aggregation on the polymorphic relation of a model. + * + * @param string $relation + * @param array $relations + * @param string $column + * @param string $function + * @return $this + */ + public function loadMorphAggregate($relation, $relations, $column, $function = null) + { + if (! $this->{$relation}) { + return $this; + } + + $className = get_class($this->{$relation}); + + $this->{$relation}->loadAggregate($relations[$className] ?? [], $column, $function); return $this; } @@ -577,11 +752,59 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public function loadMorphCount($relation, $relations) { - $className = get_class($this->{$relation}); + return $this->loadMorphAggregate($relation, $relations, '*', 'count'); + } - $this->{$relation}->loadCount($relations[$className] ?? []); + /** + * Eager load relationship max column values on the polymorphic relation of a model. + * + * @param string $relation + * @param array $relations + * @param string $column + * @return $this + */ + public function loadMorphMax($relation, $relations, $column) + { + return $this->loadMorphAggregate($relation, $relations, $column, 'max'); + } - return $this; + /** + * Eager load relationship min column values on the polymorphic relation of a model. + * + * @param string $relation + * @param array $relations + * @param string $column + * @return $this + */ + public function loadMorphMin($relation, $relations, $column) + { + return $this->loadMorphAggregate($relation, $relations, $column, 'min'); + } + + /** + * Eager load relationship column summations on the polymorphic relation of a model. + * + * @param string $relation + * @param array $relations + * @param string $column + * @return $this + */ + public function loadMorphSum($relation, $relations, $column) + { + return $this->loadMorphAggregate($relation, $relations, $column, 'sum'); + } + + /** + * Eager load relationship average column values on the polymorphic relation of a model. + * + * @param string $relation + * @param array $relations + * @param string $column + * @return $this + */ + public function loadMorphAvg($relation, $relations, $column) + { + return $this->loadMorphAggregate($relation, $relations, $column, 'avg'); } /** @@ -627,29 +850,23 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return $query->{$method}($column, $amount, $extra); } - $this->incrementOrDecrementAttributeValue($column, $amount, $extra, $method); - - return $query->where( - $this->getKeyName(), $this->getKey() - )->{$method}($column, $amount, $extra); - } - - /** - * Increment the underlying attribute value and sync with original. - * - * @param string $column - * @param float|int $amount - * @param array $extra - * @param string $method - * @return void - */ - protected function incrementOrDecrementAttributeValue($column, $amount, $extra, $method) - { - $this->{$column} = $this->{$column} + ($method === 'increment' ? $amount : $amount * -1); + $this->{$column} = $this->isClassDeviable($column) + ? $this->deviateClassCastableAttribute($method, $column, $amount) + : $this->{$column} + ($method === 'increment' ? $amount : $amount * -1); $this->forceFill($extra); - $this->syncOriginalAttribute($column); + if ($this->fireModelEvent('updating') === false) { + return false; + } + + return tap($this->setKeysForSaveQuery($query)->{$method}($column, $amount, $extra), function () use ($column) { + $this->syncChanges(); + + $this->fireModelEvent('updated', false); + + $this->syncOriginalAttribute($column); + }); } /** @@ -668,6 +885,40 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return $this->fill($attributes)->save($options); } + /** + * Update the model in the database within a transaction. + * + * @param array $attributes + * @param array $options + * @return bool + * + * @throws \Throwable + */ + public function updateOrFail(array $attributes = [], array $options = []) + { + if (! $this->exists) { + return false; + } + + return $this->fill($attributes)->saveOrFail($options); + } + + /** + * Update the model in the database without raising any events. + * + * @param array $attributes + * @param array $options + * @return bool + */ + public function updateQuietly(array $attributes = [], array $options = []) + { + if (! $this->exists) { + return false; + } + + return $this->fill($attributes)->saveQuietly($options); + } + /** * Save the model and all of its relationships. * @@ -696,6 +947,19 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return true; } + /** + * Save the model to the database without raising any events. + * + * @param array $options + * @return bool + */ + public function saveQuietly(array $options = []) + { + return static::withoutEvents(function () use ($options) { + return $this->save($options); + }); + } + /** * Save the model to the database. * @@ -704,7 +968,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public function save(array $options = []) { - $this->mergeAttributesFromClassCasts(); + $this->mergeAttributesFromCachedCasts(); $query = $this->newModelQuery(); @@ -746,7 +1010,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab } /** - * Save the model to the database using transaction. + * Save the model to the database within a transaction. * * @param array $options * @return bool @@ -815,13 +1079,36 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return true; } + /** + * Set the keys for a select query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function setKeysForSelectQuery($query) + { + $query->where($this->getKeyName(), '=', $this->getKeyForSelectQuery()); + + return $query; + } + + /** + * Get the primary key value for a select query. + * + * @return mixed + */ + protected function getKeyForSelectQuery() + { + return $this->original[$this->getKeyName()] ?? $this->getKey(); + } + /** * Set the keys for a save update query. * * @param \Illuminate\Database\Eloquent\Builder $query * @return \Illuminate\Database\Eloquent\Builder */ - protected function setKeysForSaveQuery(Builder $query) + protected function setKeysForSaveQuery($query) { $query->where($this->getKeyName(), '=', $this->getKeyForSaveQuery()); @@ -835,8 +1122,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ protected function getKeyForSaveQuery() { - return $this->original[$this->getKeyName()] - ?? $this->getKey(); + return $this->original[$this->getKeyName()] ?? $this->getKey(); } /** @@ -861,7 +1147,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab // If the model has an incrementing key, we can use the "insertGetId" method on // the query builder, which will give us back the final inserted ID for this // table from the database. Not all tables have to be incrementing though. - $attributes = $this->getAttributes(); + $attributes = $this->getAttributesForInsert(); if ($this->getIncrementing()) { $this->insertAndSetId($query, $attributes); @@ -912,10 +1198,9 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public static function destroy($ids) { - // We'll initialize a count here so we will return the total number of deletes - // for the operation. The developers can then check this number as a boolean - // type value or get this total count of records deleted for logging, etc. - $count = 0; + if ($ids instanceof EloquentCollection) { + $ids = $ids->modelKeys(); + } if ($ids instanceof BaseCollection) { $ids = $ids->all(); @@ -923,11 +1208,17 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab $ids = is_array($ids) ? $ids : func_get_args(); + if (count($ids) === 0) { + return 0; + } + // We will actually pull the models from the database table and call delete on // each of them individually so that their events get fired properly with a // correct set of attributes in case the developers wants to check these. $key = ($instance = new static)->getKeyName(); + $count = 0; + foreach ($instance->whereIn($key, $ids)->get() as $model) { if ($model->delete()) { $count++; @@ -942,14 +1233,14 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * * @return bool|null * - * @throws \Exception + * @throws \LogicException */ public function delete() { - $this->mergeAttributesFromClassCasts(); + $this->mergeAttributesFromCachedCasts(); if (is_null($this->getKeyName())) { - throw new Exception('No primary key defined on model.'); + throw new LogicException('No primary key defined on model.'); } // If the model doesn't exist, there is nothing to delete so we'll just return @@ -978,10 +1269,28 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return true; } + /** + * Delete the model from the database within a transaction. + * + * @return bool|null + * + * @throws \Throwable + */ + public function deleteOrFail() + { + if (! $this->exists) { + return false; + } + + return $this->getConnection()->transaction(function () { + return $this->delete(); + }); + } + /** * Force a hard delete on a soft deleted model. * - * This method protects developers from running forceDelete when trait is missing. + * This method protects developers from running forceDelete when the trait is missing. * * @return bool|null */ @@ -1200,6 +1509,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->toArray(); @@ -1217,9 +1527,8 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return; } - return static::newQueryWithoutScopes() + return $this->setKeysForSelectQuery($this->newQueryWithoutScopes()) ->with(is_string($with) ? func_get_args() : $with) - ->where($this->getKeyName(), $this->getKey()) ->first(); } @@ -1235,7 +1544,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab } $this->setRawAttributes( - static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes + $this->setKeysForSelectQuery($this->newQueryWithoutScopes())->firstOrFail()->attributes ); $this->load(collect($this->relations)->reject(function ($relation) { @@ -1568,7 +1877,19 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public function resolveRouteBinding($value, $field = null) { - return $this->where($field ?? $this->getRouteKeyName(), $value)->first(); + return $this->resolveRouteBindingQuery($this, $value, $field)->first(); + } + + /** + * Retrieve the model for a bound value. + * + * @param mixed $value + * @param string|null $field + * @return \Illuminate\Database\Eloquent\Model|null + */ + public function resolveSoftDeletableRouteBinding($value, $field = null) + { + return $this->resolveRouteBindingQuery($this, $value, $field)->withTrashed()->first(); } /** @@ -1580,6 +1901,32 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * @return \Illuminate\Database\Eloquent\Model|null */ public function resolveChildRouteBinding($childType, $value, $field) + { + return $this->resolveChildRouteBindingQuery($childType, $value, $field)->first(); + } + + /** + * Retrieve the child model for a bound value. + * + * @param string $childType + * @param mixed $value + * @param string|null $field + * @return \Illuminate\Database\Eloquent\Model|null + */ + public function resolveSoftDeletableChildRouteBinding($childType, $value, $field) + { + return $this->resolveChildRouteBindingQuery($childType, $value, $field)->withTrashed()->first(); + } + + /** + * Retrieve the child model query for a bound value. + * + * @param string $childType + * @param mixed $value + * @param string|null $field + * @return \Illuminate\Database\Eloquent\Relations\Relation + */ + protected function resolveChildRouteBindingQuery($childType, $value, $field) { $relationship = $this->{Str::plural(Str::camel($childType))}(); @@ -1587,10 +1934,25 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab if ($relationship instanceof HasManyThrough || $relationship instanceof BelongsToMany) { - return $relationship->where($relationship->getRelated()->getTable().'.'.$field, $value)->first(); - } else { - return $relationship->where($field, $value)->first(); + $field = $relationship->getRelated()->getTable().'.'.$field; } + + return $relationship instanceof Model + ? $relationship->resolveRouteBindingQuery($relationship, $value, $field) + : $relationship->getRelated()->resolveRouteBindingQuery($relationship, $value, $field); + } + + /** + * Retrieve the model for a bound value. + * + * @param \Illuminate\Database\Eloquent\Model|Illuminate\Database\Eloquent\Relations\Relation $query + * @param mixed $value + * @param string|null $field + * @return \Illuminate\Database\Eloquent\Relations\Relation + */ + public function resolveRouteBindingQuery($query, $value, $field = null) + { + return $query->where($field ?? $this->getRouteKeyName(), $value); } /** @@ -1626,6 +1988,36 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab return $this; } + /** + * Determine if lazy loading is disabled. + * + * @return bool + */ + public static function preventsLazyLoading() + { + return static::$modelsShouldPreventLazyLoading; + } + + /** + * Get the broadcast channel route definition that is associated with the given entity. + * + * @return string + */ + public function broadcastChannelRoute() + { + return str_replace('\\', '.', get_class($this)).'.{'.Str::camel(class_basename($this)).'}'; + } + + /** + * Get the broadcast channel name that is associated with the given entity. + * + * @return string + */ + public function broadcastChannel() + { + return str_replace('\\', '.', get_class($this)).'.'.$this->getKey(); + } + /** * Dynamically retrieve attributes on the model. * @@ -1655,6 +2047,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * @param mixed $offset * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return ! is_null($this->getAttribute($offset)); @@ -1666,6 +2059,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * @param mixed $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->getAttribute($offset); @@ -1678,6 +2072,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->setAttribute($offset, $value); @@ -1689,6 +2084,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab * @param mixed $offset * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->attributes[$offset], $this->relations[$offset]); @@ -1755,7 +2151,22 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public function __toString() { - return $this->toJson(); + return $this->escapeWhenCastingToString + ? e($this->toJson()) + : $this->toJson(); + } + + /** + * Indicate that the object's string representation should be escaped when __toString is invoked. + * + * @param bool $escape + * @return $this + */ + public function escapeWhenCastingToString($escape = true) + { + $this->escapeWhenCastingToString = $escape; + + return $this; } /** @@ -1765,9 +2176,10 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab */ public function __sleep() { - $this->mergeAttributesFromClassCasts(); + $this->mergeAttributesFromCachedCasts(); $this->classCastCache = []; + $this->attributeCastCache = []; return array_keys(get_object_vars($this)); } @@ -1780,5 +2192,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab public function __wakeup() { $this->bootIfNotBooted(); + + $this->initializeTraits(); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php index 2795b934b..c35598bdb 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php @@ -2,10 +2,10 @@ namespace Illuminate\Database\Eloquent; +use Illuminate\Database\RecordsNotFoundException; use Illuminate\Support\Arr; -use RuntimeException; -class ModelNotFoundException extends RuntimeException +class ModelNotFoundException extends RecordsNotFoundException { /** * Name of the affected Eloquent model. diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Prunable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Prunable.php new file mode 100644 index 000000000..b4ce1b034 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Prunable.php @@ -0,0 +1,67 @@ +prunable() + ->when(in_array(SoftDeletes::class, class_uses_recursive(get_class($this))), function ($query) { + $query->withTrashed(); + })->chunkById($chunkSize, function ($models) use (&$total) { + $models->each->prune(); + + $total += $models->count(); + + event(new ModelsPruned(static::class, $total)); + }); + + return $total; + } + + /** + * Get the prunable model query. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function prunable() + { + throw new LogicException('Please implement the prunable method on your model.'); + } + + /** + * Prune the model in the database. + * + * @return bool|null + */ + public function prune() + { + $this->pruning(); + + return in_array(SoftDeletes::class, class_uses_recursive(get_class($this))) + ? $this->forceDelete() + : $this->delete(); + } + + /** + * Prepare the model for pruning. + * + * @return void + */ + protected function pruning() + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php index 5acc0b309..73257bb10 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php @@ -25,13 +25,18 @@ class RelationNotFoundException extends RuntimeException * * @param object $model * @param string $relation + * @param string|null $type * @return static */ - public static function make($model, $relation) + public static function make($model, $relation, $type = null) { $class = get_class($model); - $instance = new static("Call to undefined relationship [{$relation}] on model [{$class}]."); + $instance = new static( + is_null($type) + ? "Call to undefined relationship [{$relation}] on model [{$class}]." + : "Call to undefined relationship [{$relation}] on model [{$class}] of type [{$type}].", + ); $instance->model = $class; $instance->relation = $relation; diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php index 0ee8d1ec9..c17b733a1 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php @@ -5,11 +5,15 @@ namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Concerns\ComparesRelatedModels; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithDictionary; use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; class BelongsTo extends Relation { - use SupportsDefaultModels; + use ComparesRelatedModels, + InteractsWithDictionary, + SupportsDefaultModels; /** * The child model instance of the relation. @@ -39,13 +43,6 @@ class BelongsTo extends Relation */ protected $relationName; - /** - * The count of self joins. - * - * @var int - */ - protected static $selfJoinCount = 0; - /** * Create a new belongs to relationship instance. * @@ -179,15 +176,19 @@ class BelongsTo extends Relation $dictionary = []; foreach ($results as $result) { - $dictionary[$result->getAttribute($owner)] = $result; + $attribute = $this->getDictionaryKey($result->getAttribute($owner)); + + $dictionary[$attribute] = $result; } // Once we have the dictionary constructed, we can loop through all the parents // and match back onto their children using these keys of the dictionary and // the primary key of the children to map them onto the correct instances. foreach ($models as $model) { - if (isset($dictionary[$model->{$foreign}])) { - $model->setRelation($relation, $dictionary[$model->{$foreign}]); + $attribute = $this->getDictionaryKey($model->{$foreign}); + + if (isset($dictionary[$attribute])) { + $model->setRelation($relation, $dictionary[$attribute]); } } @@ -197,7 +198,7 @@ class BelongsTo extends Relation /** * Associate the model instance to the given parent. * - * @param \Illuminate\Database\Eloquent\Model|int|string $model + * @param \Illuminate\Database\Eloquent\Model|int|string|null $model * @return \Illuminate\Database\Eloquent\Model */ public function associate($model) @@ -227,6 +228,16 @@ class BelongsTo extends Relation return $this->child->setRelation($this->relationName, null); } + /** + * Alias of "dissociate" method. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function disassociate() + { + return $this->dissociate(); + } + /** * Add the constraints for a relationship query. * @@ -267,16 +278,6 @@ class BelongsTo extends Relation ); } - /** - * Get a relationship join table hash. - * - * @return string - */ - public function getRelationCountHash() - { - return 'laravel_reserved_'.static::$selfJoinCount++; - } - /** * Determine if the related model has an auto-incrementing ID. * @@ -329,6 +330,16 @@ class BelongsTo extends Relation return $this->child->qualifyColumn($this->foreignKey); } + /** + * Get the key value of the child's foreign key. + * + * @return mixed + */ + public function getParentKey() + { + return $this->child->{$this->foreignKey}; + } + /** * Get the associated key of the relationship. * @@ -349,6 +360,17 @@ class BelongsTo extends Relation return $this->related->qualifyColumn($this->ownerKey); } + /** + * Get the value of the model's associated key. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return mixed + */ + protected function getRelatedKeyFrom(Model $model) + { + return $model->{$this->ownerKey}; + } + /** * Get the name of the relationship. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php index 45bfbc2de..4cadd7407 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -2,17 +2,21 @@ namespace Illuminate\Database\Eloquent\Relations; +use Closure; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\Eloquent\Relations\Concerns\AsPivot; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithDictionary; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithPivotTable; use Illuminate\Support\Str; use InvalidArgumentException; class BelongsToMany extends Relation { - use Concerns\InteractsWithPivotTable; + use InteractsWithDictionary, InteractsWithPivotTable; /** * The intermediate table for the relation. @@ -126,13 +130,6 @@ class BelongsToMany extends Relation */ protected $accessor = 'pivot'; - /** - * The count of self joins. - * - * @var int - */ - protected static $selfJoinCount = 0; - /** * Create a new belongs to many relationship instance. * @@ -177,7 +174,7 @@ class BelongsToMany extends Relation return $table; } - if ($model instanceof Pivot) { + if (in_array(AsPivot::class, class_uses_recursive($model))) { $this->using($table); } @@ -211,11 +208,12 @@ class BelongsToMany extends Relation // We need to join to the intermediate table on the related model's primary // key column with the intermediate table's foreign key for the related // model instance. Then we can set the "where" for the parent models. - $baseTable = $this->related->getTable(); - - $key = $baseTable.'.'.$this->relatedKey; - - $query->join($this->table, $key, '=', $this->getQualifiedRelatedPivotKeyName()); + $query->join( + $this->table, + $this->getQualifiedRelatedKeyName(), + '=', + $this->getQualifiedRelatedPivotKeyName() + ); return $this; } @@ -280,9 +278,11 @@ class BelongsToMany extends Relation // Once we have an array dictionary of child objects we can easily match the // children back to their parent using the dictionary and the keys on the - // the parent models. Then we will return the hydrated models back out. + // parent models. Then we should return these hydrated models back out. foreach ($models as $model) { - if (isset($dictionary[$key = $model->{$this->parentKey}])) { + $key = $this->getDictionaryKey($model->{$this->parentKey}); + + if (isset($dictionary[$key])) { $model->setRelation( $relation, $this->related->newCollection($dictionary[$key]) ); @@ -306,7 +306,9 @@ class BelongsToMany extends Relation $dictionary = []; foreach ($results as $result) { - $dictionary[$result->{$this->accessor}->{$this->foreignPivotKey}][] = $result; + $value = $this->getDictionaryKey($result->{$this->accessor}->{$this->foreignPivotKey}); + + $dictionary[$value][] = $result; } return $dictionary; @@ -361,7 +363,7 @@ class BelongsToMany extends Relation { $this->pivotWheres[] = func_get_args(); - return $this->where($this->table.'.'.$column, $operator, $value, $boolean); + return $this->where($this->qualifyPivotColumn($column), $operator, $value, $boolean); } /** @@ -375,7 +377,7 @@ class BelongsToMany extends Relation */ public function wherePivotBetween($column, array $values, $boolean = 'and', $not = false) { - return $this->whereBetween($this->table.'.'.$column, $values, $boolean, $not); + return $this->whereBetween($this->qualifyPivotColumn($column), $values, $boolean, $not); } /** @@ -428,7 +430,7 @@ class BelongsToMany extends Relation { $this->pivotWhereIns[] = func_get_args(); - return $this->whereIn($this->table.'.'.$column, $values, $boolean, $not); + return $this->whereIn($this->qualifyPivotColumn($column), $values, $boolean, $not); } /** @@ -523,7 +525,7 @@ class BelongsToMany extends Relation { $this->pivotWhereNulls[] = func_get_args(); - return $this->whereNull($this->table.'.'.$column, $boolean, $not); + return $this->whereNull($this->qualifyPivotColumn($column), $boolean, $not); } /** @@ -562,7 +564,19 @@ class BelongsToMany extends Relation } /** - * Find a related model by its primary key or return new instance of the related model. + * Add an "order by" clause for a pivot table column. + * + * @param string $column + * @param string $direction + * @return $this + */ + public function orderByPivot($column, $direction = 'asc') + { + return $this->orderBy($this->qualifyPivotColumn($column), $direction); + } + + /** + * Find a related model by its primary key or return a new instance of the related model. * * @param mixed $id * @param array $columns @@ -739,6 +753,28 @@ class BelongsToMany extends Relation throw (new ModelNotFoundException)->setModel(get_class($this->related)); } + /** + * Execute the query and get the first result or call a callback. + * + * @param \Closure|array $columns + * @param \Closure|null $callback + * @return \Illuminate\Database\Eloquent\Model|static|mixed + */ + public function firstOr($columns = ['*'], Closure $callback = null) + { + if ($columns instanceof Closure) { + $callback = $columns; + + $columns = ['*']; + } + + if (! is_null($model = $this->first($columns))) { + return $model; + } + + return $callback(); + } + /** * Get the results of the relationship. * @@ -760,7 +796,7 @@ class BelongsToMany extends Relation public function get($columns = ['*']) { // First we'll add the proper select columns onto the query so it is run with - // the proper columns. Then, we will get the results and hydrate out pivot + // the proper columns. Then, we will get the results and hydrate our pivot // models with the result of those columns as a separate model relation. $builder = $this->query->applyScopes(); @@ -809,7 +845,7 @@ class BelongsToMany extends Relation $defaults = [$this->foreignPivotKey, $this->relatedPivotKey]; return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) { - return $this->table.'.'.$column.' as pivot_'.$column; + return $this->qualifyPivotColumn($column).' as pivot_'.$column; })->unique()->all(); } @@ -849,6 +885,24 @@ class BelongsToMany extends Relation }); } + /** + * Paginate the given query into a cursor paginator. + * + * @param int|null $perPage + * @param array $columns + * @param string $cursorName + * @param string|null $cursor + * @return \Illuminate\Contracts\Pagination\CursorPaginator + */ + public function cursorPaginate($perPage = null, $columns = ['*'], $cursorName = 'cursor', $cursor = null) + { + $this->query->addSelect($this->shouldSelect($columns)); + + return tap($this->query->cursorPaginate($perPage, $columns, $cursorName, $cursor), function ($paginator) { + $this->hydratePivotRelation($paginator->items()); + }); + } + /** * Chunk the results of the query. * @@ -858,12 +912,10 @@ class BelongsToMany extends Relation */ public function chunk($count, callable $callback) { - $this->query->addSelect($this->shouldSelect()); - - return $this->query->chunk($count, function ($results) use ($callback) { + return $this->prepareQueryBuilder()->chunk($count, function ($results, $page) use ($callback) { $this->hydratePivotRelation($results->all()); - return $callback($results); + return $callback($results, $page); }); } @@ -878,7 +930,7 @@ class BelongsToMany extends Relation */ public function chunkById($count, callable $callback, $column = null, $alias = null) { - $this->query->addSelect($this->shouldSelect()); + $this->prepareQueryBuilder(); $column = $column ?? $this->getRelated()->qualifyColumn( $this->getRelatedKeyName() @@ -911,6 +963,44 @@ class BelongsToMany extends Relation }); } + /** + * Query lazily, by chunks of the given size. + * + * @param int $chunkSize + * @return \Illuminate\Support\LazyCollection + */ + public function lazy($chunkSize = 1000) + { + return $this->prepareQueryBuilder()->lazy($chunkSize)->map(function ($model) { + $this->hydratePivotRelation([$model]); + + return $model; + }); + } + + /** + * Query lazily, by chunking the results of a query by comparing IDs. + * + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @return \Illuminate\Support\LazyCollection + */ + public function lazyById($chunkSize = 1000, $column = null, $alias = null) + { + $column = $column ?? $this->getRelated()->qualifyColumn( + $this->getRelatedKeyName() + ); + + $alias = $alias ?? $this->getRelatedKeyName(); + + return $this->prepareQueryBuilder()->lazyById($chunkSize, $column, $alias)->map(function ($model) { + $this->hydratePivotRelation([$model]); + + return $model; + }); + } + /** * Get a lazy collection for the given query. * @@ -918,15 +1008,23 @@ class BelongsToMany extends Relation */ public function cursor() { - $this->query->addSelect($this->shouldSelect()); - - return $this->query->cursor()->map(function ($model) { + return $this->prepareQueryBuilder()->cursor()->map(function ($model) { $this->hydratePivotRelation([$model]); return $model; }); } + /** + * Prepare the query builder for query execution. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function prepareQueryBuilder() + { + return $this->query->addSelect($this->shouldSelect()); + } + /** * Hydrate the pivot table relationship on the models. * @@ -1165,16 +1263,6 @@ class BelongsToMany extends Relation return $this->getQualifiedForeignPivotKeyName(); } - /** - * Get a relationship join table hash. - * - * @return string - */ - public function getRelationCountHash() - { - return 'laravel_reserved_'.static::$selfJoinCount++; - } - /** * Specify that the pivot table has creation and update timestamps. * @@ -1229,7 +1317,7 @@ class BelongsToMany extends Relation */ public function getQualifiedForeignPivotKeyName() { - return $this->table.'.'.$this->foreignPivotKey; + return $this->qualifyPivotColumn($this->foreignPivotKey); } /** @@ -1249,7 +1337,7 @@ class BelongsToMany extends Relation */ public function getQualifiedRelatedPivotKeyName() { - return $this->table.'.'.$this->relatedPivotKey; + return $this->qualifyPivotColumn($this->relatedPivotKey); } /** @@ -1282,6 +1370,16 @@ class BelongsToMany extends Relation return $this->relatedKey; } + /** + * Get the fully qualified related key name for the relation. + * + * @return string + */ + public function getQualifiedRelatedKeyName() + { + return $this->related->qualifyColumn($this->relatedKey); + } + /** * Get the intermediate table for the relationship. * @@ -1321,4 +1419,17 @@ class BelongsToMany extends Relation { return $this->pivotColumns; } + + /** + * Qualify the given column name by the pivot table. + * + * @param string $column + * @return string + */ + public function qualifyPivotColumn($column) + { + return Str::contains($column, '.') + ? $column + : $this->table.'.'.$column; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php index d7de34e2c..af9defb74 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php @@ -83,15 +83,15 @@ trait AsPivot } /** - * Set the keys for a save update query. + * Set the keys for a select query. * * @param \Illuminate\Database\Eloquent\Builder $query * @return \Illuminate\Database\Eloquent\Builder */ - protected function setKeysForSaveQuery(Builder $query) + protected function setKeysForSelectQuery($query) { if (isset($this->attributes[$this->getKeyName()])) { - return parent::setKeysForSaveQuery($query); + return parent::setKeysForSelectQuery($query); } $query->where($this->foreignKey, $this->getOriginal( @@ -103,6 +103,17 @@ trait AsPivot )); } + /** + * Set the keys for a save update query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function setKeysForSaveQuery($query) + { + return $this->setKeysForSelectQuery($query); + } + /** * Delete the pivot model record from the database. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/CanBeOneOfMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/CanBeOneOfMany.php new file mode 100644 index 000000000..6f6b1b7f1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/CanBeOneOfMany.php @@ -0,0 +1,313 @@ +isOneOfMany = true; + + $this->relationName = $relation ?: $this->getDefaultOneOfManyJoinAlias( + $this->guessRelationship() + ); + + $keyName = $this->query->getModel()->getKeyName(); + + $columns = is_string($columns = $column) ? [ + $column => $aggregate, + $keyName => $aggregate, + ] : $column; + + if (! array_key_exists($keyName, $columns)) { + $columns[$keyName] = 'MAX'; + } + + if ($aggregate instanceof Closure) { + $closure = $aggregate; + } + + foreach ($columns as $column => $aggregate) { + if (! in_array(strtolower($aggregate), ['min', 'max'])) { + throw new InvalidArgumentException("Invalid aggregate [{$aggregate}] used within ofMany relation. Available aggregates: MIN, MAX"); + } + + $subQuery = $this->newOneOfManySubQuery( + $this->getOneOfManySubQuerySelectColumns(), + $column, $aggregate + ); + + if (isset($previous)) { + $this->addOneOfManyJoinSubQuery($subQuery, $previous['subQuery'], $previous['column']); + } + + if (isset($closure)) { + $closure($subQuery); + } + + if (! isset($previous)) { + $this->oneOfManySubQuery = $subQuery; + } + + if (array_key_last($columns) == $column) { + $this->addOneOfManyJoinSubQuery($this->query, $subQuery, $column); + } + + $previous = [ + 'subQuery' => $subQuery, + 'column' => $column, + ]; + } + + $this->addConstraints(); + + $columns = $this->query->getQuery()->columns; + + if (is_null($columns) || $columns === ['*']) { + $this->select([$this->qualifyColumn('*')]); + } + + return $this; + } + + /** + * Indicate that the relation is the latest single result of a larger one-to-many relationship. + * + * @param string|array|null $column + * @param string|Closure|null $aggregate + * @param string|null $relation + * @return $this + */ + public function latestOfMany($column = 'id', $relation = null) + { + return $this->ofMany(collect(Arr::wrap($column))->mapWithKeys(function ($column) { + return [$column => 'MAX']; + })->all(), 'MAX', $relation); + } + + /** + * Indicate that the relation is the oldest single result of a larger one-to-many relationship. + * + * @param string|array|null $column + * @param string|Closure|null $aggregate + * @param string|null $relation + * @return $this + */ + public function oldestOfMany($column = 'id', $relation = null) + { + return $this->ofMany(collect(Arr::wrap($column))->mapWithKeys(function ($column) { + return [$column => 'MIN']; + })->all(), 'MIN', $relation); + } + + /** + * Get the default alias for the one of many inner join clause. + * + * @param string $relation + * @return string + */ + protected function getDefaultOneOfManyJoinAlias($relation) + { + return $relation == $this->query->getModel()->getTable() + ? $relation.'_of_many' + : $relation; + } + + /** + * Get a new query for the related model, grouping the query by the given column, often the foreign key of the relationship. + * + * @param string|array $groupBy + * @param string|null $column + * @param string|null $aggregate + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function newOneOfManySubQuery($groupBy, $column = null, $aggregate = null) + { + $subQuery = $this->query->getModel() + ->newQuery() + ->withoutGlobalScopes($this->removedScopes()); + + foreach (Arr::wrap($groupBy) as $group) { + $subQuery->groupBy($this->qualifyRelatedColumn($group)); + } + + if (! is_null($column)) { + $subQuery->selectRaw($aggregate.'('.$subQuery->getQuery()->grammar->wrap($subQuery->qualifyColumn($column)).') as '.$subQuery->getQuery()->grammar->wrap($column.'_aggregate')); + } + + $this->addOneOfManySubQueryConstraints($subQuery, $groupBy, $column, $aggregate); + + return $subQuery; + } + + /** + * Add the join subquery to the given query on the given column and the relationship's foreign key. + * + * @param \Illuminate\Database\Eloquent\Builder $parent + * @param \Illuminate\Database\Eloquent\Builder $subQuery + * @param string $on + * @return void + */ + protected function addOneOfManyJoinSubQuery(Builder $parent, Builder $subQuery, $on) + { + $parent->beforeQuery(function ($parent) use ($subQuery, $on) { + $subQuery->applyBeforeQueryCallbacks(); + + $parent->joinSub($subQuery, $this->relationName, function ($join) use ($on) { + $join->on($this->qualifySubSelectColumn($on.'_aggregate'), '=', $this->qualifyRelatedColumn($on)); + + $this->addOneOfManyJoinSubQueryConstraints($join, $on); + }); + }); + } + + /** + * Merge the relationship query joins to the given query builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function mergeOneOfManyJoinsTo(Builder $query) + { + $query->getQuery()->beforeQueryCallbacks = $this->query->getQuery()->beforeQueryCallbacks; + + $query->applyBeforeQueryCallbacks(); + } + + /** + * Get the query builder that will contain the relationship constraints. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function getRelationQuery() + { + return $this->isOneOfMany() + ? $this->oneOfManySubQuery + : $this->query; + } + + /** + * Get the one of many inner join subselect builder instance. + * + * @return \Illuminate\Database\Eloquent\Builder|void + */ + public function getOneOfManySubQuery() + { + return $this->oneOfManySubQuery; + } + + /** + * Get the qualified column name for the one-of-many relationship using the subselect join query's alias. + * + * @param string $column + * @return string + */ + public function qualifySubSelectColumn($column) + { + return $this->getRelationName().'.'.last(explode('.', $column)); + } + + /** + * Qualify related column using the related table name if it is not already qualified. + * + * @param string $column + * @return string + */ + protected function qualifyRelatedColumn($column) + { + return Str::contains($column, '.') ? $column : $this->query->getModel()->getTable().'.'.$column; + } + + /** + * Guess the "hasOne" relationship's name via backtrace. + * + * @return string + */ + protected function guessRelationship() + { + return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['function']; + } + + /** + * Determine whether the relationship is a one-of-many relationship. + * + * @return bool + */ + public function isOneOfMany() + { + return $this->isOneOfMany; + } + + /** + * Get the name of the relationship. + * + * @return string + */ + public function getRelationName() + { + return $this->relationName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/ComparesRelatedModels.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/ComparesRelatedModels.php new file mode 100644 index 000000000..ca0669887 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/ComparesRelatedModels.php @@ -0,0 +1,77 @@ +compareKeys($this->getParentKey(), $this->getRelatedKeyFrom($model)) && + $this->related->getTable() === $model->getTable() && + $this->related->getConnectionName() === $model->getConnectionName(); + + if ($match && $this instanceof SupportsPartialRelations && $this->isOneOfMany()) { + return $this->query + ->whereKey($model->getKey()) + ->exists(); + } + + return $match; + } + + /** + * Determine if the model is not the related instance of the relationship. + * + * @param \Illuminate\Database\Eloquent\Model|null $model + * @return bool + */ + public function isNot($model) + { + return ! $this->is($model); + } + + /** + * Get the value of the parent model's key. + * + * @return mixed + */ + abstract public function getParentKey(); + + /** + * Get the value of the model's related key. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return mixed + */ + abstract protected function getRelatedKeyFrom(Model $model); + + /** + * Compare the parent key with the related key. + * + * @param mixed $parentKey + * @param mixed $relatedKey + * @return bool + */ + protected function compareKeys($parentKey, $relatedKey) + { + if (empty($parentKey) || empty($relatedKey)) { + return false; + } + + if (is_int($parentKey) || is_int($relatedKey)) { + return (int) $parentKey === (int) $relatedKey; + } + + return $parentKey === $relatedKey; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithDictionary.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithDictionary.php new file mode 100644 index 000000000..ba4ae9aeb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithDictionary.php @@ -0,0 +1,35 @@ +__toString(); + } + + if (function_exists('enum_exists') && + $attribute instanceof BackedEnum) { + return $attribute->value; + } + + throw new InvalidArgumentException('Model attribute value is an object but does not have a __toString method.'); + } + + return $attribute; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php index df39c1169..7a1cbfaed 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php @@ -116,13 +116,29 @@ trait InteractsWithPivotTable // have done any attaching or detaching, and if we have we will touch these // relationships if they are configured to touch on any database updates. if (count($changes['attached']) || - count($changes['updated'])) { + count($changes['updated']) || + count($changes['detached'])) { $this->touchIfTouching(); } return $changes; } + /** + * Sync the intermediate tables with a list of IDs or collection of models with the given pivot values. + * + * @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids + * @param array $values + * @param bool $detaching + * @return array + */ + public function syncWithPivotValues($ids, array $values, bool $detaching = true) + { + return $this->sync(collect($this->parseIds($ids))->mapWithKeys(function ($id) use ($values) { + return [$id => $values]; + }), $detaching); + } + /** * Format the sync / toggle record list so that it is keyed by ID. * @@ -431,7 +447,7 @@ trait InteractsWithPivotTable return 0; } - $query->whereIn($this->relatedPivotKey, (array) $ids); + $query->whereIn($this->getQualifiedRelatedPivotKeyName(), (array) $ids); } // Once we have all of the conditions set on the statement, we are ready @@ -475,7 +491,7 @@ trait InteractsWithPivotTable protected function getCurrentlyAttachedPivots() { return $this->newPivotQuery()->get()->map(function ($record) { - $class = $this->using ? $this->using : Pivot::class; + $class = $this->using ?: Pivot::class; $pivot = $class::fromRawAttributes($this->parent, (array) $record, $this->getTable(), true); @@ -552,7 +568,7 @@ trait InteractsWithPivotTable $query->whereNull(...$arguments); } - return $query->where($this->foreignPivotKey, $this->parent->{$this->parentKey}); + return $query->where($this->getQualifiedForeignPivotKeyName(), $this->parent->{$this->parentKey}); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php index b0b568b25..207481679 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php @@ -7,10 +7,13 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithDictionary; use Illuminate\Database\Eloquent\SoftDeletes; class HasManyThrough extends Relation { + use InteractsWithDictionary; + /** * The "through" parent model instance. * @@ -53,13 +56,6 @@ class HasManyThrough extends Relation */ protected $secondLocalKey; - /** - * The count of self joins. - * - * @var int - */ - protected static $selfJoinCount = 0; - /** * Create a new has many through relationship instance. * @@ -200,7 +196,7 @@ class HasManyThrough extends Relation // link them up with their children using the keyed dictionary to make the // matching very convenient and easy work. Then we'll just return them. foreach ($models as $model) { - if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) { + if (isset($dictionary[$key = $this->getDictionaryKey($model->getAttribute($this->localKey))])) { $model->setRelation( $relation, $this->related->newCollection($dictionary[$key]) ); @@ -435,6 +431,22 @@ class HasManyThrough extends Relation return $this->query->simplePaginate($perPage, $columns, $pageName, $page); } + /** + * Paginate the given query into a cursor paginator. + * + * @param int|null $perPage + * @param array $columns + * @param string $cursorName + * @param string|null $cursor + * @return \Illuminate\Contracts\Pagination\CursorPaginator + */ + public function cursorPaginate($perPage = null, $columns = ['*'], $cursorName = 'cursor', $cursor = null) + { + $this->query->addSelect($this->shouldSelect($columns)); + + return $this->query->cursorPaginate($perPage, $columns, $cursorName, $cursor); + } + /** * Set the select clause for the relation query. * @@ -508,6 +520,34 @@ class HasManyThrough extends Relation }); } + /** + * Query lazily, by chunks of the given size. + * + * @param int $chunkSize + * @return \Illuminate\Support\LazyCollection + */ + public function lazy($chunkSize = 1000) + { + return $this->prepareQueryBuilder()->lazy($chunkSize); + } + + /** + * Query lazily, by chunking the results of a query by comparing IDs. + * + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @return \Illuminate\Support\LazyCollection + */ + public function lazyById($chunkSize = 1000, $column = null, $alias = null) + { + $column = $column ?? $this->getRelated()->getQualifiedKeyName(); + + $alias = $alias ?? $this->getRelated()->getKeyName(); + + return $this->prepareQueryBuilder()->lazyById($chunkSize, $column, $alias); + } + /** * Prepare the query builder for query execution. * @@ -596,16 +636,6 @@ class HasManyThrough extends Relation ); } - /** - * Get a relationship join table hash. - * - * @return string - */ - public function getRelationCountHash() - { - return 'laravel_reserved_'.static::$selfJoinCount++; - } - /** * Get the qualified foreign key on the related model. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php index 1d9e008fd..15c735c32 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php @@ -2,13 +2,18 @@ namespace Illuminate\Database\Eloquent\Relations; +use Illuminate\Contracts\Database\Eloquent\SupportsPartialRelations; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Concerns\CanBeOneOfMany; +use Illuminate\Database\Eloquent\Relations\Concerns\ComparesRelatedModels; use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; +use Illuminate\Database\Query\JoinClause; -class HasOne extends HasOneOrMany +class HasOne extends HasOneOrMany implements SupportsPartialRelations { - use SupportsDefaultModels; + use ComparesRelatedModels, CanBeOneOfMany, SupportsDefaultModels; /** * Get the results of the relationship. @@ -53,6 +58,59 @@ class HasOne extends HasOneOrMany return $this->matchOne($models, $results, $relation); } + /** + * Add the constraints for an internal relationship existence query. + * + * Essentially, these queries compare on column names like "whereColumn". + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + if ($this->isOneOfMany()) { + $this->mergeOneOfManyJoinsTo($query); + } + + return parent::getRelationExistenceQuery($query, $parentQuery, $columns); + } + + /** + * Add constraints for inner join subselect for one of many relationships. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string|null $column + * @param string|null $aggregate + * @return void + */ + public function addOneOfManySubQueryConstraints(Builder $query, $column = null, $aggregate = null) + { + $query->addSelect($this->foreignKey); + } + + /** + * Get the columns that should be selected by the one of many subquery. + * + * @return array|string + */ + public function getOneOfManySubQuerySelectColumns() + { + return $this->foreignKey; + } + + /** + * Add join query constraints for one of many relationships. + * + * @param \Illuminate\Database\Eloquent\JoinClause $join + * @return void + */ + public function addOneOfManyJoinSubQueryConstraints(JoinClause $join) + { + $join->on($this->qualifySubSelectColumn($this->foreignKey), '=', $this->qualifyRelatedColumn($this->foreignKey)); + } + /** * Make a new related instance for the given model. * @@ -65,4 +123,15 @@ class HasOne extends HasOneOrMany $this->getForeignKeyName(), $parent->{$this->localKey} ); } + + /** + * Get the value of the model's foreign key. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return mixed + */ + protected function getRelatedKeyFrom(Model $model) + { + return $model->getAttribute($this->getForeignKeyName()); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php index d015c863b..ff738b9ad 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php @@ -5,9 +5,12 @@ namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithDictionary; abstract class HasOneOrMany extends Relation { + use InteractsWithDictionary; + /** * The foreign key of the parent model. * @@ -22,13 +25,6 @@ abstract class HasOneOrMany extends Relation */ protected $localKey; - /** - * The count of self joins. - * - * @var int - */ - protected static $selfJoinCount = 0; - /** * Create a new has one or many relationship instance. * @@ -60,7 +56,7 @@ abstract class HasOneOrMany extends Relation } /** - * Create and return an un-saved instances of the related models. + * Create and return an un-saved instance of the related models. * * @param iterable $records * @return \Illuminate\Database\Eloquent\Collection @@ -84,9 +80,11 @@ abstract class HasOneOrMany extends Relation public function addConstraints() { if (static::$constraints) { - $this->query->where($this->foreignKey, '=', $this->getParentKey()); + $query = $this->getRelationQuery(); - $this->query->whereNotNull($this->foreignKey); + $query->where($this->foreignKey, '=', $this->getParentKey()); + + $query->whereNotNull($this->foreignKey); } } @@ -100,7 +98,7 @@ abstract class HasOneOrMany extends Relation { $whereIn = $this->whereInMethod($this->parent, $this->localKey); - $this->query->{$whereIn}( + $this->getRelationQuery()->{$whereIn}( $this->foreignKey, $this->getKeys($models, $this->localKey) ); } @@ -148,7 +146,7 @@ abstract class HasOneOrMany extends Relation // link them up with their children using the keyed dictionary to make the // matching very convenient and easy work. Then we'll just return them. foreach ($models as $model) { - if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) { + if (isset($dictionary[$key = $this->getDictionaryKey($model->getAttribute($this->localKey))])) { $model->setRelation( $relation, $this->getRelationValue($dictionary, $key, $type) ); @@ -184,12 +182,12 @@ abstract class HasOneOrMany extends Relation $foreign = $this->getForeignKeyName(); return $results->mapToDictionary(function ($result) use ($foreign) { - return [$result->{$foreign} => $result]; + return [$this->getDictionaryKey($result->{$foreign}) => $result]; })->all(); } /** - * Find a model by its primary key or return new instance of the related model. + * Find a model by its primary key or return a new instance of the related model. * * @param mixed $id * @param array $columns @@ -213,10 +211,10 @@ abstract class HasOneOrMany extends Relation * @param array $values * @return \Illuminate\Database\Eloquent\Model */ - public function firstOrNew(array $attributes, array $values = []) + public function firstOrNew(array $attributes = [], array $values = []) { if (is_null($instance = $this->where($attributes)->first())) { - $instance = $this->related->newInstance($attributes + $values); + $instance = $this->related->newInstance(array_merge($attributes, $values)); $this->setForeignAttributesForCreate($instance); } @@ -231,10 +229,10 @@ abstract class HasOneOrMany extends Relation * @param array $values * @return \Illuminate\Database\Eloquent\Model */ - public function firstOrCreate(array $attributes, array $values = []) + public function firstOrCreate(array $attributes = [], array $values = []) { if (is_null($instance = $this->where($attributes)->first())) { - $instance = $this->create($attributes + $values); + $instance = $this->create(array_merge($attributes, $values)); } return $instance; @@ -299,6 +297,19 @@ abstract class HasOneOrMany extends Relation }); } + /** + * Create a new instance of the related model. Allow mass-assignment. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function forceCreate(array $attributes = []) + { + $attributes[$this->getForeignKeyName()] = $this->getParentKey(); + + return $this->related->forceCreate($attributes); + } + /** * Create a Collection of new instances of the related model. * @@ -363,16 +374,6 @@ abstract class HasOneOrMany extends Relation ); } - /** - * Get a relationship join table hash. - * - * @return string - */ - public function getRelationCountHash() - { - return 'laravel_reserved_'.static::$selfJoinCount++; - } - /** * Get the key for comparing against the parent key in "has" query. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php index a48c31862..ed9c7baa4 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php @@ -4,11 +4,12 @@ namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithDictionary; use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; class HasOneThrough extends HasManyThrough { - use SupportsDefaultModels; + use InteractsWithDictionary, SupportsDefaultModels; /** * Get the results of the relationship. @@ -52,7 +53,7 @@ class HasOneThrough extends HasManyThrough // link them up with their children using the keyed dictionary to make the // matching very convenient and easy work. Then we'll just return them. foreach ($models as $model) { - if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) { + if (isset($dictionary[$key = $this->getDictionaryKey($model->getAttribute($this->localKey))])) { $value = $dictionary[$key]; $model->setRelation( $relation, reset($value) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php index 12b065026..282ba2e86 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php @@ -46,4 +46,17 @@ class MorphMany extends MorphOneOrMany { return $this->matchMany($models, $results, $relation); } + + /** + * Create a new instance of the related model. Allow mass-assignment. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function forceCreate(array $attributes = []) + { + $attributes[$this->getMorphType()] = $this->morphClass; + + return parent::forceCreate($attributes); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php index 5f8da14f1..ff526842e 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php @@ -2,13 +2,18 @@ namespace Illuminate\Database\Eloquent\Relations; +use Illuminate\Contracts\Database\Eloquent\SupportsPartialRelations; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Concerns\CanBeOneOfMany; +use Illuminate\Database\Eloquent\Relations\Concerns\ComparesRelatedModels; use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; +use Illuminate\Database\Query\JoinClause; -class MorphOne extends MorphOneOrMany +class MorphOne extends MorphOneOrMany implements SupportsPartialRelations { - use SupportsDefaultModels; + use CanBeOneOfMany, ComparesRelatedModels, SupportsDefaultModels; /** * Get the results of the relationship. @@ -53,6 +58,59 @@ class MorphOne extends MorphOneOrMany return $this->matchOne($models, $results, $relation); } + /** + * Get the relationship query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + if ($this->isOneOfMany()) { + $this->mergeOneOfManyJoinsTo($query); + } + + return parent::getRelationExistenceQuery($query, $parentQuery, $columns); + } + + /** + * Add constraints for inner join subselect for one of many relationships. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string|null $column + * @param string|null $aggregate + * @return void + */ + public function addOneOfManySubQueryConstraints(Builder $query, $column = null, $aggregate = null) + { + $query->addSelect($this->foreignKey, $this->morphType); + } + + /** + * Get the columns that should be selected by the one of many subquery. + * + * @return array|string + */ + public function getOneOfManySubQuerySelectColumns() + { + return [$this->foreignKey, $this->morphType]; + } + + /** + * Add join query constraints for one of many relationships. + * + * @param \Illuminate\Database\Eloquent\JoinClause $join + * @return void + */ + public function addOneOfManyJoinSubQueryConstraints(JoinClause $join) + { + $join + ->on($this->qualifySubSelectColumn($this->morphType), '=', $this->qualifyRelatedColumn($this->morphType)) + ->on($this->qualifySubSelectColumn($this->foreignKey), '=', $this->qualifyRelatedColumn($this->foreignKey)); + } + /** * Make a new related instance for the given model. * @@ -65,4 +123,15 @@ class MorphOne extends MorphOneOrMany ->setAttribute($this->getForeignKeyName(), $parent->{$this->localKey}) ->setAttribute($this->getMorphType(), $this->morphClass); } + + /** + * Get the value of the model's foreign key. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return mixed + */ + protected function getRelatedKeyFrom(Model $model) + { + return $model->getAttribute($this->getForeignKeyName()); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php index 887ebe247..6e2297fcc 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php @@ -48,9 +48,9 @@ abstract class MorphOneOrMany extends HasOneOrMany public function addConstraints() { if (static::$constraints) { - parent::addConstraints(); + $this->getRelationQuery()->where($this->morphType, $this->morphClass); - $this->query->where($this->morphType, $this->morphClass); + parent::addConstraints(); } } @@ -64,7 +64,7 @@ abstract class MorphOneOrMany extends HasOneOrMany { parent::addEagerConstraints($models); - $this->query->where($this->morphType, $this->morphClass); + $this->getRelationQuery()->where($this->morphType, $this->morphClass); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php index 68489265f..7fbe484aa 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php @@ -2,7 +2,6 @@ namespace Illuminate\Database\Eloquent\Relations; -use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Str; class MorphPivot extends Pivot @@ -31,13 +30,26 @@ class MorphPivot extends Pivot * @param \Illuminate\Database\Eloquent\Builder $query * @return \Illuminate\Database\Eloquent\Builder */ - protected function setKeysForSaveQuery(Builder $query) + protected function setKeysForSaveQuery($query) { $query->where($this->morphType, $this->morphClass); return parent::setKeysForSaveQuery($query); } + /** + * Set the keys for a select query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function setKeysForSelectQuery($query) + { + $query->where($this->morphType, $this->morphClass); + + return parent::setKeysForSelectQuery($query); + } + /** * Delete the pivot model record from the database. * @@ -62,6 +74,16 @@ class MorphPivot extends Pivot }); } + /** + * Get the morph type for the pivot. + * + * @return string + */ + public function getMorphType() + { + return $this->morphType; + } + /** * Set the morph type for the pivot. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php index 22d1d4d2c..262741f30 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php @@ -6,9 +6,12 @@ use BadMethodCallException; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithDictionary; class MorphTo extends BelongsTo { + use InteractsWithDictionary; + /** * The type of the polymorphic relation. * @@ -51,6 +54,13 @@ class MorphTo extends BelongsTo */ protected $morphableEagerLoadCounts = []; + /** + * A map of constraints to apply for each individual morph type. + * + * @var array + */ + protected $morphableConstraints = []; + /** * Create a new morph to relationship instance. * @@ -90,7 +100,10 @@ class MorphTo extends BelongsTo { foreach ($models as $model) { if ($model->{$this->morphType}) { - $this->dictionary[$model->{$this->morphType}][$model->{$this->foreignKey}][] = $model; + $morphTypeKey = $this->getDictionaryKey($model->{$this->morphType}); + $foreignKeyKey = $this->getDictionaryKey($model->{$this->foreignKey}); + + $this->dictionary[$morphTypeKey][$foreignKeyKey][] = $model; } } } @@ -133,10 +146,14 @@ class MorphTo extends BelongsTo (array) ($this->morphableEagerLoadCounts[get_class($instance)] ?? []) ); + if ($callback = ($this->morphableConstraints[get_class($instance)] ?? null)) { + $callback($query); + } + $whereIn = $this->whereInMethod($instance, $ownerKey); return $query->{$whereIn}( - $instance->getTable().'.'.$ownerKey, $this->gatherKeysByType($type) + $instance->getTable().'.'.$ownerKey, $this->gatherKeysByType($type, $instance->getKeyType()) )->get(); } @@ -144,11 +161,16 @@ class MorphTo extends BelongsTo * Gather all of the foreign keys for a given type. * * @param string $type + * @param string $keyType * @return array */ - protected function gatherKeysByType($type) + protected function gatherKeysByType($type, $keyType) { - return array_keys($this->dictionary[$type]); + return $keyType !== 'string' + ? array_keys($this->dictionary[$type]) + : array_map(function ($modelId) { + return (string) $modelId; + }, array_filter(array_keys($this->dictionary[$type]))); } /** @@ -191,7 +213,7 @@ class MorphTo extends BelongsTo protected function matchToMorphParents($type, Collection $results) { foreach ($results as $result) { - $ownerKey = ! is_null($this->ownerKey) ? $result->{$this->ownerKey} : $result->getKey(); + $ownerKey = ! is_null($this->ownerKey) ? $this->getDictionaryKey($result->{$this->ownerKey}) : $result->getKey(); if (isset($this->dictionary[$type][$ownerKey])) { foreach ($this->dictionary[$type][$ownerKey] as $model) { @@ -209,8 +231,14 @@ class MorphTo extends BelongsTo */ public function associate($model) { + if ($model instanceof Model) { + $foreignKey = $this->ownerKey && $model->{$this->ownerKey} + ? $this->ownerKey + : $model->getKeyName(); + } + $this->parent->setAttribute( - $this->foreignKey, $model instanceof Model ? $model->getKey() : null + $this->foreignKey, $model instanceof Model ? $model->{$foreignKey} : null ); $this->parent->setAttribute( @@ -307,6 +335,21 @@ class MorphTo extends BelongsTo return $this; } + /** + * Specify constraints on the query for a given morph type. + * + * @param array $callbacks + * @return \Illuminate\Database\Eloquent\Relations\MorphTo + */ + public function constrain(array $callbacks) + { + $this->morphableConstraints = array_merge( + $this->morphableConstraints, $callbacks + ); + + return $this; + } + /** * Replay stored macro calls on the actual related instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php index 0adf385e1..c2d574558 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php @@ -68,7 +68,7 @@ class MorphToMany extends BelongsToMany { parent::addWhereConstraints(); - $this->query->where($this->table.'.'.$this->morphType, $this->morphClass); + $this->query->where($this->qualifyPivotColumn($this->morphType), $this->morphClass); return $this; } @@ -83,7 +83,7 @@ class MorphToMany extends BelongsToMany { parent::addEagerConstraints($models); - $this->query->where($this->table.'.'.$this->morphType, $this->morphClass); + $this->query->where($this->qualifyPivotColumn($this->morphType), $this->morphClass); } /** @@ -111,7 +111,7 @@ class MorphToMany extends BelongsToMany public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) { return parent::getRelationExistenceQuery($query, $parentQuery, $columns)->where( - $this->table.'.'.$this->morphType, $this->morphClass + $this->qualifyPivotColumn($this->morphType), $this->morphClass ); } @@ -173,7 +173,7 @@ class MorphToMany extends BelongsToMany $defaults = [$this->foreignPivotKey, $this->relatedPivotKey, $this->morphType]; return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) { - return $this->table.'.'.$column.' as pivot_'.$column; + return $this->qualifyPivotColumn($column).' as pivot_'.$column; })->unique()->all(); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php index 6bdb6f7a7..aa8ce5a07 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php @@ -6,6 +6,8 @@ use Closure; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\MultipleRecordsFoundException; use Illuminate\Database\Query\Expression; use Illuminate\Support\Arr; use Illuminate\Support\Traits\ForwardsCalls; @@ -49,12 +51,26 @@ abstract class Relation protected static $constraints = true; /** - * An array to map class names to their morph names in database. + * An array to map class names to their morph names in the database. * * @var array */ public static $morphMap = []; + /** + * Prevents morph relationships without a morph map. + * + * @var bool + */ + protected static $requireMorphMap = false; + + /** + * The count of self joins. + * + * @var int + */ + protected static $selfJoinCount = 0; + /** * Create a new relation instance. * @@ -144,6 +160,30 @@ abstract class Relation return $this->get(); } + /** + * Execute the query and get the first result if it's the sole matching record. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Model + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException + */ + public function sole($columns = ['*']) + { + $result = $this->take(2)->get($columns); + + if ($result->isEmpty()) { + throw (new ModelNotFoundException)->setModel(get_class($this->related)); + } + + if ($result->count() > 1) { + throw new MultipleRecordsFoundException; + } + + return $result->first(); + } + /** * Execute the query as a "select" statement. * @@ -213,6 +253,17 @@ abstract class Relation ); } + /** + * Get a relationship join table hash. + * + * @param bool $incrementJoinCount + * @return string + */ + public function getRelationCountHash($incrementJoinCount = true) + { + return 'laravel_reserved_'.($incrementJoinCount ? static::$selfJoinCount++ : static::$selfJoinCount); + } + /** * Get all of the primary keys for an array of models. * @@ -227,6 +278,16 @@ abstract class Relation })->values()->unique(null, true)->sort()->all(); } + /** + * Get the query builder that will contain the relationship constraints. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function getRelationQuery() + { + return $this->query; + } + /** * Get the underlying query for the relation. * @@ -322,6 +383,41 @@ abstract class Relation : 'whereIn'; } + /** + * Prevent polymorphic relationships from being used without model mappings. + * + * @param bool $requireMorphMap + * @return void + */ + public static function requireMorphMap($requireMorphMap = true) + { + static::$requireMorphMap = $requireMorphMap; + } + + /** + * Determine if polymorphic relationships require explicit model mapping. + * + * @return bool + */ + public static function requiresMorphMap() + { + return static::$requireMorphMap; + } + + /** + * Define the morph map for polymorphic relations and require all morphed models to be explicitly mapped. + * + * @param array $map + * @param bool $merge + * @return array + */ + public static function enforceMorphMap(array $map, $merge = true) + { + static::requireMorphMap(); + + return static::morphMap($map, $merge); + } + /** * Set or get the morph map for polymorphic relations. * @@ -382,13 +478,7 @@ abstract class Relation return $this->macroCall($method, $parameters); } - $result = $this->forwardCallTo($this->query, $method, $parameters); - - if ($result === $this->query) { - return $this; - } - - return $result; + return $this->forwardDecoratedCallTo($this->query, $method, $parameters); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php index f50eba85f..aa6c81784 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php @@ -3,7 +3,7 @@ namespace Illuminate\Database\Eloquent; /** - * @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withTrashed() + * @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withTrashed(bool $withTrashed = true) * @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder onlyTrashed() * @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withoutTrashed() */ @@ -33,7 +33,9 @@ trait SoftDeletes */ public function initializeSoftDeletes() { - $this->dates[] = $this->getDeletedAtColumn(); + if (! isset($this->casts[$this->getDeletedAtColumn()])) { + $this->casts[$this->getDeletedAtColumn()] = 'datetime'; + } } /** @@ -62,9 +64,9 @@ trait SoftDeletes protected function performDeleteOnModel() { if ($this->forceDeleting) { - $this->exists = false; - - return $this->setKeysForSaveQuery($this->newModelQuery())->forceDelete(); + return tap($this->setKeysForSaveQuery($this->newModelQuery())->forceDelete(), function () { + $this->exists = false; + }); } return $this->runSoftDelete(); @@ -94,6 +96,8 @@ trait SoftDeletes $query->update($columns); $this->syncOriginalAttributes(array_keys($columns)); + + $this->fireModelEvent('trashed', false); } /** @@ -134,6 +138,17 @@ trait SoftDeletes return ! is_null($this->{$this->getDeletedAtColumn()}); } + /** + * Register a "softDeleted" model event callback with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function softDeleted($callback) + { + static::registerModelEvent('trashed', $callback); + } + /** * Register a "restoring" model event callback with the dispatcher. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php index 0d5169662..7528964c1 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php @@ -7,7 +7,7 @@ class SoftDeletingScope implements Scope /** * All of the extensions to be added to the builder. * - * @var array + * @var string[] */ protected $extensions = ['Restore', 'WithTrashed', 'WithoutTrashed', 'OnlyTrashed']; diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/DatabaseRefreshed.php b/vendor/laravel/framework/src/Illuminate/Database/Events/DatabaseRefreshed.php new file mode 100644 index 000000000..5b1fb4585 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/DatabaseRefreshed.php @@ -0,0 +1,10 @@ +method = $method; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationsStarted.php b/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationsStarted.php index 123e03260..5283b4991 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationsStarted.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationsStarted.php @@ -2,9 +2,7 @@ namespace Illuminate\Database\Events; -use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract; - -class MigrationsStarted implements MigrationEventContract +class MigrationsStarted extends MigrationsEvent { // } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/ModelsPruned.php b/vendor/laravel/framework/src/Illuminate/Database/Events/ModelsPruned.php new file mode 100644 index 000000000..ca8bee9e0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/ModelsPruned.php @@ -0,0 +1,33 @@ +model = $model; + $this->count = $count; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/SchemaDumped.php b/vendor/laravel/framework/src/Illuminate/Database/Events/SchemaDumped.php new file mode 100644 index 000000000..1cbbfff96 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/SchemaDumped.php @@ -0,0 +1,41 @@ +connection = $connection; + $this->connectionName = $connection->getName(); + $this->path = $path; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/SchemaLoaded.php b/vendor/laravel/framework/src/Illuminate/Database/Events/SchemaLoaded.php new file mode 100644 index 000000000..061a079a9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/SchemaLoaded.php @@ -0,0 +1,41 @@ +connection = $connection; + $this->connectionName = $connection->getName(); + $this->path = $path; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php index cc1e0b946..52e3d6357 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php @@ -179,7 +179,7 @@ abstract class Grammar * Get the value of a raw expression. * * @param \Illuminate\Database\Query\Expression $expression - * @return string + * @return mixed */ public function getValue($expression) { diff --git a/vendor/laravel/framework/src/Illuminate/Database/LazyLoadingViolationException.php b/vendor/laravel/framework/src/Illuminate/Database/LazyLoadingViolationException.php new file mode 100644 index 000000000..1bcd40c95 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/LazyLoadingViolationException.php @@ -0,0 +1,39 @@ +model = $class; + $this->relation = $relation; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php index 9b1f355d1..9ae768577 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\Database; +use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Database\Console\Migrations\FreshCommand; use Illuminate\Database\Console\Migrations\InstallCommand; @@ -116,7 +117,7 @@ class MigrationServiceProvider extends ServiceProvider implements DeferrableProv protected function registerMigrateCommand() { $this->app->singleton('command.migrate', function ($app) { - return new MigrateCommand($app['migrator']); + return new MigrateCommand($app['migrator'], $app[Dispatcher::class]); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php index 1ace1a6ff..ed42756b1 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php @@ -169,6 +169,18 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface return $schema->hasTable($this->table); } + /** + * Delete the migration repository data store. + * + * @return void + */ + public function deleteRepository() + { + $schema = $this->getConnection()->getSchemaBuilder(); + + $schema->drop($this->table); + } + /** * Get a query builder for the migration table. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php index fca9ed81b..a79039a7a 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php @@ -63,9 +63,12 @@ class MigrationCreator // various place-holders, save the file, and run the post create event. $stub = $this->getStub($table, $create); + $path = $this->getPath($name, $path); + + $this->files->ensureDirectoryExists(dirname($path)); + $this->files->put( - $path = $this->getPath($name, $path), - $this->populateStub($name, $stub, $table) + $path, $this->populateStub($name, $stub, $table) ); // Next, we will fire any hooks that are supposed to fire after a migration is diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php index 410326a9b..840a5e1df 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php @@ -12,7 +12,7 @@ interface MigrationRepositoryInterface public function getRan(); /** - * Get list of migrations. + * Get the list of migrations. * * @param int $steps * @return array @@ -71,6 +71,13 @@ interface MigrationRepositoryInterface */ public function repositoryExists(); + /** + * Delete the migration repository data store. + * + * @return void + */ + public function deleteRepository(); + /** * Set the information source to gather data. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php index d334e0b56..c043e6cd7 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php @@ -2,6 +2,7 @@ namespace Illuminate\Database\Migrations; +use Doctrine\DBAL\Schema\SchemaException; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Database\ConnectionResolverInterface as Resolver; use Illuminate\Database\Events\MigrationEnded; @@ -13,6 +14,7 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use ReflectionClass; use Symfony\Component\Console\Output\OutputInterface; class Migrator @@ -156,7 +158,7 @@ class Migrator $step = $options['step'] ?? false; - $this->fireMigrationEvent(new MigrationsStarted); + $this->fireMigrationEvent(new MigrationsStarted('up')); // Once we have the array of migrations, we will spin through them and run the // migrations "up" so the changes are made to the databases. We'll then log @@ -169,7 +171,7 @@ class Migrator } } - $this->fireMigrationEvent(new MigrationsEnded); + $this->fireMigrationEvent(new MigrationsEnded('up')); } /** @@ -185,9 +187,9 @@ class Migrator // First we will resolve a "real" instance of the migration class from this // migration file name. Once we have the instances we can run the actual // command such as "up" or "down", or we can just simulate the action. - $migration = $this->resolve( - $name = $this->getMigrationName($file) - ); + $migration = $this->resolvePath($file); + + $name = $this->getMigrationName($file); if ($pretend) { return $this->pretendToRun($migration, 'up'); @@ -199,14 +201,14 @@ class Migrator $this->runMigration($migration, 'up'); - $runTime = round(microtime(true) - $startTime, 2); + $runTime = number_format((microtime(true) - $startTime) * 1000, 2); // Once we have run a migrations class, we will log that it was run in this // repository so that we don't try to run it next time we do a migration // in the application. A migration repository keeps the migrate order. $this->repository->log($name, $batch); - $this->note("Migrated: {$name} ({$runTime} seconds)"); + $this->note("Migrated: {$name} ({$runTime}ms)"); } /** @@ -263,7 +265,7 @@ class Migrator $this->requireFiles($files = $this->getMigrationFiles($paths)); - $this->fireMigrationEvent(new MigrationsStarted); + $this->fireMigrationEvent(new MigrationsStarted('down')); // Next we will run through all of the migrations and call the "down" method // which will reverse each migration in order. This getLast method on the @@ -285,7 +287,7 @@ class Migrator ); } - $this->fireMigrationEvent(new MigrationsEnded); + $this->fireMigrationEvent(new MigrationsEnded('down')); return $rolledBack; } @@ -348,9 +350,9 @@ class Migrator // First we will get the file name of the migration so we can resolve out an // instance of the migration. Once we get an instance we can either run a // pretend execution of the migration or we can run the real migration. - $instance = $this->resolve( - $name = $this->getMigrationName($file) - ); + $instance = $this->resolvePath($file); + + $name = $this->getMigrationName($file); $this->note("Rolling back: {$name}"); @@ -362,14 +364,14 @@ class Migrator $this->runMigration($instance, 'down'); - $runTime = round(microtime(true) - $startTime, 2); + $runTime = number_format((microtime(true) - $startTime) * 1000, 2); // Once we have successfully run the migration "down" we will remove it from // the migration repository so it will be considered to have not been run // by the application then will be able to fire by any later operation. $this->repository->delete($migration); - $this->note("Rolled back: {$name} ({$runTime} seconds)"); + $this->note("Rolled back: {$name} ({$runTime}ms)"); } /** @@ -385,11 +387,11 @@ class Migrator $migration->getConnection() ); - $callback = function () use ($migration, $method) { + $callback = function () use ($connection, $migration, $method) { if (method_exists($migration, $method)) { $this->fireMigrationEvent(new MigrationStarted($migration, $method)); - $migration->{$method}(); + $this->runMethod($connection, $migration, $method); $this->fireMigrationEvent(new MigrationEnded($migration, $method)); } @@ -410,10 +412,22 @@ class Migrator */ protected function pretendToRun($migration, $method) { - foreach ($this->getQueries($migration, $method) as $query) { + try { + foreach ($this->getQueries($migration, $method) as $query) { + $name = get_class($migration); + + $reflectionClass = new ReflectionClass($migration); + + if ($reflectionClass->isAnonymous()) { + $name = $this->getMigrationName($reflectionClass->getFileName()); + } + + $this->note("{$name}: {$query['query']}"); + } + } catch (SchemaException $e) { $name = get_class($migration); - $this->note("{$name}: {$query['query']}"); + $this->note("{$name}: failed to dump queries. This may be due to changing database columns using Doctrine, which is not supported while pretending to run migrations."); } } @@ -433,13 +447,34 @@ class Migrator $migration->getConnection() ); - return $db->pretend(function () use ($migration, $method) { + return $db->pretend(function () use ($db, $migration, $method) { if (method_exists($migration, $method)) { - $migration->{$method}(); + $this->runMethod($db, $migration, $method); } }); } + /** + * Run a migration method on the given connection. + * + * @param \Illuminate\Database\Connection $connection + * @param object $migration + * @param string $method + * @return void + */ + protected function runMethod($connection, $migration, $method) + { + $previousConnection = $this->resolver->getDefaultConnection(); + + try { + $this->resolver->setDefaultConnection($connection->getName()); + + $migration->{$method}(); + } finally { + $this->resolver->setDefaultConnection($previousConnection); + } + } + /** * Resolve a migration instance from a file. * @@ -448,11 +483,41 @@ class Migrator */ public function resolve($file) { - $class = Str::studly(implode('_', array_slice(explode('_', $file), 4))); + $class = $this->getMigrationClass($file); return new $class; } + /** + * Resolve a migration instance from a migration path. + * + * @param string $path + * @return object + */ + protected function resolvePath(string $path) + { + $class = $this->getMigrationClass($this->getMigrationName($path)); + + if (class_exists($class) && realpath($path) == (new ReflectionClass($class))->getFileName()) { + return new $class; + } + + $migration = $this->files->getRequire($path); + + return is_object($migration) ? $migration : new $class; + } + + /** + * Generate a migration class name based on the migration file name. + * + * @param string $migrationName + * @return string + */ + protected function getMigrationClass(string $migrationName): string + { + return Str::studly(implode('_', array_slice(explode('_', $migrationName), 4))); + } + /** * Get all of the migration files in a given path. * @@ -608,6 +673,26 @@ class Migrator return $this->repository->repositoryExists(); } + /** + * Determine if any migrations have been run. + * + * @return bool + */ + public function hasRunAnyMigrations() + { + return $this->repositoryExists() && count($this->repository->getRan()) > 0; + } + + /** + * Delete the migration repository data store. + * + * @return void + */ + public function deleteRepository() + { + return $this->repository->deleteRepository(); + } + /** * Get the file system instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/MultipleRecordsFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/MultipleRecordsFoundException.php new file mode 100755 index 000000000..cccb7e417 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/MultipleRecordsFoundException.php @@ -0,0 +1,10 @@ +getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION), 'MariaDB') !== false; + } + /** * Get the default query grammar instance. * @@ -44,6 +59,18 @@ class MySqlConnection extends Connection return $this->withTablePrefix(new SchemaGrammar); } + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * @return \Illuminate\Database\Schema\MySqlSchemaState + */ + public function getSchemaState(Filesystem $files = null, callable $processFactory = null) + { + return new MySqlSchemaState($this, $files, $processFactory); + } + /** * Get the default post processor instance. * @@ -57,10 +84,10 @@ class MySqlConnection extends Connection /** * Get the Doctrine DBAL driver. * - * @return \Doctrine\DBAL\Driver\PDOMySql\Driver + * @return \Doctrine\DBAL\Driver\PDOMySql\Driver|\Illuminate\Database\PDO\MySqlDriver */ protected function getDoctrineDriver() { - return new DoctrineDriver; + return class_exists(Version::class) ? new DoctrineDriver : new MySqlDriver; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/PDO/Concerns/ConnectsToDatabase.php b/vendor/laravel/framework/src/Illuminate/Database/PDO/Concerns/ConnectsToDatabase.php new file mode 100644 index 000000000..84c333801 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/PDO/Concerns/ConnectsToDatabase.php @@ -0,0 +1,27 @@ +connection = $connection; + } + + /** + * Execute an SQL statement. + * + * @param string $statement + * @return int + */ + public function exec(string $statement): int + { + try { + $result = $this->connection->exec($statement); + + \assert($result !== false); + + return $result; + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** + * Prepare a new SQL statement. + * + * @param string $sql + * @return \Doctrine\DBAL\Driver\Statement + */ + public function prepare(string $sql): StatementInterface + { + try { + return $this->createStatement( + $this->connection->prepare($sql) + ); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** + * Execute a new query against the connection. + * + * @param string $sql + * @return \Doctrine\DBAL\Driver\Result + */ + public function query(string $sql): ResultInterface + { + try { + $stmt = $this->connection->query($sql); + + \assert($stmt instanceof PDOStatement); + + return new Result($stmt); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** + * Get the last insert ID. + * + * @param string|null $name + * @return mixed + */ + public function lastInsertId($name = null) + { + try { + if ($name === null) { + return $this->connection->lastInsertId(); + } + + return $this->connection->lastInsertId($name); + } catch (PDOException $exception) { + throw Exception::new($exception); + } + } + + /** + * Create a new statement instance. + * + * @param \PDOStatement $stmt + * @return \Doctrine\DBAL\Driver\PDO\Statement + */ + protected function createStatement(PDOStatement $stmt): Statement + { + return new Statement($stmt); + } + + /** + * Begin a new database transaction. + * + * @return void + */ + public function beginTransaction() + { + return $this->connection->beginTransaction(); + } + + /** + * Commit a database transaction. + * + * @return void + */ + public function commit() + { + return $this->connection->commit(); + } + + /** + * Rollback a database transaction. + * + * @return void + */ + public function rollBack() + { + return $this->connection->rollBack(); + } + + /** + * Wrap quotes around the given input. + * + * @param string $input + * @param string $type + * @return string + */ + public function quote($input, $type = ParameterType::STRING) + { + return $this->connection->quote($input, $type); + } + + /** + * Get the server version for the connection. + * + * @return string + */ + public function getServerVersion() + { + return $this->connection->getAttribute(PDO::ATTR_SERVER_VERSION); + } + + /** + * Get the wrapped PDO connection. + * + * @return \PDO + */ + public function getWrappedConnection(): PDO + { + return $this->connection; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/PDO/MySqlDriver.php b/vendor/laravel/framework/src/Illuminate/Database/PDO/MySqlDriver.php new file mode 100644 index 000000000..5f68c6fab --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/PDO/MySqlDriver.php @@ -0,0 +1,11 @@ +connection = $connection; + } + + /** + * Prepare a new SQL statement. + * + * @param string $sql + * @return \Doctrine\DBAL\Driver\Statement + */ + public function prepare(string $sql): StatementInterface + { + return new Statement( + $this->connection->prepare($sql) + ); + } + + /** + * Execute a new query against the connection. + * + * @param string $sql + * @return \Doctrine\DBAL\Driver\Result + */ + public function query(string $sql): Result + { + return $this->connection->query($sql); + } + + /** + * Execute an SQL statement. + * + * @param string $statement + * @return int + */ + public function exec(string $statement): int + { + return $this->connection->exec($statement); + } + + /** + * Get the last insert ID. + * + * @param string|null $name + * @return mixed + */ + public function lastInsertId($name = null) + { + if ($name === null) { + return $this->connection->lastInsertId($name); + } + + return $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?') + ->execute([$name]) + ->fetchOne(); + } + + /** + * Begin a new database transaction. + * + * @return void + */ + public function beginTransaction() + { + return $this->connection->beginTransaction(); + } + + /** + * Commit a database transaction. + * + * @return void + */ + public function commit() + { + return $this->connection->commit(); + } + + /** + * Rollback a database transaction. + * + * @return void + */ + public function rollBack() + { + return $this->connection->rollBack(); + } + + /** + * Wrap quotes around the given input. + * + * @param string $value + * @param int $type + * @return string + */ + public function quote($value, $type = ParameterType::STRING) + { + $val = $this->connection->quote($value, $type); + + // Fix for a driver version terminating all values with null byte... + if (\is_string($val) && \strpos($val, "\0") !== false) { + $val = \substr($val, 0, -1); + } + + return $val; + } + + /** + * Get the server version for the connection. + * + * @return string + */ + public function getServerVersion() + { + return $this->connection->getServerVersion(); + } + + /** + * Get the wrapped PDO connection. + * + * @return \PDO + */ + public function getWrappedConnection(): PDO + { + return $this->connection->getWrappedConnection(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/PDO/SqlServerDriver.php b/vendor/laravel/framework/src/Illuminate/Database/PDO/SqlServerDriver.php new file mode 100644 index 000000000..1373fc49f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/PDO/SqlServerDriver.php @@ -0,0 +1,18 @@ +withTablePrefix(new SchemaGrammar); } + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * @return \Illuminate\Database\Schema\PostgresSchemaState + */ + public function getSchemaState(Filesystem $files = null, callable $processFactory = null) + { + return new PostgresSchemaState($this, $files, $processFactory); + } + /** * Get the default post processor instance. * @@ -84,10 +100,10 @@ class PostgresConnection extends Connection /** * Get the Doctrine DBAL driver. * - * @return \Doctrine\DBAL\Driver\PDOPgSql\Driver + * @return \Doctrine\DBAL\Driver\PDOPgSql\Driver|\Illuminate\Database\PDO\PostgresDriver */ protected function getDoctrineDriver() { - return new DoctrineDriver; + return class_exists(Version::class) ? new DoctrineDriver : new PostgresDriver; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php index 2117bc2e3..40bd0b958 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -2,10 +2,12 @@ namespace Illuminate\Database\Query; +use BackedEnum; use Closure; use DateTimeInterface; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Concerns\BuildsQueries; +use Illuminate\Database\Concerns\ExplainsQueries; use Illuminate\Database\ConnectionInterface; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Relations\Relation; @@ -19,11 +21,12 @@ use Illuminate\Support\Str; use Illuminate\Support\Traits\ForwardsCalls; use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; +use LogicException; use RuntimeException; class Builder { - use BuildsQueries, ForwardsCalls, Macroable { + use BuildsQueries, ExplainsQueries, ForwardsCalls, Macroable { __call as macroCall; } @@ -180,21 +183,37 @@ class Builder public $lock; /** - * All of the available clause operators. + * The callbacks that should be invoked before the query is executed. * * @var array */ + public $beforeQueryCallbacks = []; + + /** + * All of the available clause operators. + * + * @var string[] + */ public $operators = [ '=', '<', '>', '<=', '>=', '<>', '!=', '<=>', 'like', 'like binary', 'not like', 'ilike', - '&', '|', '^', '<<', '>>', + '&', '|', '^', '<<', '>>', '&~', 'rlike', 'not rlike', 'regexp', 'not regexp', '~', '~*', '!~', '!~*', 'similar to', 'not similar to', 'not ilike', '~~*', '!~~*', ]; /** - * Whether use write pdo for select. + * All of the available bitwise operators. + * + * @var string[] + */ + public $bitwiseOperators = [ + '&', '|', '^', '<<', '>>', '&~', + ]; + + /** + * Whether to use write pdo for the select. * * @var bool */ @@ -243,7 +262,7 @@ class Builder /** * Add a subselect expression to the query. * - * @param \Closure|$this|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query * @param string $as * @return $this * @@ -339,6 +358,8 @@ class Builder protected function parseSub($query) { if ($query instanceof self || $query instanceof EloquentBuilder || $query instanceof Relation) { + $query = $this->prependDatabaseNameIfCrossDatabaseQuery($query); + return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; @@ -349,6 +370,26 @@ class Builder } } + /** + * Prepend the database name if the given query is on another database. + * + * @param mixed $query + * @return mixed + */ + protected function prependDatabaseNameIfCrossDatabaseQuery($query) + { + if ($query->getConnection()->getDatabaseName() !== + $this->getConnection()->getDatabaseName()) { + $databaseName = $query->getConnection()->getDatabaseName(); + + if (strpos($query->from, $databaseName) !== 0 && strpos($query->from, '.') === false) { + $query->from($databaseName.'.'.$query->from); + } + } + + return $query; + } + /** * Add a new select column to the query. * @@ -377,6 +418,7 @@ class Builder /** * Force the query to only return distinct results. * + * @param mixed ...$distinct * @return $this */ public function distinct() @@ -468,7 +510,7 @@ class Builder /** * Add a subquery join clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query * @param string $as * @param \Closure|string $first * @param string|null $operator @@ -521,7 +563,7 @@ class Builder /** * Add a subquery left join to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query * @param string $as * @param \Closure|string $first * @param string|null $operator @@ -564,7 +606,7 @@ class Builder /** * Add a subquery right join to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query * @param string $as * @param \Closure|string $first * @param string|null $operator @@ -596,6 +638,26 @@ class Builder return $this; } + /** + * Add a subquery cross join to the query. + * + * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @param string $as + * @return $this + */ + public function crossJoinSub($query, $as) + { + [$query, $bindings] = $this->createSub($query); + + $expression = '('.$query.') as '.$this->grammar->wrapTable($as); + + $this->addBinding($bindings, 'join'); + + $this->joins[] = $this->newJoinClause($this, 'cross', new Expression($expression)); + + return $this; + } + /** * Get a new join clause. * @@ -701,6 +763,10 @@ class Builder } } + if ($this->isBitwiseOperator($operator)) { + $type = 'Bitwise'; + } + // Now that we are working with just a simple query we can put the elements // in our array and add the query binding to our array of bindings that // will be bound to each SQL statements when it is finally executed. @@ -780,8 +846,20 @@ class Builder */ protected function invalidOperator($operator) { - return ! in_array(strtolower($operator), $this->operators, true) && - ! in_array(strtolower($operator), $this->grammar->getOperators(), true); + return ! is_string($operator) || (! in_array(strtolower($operator), $this->operators, true) && + ! in_array(strtolower($operator), $this->grammar->getOperators(), true)); + } + + /** + * Determine if the operator is a bitwise operator. + * + * @param string $operator + * @return bool + */ + protected function isBitwiseOperator($operator) + { + return in_array(strtolower($operator), $this->bitwiseOperators, true) || + in_array(strtolower($operator), $this->grammar->getBitwiseOperators(), true); } /** @@ -1043,7 +1121,7 @@ class Builder /** * Add an "or where null" clause to the query. * - * @param string $column + * @param string|array $column * @return $this */ public function orWhereNull($column) @@ -1066,7 +1144,7 @@ class Builder /** * Add a where between statement to the query. * - * @param string $column + * @param string|\Illuminate\Database\Query\Expression $column * @param array $values * @param string $boolean * @param bool $not @@ -1189,7 +1267,7 @@ class Builder /** * Add a "where date" statement to the query. * - * @param string $column + * @param \Illuminate\Database\Query\Expression|string $column * @param string $operator * @param \DateTimeInterface|string|null $value * @param string $boolean @@ -1768,6 +1846,39 @@ class Builder $this->where(Str::snake($segment), '=', $parameters[$index], $bool); } + /** + * Add a "where fulltext" clause to the query. + * + * @param string|string[] $columns + * @param string $value + * @param string $boolean + * @return $this + */ + public function whereFullText($columns, $value, array $options = [], $boolean = 'and') + { + $type = 'Fulltext'; + + $columns = (array) $columns; + + $this->wheres[] = compact('type', 'columns', 'value', 'options', 'boolean'); + + $this->addBinding($value); + + return $this; + } + + /** + * Add a "or where fulltext" clause to the query. + * + * @param string|string[] $columns + * @param string $value + * @return $this + */ + public function orWhereFullText($columns, $value, array $options = []) + { + return $this->whereFulltext($columns, $value, $options, 'or'); + } + /** * Add a "group by" clause to the query. * @@ -1829,6 +1940,10 @@ class Builder [$value, $operator] = [$operator, '=']; } + if ($this->isBitwiseOperator($operator)) { + $type = 'Bitwise'; + } + $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); if (! $value instanceof Expression) { @@ -1909,7 +2024,7 @@ class Builder /** * Add an "order by" clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column + * @param \Closure|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column * @param string $direction * @return $this * @@ -1942,7 +2057,7 @@ class Builder /** * Add a descending "order by" clause to the query. * - * @param string $column + * @param \Closure|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column * @return $this */ public function orderByDesc($column) @@ -1953,7 +2068,7 @@ class Builder /** * Add an "order by" clause for a timestamp to the query. * - * @param string $column + * @param \Closure|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column * @return $this */ public function latest($column = 'created_at') @@ -1964,7 +2079,7 @@ class Builder /** * Add an "order by" clause for a timestamp to the query. * - * @param string $column + * @param \Closure|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column * @return $this */ public function oldest($column = 'created_at') @@ -2110,7 +2225,7 @@ class Builder /** * Remove all existing orders and optionally add a new order. * - * @param string|null $column + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string|null $column * @param string $direction * @return $this */ @@ -2211,6 +2326,33 @@ class Builder return $this->lock(false); } + /** + * Register a closure to be invoked before the query is executed. + * + * @param callable $callback + * @return $this + */ + public function beforeQuery(callable $callback) + { + $this->beforeQueryCallbacks[] = $callback; + + return $this; + } + + /** + * Invoke the "before query" modification callbacks. + * + * @return void + */ + public function applyBeforeQueryCallbacks() + { + foreach ($this->beforeQueryCallbacks as $callback) { + $callback($this); + } + + $this->beforeQueryCallbacks = []; + } + /** * Get the SQL representation of the query. * @@ -2218,6 +2360,8 @@ class Builder */ public function toSql() { + $this->applyBeforeQueryCallbacks(); + return $this->grammar->compileSelect($this); } @@ -2317,6 +2461,43 @@ class Builder ]); } + /** + * Get a paginator only supporting simple next and previous links. + * + * This is more efficient on larger data-sets, etc. + * + * @param int|null $perPage + * @param array $columns + * @param string $cursorName + * @param \Illuminate\Pagination\Cursor|string|null $cursor + * @return \Illuminate\Contracts\Pagination\CursorPaginator + */ + public function cursorPaginate($perPage = 15, $columns = ['*'], $cursorName = 'cursor', $cursor = null) + { + return $this->paginateUsingCursor($perPage, $columns, $cursorName, $cursor); + } + + /** + * Ensure the proper order by required for cursor pagination. + * + * @param bool $shouldReverse + * @return \Illuminate\Support\Collection + */ + protected function ensureOrderForCursorPagination($shouldReverse = false) + { + $this->enforceOrderBy(); + + return collect($this->orders ?? $this->unionOrders ?? [])->filter(function ($order) { + return Arr::has($order, 'direction'); + })->when($shouldReverse, function (Collection $orders) { + return $orders->map(function ($order) { + $order['direction'] = $order['direction'] === 'asc' ? 'desc' : 'asc'; + + return $order; + }); + })->values(); + } + /** * Get the count of the total records for the paginator. * @@ -2427,7 +2608,7 @@ class Builder } /** - * Get an array with the values of a given column. + * Get a collection instance containing the values of a given column. * * @param string $column * @param string|null $key @@ -2549,6 +2730,8 @@ class Builder */ public function exists() { + $this->applyBeforeQueryCallbacks(); + $results = $this->connection->select( $this->grammar->compileExists($this), $this->getBindings(), ! $this->useWritePdo ); @@ -2674,8 +2857,8 @@ class Builder */ public function aggregate($function, $columns = ['*']) { - $results = $this->cloneWithout($this->unions ? [] : ['columns']) - ->cloneWithoutBindings($this->unions ? [] : ['select']) + $results = $this->cloneWithout($this->unions || $this->havings ? [] : ['columns']) + ->cloneWithoutBindings($this->unions || $this->havings ? [] : ['select']) ->setAggregate($function, $columns) ->get($columns); @@ -2758,7 +2941,7 @@ class Builder } /** - * Insert a new record into the database. + * Insert new records into the database. * * @param array $values * @return bool @@ -2787,6 +2970,8 @@ class Builder } } + $this->applyBeforeQueryCallbacks(); + // Finally, we will run this query against the database connection and return // the results. We will need to also flatten these bindings before running // the query so they are all in one huge, flattened array for execution. @@ -2797,7 +2982,7 @@ class Builder } /** - * Insert a new record into the database while ignoring errors. + * Insert new records into the database while ignoring errors. * * @param array $values * @return int @@ -2817,6 +3002,8 @@ class Builder } } + $this->applyBeforeQueryCallbacks(); + return $this->connection->affectingStatement( $this->grammar->compileInsertOrIgnore($this, $values), $this->cleanBindings(Arr::flatten($values, 1)) @@ -2832,6 +3019,8 @@ class Builder */ public function insertGetId(array $values, $sequence = null) { + $this->applyBeforeQueryCallbacks(); + $sql = $this->grammar->compileInsertGetId($this, $values, $sequence); $values = $this->cleanBindings($values); @@ -2848,6 +3037,8 @@ class Builder */ public function insertUsing(array $columns, $query) { + $this->applyBeforeQueryCallbacks(); + [$sql, $bindings] = $this->createSub($query); return $this->connection->affectingStatement( @@ -2857,13 +3048,15 @@ class Builder } /** - * Update a record in the database. + * Update records in the database. * * @param array $values * @return int */ public function update(array $values) { + $this->applyBeforeQueryCallbacks(); + $sql = $this->grammar->compileUpdate($this, $values); return $this->connection->update($sql, $this->cleanBindings( @@ -2871,6 +3064,27 @@ class Builder )); } + /** + * Update records in a PostgreSQL database using the update from syntax. + * + * @param array $values + * @return int + */ + public function updateFrom(array $values) + { + if (! method_exists($this->grammar, 'compileUpdateFrom')) { + throw new LogicException('This database engine does not support the updateFrom method.'); + } + + $this->applyBeforeQueryCallbacks(); + + $sql = $this->grammar->compileUpdateFrom($this, $values); + + return $this->connection->update($sql, $this->cleanBindings( + $this->grammar->prepareBindingsForUpdateFrom($this->bindings, $values) + )); + } + /** * Insert or update a record matching the attributes, and fill it with values. * @@ -2891,6 +3105,51 @@ class Builder return (bool) $this->limit(1)->update($values); } + /** + * Insert new records or update the existing ones. + * + * @param array $values + * @param array|string $uniqueBy + * @param array|null $update + * @return int + */ + public function upsert(array $values, $uniqueBy, $update = null) + { + if (empty($values)) { + return 0; + } elseif ($update === []) { + return (int) $this->insert($values); + } + + if (! is_array(reset($values))) { + $values = [$values]; + } else { + foreach ($values as $key => $value) { + ksort($value); + + $values[$key] = $value; + } + } + + if (is_null($update)) { + $update = array_keys(reset($values)); + } + + $this->applyBeforeQueryCallbacks(); + + $bindings = $this->cleanBindings(array_merge( + Arr::flatten($values, 1), + collect($update)->reject(function ($value, $key) { + return is_int($key); + })->all() + )); + + return $this->connection->affectingStatement( + $this->grammar->compileUpsert($this, $values, (array) $uniqueBy, $update), + $bindings + ); + } + /** * Increment a column's value by a given amount. * @@ -2938,7 +3197,7 @@ class Builder } /** - * Delete a record from the database. + * Delete records from the database. * * @param mixed $id * @return int @@ -2952,6 +3211,8 @@ class Builder $this->where($this->from.'.id', '=', $id); } + $this->applyBeforeQueryCallbacks(); + return $this->connection->delete( $this->grammar->compileDelete($this), $this->cleanBindings( $this->grammar->prepareBindingsForDelete($this->bindings) @@ -2966,6 +3227,8 @@ class Builder */ public function truncate() { + $this->applyBeforeQueryCallbacks(); + foreach ($this->grammar->compileTruncate($this) as $sql => $bindings) { $this->connection->statement($sql, $bindings); } @@ -3058,14 +3321,32 @@ class Builder } if (is_array($value)) { - $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); + $this->bindings[$type] = array_values(array_map( + [$this, 'castBinding'], + array_merge($this->bindings[$type], $value), + )); } else { - $this->bindings[$type][] = $value; + $this->bindings[$type][] = $this->castBinding($value); } return $this; } + /** + * Cast the given binding value. + * + * @param mixed $value + * @return mixed + */ + public function castBinding($value) + { + if (function_exists('enum_exists') && $value instanceof BackedEnum) { + return $value->value; + } + + return $value; + } + /** * Merge an array of bindings into our bindings. * @@ -3085,11 +3366,15 @@ class Builder * @param array $bindings * @return array */ - protected function cleanBindings(array $bindings) + public function cleanBindings(array $bindings) { - return array_values(array_filter($bindings, function ($binding) { - return ! $binding instanceof Expression; - })); + return collect($bindings) + ->reject(function ($binding) { + return $binding instanceof Expression; + }) + ->map([$this, 'castBinding']) + ->values() + ->all(); } /** @@ -3169,6 +3454,16 @@ class Builder $value instanceof Closure; } + /** + * Clone the query. + * + * @return static + */ + public function clone() + { + return clone $this; + } + /** * Clone the query without the given properties. * @@ -3177,7 +3472,7 @@ class Builder */ public function cloneWithout(array $properties) { - return tap(clone $this, function ($clone) use ($properties) { + return tap($this->clone(), function ($clone) use ($properties) { foreach ($properties as $property) { $clone->{$property} = null; } @@ -3192,7 +3487,7 @@ class Builder */ public function cloneWithoutBindings(array $except) { - return tap(clone $this, function ($clone) use ($except) { + return tap($this->clone(), function ($clone) use ($except) { foreach ($except as $type) { $clone->bindings[$type] = []; } @@ -3214,7 +3509,7 @@ class Builder /** * Die and dump the current SQL and bindings. * - * @return void + * @return never */ public function dd() { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php index fa9e962d1..0dbdb1e05 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php @@ -19,10 +19,17 @@ class Grammar extends BaseGrammar protected $operators = []; /** - * The components that make up a select clause. + * The grammar specific bitwise operators. * * @var array */ + protected $bitwiseOperators = []; + + /** + * The components that make up a select clause. + * + * @var string[] + */ protected $selectComponents = [ 'aggregate', 'columns', @@ -45,7 +52,7 @@ class Grammar extends BaseGrammar */ public function compileSelect(Builder $query) { - if ($query->unions && $query->aggregate) { + if (($query->unions || $query->havings) && $query->aggregate) { return $this->compileUnionAggregate($query); } @@ -181,7 +188,7 @@ class Grammar extends BaseGrammar * @param \Illuminate\Database\Query\Builder $query * @return string */ - protected function compileWheres(Builder $query) + public function compileWheres(Builder $query) { // Each type of where clauses has its own compiler function which is responsible // for actually creating the where clauses SQL. This helps keep the code nice @@ -250,7 +257,21 @@ class Grammar extends BaseGrammar { $value = $this->parameter($where['value']); - return $this->wrap($where['column']).' '.$where['operator'].' '.$value; + $operator = str_replace('?', '??', $where['operator']); + + return $this->wrap($where['column']).' '.$operator.' '.$value; + } + + /** + * Compile a bitwise operator where clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereBitwise(Builder $query, $where) + { + return $this->whereBasic($query, $where); } /** @@ -457,7 +478,7 @@ class Grammar extends BaseGrammar } /** - * Compile a where clause comparing two columns.. + * Compile a where clause comparing two columns. * * @param \Illuminate\Database\Query\Builder $query * @param array $where @@ -569,7 +590,8 @@ class Grammar extends BaseGrammar $not = $where['not'] ? 'not ' : ''; return $not.$this->compileJsonContains( - $where['column'], $this->parameter($where['value']) + $where['column'], + $this->parameter($where['value']) ); } @@ -608,7 +630,9 @@ class Grammar extends BaseGrammar protected function whereJsonLength(Builder $query, $where) { return $this->compileJsonLength( - $where['column'], $where['operator'], $this->parameter($where['value']) + $where['column'], + $where['operator'], + $this->parameter($where['value']) ); } @@ -627,6 +651,18 @@ class Grammar extends BaseGrammar throw new RuntimeException('This database engine does not support JSON length operations.'); } + /** + * Compile a "where fulltext" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + public function whereFullText(Builder $query, $where) + { + throw new RuntimeException('This database engine does not support fulltext search operations.'); + } + /** * Compile the "group by" portions of the query. * @@ -993,6 +1029,22 @@ class Grammar extends BaseGrammar return "update {$table} {$joins} set {$columns} {$where}"; } + /** + * Compile an "upsert" statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param array $uniqueBy + * @param array $update + * @return string + * + * @throws \RuntimeException + */ + public function compileUpsert(Builder $query, array $values, array $uniqueBy, array $update) + { + throw new RuntimeException('This database engine does not support upserts.'); + } + /** * Prepare the bindings for an update statement. * @@ -1266,4 +1318,14 @@ class Grammar extends BaseGrammar { return $this->operators; } + + /** + * Get the grammar specific bitwise operators. + * + * @return array + */ + public function getBitwiseOperators() + { + return $this->bitwiseOperators; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php index 494018803..404b3d540 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php @@ -10,17 +10,16 @@ class MySqlGrammar extends Grammar /** * The grammar specific operators. * - * @var array + * @var string[] */ protected $operators = ['sounds like']; /** * Add a "where null" clause to the query. * - * @param string|array $columns - * @param string $boolean - * @param bool $not - * @return $this + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string */ protected function whereNull(Builder $query, $where) { @@ -36,9 +35,9 @@ class MySqlGrammar extends Grammar /** * Add a "where not null" clause to the query. * - * @param string|array $columns - * @param string $boolean - * @return $this + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string */ protected function whereNotNull(Builder $query, $where) { @@ -51,6 +50,30 @@ class MySqlGrammar extends Grammar return parent::whereNotNull($query, $where); } + /** + * Compile a "where fulltext" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + public function whereFullText(Builder $query, $where) + { + $columns = $this->columnize($where['columns']); + + $value = $this->parameter($where['value']); + + $mode = ($where['options']['mode'] ?? []) === 'boolean' + ? ' in boolean mode' + : ' in natural language mode'; + + $expanded = ($where['options']['expanded'] ?? []) && ($where['options']['mode'] ?? []) !== 'boolean' + ? ' with query expansion' + : ''; + + return "match ({$columns}) against (".$value."{$mode}{$expanded})"; + } + /** * Compile an insert ignore statement into SQL. * @@ -153,6 +176,28 @@ class MySqlGrammar extends Grammar })->implode(', '); } + /** + * Compile an "upsert" statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param array $uniqueBy + * @param array $update + * @return string + */ + public function compileUpsert(Builder $query, array $values, array $uniqueBy, array $update) + { + $sql = $this->compileInsert($query, $values).' on duplicate key update '; + + $columns = collect($update)->map(function ($value, $key) { + return is_numeric($key) + ? $this->wrap($value).' = values('.$this->wrap($value).')' + : $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + + return $sql.$columns; + } + /** * Prepare a JSON column being updated using the JSON_SET function. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php index 46420bb6a..1b49bf10e 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php @@ -11,16 +11,25 @@ class PostgresGrammar extends Grammar /** * All of the available clause operators. * - * @var array + * @var string[] */ protected $operators = [ '=', '<', '>', '<=', '>=', '<>', '!=', 'like', 'not like', 'between', 'ilike', 'not ilike', '~', '&', '|', '#', '<<', '>>', '<<=', '>>=', - '&&', '@>', '<@', '?', '?|', '?&', '||', '-', '-', '#-', + '&&', '@>', '<@', '?', '?|', '?&', '||', '-', '@?', '@@', '#-', 'is distinct from', 'is not distinct from', ]; + /** + * The grammar specific bitwise operators. + * + * @var array + */ + protected $bitwiseOperators = [ + '~', '&', '|', '#', '<<', '>>', '<<=', '>>=', + ]; + /** * {@inheritdoc} * @@ -42,6 +51,22 @@ class PostgresGrammar extends Grammar return parent::whereBasic($query, $where); } + /** + * {@inheritdoc} + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereBitwise(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + $operator = str_replace('?', '??', $where['operator']); + + return '('.$this->wrap($where['column']).' '.$operator.' '.$value.')::bool'; + } + /** * Compile a "where date" clause. * @@ -85,6 +110,71 @@ class PostgresGrammar extends Grammar return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value; } + /** + * Compile a "where fulltext" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + public function whereFullText(Builder $query, $where) + { + $language = $where['options']['language'] ?? 'english'; + + if (! in_array($language, $this->validFullTextLanguages())) { + $language = 'english'; + } + + $columns = collect($where['columns'])->map(function ($column) use ($language) { + return "to_tsvector('{$language}', {$this->wrap($column)})"; + })->implode(' || '); + + $mode = 'plainto_tsquery'; + + if (($where['options']['mode'] ?? []) === 'phrase') { + $mode = 'phraseto_tsquery'; + } + + if (($where['options']['mode'] ?? []) === 'websearch') { + $mode = 'websearch_to_tsquery'; + } + + return "({$columns}) @@ {$mode}('{$language}', {$this->parameter($where['value'])})"; + } + + /** + * Get an array of valid full text languages. + * + * @return array + */ + protected function validFullTextLanguages() + { + return [ + 'simple', + 'arabic', + 'danish', + 'dutch', + 'english', + 'finnish', + 'french', + 'german', + 'hungarian', + 'indonesian', + 'irish', + 'italian', + 'lithuanian', + 'nepali', + 'norwegian', + 'portuguese', + 'romanian', + 'russian', + 'spanish', + 'swedish', + 'tamil', + 'turkish', + ]; + } + /** * Compile the "select *" portion of the query. * @@ -141,6 +231,36 @@ class PostgresGrammar extends Grammar return 'json_array_length(('.$column.')::json) '.$operator.' '.$value; } + /** + * {@inheritdoc} + * + * @param array $having + * @return string + */ + protected function compileHaving(array $having) + { + if ($having['type'] === 'Bitwise') { + return $this->compileHavingBitwise($having); + } + + return parent::compileHaving($having); + } + + /** + * Compile a having clause involving a bitwise operator. + * + * @param array $having + * @return string + */ + protected function compileHavingBitwise($having) + { + $column = $this->wrap($having['column']); + + $parameter = $this->parameter($having['value']); + + return $having['boolean'].' ('.$column.' '.$having['operator'].' '.$parameter.')::bool'; + } + /** * Compile the lock into SQL. * @@ -218,6 +338,30 @@ class PostgresGrammar extends Grammar })->implode(', '); } + /** + * Compile an "upsert" statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param array $uniqueBy + * @param array $update + * @return string + */ + public function compileUpsert(Builder $query, array $values, array $uniqueBy, array $update) + { + $sql = $this->compileInsert($query, $values); + + $sql .= ' on conflict ('.$this->columnize($uniqueBy).') do update set '; + + $columns = collect($update)->map(function ($value, $key) { + return is_numeric($key) + ? $this->wrap($value).' = '.$this->wrapValue('excluded').'.'.$this->wrap($value) + : $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + + return $sql.$columns; + } + /** * Prepares a JSON column being updated using the JSONB_SET function. * @@ -236,6 +380,114 @@ class PostgresGrammar extends Grammar return "{$field} = jsonb_set({$field}::jsonb, {$path}, {$this->parameter($value)})"; } + /** + * Compile an update from statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileUpdateFrom(Builder $query, $values) + { + $table = $this->wrapTable($query->from); + + // Each one of the columns in the update statements needs to be wrapped in the + // keyword identifiers, also a place-holder needs to be created for each of + // the values in the list of bindings so we can make the sets statements. + $columns = $this->compileUpdateColumns($query, $values); + + $from = ''; + + if (isset($query->joins)) { + // When using Postgres, updates with joins list the joined tables in the from + // clause, which is different than other systems like MySQL. Here, we will + // compile out the tables that are joined and add them to a from clause. + $froms = collect($query->joins)->map(function ($join) { + return $this->wrapTable($join->table); + })->all(); + + if (count($froms) > 0) { + $from = ' from '.implode(', ', $froms); + } + } + + $where = $this->compileUpdateWheres($query); + + return trim("update {$table} set {$columns}{$from} {$where}"); + } + + /** + * Compile the additional where clauses for updates with joins. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileUpdateWheres(Builder $query) + { + $baseWheres = $this->compileWheres($query); + + if (! isset($query->joins)) { + return $baseWheres; + } + + // Once we compile the join constraints, we will either use them as the where + // clause or append them to the existing base where clauses. If we need to + // strip the leading boolean we will do so when using as the only where. + $joinWheres = $this->compileUpdateJoinWheres($query); + + if (trim($baseWheres) == '') { + return 'where '.$this->removeLeadingBoolean($joinWheres); + } + + return $baseWheres.' '.$joinWheres; + } + + /** + * Compile the "join" clause where clauses for an update. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileUpdateJoinWheres(Builder $query) + { + $joinWheres = []; + + // Here we will just loop through all of the join constraints and compile them + // all out then implode them. This should give us "where" like syntax after + // everything has been built and then we will join it to the real wheres. + foreach ($query->joins as $join) { + foreach ($join->wheres as $where) { + $method = "where{$where['type']}"; + + $joinWheres[] = $where['boolean'].' '.$this->$method($query, $where); + } + } + + return implode(' ', $joinWheres); + } + + /** + * Prepare the bindings for an update statement. + * + * @param array $bindings + * @param array $values + * @return array + */ + public function prepareBindingsForUpdateFrom(array $bindings, array $values) + { + $values = collect($values)->map(function ($value, $column) { + return is_array($value) || ($this->isJsonSelector($column) && ! $this->isExpression($value)) + ? json_encode($value) + : $value; + })->all(); + + $bindingsWithoutWhere = Arr::except($bindings, ['select', 'where']); + + return array_values( + array_merge($values, $bindings['where'], Arr::flatten($bindingsWithoutWhere)) + ); + } + /** * Compile an update statement with joins or limit into SQL. * @@ -345,7 +597,7 @@ class PostgresGrammar extends Grammar } /** - *Wrap the given JSON selector for boolean values. + * Wrap the given JSON selector for boolean values. * * @param string $value * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php index 2c27ddf3c..29a379686 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php @@ -11,7 +11,7 @@ class SQLiteGrammar extends Grammar /** * All of the available clause operators. * - * @var array + * @var string[] */ protected $operators = [ '=', '<', '>', '<=', '>=', '<>', '!=', @@ -182,6 +182,30 @@ class SQLiteGrammar extends Grammar })->implode(', '); } + /** + * Compile an "upsert" statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param array $uniqueBy + * @param array $update + * @return string + */ + public function compileUpsert(Builder $query, array $values, array $uniqueBy, array $update) + { + $sql = $this->compileInsert($query, $values); + + $sql .= ' on conflict ('.$this->columnize($uniqueBy).') do update set '; + + $columns = collect($update)->map(function ($value, $key) { + return is_numeric($key) + ? $this->wrap($value).' = '.$this->wrapValue('excluded').'.'.$this->wrap($value) + : $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + + return $sql.$columns; + } + /** * Group the nested JSON columns. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php index 9dfc22939..417b63e4a 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php @@ -11,7 +11,7 @@ class SqlServerGrammar extends Grammar /** * All of the available clause operators. * - * @var array + * @var string[] */ protected $operators = [ '=', '<', '>', '<=', '>=', '!<', '!>', '<>', '!=', @@ -31,15 +31,21 @@ class SqlServerGrammar extends Grammar return parent::compileSelect($query); } - // If an offset is present on the query, we will need to wrap the query in - // a big "ANSI" offset syntax block. This is very nasty compared to the - // other database systems but is necessary for implementing features. if (is_null($query->columns)) { $query->columns = ['*']; } + $components = $this->compileComponents($query); + + if (! empty($components['orders'])) { + return parent::compileSelect($query)." offset {$query->offset} rows fetch next {$query->limit} rows only"; + } + + // If an offset is present on the query, we will need to wrap the query in + // a big "ANSI" offset syntax block. This is very nasty compared to the + // other database systems but is necessary for implementing features. return $this->compileAnsiOffset( - $query, $this->compileComponents($query) + $query, $components ); } @@ -61,8 +67,8 @@ class SqlServerGrammar extends Grammar // If there is a limit on the query, but not an offset, we will add the top // clause to the query, which serves as a "limit" type clause within the // SQL Server system similar to the limit keywords available in MySQL. - if ($query->limit > 0 && $query->offset <= 0) { - $select .= 'top '.$query->limit.' '; + if (is_numeric($query->limit) && $query->limit > 0 && $query->offset <= 0) { + $select .= 'top '.((int) $query->limit).' '; } return $select.$this->columnize($columns); @@ -90,6 +96,22 @@ class SqlServerGrammar extends Grammar return $from; } + /** + * {@inheritdoc} + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereBitwise(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + $operator = str_replace('?', '??', $where['operator']); + + return '('.$this->wrap($where['column']).' '.$operator.' '.$value.') != 0'; + } + /** * Compile a "where date" clause. * @@ -158,6 +180,36 @@ class SqlServerGrammar extends Grammar return '(select count(*) from openjson('.$field.$path.')) '.$operator.' '.$value; } + /** + * {@inheritdoc} + * + * @param array $having + * @return string + */ + protected function compileHaving(array $having) + { + if ($having['type'] === 'Bitwise') { + return $this->compileHavingBitwise($having); + } + + return parent::compileHaving($having); + } + + /** + * Compile a having clause involving a bitwise operator. + * + * @param array $having + * @return string + */ + protected function compileHavingBitwise($having) + { + $column = $this->wrap($having['column']); + + $parameter = $this->parameter($having['value']); + + return $having['boolean'].' ('.$column.' '.$having['operator'].' '.$parameter.') != 0'; + } + /** * Create a full ANSI offset clause for the query. * @@ -181,6 +233,10 @@ class SqlServerGrammar extends Grammar unset($components['orders']); + if ($this->queryOrderContainsSubquery($query)) { + $query->bindings = $this->sortBindingsForSubqueryOrderBy($query); + } + // Next we need to calculate the constraints that should be placed on the query // to get the right offset and limit from our query but if there is no limit // set we will just handle the offset only since that is all that matters. @@ -200,6 +256,36 @@ class SqlServerGrammar extends Grammar return ", row_number() over ({$orderings}) as row_num"; } + /** + * Determine if the query's order by clauses contain a subquery. + * + * @param \Illuminate\Database\Query\Builder $query + * @return bool + */ + protected function queryOrderContainsSubquery($query) + { + if (! is_array($query->orders)) { + return false; + } + + return Arr::first($query->orders, function ($value) { + return $this->isExpression($value['column'] ?? null); + }, false) !== false; + } + + /** + * Move the order bindings to be after the "select" statement to account for an order by subquery. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + protected function sortBindingsForSubqueryOrderBy($query) + { + return Arr::sort($query->bindings, function ($bindings, $key) { + return array_search($key, ['select', 'order', 'from', 'join', 'where', 'groupBy', 'having', 'union', 'unionOrder']); + }); + } + /** * Compile a common table expression for a query. * @@ -222,10 +308,10 @@ class SqlServerGrammar extends Grammar */ protected function compileRowConstraint($query) { - $start = $query->offset + 1; + $start = (int) $query->offset + 1; if ($query->limit > 0) { - $finish = $query->offset + $query->limit; + $finish = (int) $query->offset + (int) $query->limit; return "between {$start} and {$finish}"; } @@ -341,6 +427,48 @@ class SqlServerGrammar extends Grammar return "update {$alias} set {$columns} from {$table} {$joins} {$where}"; } + /** + * Compile an "upsert" statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param array $uniqueBy + * @param array $update + * @return string + */ + public function compileUpsert(Builder $query, array $values, array $uniqueBy, array $update) + { + $columns = $this->columnize(array_keys(reset($values))); + + $sql = 'merge '.$this->wrapTable($query->from).' '; + + $parameters = collect($values)->map(function ($record) { + return '('.$this->parameterize($record).')'; + })->implode(', '); + + $sql .= 'using (values '.$parameters.') '.$this->wrapTable('laravel_source').' ('.$columns.') '; + + $on = collect($uniqueBy)->map(function ($column) use ($query) { + return $this->wrap('laravel_source.'.$column).' = '.$this->wrap($query->from.'.'.$column); + })->implode(' and '); + + $sql .= 'on '.$on.' '; + + if ($update) { + $update = collect($update)->map(function ($value, $key) { + return is_numeric($key) + ? $this->wrap($value).' = '.$this->wrap('laravel_source.'.$value) + : $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + + $sql .= 'when matched then update set '.$update.' '; + } + + $sql .= 'when not matched then insert ('.$columns.') values ('.$columns.');'; + + return $sql; + } + /** * Prepare the bindings for an update statement. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php index 800da42ef..57d650a38 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php @@ -104,7 +104,7 @@ class JoinClause extends Builder * * @param \Closure|string $first * @param string|null $operator - * @param string|null $second + * @param \Illuminate\Database\Query\Expression|string|null $second * @return \Illuminate\Database\Query\JoinClause */ public function orOn($first, $operator = null, $second = null) diff --git a/vendor/laravel/framework/src/Illuminate/Database/README.md b/vendor/laravel/framework/src/Illuminate/Database/README.md index 7d59ab7d8..901993602 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/README.md +++ b/vendor/laravel/framework/src/Illuminate/Database/README.md @@ -12,14 +12,14 @@ use Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule; $capsule->addConnection([ - 'driver' => 'mysql', - 'host' => 'localhost', - 'database' => 'database', - 'username' => 'root', - 'password' => 'password', - 'charset' => 'utf8', + 'driver' => 'mysql', + 'host' => 'localhost', + 'database' => 'database', + 'username' => 'root', + 'password' => 'password', + 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', - 'prefix' => '', + 'prefix' => '', ]); // Set the event dispatcher used by Eloquent models... (optional) diff --git a/vendor/laravel/framework/src/Illuminate/Database/RecordsNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/RecordsNotFoundException.php new file mode 100755 index 000000000..3e0d95575 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/RecordsNotFoundException.php @@ -0,0 +1,10 @@ +withTablePrefix(new SchemaGrammar); } + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * + * @throws \RuntimeException + */ + public function getSchemaState(Filesystem $files = null, callable $processFactory = null) + { + return new SqliteSchemaState($this, $files, $processFactory); + } + /** * Get the default post processor instance. * @@ -81,11 +98,11 @@ class SQLiteConnection extends Connection /** * Get the Doctrine DBAL driver. * - * @return \Doctrine\DBAL\Driver\PDOSqlite\Driver + * @return \Doctrine\DBAL\Driver\PDOSqlite\Driver|\Illuminate\Database\PDO\SQLiteDriver */ protected function getDoctrineDriver() { - return new DoctrineDriver; + return class_exists(Version::class) ? new DoctrineDriver : new SQLiteDriver; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php index f01603f76..dfe53ee79 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php @@ -71,6 +71,13 @@ class Blueprint */ public $temporary = false; + /** + * The column to add new columns after. + * + * @var string + */ + public $after; + /** * Create a new schema blueprint. * @@ -201,7 +208,7 @@ class Blueprint protected function addFluentIndexes() { foreach ($this->columns as $column) { - foreach (['primary', 'unique', 'index', 'spatialIndex'] as $index) { + foreach (['primary', 'unique', 'index', 'fulltext', 'fullText', 'spatialIndex'] as $index) { // If the index has been specified on the given column, but is simply equal // to "true" (boolean), no name has been specified for this index so the // index method can be called without a name and it will generate one. @@ -255,7 +262,7 @@ class Blueprint * * @return bool */ - protected function creating() + public function creating() { return collect($this->commands)->contains(function ($command) { return $command->name === 'create'; @@ -360,6 +367,17 @@ class Blueprint return $this->dropIndexCommand('dropIndex', 'index', $index); } + /** + * Indicate that the given fulltext index should be dropped. + * + * @param string|array $index + * @return \Illuminate\Support\Fluent + */ + public function dropFullText($index) + { + return $this->dropIndexCommand('dropFullText', 'fulltext', $index); + } + /** * Indicate that the given spatial index should be dropped. * @@ -382,6 +400,19 @@ class Blueprint return $this->dropIndexCommand('dropForeign', 'foreign', $index); } + /** + * Indicate that the given column and foreign key should be dropped. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function dropConstrainedForeignId($column) + { + $this->dropForeign([$column]); + + return $this->dropColumn($column); + } + /** * Indicate that the given indexes should be renamed. * @@ -510,6 +541,19 @@ class Blueprint return $this->indexCommand('index', $columns, $name, $algorithm); } + /** + * Specify an fulltext for the table. + * + * @param string|array $columns + * @param string|null $name + * @param string|null $algorithm + * @return \Illuminate\Support\Fluent + */ + public function fullText($columns, $name = null, $algorithm = null) + { + return $this->indexCommand('fulltext', $columns, $name, $algorithm); + } + /** * Specify a spatial index for the table. * @@ -657,6 +701,17 @@ class Blueprint return $this->addColumn('string', $column, compact('length')); } + /** + * Create a new tiny text column on the table. + * + * @param string $column + * @return \Illuminate\Database\Schema\ColumnDefinition + */ + public function tinyText($column) + { + return $this->addColumn('tinyText', $column); + } + /** * Create a new text column on the table. * @@ -823,14 +878,30 @@ class Blueprint */ public function foreignId($column) { - $this->columns[] = $column = new ForeignIdColumnDefinition($this, [ + return $this->addColumnDefinition(new ForeignIdColumnDefinition($this, [ 'type' => 'bigInteger', 'name' => $column, 'autoIncrement' => false, 'unsigned' => true, - ]); + ])); + } - return $column; + /** + * Create a foreign ID column for the given model. + * + * @param \Illuminate\Database\Eloquent\Model|string $model + * @param string|null $column + * @return \Illuminate\Database\Schema\ForeignIdColumnDefinition + */ + public function foreignIdFor($model, $column = null) + { + if (is_string($model)) { + $model = new $model; + } + + return $model->getKeyType() === 'int' && $model->getIncrementing() + ? $this->foreignId($column ?: $model->getForeignKey()) + : $this->foreignUuid($column ?: $model->getForeignKey()); } /** @@ -1158,10 +1229,10 @@ class Blueprint */ public function foreignUuid($column) { - return $this->columns[] = new ForeignIdColumnDefinition($this, [ + return $this->addColumnDefinition(new ForeignIdColumnDefinition($this, [ 'type' => 'uuid', 'name' => $column, - ]); + ])); } /** @@ -1307,11 +1378,11 @@ class Blueprint */ public function morphs($name, $indexName = null) { - $this->string("{$name}_type"); - - $this->unsignedBigInteger("{$name}_id"); - - $this->index(["{$name}_type", "{$name}_id"], $indexName); + if (Builder::$defaultMorphKeyType === 'uuid') { + $this->uuidMorphs($name, $indexName); + } else { + $this->numericMorphs($name, $indexName); + } } /** @@ -1322,6 +1393,38 @@ class Blueprint * @return void */ public function nullableMorphs($name, $indexName = null) + { + if (Builder::$defaultMorphKeyType === 'uuid') { + $this->nullableUuidMorphs($name, $indexName); + } else { + $this->nullableNumericMorphs($name, $indexName); + } + } + + /** + * Add the proper columns for a polymorphic table using numeric IDs (incremental). + * + * @param string $name + * @param string|null $indexName + * @return void + */ + public function numericMorphs($name, $indexName = null) + { + $this->string("{$name}_type"); + + $this->unsignedBigInteger("{$name}_id"); + + $this->index(["{$name}_type", "{$name}_id"], $indexName); + } + + /** + * Add nullable columns for a polymorphic table using numeric IDs (incremental). + * + * @param string $name + * @param string|null $indexName + * @return void + */ + public function nullableNumericMorphs($name, $indexName = null) { $this->string("{$name}_type")->nullable(); @@ -1441,11 +1544,44 @@ class Blueprint */ public function addColumn($type, $name, array $parameters = []) { - $this->columns[] = $column = new ColumnDefinition( + return $this->addColumnDefinition(new ColumnDefinition( array_merge(compact('type', 'name'), $parameters) - ); + )); + } - return $column; + /** + * Add a new column definition to the blueprint. + * + * @param \Illuminate\Database\Schema\ColumnDefinition $definition + * @return \Illuminate\Database\Schema\ColumnDefinition + */ + protected function addColumnDefinition($definition) + { + $this->columns[] = $definition; + + if ($this->after) { + $definition->after($this->after); + + $this->after = $definition->name; + } + + return $definition; + } + + /** + * Add the columns from the callback after the given column. + * + * @param string $column + * @param \Closure $callback + * @return void + */ + public function after($column, Closure $callback) + { + $this->after = $column; + + $callback($this); + + $this->after = null; } /** @@ -1542,4 +1678,34 @@ class Blueprint return (bool) $column->change; }); } + + /** + * Determine if the blueprint has auto-increment columns. + * + * @return bool + */ + public function hasAutoIncrementColumn() + { + return ! is_null(collect($this->getAddedColumns())->first(function ($column) { + return $column->autoIncrement === true; + })); + } + + /** + * Get the auto-increment column starting values. + * + * @return array + */ + public function autoIncrementingStartingValues() + { + if (! $this->hasAutoIncrementColumn()) { + return []; + } + + return collect($this->getAddedColumns())->mapWithKeys(function ($column) { + return $column->autoIncrement === true + ? [$column->name => $column->get('startingValue', $column->get('from'))] + : [$column->name => null]; + })->filter()->all(); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php index 93571b2c4..40f78880b 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php @@ -3,10 +3,10 @@ namespace Illuminate\Database\Schema; use Closure; -use Doctrine\DBAL\Types\Type; +use Illuminate\Container\Container; use Illuminate\Database\Connection; +use InvalidArgumentException; use LogicException; -use RuntimeException; class Builder { @@ -38,6 +38,13 @@ class Builder */ public static $defaultStringLength = 255; + /** + * The default relationship morph key type. + * + * @var string + */ + public static $defaultMorphKeyType = 'int'; + /** * Create a new database Schema manager. * @@ -61,6 +68,59 @@ class Builder static::$defaultStringLength = $length; } + /** + * Set the default morph key type for migrations. + * + * @param string $type + * @return void + * + * @throws \InvalidArgumentException + */ + public static function defaultMorphKeyType(string $type) + { + if (! in_array($type, ['int', 'uuid'])) { + throw new InvalidArgumentException("Morph key type must be 'int' or 'uuid'."); + } + + static::$defaultMorphKeyType = $type; + } + + /** + * Set the default morph key type for migrations to UUIDs. + * + * @return void + */ + public static function morphUsingUuids() + { + return static::defaultMorphKeyType('uuid'); + } + + /** + * Create a database in the schema. + * + * @param string $name + * @return bool + * + * @throws \LogicException + */ + public function createDatabase($name) + { + throw new LogicException('This database driver does not support creating databases.'); + } + + /** + * Drop a database from the schema if the database exists. + * + * @param string $name + * @return bool + * + * @throws \LogicException + */ + public function dropDatabaseIfExists($name) + { + throw new LogicException('This database driver does not support dropping databases.'); + } + /** * Determine if the given table exists. * @@ -193,6 +253,20 @@ class Builder })); } + /** + * Drop columns from a table schema. + * + * @param string $table + * @param string|array $columns + * @return void + */ + public function dropColumns($table, $columns) + { + $this->table($table, function (Blueprint $blueprint) use ($columns) { + $blueprint->dropColumn($columns); + }); + } + /** * Drop all tables from the database. * @@ -307,7 +381,7 @@ class Builder return call_user_func($this->resolver, $table, $callback, $prefix); } - return new Blueprint($table, $callback, $prefix); + return Container::getInstance()->make(Blueprint::class, compact('table', 'callback', 'prefix')); } /** @@ -317,26 +391,10 @@ class Builder * @param string $name * @param string $type * @return void - * - * @throws \Doctrine\DBAL\DBALException - * @throws \RuntimeException */ public function registerCustomDoctrineType($class, $name, $type) { - if (! $this->connection->isDoctrineAvailable()) { - throw new RuntimeException( - 'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).' - ); - } - - if (! Type::hasType($name)) { - Type::addType($name, $class); - - $this->connection - ->getDoctrineSchemaManager() - ->getDatabasePlatform() - ->registerDoctrineTypeMapping($type, $name); - } + $this->connection->registerDoctrineType($class, $name, $type); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php index c13e69ea9..85f8ba38c 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php @@ -2,7 +2,6 @@ namespace Illuminate\Database\Schema; -use Illuminate\Database\Query\Expression; use Illuminate\Support\Fluent; /** @@ -12,21 +11,26 @@ use Illuminate\Support\Fluent; * @method $this change() Change the column * @method $this charset(string $charset) Specify a character set for the column (MySQL) * @method $this collation(string $collation) Specify a collation for the column (MySQL/PostgreSQL/SQL Server) - * @method $this comment(string $comment) Add a comment to the column (MySQL) + * @method $this comment(string $comment) Add a comment to the column (MySQL/PostgreSQL) * @method $this default(mixed $value) Specify a "default" value for the column * @method $this first() Place the column "first" in the table (MySQL) + * @method $this from(int $startingValue) Set the starting value of an auto-incrementing field (MySQL / PostgreSQL) * @method $this generatedAs(string|Expression $expression = null) Create a SQL compliant identity column (PostgreSQL) * @method $this index(string $indexName = null) Add an index + * @method $this invisible() Specify that the column should be invisible to "SELECT *" (MySQL) * @method $this nullable(bool $value = true) Allow NULL values to be inserted into the column * @method $this persisted() Mark the computed generated column as persistent (SQL Server) * @method $this primary() Add a primary index - * @method $this spatialIndex() Add a spatial index - * @method $this storedAs(string $expression) Create a stored generated column (MySQL) + * @method $this fulltext(string $indexName = null) Add a fulltext index + * @method $this spatialIndex(string $indexName = null) Add a spatial index + * @method $this startingValue(int $startingValue) Set the starting value of an auto-incrementing field (MySQL/PostgreSQL) + * @method $this storedAs(string $expression) Create a stored generated column (MySQL/PostgreSQL/SQLite) * @method $this type(string $type) Specify a type for the column * @method $this unique(string $indexName = null) Add a unique index * @method $this unsigned() Set the INTEGER column as UNSIGNED (MySQL) * @method $this useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value - * @method $this virtualAs(string $expression) Create a virtual generated column (MySQL) + * @method $this useCurrentOnUpdate() Set the TIMESTAMP column to use CURRENT_TIMESTAMP when updating (MySQL) + * @method $this virtualAs(string $expression) Create a virtual generated column (MySQL/PostgreSQL/SQLite) */ class ColumnDefinition extends Fluent { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php index 1508ee0de..1a2059eee 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php @@ -32,7 +32,7 @@ class ForeignIdColumnDefinition extends ColumnDefinition * * @param string|null $table * @param string $column - * @return \Illuminate\Support\Fluent|\Illuminate\Database\Schema\ForeignKeyDefinition + * @return \Illuminate\Database\Schema\ForeignKeyDefinition */ public function constrained($table = null, $column = 'id') { @@ -43,7 +43,7 @@ class ForeignIdColumnDefinition extends ColumnDefinition * Specify which column this foreign ID references on another table. * * @param string $column - * @return \Illuminate\Support\Fluent|\Illuminate\Database\Schema\ForeignKeyDefinition + * @return \Illuminate\Database\Schema\ForeignKeyDefinition */ public function references($column) { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php index 6fe970608..a03fcff77 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php @@ -24,6 +24,16 @@ class ForeignKeyDefinition extends Fluent return $this->onUpdate('cascade'); } + /** + * Indicate that updates should be restricted. + * + * @return $this + */ + public function restrictOnUpdate() + { + return $this->onUpdate('restrict'); + } + /** * Indicate that deletes should cascade. * @@ -34,6 +44,16 @@ class ForeignKeyDefinition extends Fluent return $this->onDelete('cascade'); } + /** + * Indicate that deletes should be restricted. + * + * @return $this + */ + public function restrictOnDelete() + { + return $this->onDelete('restrict'); + } + /** * Indicate that deletes should set the foreign key value to null. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php index 6167b21e2..260935f8a 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php @@ -198,6 +198,7 @@ class ChangeColumn 'binary', 'boolean', 'date', + 'dateTime', 'decimal', 'double', 'float', diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php index b60dfe817..7313576b4 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php @@ -9,6 +9,7 @@ use Illuminate\Database\Grammar as BaseGrammar; use Illuminate\Database\Query\Expression; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Fluent; +use LogicException; use RuntimeException; abstract class Grammar extends BaseGrammar @@ -27,6 +28,33 @@ abstract class Grammar extends BaseGrammar */ protected $fluentCommands = []; + /** + * Compile a create database command. + * + * @param string $name + * @param \Illuminate\Database\Connection $connection + * @return void + * + * @throws \LogicException + */ + public function compileCreateDatabase($name, $connection) + { + throw new LogicException('This database driver does not support creating databases.'); + } + + /** + * Compile a drop database if exists command. + * + * @param string $name + * @return void + * + * @throws \LogicException + */ + public function compileDropDatabaseIfExists($name) + { + throw new LogicException('This database driver does not support dropping databases.'); + } + /** * Compile a rename column command. * @@ -55,6 +83,32 @@ abstract class Grammar extends BaseGrammar return ChangeColumn::compile($this, $blueprint, $command, $connection); } + /** + * Compile a fulltext index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + * + * @throws \RuntimeException + */ + public function compileFulltext(Blueprint $blueprint, Fluent $command) + { + throw new RuntimeException('This database driver does not support fulltext index creation.'); + } + + /** + * Compile a drop fulltext index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropFullText(Blueprint $blueprint, Fluent $command) + { + throw new RuntimeException('This database driver does not support fulltext index creation.'); + } + /** * Compile a foreign key command. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 30afde966..1f64cf31e 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -12,20 +12,51 @@ class MySqlGrammar extends Grammar /** * The possible column modifiers. * - * @var array + * @var string[] */ protected $modifiers = [ - 'Unsigned', 'Charset', 'Collate', 'VirtualAs', 'StoredAs', 'Nullable', + 'Unsigned', 'Charset', 'Collate', 'VirtualAs', 'StoredAs', 'Nullable', 'Invisible', 'Srid', 'Default', 'Increment', 'Comment', 'After', 'First', ]; /** * The possible column serials. * - * @var array + * @var string[] */ protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger']; + /** + * Compile a create database command. + * + * @param string $name + * @param \Illuminate\Database\Connection $connection + * @return string + */ + public function compileCreateDatabase($name, $connection) + { + return sprintf( + 'create database %s default character set %s default collate %s', + $this->wrapValue($name), + $this->wrapValue($connection->getConfig('charset')), + $this->wrapValue($connection->getConfig('collation')), + ); + } + + /** + * Compile a drop database if exists command. + * + * @param string $name + * @return string + */ + public function compileDropDatabaseIfExists($name) + { + return sprintf( + 'drop database if exists %s', + $this->wrapValue($name) + ); + } + /** * Compile the query to determine the list of tables. * @@ -52,7 +83,7 @@ class MySqlGrammar extends Grammar * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param \Illuminate\Support\Fluent $command * @param \Illuminate\Database\Connection $connection - * @return string + * @return array */ public function compileCreate(Blueprint $blueprint, Fluent $command, Connection $connection) { @@ -70,9 +101,9 @@ class MySqlGrammar extends Grammar // Finally, we will append the engine configuration onto this SQL statement as // the final thing we do before returning this finished SQL. Once this gets // added the query will be ready to execute against the real connections. - return $this->compileCreateEngine( + return array_values(array_filter(array_merge([$this->compileCreateEngine( $sql, $connection, $blueprint - ); + )], $this->compileAutoIncrementStartingValues($blueprint)))); } /** @@ -81,15 +112,15 @@ class MySqlGrammar extends Grammar * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param \Illuminate\Support\Fluent $command * @param \Illuminate\Database\Connection $connection - * @return string + * @return array */ protected function compileCreateTable($blueprint, $command, $connection) { - return sprintf('%s table %s (%s)', + return trim(sprintf('%s table %s (%s)', $blueprint->temporary ? 'create temporary' : 'create', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) - ); + )); } /** @@ -147,13 +178,29 @@ class MySqlGrammar extends Grammar * * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param \Illuminate\Support\Fluent $command - * @return string + * @return array */ public function compileAdd(Blueprint $blueprint, Fluent $command) { $columns = $this->prefixArray('add', $this->getColumns($blueprint)); - return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns); + return array_values(array_merge( + ['alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns)], + $this->compileAutoIncrementStartingValues($blueprint) + )); + } + + /** + * Compile the auto-incrementing column starting values. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return array + */ + public function compileAutoIncrementStartingValues(Blueprint $blueprint) + { + return collect($blueprint->autoIncrementingStartingValues())->map(function ($value, $column) use ($blueprint) { + return 'alter table '.$this->wrapTable($blueprint->getTable()).' auto_increment = '.$value; + })->all(); } /** @@ -194,6 +241,18 @@ class MySqlGrammar extends Grammar return $this->compileKey($blueprint, $command, 'index'); } + /** + * Compile a fulltext index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileFullText(Blueprint $blueprint, Fluent $command) + { + return $this->compileKey($blueprint, $command, 'fulltext'); + } + /** * Compile a spatial index key command. * @@ -303,6 +362,18 @@ class MySqlGrammar extends Grammar return "alter table {$this->wrapTable($blueprint)} drop index {$index}"; } + /** + * Compile a drop fulltext index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropFullText(Blueprint $blueprint, Fluent $command) + { + return $this->compileDropIndex($blueprint, $command); + } + /** * Compile a drop spatial index command. * @@ -443,6 +514,17 @@ class MySqlGrammar extends Grammar return "varchar({$column->length})"; } + /** + * Create the column definition for a tiny text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyText(Fluent $column) + { + return 'tinytext'; + } + /** * Create the column definition for a text type. * @@ -644,7 +726,11 @@ class MySqlGrammar extends Grammar { $columnType = $column->precision ? "datetime($column->precision)" : 'datetime'; - return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType; + $current = $column->precision ? "CURRENT_TIMESTAMP($column->precision)" : 'CURRENT_TIMESTAMP'; + + $columnType = $column->useCurrent ? "$columnType default $current" : $columnType; + + return $column->useCurrentOnUpdate ? "$columnType on update $current" : $columnType; } /** @@ -690,9 +776,11 @@ class MySqlGrammar extends Grammar { $columnType = $column->precision ? "timestamp($column->precision)" : 'timestamp'; - $defaultCurrent = $column->precision ? "CURRENT_TIMESTAMP($column->precision)" : 'CURRENT_TIMESTAMP'; + $current = $column->precision ? "CURRENT_TIMESTAMP($column->precision)" : 'CURRENT_TIMESTAMP'; - return $column->useCurrent ? "$columnType default $defaultCurrent" : $columnType; + $columnType = $column->useCurrent ? "$columnType default $current" : $columnType; + + return $column->useCurrentOnUpdate ? "$columnType on update $current" : $columnType; } /** @@ -950,6 +1038,20 @@ class MySqlGrammar extends Grammar } } + /** + * Get the SQL for an invisible column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyInvisible(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->invisible)) { + return ' invisible'; + } + } + /** * Get the SQL for a default column modifier. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php index 0c1dd2e59..27490bc44 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -17,24 +17,54 @@ class PostgresGrammar extends Grammar /** * The possible column modifiers. * - * @var array + * @var string[] */ protected $modifiers = ['Collate', 'Increment', 'Nullable', 'Default', 'VirtualAs', 'StoredAs']; /** * The columns available as serials. * - * @var array + * @var string[] */ protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger']; /** * The commands to be executed outside of create or alter command. * - * @var array + * @var string[] */ protected $fluentCommands = ['Comment']; + /** + * Compile a create database command. + * + * @param string $name + * @param \Illuminate\Database\Connection $connection + * @return string + */ + public function compileCreateDatabase($name, $connection) + { + return sprintf( + 'create database %s encoding %s', + $this->wrapValue($name), + $this->wrapValue($connection->getConfig('charset')), + ); + } + + /** + * Compile a drop database if exists command. + * + * @param string $name + * @return string + */ + public function compileDropDatabaseIfExists($name) + { + return sprintf( + 'drop database if exists %s', + $this->wrapValue($name) + ); + } + /** * Compile the query to determine if a table exists. * @@ -60,15 +90,15 @@ class PostgresGrammar extends Grammar * * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param \Illuminate\Support\Fluent $command - * @return string + * @return array */ public function compileCreate(Blueprint $blueprint, Fluent $command) { - return sprintf('%s table %s (%s)', + return array_values(array_filter(array_merge([sprintf('%s table %s (%s)', $blueprint->temporary ? 'create temporary' : 'create', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) - ); + )], $this->compileAutoIncrementStartingValues($blueprint)))); } /** @@ -80,10 +110,23 @@ class PostgresGrammar extends Grammar */ public function compileAdd(Blueprint $blueprint, Fluent $command) { - return sprintf('alter table %s %s', + return array_values(array_filter(array_merge([sprintf('alter table %s %s', $this->wrapTable($blueprint), implode(', ', $this->prefixArray('add column', $this->getColumns($blueprint))) - ); + )], $this->compileAutoIncrementStartingValues($blueprint)))); + } + + /** + * Compile the auto-incrementing column starting values. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return array + */ + public function compileAutoIncrementStartingValues(Blueprint $blueprint) + { + return collect($blueprint->autoIncrementingStartingValues())->map(function ($value, $column) use ($blueprint) { + return 'alter sequence '.$blueprint->getTable().'_'.$column.'_seq restart with '.$value; + })->all(); } /** @@ -133,6 +176,30 @@ class PostgresGrammar extends Grammar ); } + /** + * Compile a fulltext index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + * + * @throws \RuntimeException + */ + public function compileFulltext(Blueprint $blueprint, Fluent $command) + { + $language = $command->language ?: 'english'; + + $columns = array_map(function ($column) use ($language) { + return "to_tsvector({$this->quoteString($language)}, {$this->wrap($column)})"; + }, $command->columns); + + return sprintf('create index %s on %s using gin ((%s))', + $this->wrap($command->index), + $this->wrapTable($blueprint), + implode(' || ', $columns) + ); + } + /** * Compile a spatial index key command. * @@ -316,6 +383,18 @@ class PostgresGrammar extends Grammar return "drop index {$this->wrap($command->index)}"; } + /** + * Compile a drop fulltext index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropFullText(Blueprint $blueprint, Fluent $command) + { + return $this->compileDropIndex($blueprint, $command); + } + /** * Compile a drop spatial index command. * @@ -429,6 +508,17 @@ class PostgresGrammar extends Grammar return "varchar({$column->length})"; } + /** + * Create the column definition for a tiny text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyText(Fluent $column) + { + return 'varchar(255)'; + } + /** * Create the column definition for a text type. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php index 557a3f534..e699ee68b 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php @@ -14,14 +14,14 @@ class SQLiteGrammar extends Grammar /** * The possible column modifiers. * - * @var array + * @var string[] */ - protected $modifiers = ['Nullable', 'Default', 'Increment']; + protected $modifiers = ['VirtualAs', 'StoredAs', 'Nullable', 'Default', 'Increment']; /** * The columns available as serials. * - * @var array + * @var string[] */ protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger']; @@ -137,7 +137,9 @@ class SQLiteGrammar extends Grammar { $columns = $this->prefixArray('add column', $this->getColumns($blueprint)); - return collect($columns)->map(function ($column) use ($blueprint) { + return collect($columns)->reject(function ($column) { + return preg_match('/as \(.*\) stored/', $column) > 0; + })->map(function ($column) use ($blueprint) { return 'alter table '.$this->wrapTable($blueprint).' '.$column; })->all(); } @@ -430,6 +432,17 @@ class SQLiteGrammar extends Grammar return 'varchar'; } + /** + * Create the column definition for a tiny text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyText(Fluent $column) + { + return 'text'; + } + /** * Create the column definition for a text type. * @@ -823,6 +836,47 @@ class SQLiteGrammar extends Grammar return 'multipolygon'; } + /** + * Create the column definition for a generated, computed column type. + * + * @param \Illuminate\Support\Fluent $column + * @return void + * + * @throws \RuntimeException + */ + protected function typeComputed(Fluent $column) + { + throw new RuntimeException('This database driver requires a type, see the virtualAs / storedAs modifiers.'); + } + + /** + * Get the SQL for a generated virtual column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyVirtualAs(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->virtualAs)) { + return " as ({$column->virtualAs})"; + } + } + + /** + * Get the SQL for a generated stored column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyStoredAs(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->storedAs)) { + return " as ({$column->storedAs}) stored"; + } + } + /** * Get the SQL for a nullable column modifier. * @@ -832,7 +886,13 @@ class SQLiteGrammar extends Grammar */ protected function modifyNullable(Blueprint $blueprint, Fluent $column) { - return $column->nullable ? ' null' : ' not null'; + if (is_null($column->virtualAs) && is_null($column->storedAs)) { + return $column->nullable ? '' : ' not null'; + } + + if ($column->nullable === false) { + return ' not null'; + } } /** @@ -844,7 +904,7 @@ class SQLiteGrammar extends Grammar */ protected function modifyDefault(Blueprint $blueprint, Fluent $column) { - if (! is_null($column->default)) { + if (! is_null($column->default) && is_null($column->virtualAs) && is_null($column->storedAs)) { return ' default '.$this->getDefaultValue($column->default); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php index 43d3b7d05..e594cfd99 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php @@ -17,17 +17,46 @@ class SqlServerGrammar extends Grammar /** * The possible column modifiers. * - * @var array + * @var string[] */ protected $modifiers = ['Increment', 'Collate', 'Nullable', 'Default', 'Persisted']; /** * The columns available as serials. * - * @var array + * @var string[] */ protected $serials = ['tinyInteger', 'smallInteger', 'mediumInteger', 'integer', 'bigInteger']; + /** + * Compile a create database command. + * + * @param string $name + * @param \Illuminate\Database\Connection $connection + * @return string + */ + public function compileCreateDatabase($name, $connection) + { + return sprintf( + 'create database %s', + $this->wrapValue($name), + ); + } + + /** + * Compile a drop database if exists command. + * + * @param string $name + * @return string + */ + public function compileDropDatabaseIfExists($name) + { + return sprintf( + 'drop database if exists %s', + $this->wrapValue($name) + ); + } + /** * Compile the query to determine if a table exists. * @@ -35,7 +64,7 @@ class SqlServerGrammar extends Grammar */ public function compileTableExists() { - return "select * from sysobjects where type = 'U' and name = ?"; + return "select * from sys.sysobjects where id = object_id(?) and xtype in ('U', 'V')"; } /** @@ -46,9 +75,7 @@ class SqlServerGrammar extends Grammar */ public function compileColumnListing($table) { - return "select col.name from sys.columns as col - join sys.objects as obj on col.object_id = obj.object_id - where obj.type = 'U' and obj.object_id = object_id('$table')"; + return "select name from sys.columns where object_id = object_id('$table')"; } /** @@ -165,7 +192,7 @@ class SqlServerGrammar extends Grammar */ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) { - return sprintf('if exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME = %s) drop table %s', + return sprintf('if exists (select * from sys.sysobjects where id = object_id(%s, \'U\')) drop table %s', "'".str_replace("'", "''", $this->getTablePrefix().$blueprint->getTable())."'", $this->wrapTable($blueprint) ); @@ -212,7 +239,7 @@ class SqlServerGrammar extends Grammar $sql = "DECLARE @sql NVARCHAR(MAX) = '';"; $sql .= "SELECT @sql += 'ALTER TABLE [dbo].[{$tableName}] DROP CONSTRAINT ' + OBJECT_NAME([default_object_id]) + ';' "; - $sql .= 'FROM SYS.COLUMNS '; + $sql .= 'FROM sys.columns '; $sql .= "WHERE [object_id] = OBJECT_ID('[dbo].[{$tableName}]') AND [name] in ({$columns}) AND [default_object_id] <> 0;"; $sql .= 'EXEC(@sql)'; @@ -388,6 +415,17 @@ class SqlServerGrammar extends Grammar return "nvarchar({$column->length})"; } + /** + * Create the column definition for a tiny text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyText(Fluent $column) + { + return 'nvarchar(255)'; + } + /** * Create the column definition for a text type. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php index f07946c85..699b41d5f 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php @@ -4,6 +4,32 @@ namespace Illuminate\Database\Schema; class MySqlBuilder extends Builder { + /** + * Create a database in the schema. + * + * @param string $name + * @return bool + */ + public function createDatabase($name) + { + return $this->connection->statement( + $this->grammar->compileCreateDatabase($name, $this->connection) + ); + } + + /** + * Drop a database from the schema if the database exists. + * + * @param string $name + * @return bool + */ + public function dropDatabaseIfExists($name) + { + return $this->connection->statement( + $this->grammar->compileDropDatabaseIfExists($name) + ); + } + /** * Determine if the given table exists. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlSchemaState.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlSchemaState.php new file mode 100644 index 000000000..e0b0103d3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlSchemaState.php @@ -0,0 +1,163 @@ +executeDumpProcess($this->makeProcess( + $this->baseDumpCommand().' --routines --result-file="${:LARAVEL_LOAD_PATH}" --no-data' + ), $this->output, array_merge($this->baseVariables($this->connection->getConfig()), [ + 'LARAVEL_LOAD_PATH' => $path, + ])); + + $this->removeAutoIncrementingState($path); + + $this->appendMigrationData($path); + } + + /** + * Remove the auto-incrementing state from the given schema dump. + * + * @param string $path + * @return void + */ + protected function removeAutoIncrementingState(string $path) + { + $this->files->put($path, preg_replace( + '/\s+AUTO_INCREMENT=[0-9]+/iu', + '', + $this->files->get($path) + )); + } + + /** + * Append the migration data to the schema dump. + * + * @param string $path + * @return void + */ + protected function appendMigrationData(string $path) + { + $process = $this->executeDumpProcess($this->makeProcess( + $this->baseDumpCommand().' '.$this->migrationTable.' --no-create-info --skip-extended-insert --skip-routines --compact' + ), null, array_merge($this->baseVariables($this->connection->getConfig()), [ + // + ])); + + $this->files->append($path, $process->getOutput()); + } + + /** + * Load the given schema file into the database. + * + * @param string $path + * @return void + */ + public function load($path) + { + $command = 'mysql '.$this->connectionString().' --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}"'; + + $process = $this->makeProcess($command)->setTimeout(null); + + $process->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [ + 'LARAVEL_LOAD_PATH' => $path, + ])); + } + + /** + * Get the base dump command arguments for MySQL as a string. + * + * @return string + */ + protected function baseDumpCommand() + { + $command = 'mysqldump '.$this->connectionString().' --no-tablespaces --skip-add-locks --skip-comments --skip-set-charset --tz-utc --column-statistics=0'; + + if (! $this->connection->isMaria()) { + $command .= ' --set-gtid-purged=OFF'; + } + + return $command.' "${:LARAVEL_LOAD_DATABASE}"'; + } + + /** + * Generate a basic connection string (--socket, --host, --port, --user, --password) for the database. + * + * @return string + */ + protected function connectionString() + { + $value = ' --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}"'; + + $value .= $this->connection->getConfig()['unix_socket'] ?? false + ? ' --socket="${:LARAVEL_LOAD_SOCKET}"' + : ' --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}"'; + + return $value; + } + + /** + * Get the base variables for a dump / load command. + * + * @param array $config + * @return array + */ + protected function baseVariables(array $config) + { + $config['host'] = $config['host'] ?? ''; + + return [ + 'LARAVEL_LOAD_SOCKET' => $config['unix_socket'] ?? '', + 'LARAVEL_LOAD_HOST' => is_array($config['host']) ? $config['host'][0] : $config['host'], + 'LARAVEL_LOAD_PORT' => $config['port'] ?? '', + 'LARAVEL_LOAD_USER' => $config['username'], + 'LARAVEL_LOAD_PASSWORD' => $config['password'] ?? '', + 'LARAVEL_LOAD_DATABASE' => $config['database'], + ]; + } + + /** + * Execute the given dump process. + * + * @param \Symfony\Component\Process\Process $process + * @param callable $output + * @param array $variables + * @return \Symfony\Component\Process\Process + */ + protected function executeDumpProcess(Process $process, $output, array $variables) + { + try { + $process->setTimeout(null)->mustRun($output, $variables); + } catch (Exception $e) { + if (Str::contains($e->getMessage(), ['column-statistics', 'column_statistics'])) { + return $this->executeDumpProcess(Process::fromShellCommandLine( + str_replace(' --column-statistics=0', '', $process->getCommandLine()) + ), $output, $variables); + } + + if (Str::contains($e->getMessage(), ['set-gtid-purged'])) { + return $this->executeDumpProcess(Process::fromShellCommandLine( + str_replace(' --set-gtid-purged=OFF', '', $process->getCommandLine()) + ), $output, $variables); + } + + throw $e; + } + + return $process; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php index 76673a719..ce1b5770a 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php @@ -4,6 +4,32 @@ namespace Illuminate\Database\Schema; class PostgresBuilder extends Builder { + /** + * Create a database in the schema. + * + * @param string $name + * @return bool + */ + public function createDatabase($name) + { + return $this->connection->statement( + $this->grammar->compileCreateDatabase($name, $this->connection) + ); + } + + /** + * Drop a database from the schema if the database exists. + * + * @param string $name + * @return bool + */ + public function dropDatabaseIfExists($name) + { + return $this->connection->statement( + $this->grammar->compileDropDatabaseIfExists($name) + ); + } + /** * Determine if the given table exists. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresSchemaState.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresSchemaState.php new file mode 100644 index 000000000..3e2f5666e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresSchemaState.php @@ -0,0 +1,83 @@ +getSchemaBuilder()->getAllTables()) + ->map->tablename + ->reject(function ($table) { + return $table === $this->migrationTable; + })->map(function ($table) { + return '--exclude-table-data="*.'.$table.'"'; + })->implode(' '); + + $this->makeProcess( + $this->baseDumpCommand().' --file="${:LARAVEL_LOAD_PATH}" '.$excludedTables + )->mustRun($this->output, array_merge($this->baseVariables($this->connection->getConfig()), [ + 'LARAVEL_LOAD_PATH' => $path, + ])); + } + + /** + * Load the given schema file into the database. + * + * @param string $path + * @return void + */ + public function load($path) + { + $command = 'pg_restore --no-owner --no-acl --clean --if-exists --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --username="${:LARAVEL_LOAD_USER}" --dbname="${:LARAVEL_LOAD_DATABASE}" "${:LARAVEL_LOAD_PATH}"'; + + if (Str::endsWith($path, '.sql')) { + $command = 'psql --file="${:LARAVEL_LOAD_PATH}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --username="${:LARAVEL_LOAD_USER}" --dbname="${:LARAVEL_LOAD_DATABASE}"'; + } + + $process = $this->makeProcess($command); + + $process->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [ + 'LARAVEL_LOAD_PATH' => $path, + ])); + } + + /** + * Get the base dump command arguments for PostgreSQL as a string. + * + * @return string + */ + protected function baseDumpCommand() + { + return 'pg_dump --no-owner --no-acl -Fc --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --username="${:LARAVEL_LOAD_USER}" --dbname="${:LARAVEL_LOAD_DATABASE}"'; + } + + /** + * Get the base variables for a dump / load command. + * + * @param array $config + * @return array + */ + protected function baseVariables(array $config) + { + $config['host'] = $config['host'] ?? ''; + + return [ + 'LARAVEL_LOAD_HOST' => is_array($config['host']) ? $config['host'][0] : $config['host'], + 'LARAVEL_LOAD_PORT' => $config['port'], + 'LARAVEL_LOAD_USER' => $config['username'], + 'PGPASSWORD' => $config['password'], + 'LARAVEL_LOAD_DATABASE' => $config['database'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php index 78b6b9c78..3bc1275c6 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php @@ -2,8 +2,34 @@ namespace Illuminate\Database\Schema; +use Illuminate\Support\Facades\File; + class SQLiteBuilder extends Builder { + /** + * Create a database in the schema. + * + * @param string $name + * @return bool + */ + public function createDatabase($name) + { + return File::put($name, '') !== false; + } + + /** + * Drop a database from the schema if the database exists. + * + * @param string $name + * @return bool + */ + public function dropDatabaseIfExists($name) + { + return File::exists($name) + ? File::delete($name) + : true; + } + /** * Drop all tables from the database. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SchemaState.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SchemaState.php new file mode 100644 index 000000000..e6f35ab91 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/SchemaState.php @@ -0,0 +1,122 @@ +connection = $connection; + + $this->files = $files ?: new Filesystem; + + $this->processFactory = $processFactory ?: function (...$arguments) { + return Process::fromShellCommandline(...$arguments)->setTimeout(null); + }; + + $this->handleOutputUsing(function () { + // + }); + } + + /** + * Dump the database's schema into a file. + * + * @param \Illuminate\Database\Connection $connection + * @param string $path + * @return void + */ + abstract public function dump(Connection $connection, $path); + + /** + * Load the given schema file into the database. + * + * @param string $path + * @return void + */ + abstract public function load($path); + + /** + * Create a new process instance. + * + * @param array $arguments + * @return \Symfony\Component\Process\Process + */ + public function makeProcess(...$arguments) + { + return call_user_func($this->processFactory, ...$arguments); + } + + /** + * Specify the name of the application's migration table. + * + * @param string $table + * @return $this + */ + public function withMigrationTable(string $table) + { + $this->migrationTable = $table; + + return $this; + } + + /** + * Specify the callback that should be used to handle process output. + * + * @param callable $output + * @return $this + */ + public function handleOutputUsing(callable $output) + { + $this->output = $output; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php index 0b3e47bec..93da1cb86 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php @@ -4,6 +4,32 @@ namespace Illuminate\Database\Schema; class SqlServerBuilder extends Builder { + /** + * Create a database in the schema. + * + * @param string $name + * @return bool + */ + public function createDatabase($name) + { + return $this->connection->statement( + $this->grammar->compileCreateDatabase($name, $this->connection) + ); + } + + /** + * Drop a database from the schema if the database exists. + * + * @param string $name + * @return bool + */ + public function dropDatabaseIfExists($name) + { + return $this->connection->statement( + $this->grammar->compileDropDatabaseIfExists($name) + ); + } + /** * Drop all tables from the database. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqliteSchemaState.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqliteSchemaState.php new file mode 100644 index 000000000..9a98b6331 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqliteSchemaState.php @@ -0,0 +1,93 @@ +makeProcess( + $this->baseCommand().' .schema' + ))->setTimeout(null)->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [ + // + ])); + + $migrations = collect(preg_split("/\r\n|\n|\r/", $process->getOutput()))->filter(function ($line) { + return stripos($line, 'sqlite_sequence') === false && + strlen($line) > 0; + })->all(); + + $this->files->put($path, implode(PHP_EOL, $migrations).PHP_EOL); + + $this->appendMigrationData($path); + } + + /** + * Append the migration data to the schema dump. + * + * @param string $path + * @return void + */ + protected function appendMigrationData(string $path) + { + with($process = $this->makeProcess( + $this->baseCommand().' ".dump \''.$this->migrationTable.'\'"' + ))->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [ + // + ])); + + $migrations = collect(preg_split("/\r\n|\n|\r/", $process->getOutput()))->filter(function ($line) { + return preg_match('/^\s*(--|INSERT\s)/iu', $line) === 1 && + strlen($line) > 0; + })->all(); + + $this->files->append($path, implode(PHP_EOL, $migrations).PHP_EOL); + } + + /** + * Load the given schema file into the database. + * + * @param string $path + * @return void + */ + public function load($path) + { + $process = $this->makeProcess($this->baseCommand().' < "${:LARAVEL_LOAD_PATH}"'); + + $process->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [ + 'LARAVEL_LOAD_PATH' => $path, + ])); + } + + /** + * Get the base sqlite command arguments as a string. + * + * @return string + */ + protected function baseCommand() + { + return 'sqlite3 "${:LARAVEL_LOAD_DATABASE}"'; + } + + /** + * Get the base variables for a dump / load command. + * + * @param array $config + * @return array + */ + protected function baseVariables(array $config) + { + return [ + 'LARAVEL_LOAD_DATABASE' => $config['database'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php index 2facfd7de..441fa27d6 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php @@ -24,13 +24,14 @@ abstract class Seeder protected $command; /** - * Seed the given connection from the given path. + * Run the given seeder class. * * @param array|string $class * @param bool $silent + * @param array $parameters * @return $this */ - public function call($class, $silent = false) + public function call($class, $silent = false, array $parameters = []) { $classes = Arr::wrap($class); @@ -45,12 +46,12 @@ abstract class Seeder $startTime = microtime(true); - $seeder->__invoke(); + $seeder->__invoke($parameters); - $runTime = round(microtime(true) - $startTime, 2); + $runTime = number_format((microtime(true) - $startTime) * 1000, 2); if ($silent === false && isset($this->command)) { - $this->command->getOutput()->writeln("Seeded: {$name} ({$runTime} seconds)"); + $this->command->getOutput()->writeln("Seeded: {$name} ({$runTime}ms)"); } } @@ -58,14 +59,27 @@ abstract class Seeder } /** - * Silently seed the given connection from the given path. + * Run the given seeder class. * * @param array|string $class + * @param array $parameters * @return void */ - public function callSilent($class) + public function callWith($class, array $parameters = []) { - $this->call($class, true); + $this->call($class, false, $parameters); + } + + /** + * Silently run the given seeder class. + * + * @param array|string $class + * @param array $parameters + * @return void + */ + public function callSilent($class, array $parameters = []) + { + $this->call($class, true, $parameters); } /** @@ -120,18 +134,19 @@ abstract class Seeder /** * Run the database seeds. * + * @param array $parameters * @return mixed * * @throws \InvalidArgumentException */ - public function __invoke() + public function __invoke(array $parameters = []) { if (! method_exists($this, 'run')) { throw new InvalidArgumentException('Method [run] missing from '.get_class($this)); } return isset($this->container) - ? $this->container->call([$this, 'run']) - : $this->run(); + ? $this->container->call([$this, 'run'], $parameters) + : $this->run(...$parameters); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php index c5f0c19cf..d6a2b7ae9 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php @@ -4,10 +4,14 @@ namespace Illuminate\Database; use Closure; use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as DoctrineDriver; +use Doctrine\DBAL\Version; +use Illuminate\Database\PDO\SqlServerDriver; use Illuminate\Database\Query\Grammars\SqlServerGrammar as QueryGrammar; use Illuminate\Database\Query\Processors\SqlServerProcessor; use Illuminate\Database\Schema\Grammars\SqlServerGrammar as SchemaGrammar; use Illuminate\Database\Schema\SqlServerBuilder; +use Illuminate\Filesystem\Filesystem; +use RuntimeException; use Throwable; class SqlServerConnection extends Connection @@ -25,7 +29,7 @@ class SqlServerConnection extends Connection { for ($a = 1; $a <= $attempts; $a++) { if ($this->getDriverName() === 'sqlsrv') { - return parent::transaction($callback); + return parent::transaction($callback, $attempts); } $this->getPdo()->exec('BEGIN TRAN'); @@ -39,7 +43,7 @@ class SqlServerConnection extends Connection $this->getPdo()->exec('COMMIT TRAN'); } - // If we catch an exception, we will roll back so nothing gets messed + // If we catch an exception, we will rollback so nothing gets messed // up in the database. Then we'll re-throw the exception so it can // be handled how the developer sees fit for their applications. catch (Throwable $e) { @@ -86,6 +90,19 @@ class SqlServerConnection extends Connection return $this->withTablePrefix(new SchemaGrammar); } + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * + * @throws \RuntimeException + */ + public function getSchemaState(Filesystem $files = null, callable $processFactory = null) + { + throw new RuntimeException('Schema dumping is not supported when using SQL Server.'); + } + /** * Get the default post processor instance. * @@ -99,10 +116,10 @@ class SqlServerConnection extends Connection /** * Get the Doctrine DBAL driver. * - * @return \Doctrine\DBAL\Driver\PDOSqlsrv\Driver + * @return \Doctrine\DBAL\Driver\PDOSqlsrv\Driver|\Illuminate\Database\PDO\SqlServerDriver */ protected function getDoctrineDriver() { - return new DoctrineDriver; + return class_exists(Version::class) ? new DoctrineDriver : new SqlServerDriver; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/composer.json b/vendor/laravel/framework/src/Illuminate/Database/composer.json index 38d7d371a..12738d4ae 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Database/composer.json @@ -15,12 +15,14 @@ } ], "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "symfony/console": "^5.0" + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "symfony/console": "^5.4" }, "autoload": { "psr-4": { @@ -29,17 +31,17 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "illuminate/console": "Required to use the database commands (^7.0).", - "illuminate/events": "Required to use the observers with Eloquent (^7.0).", - "illuminate/filesystem": "Required to use the migrations (^7.0).", - "illuminate/pagination": "Required to paginate the result set (^7.0).", - "symfony/finder": "Required to use Eloquent model factories (^5.0)." + "illuminate/console": "Required to use the database commands (^8.0).", + "illuminate/events": "Required to use the observers with Eloquent (^8.0).", + "illuminate/filesystem": "Required to use the migrations (^8.0).", + "illuminate/pagination": "Required to paginate the result set (^8.0).", + "symfony/finder": "Required to use Eloquent model factories (^5.4)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php index 6c5d4826c..9c2a71446 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php +++ b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php @@ -5,9 +5,10 @@ namespace Illuminate\Encryption; use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract; use Illuminate\Contracts\Encryption\EncryptException; +use Illuminate\Contracts\Encryption\StringEncrypter; use RuntimeException; -class Encrypter implements EncrypterContract +class Encrypter implements EncrypterContract, StringEncrypter { /** * The encryption key. @@ -23,6 +24,18 @@ class Encrypter implements EncrypterContract */ protected $cipher; + /** + * The supported cipher algorithms and their properties. + * + * @var array + */ + private static $supportedCiphers = [ + 'aes-128-cbc' => ['size' => 16, 'aead' => false], + 'aes-256-cbc' => ['size' => 32, 'aead' => false], + 'aes-128-gcm' => ['size' => 16, 'aead' => true], + 'aes-256-gcm' => ['size' => 32, 'aead' => true], + ]; + /** * Create a new encrypter instance. * @@ -32,16 +45,18 @@ class Encrypter implements EncrypterContract * * @throws \RuntimeException */ - public function __construct($key, $cipher = 'AES-128-CBC') + public function __construct($key, $cipher = 'aes-128-cbc') { $key = (string) $key; - if (static::supported($key, $cipher)) { - $this->key = $key; - $this->cipher = $cipher; - } else { - throw new RuntimeException('The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.'); + if (! static::supported($key, $cipher)) { + $ciphers = implode(', ', array_keys(self::$supportedCiphers)); + + throw new RuntimeException("Unsupported cipher or incorrect key length. Supported ciphers are: {$ciphers}."); } + + $this->key = $key; + $this->cipher = $cipher; } /** @@ -53,10 +68,11 @@ class Encrypter implements EncrypterContract */ public static function supported($key, $cipher) { - $length = mb_strlen($key, '8bit'); + if (! isset(self::$supportedCiphers[strtolower($cipher)])) { + return false; + } - return ($cipher === 'AES-128-CBC' && $length === 16) || - ($cipher === 'AES-256-CBC' && $length === 32); + return mb_strlen($key, '8bit') === self::$supportedCiphers[strtolower($cipher)]['size']; } /** @@ -67,7 +83,7 @@ class Encrypter implements EncrypterContract */ public static function generateKey($cipher) { - return random_bytes($cipher === 'AES-128-CBC' ? 16 : 32); + return random_bytes(self::$supportedCiphers[strtolower($cipher)]['size'] ?? 32); } /** @@ -81,26 +97,32 @@ class Encrypter implements EncrypterContract */ public function encrypt($value, $serialize = true) { - $iv = random_bytes(openssl_cipher_iv_length($this->cipher)); + $iv = random_bytes(openssl_cipher_iv_length(strtolower($this->cipher))); - // First we will encrypt the value using OpenSSL. After this is encrypted we - // will proceed to calculating a MAC for the encrypted value so that this - // value can be verified later as not having been changed by the users. - $value = \openssl_encrypt( - $serialize ? serialize($value) : $value, - $this->cipher, $this->key, 0, $iv - ); + $tag = ''; + + $value = self::$supportedCiphers[strtolower($this->cipher)]['aead'] + ? \openssl_encrypt( + $serialize ? serialize($value) : $value, + strtolower($this->cipher), $this->key, 0, $iv, $tag + ) + : \openssl_encrypt( + $serialize ? serialize($value) : $value, + strtolower($this->cipher), $this->key, 0, $iv + ); if ($value === false) { throw new EncryptException('Could not encrypt the data.'); } - // Once we get the encrypted value we'll go ahead and base64_encode the input - // vector and create the MAC for the encrypted value so we can then verify - // its authenticity. Then, we'll JSON the data into the "payload" array. - $mac = $this->hash($iv = base64_encode($iv), $value); + $iv = base64_encode($iv); + $tag = base64_encode($tag); - $json = json_encode(compact('iv', 'value', 'mac'), JSON_UNESCAPED_SLASHES); + $mac = self::$supportedCiphers[strtolower($this->cipher)]['aead'] + ? '' // For AEAD-algoritms, the tag / MAC is returned by openssl_encrypt... + : $this->hash($iv, $value); + + $json = json_encode(compact('iv', 'value', 'mac', 'tag'), JSON_UNESCAPED_SLASHES); if (json_last_error() !== JSON_ERROR_NONE) { throw new EncryptException('Could not encrypt the data.'); @@ -137,11 +159,15 @@ class Encrypter implements EncrypterContract $iv = base64_decode($payload['iv']); + $this->ensureTagIsValid( + $tag = empty($payload['tag']) ? null : base64_decode($payload['tag']) + ); + // Here we will decrypt the value. If we are able to successfully decrypt it // we will then unserialize it and return it out to the caller. If we are // unable to decrypt this value we will throw out an exception message. $decrypted = \openssl_decrypt( - $payload['value'], $this->cipher, $this->key, 0, $iv + $payload['value'], strtolower($this->cipher), $this->key, 0, $iv, $tag ?? '' ); if ($decrypted === false) { @@ -195,7 +221,7 @@ class Encrypter implements EncrypterContract throw new DecryptException('The payload is invalid.'); } - if (! $this->validMac($payload)) { + if (! self::$supportedCiphers[strtolower($this->cipher)]['aead'] && ! $this->validMac($payload)) { throw new DecryptException('The MAC is invalid.'); } @@ -211,7 +237,7 @@ class Encrypter implements EncrypterContract protected function validPayload($payload) { return is_array($payload) && isset($payload['iv'], $payload['value'], $payload['mac']) && - strlen(base64_decode($payload['iv'], true)) === openssl_cipher_iv_length($this->cipher); + strlen(base64_decode($payload['iv'], true)) === openssl_cipher_iv_length(strtolower($this->cipher)); } /** @@ -222,25 +248,26 @@ class Encrypter implements EncrypterContract */ protected function validMac(array $payload) { - $calculated = $this->calculateMac($payload, $bytes = random_bytes(16)); - return hash_equals( - hash_hmac('sha256', $payload['mac'], $bytes, true), $calculated + $this->hash($payload['iv'], $payload['value']), $payload['mac'] ); } /** - * Calculate the hash of the given payload. + * Ensure the given tag is a valid tag given the selected cipher. * - * @param array $payload - * @param string $bytes - * @return string + * @param string $tag + * @return void */ - protected function calculateMac($payload, $bytes) + protected function ensureTagIsValid($tag) { - return hash_hmac( - 'sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true - ); + if (self::$supportedCiphers[strtolower($this->cipher)]['aead'] && strlen($tag) !== 16) { + throw new DecryptException('Could not decrypt the data.'); + } + + if (! self::$supportedCiphers[strtolower($this->cipher)]['aead'] && is_string($tag)) { + throw new DecryptException('Unable to use tag because the cipher algorithm does not support AEAD.'); + } } /** diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php index cd590f12d..4ef42ba4c 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php @@ -4,8 +4,8 @@ namespace Illuminate\Encryption; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Str; -use Opis\Closure\SerializableClosure; -use RuntimeException; +use Laravel\SerializableClosure\SerializableClosure; +use Opis\Closure\SerializableClosure as OpisSerializableClosure; class EncryptionServiceProvider extends ServiceProvider { @@ -18,6 +18,7 @@ class EncryptionServiceProvider extends ServiceProvider { $this->registerEncrypter(); $this->registerOpisSecurityKey(); + $this->registerSerializableClosureSecurityKey(); } /** @@ -38,8 +39,28 @@ class EncryptionServiceProvider extends ServiceProvider * Configure Opis Closure signing for security. * * @return void + * + * @deprecated Will be removed in a future Laravel version. */ protected function registerOpisSecurityKey() + { + if (\PHP_VERSION_ID < 80100) { + $config = $this->app->make('config')->get('app'); + + if (! class_exists(OpisSerializableClosure::class) || empty($config['key'])) { + return; + } + + OpisSerializableClosure::setSecretKey($this->parseKey($config)); + } + } + + /** + * Configure Serializable Closure signing for security. + * + * @return void + */ + protected function registerSerializableClosureSecurityKey() { $config = $this->app->make('config')->get('app'); @@ -71,15 +92,13 @@ class EncryptionServiceProvider extends ServiceProvider * @param array $config * @return string * - * @throws \RuntimeException + * @throws \Illuminate\Encryption\MissingAppKeyException */ protected function key(array $config) { return tap($config['key'], function ($key) { if (empty($key)) { - throw new RuntimeException( - 'No application encryption key has been specified.' - ); + throw new MissingAppKeyException; } }); } diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/MissingAppKeyException.php b/vendor/laravel/framework/src/Illuminate/Encryption/MissingAppKeyException.php new file mode 100644 index 000000000..d8ffcd184 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Encryption/MissingAppKeyException.php @@ -0,0 +1,19 @@ +firstClosureParameterTypes($events)) + ->each(function ($event) use ($events) { + $this->listen($event, $events); + }); + } elseif ($events instanceof QueuedClosure) { + return collect($this->firstClosureParameterTypes($events->closure)) + ->each(function ($event) use ($events) { + $this->listen($event, $events->resolve()); + }); + } elseif ($listener instanceof QueuedClosure) { + $listener = $listener->resolve(); + } + foreach ((array) $events as $event) { if (Str::contains($event, '*')) { $this->setupWildcardListen($event, $listener); @@ -165,7 +182,13 @@ class Dispatcher implements DispatcherContract if (is_array($events)) { foreach ($events as $event => $listeners) { - foreach ($listeners as $listener) { + foreach (Arr::wrap($listeners) as $listener) { + if (is_string($listener) && method_exists($subscriber, $listener)) { + $this->listen($event, [get_class($subscriber), $listener]); + + continue; + } + $this->listen($event, $listener); } } @@ -275,7 +298,7 @@ class Dispatcher implements DispatcherContract } /** - * Check if event should be broadcasted by condition. + * Check if the event should be broadcasted by the condition. * * @param mixed $event * @return bool @@ -359,7 +382,7 @@ class Dispatcher implements DispatcherContract /** * Register an event listener with the dispatcher. * - * @param \Closure|string $listener + * @param \Closure|string|array $listener * @param bool $wildcard * @return \Closure */ @@ -414,11 +437,19 @@ class Dispatcher implements DispatcherContract ? $listener : $this->parseClassCallable($listener); + if (! method_exists($class, $method)) { + $method = '__invoke'; + } + if ($this->handlerShouldBeQueued($class)) { return $this->createQueuedHandlerCallable($class, $method); } - return [$this->container->make($class), $method]; + $listener = $this->container->make($class); + + return $this->handlerShouldBeDispatchedAfterDatabaseTransactions($listener) + ? $this->createCallbackForListenerRunningAfterCommits($listener, $method) + : [$listener, $method]; } /** @@ -469,6 +500,37 @@ class Dispatcher implements DispatcherContract }; } + /** + * Determine if the given event handler should be dispatched after all database transactions have committed. + * + * @param object|mixed $listener + * @return bool + */ + protected function handlerShouldBeDispatchedAfterDatabaseTransactions($listener) + { + return ($listener->afterCommit ?? null) && $this->container->bound('db.transactions'); + } + + /** + * Create a callable for dispatching a listener after database transactions. + * + * @param mixed $listener + * @param string $method + * @return \Closure + */ + protected function createCallbackForListenerRunningAfterCommits($listener, $method) + { + return function () use ($method, $listener) { + $payload = func_get_args(); + + $this->container->make('db.transactions')->addCallback( + function () use ($listener, $method, $payload) { + $listener->$method(...$payload); + } + ); + }; + } + /** * Determine if the event handler wants to be queued. * @@ -499,9 +561,9 @@ class Dispatcher implements DispatcherContract { [$listener, $job] = $this->createListenerAndJob($class, $method, $arguments); - $connection = $this->resolveQueue()->connection( - $listener->connection ?? null - ); + $connection = $this->resolveQueue()->connection(method_exists($listener, 'viaConnection') + ? $listener->viaConnection() + : $listener->connection ?? null); $queue = method_exists($listener, 'viaQueue') ? $listener->viaQueue() @@ -539,12 +601,18 @@ class Dispatcher implements DispatcherContract protected function propagateListenerOptions($listener, $job) { return tap($job, function ($job) use ($listener) { - $job->tries = $listener->tries ?? null; - $job->retryAfter = method_exists($listener, 'retryAfter') - ? $listener->retryAfter() : ($listener->retryAfter ?? null); + $job->afterCommit = property_exists($listener, 'afterCommit') ? $listener->afterCommit : null; + $job->backoff = method_exists($listener, 'backoff') ? $listener->backoff() : ($listener->backoff ?? null); + $job->maxExceptions = $listener->maxExceptions ?? null; + $job->retryUntil = method_exists($listener, 'retryUntil') ? $listener->retryUntil() : null; + $job->shouldBeEncrypted = $listener instanceof ShouldBeEncrypted; $job->timeout = $listener->timeout ?? null; - $job->timeoutAt = method_exists($listener, 'retryUntil') - ? $listener->retryUntil() : null; + $job->tries = $listener->tries ?? null; + + $job->through(array_merge( + method_exists($listener, 'middleware') ? $listener->middleware() : [], + $listener->middleware ?? [] + )); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Events/InvokeQueuedClosure.php b/vendor/laravel/framework/src/Illuminate/Events/InvokeQueuedClosure.php new file mode 100644 index 000000000..bc68b19d6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/InvokeQueuedClosure.php @@ -0,0 +1,34 @@ +getClosure(), ...$arguments); + } + + /** + * Handle a job failure. + * + * @param \Laravel\SerializableClosure\SerializableClosure $closure + * @param array $arguments + * @param array $catchCallbacks + * @param \Throwable $exception + * @return void + */ + public function failed($closure, array $arguments, array $catchCallbacks, $exception) + { + $arguments[] = $exception; + + collect($catchCallbacks)->each->__invoke(...$arguments); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php index 793ef1e19..5c539d53a 100644 --- a/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php +++ b/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php @@ -12,7 +12,7 @@ class NullDispatcher implements DispatcherContract /** * The underlying event dispatcher instance. * - * @var \Illuminate\Contracts\Bus\Dispatcher + * @var \Illuminate\Contracts\Events\Dispatcher */ protected $dispatcher; @@ -37,6 +37,7 @@ class NullDispatcher implements DispatcherContract */ public function dispatch($event, $payload = [], $halt = false) { + // } /** @@ -48,6 +49,7 @@ class NullDispatcher implements DispatcherContract */ public function push($event, $payload = []) { + // } /** @@ -59,16 +61,17 @@ class NullDispatcher implements DispatcherContract */ public function until($event, $payload = []) { + // } /** * Register an event listener with the dispatcher. * - * @param string|array $events - * @param \Closure|string $listener + * @param \Closure|string|array $events + * @param \Closure|string|array|null $listener * @return void */ - public function listen($events, $listener) + public function listen($events, $listener = null) { $this->dispatcher->listen($events, $listener); } diff --git a/vendor/laravel/framework/src/Illuminate/Events/QueuedClosure.php b/vendor/laravel/framework/src/Illuminate/Events/QueuedClosure.php new file mode 100644 index 000000000..825905984 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/QueuedClosure.php @@ -0,0 +1,125 @@ +closure = $closure; + } + + /** + * Set the desired connection for the job. + * + * @param string|null $connection + * @return $this + */ + public function onConnection($connection) + { + $this->connection = $connection; + + return $this; + } + + /** + * Set the desired queue for the job. + * + * @param string|null $queue + * @return $this + */ + public function onQueue($queue) + { + $this->queue = $queue; + + return $this; + } + + /** + * Set the desired delay for the job. + * + * @param \DateTimeInterface|\DateInterval|int|null $delay + * @return $this + */ + public function delay($delay) + { + $this->delay = $delay; + + return $this; + } + + /** + * Specify a callback that should be invoked if the queued listener job fails. + * + * @param \Closure $closure + * @return $this + */ + public function catch(Closure $closure) + { + $this->catchCallbacks[] = $closure; + + return $this; + } + + /** + * Resolve the actual event listener callback. + * + * @return \Closure + */ + public function resolve() + { + return function (...$arguments) { + dispatch(new CallQueuedListener(InvokeQueuedClosure::class, 'handle', [ + 'closure' => SerializableClosureFactory::make($this->closure), + 'arguments' => $arguments, + 'catch' => collect($this->catchCallbacks)->map(function ($callback) { + return SerializableClosureFactory::make($callback); + })->all(), + ]))->onConnection($this->connection)->onQueue($this->queue)->delay($this->delay); + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json index c93a0320c..b77ba2c89 100755 --- a/vendor/laravel/framework/src/Illuminate/Events/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Events/composer.json @@ -14,19 +14,25 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/bus": "^8.0", + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { "Illuminate\\Events\\": "" - } + }, + "files": [ + "functions.php" + ] }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Events/functions.php b/vendor/laravel/framework/src/Illuminate/Events/functions.php new file mode 100644 index 000000000..df1b0febf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/functions.php @@ -0,0 +1,18 @@ +isFile($path)) { - return require $path; + $__path = $path; + $__data = $data; + + return (static function () use ($__path, $__data) { + extract($__data, EXTR_SKIP); + + return require $__path; + })(); } throw new FileNotFoundException("File does not exist at path {$path}."); @@ -103,12 +114,53 @@ class Filesystem /** * Require the given file once. * - * @param string $file + * @param string $path + * @param array $data * @return mixed + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ - public function requireOnce($file) + public function requireOnce($path, array $data = []) { - require_once $file; + if ($this->isFile($path)) { + $__path = $path; + $__data = $data; + + return (static function () use ($__path, $__data) { + extract($__data, EXTR_SKIP); + + return require_once $__path; + })(); + } + + throw new FileNotFoundException("File does not exist at path {$path}."); + } + + /** + * Get the contents of a file one line at a time. + * + * @param string $path + * @return \Illuminate\Support\LazyCollection + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException + */ + public function lines($path) + { + if (! $this->isFile($path)) { + throw new FileNotFoundException( + "File does not exist at path {$path}." + ); + } + + return LazyCollection::make(function () use ($path) { + $file = new SplFileObject($path); + + $file->setFlags(SplFileObject::DROP_NEW_LINE); + + while (! $file->eof()) { + yield $file->fgets(); + } + }); } /** @@ -159,6 +211,19 @@ class Filesystem rename($tempPath, $path); } + /** + * Replace a given string within a given file. + * + * @param array|string $search + * @param array|string $replace + * @param string $path + * @return void + */ + public function replaceInFile($search, $replace, $path) + { + file_put_contents($path, str_replace($search, $replace, file_get_contents($path))); + } + /** * Prepend to a file. * @@ -217,7 +282,9 @@ class Filesystem foreach ($paths as $path) { try { - if (! @unlink($path)) { + if (@unlink($path)) { + clearstatcache(false, $path); + } else { $success = false; } } catch (ErrorException $e) { @@ -270,6 +337,28 @@ class Filesystem exec("mklink /{$mode} ".escapeshellarg($link).' '.escapeshellarg($target)); } + /** + * Create a relative symlink to the target file or directory. + * + * @param string $target + * @param string $link + * @return void + * + * @throws \RuntimeException + */ + public function relativeLink($target, $link) + { + if (! class_exists(SymfonyFilesystem::class)) { + throw new RuntimeException( + 'To enable support for relative links, please install the symfony/filesystem package.' + ); + } + + $relativeTarget = (new SymfonyFilesystem)->makePathRelative($target, dirname($link)); + + $this->link($relativeTarget, $link); + } + /** * Extract the file name from a file path. * @@ -319,6 +408,8 @@ class Filesystem * * @param string $path * @return string|null + * + * @throws \RuntimeException */ public function guessExtension($path) { diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php index fb3ffdc39..a9fd52474 100644 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php @@ -2,6 +2,7 @@ namespace Illuminate\Filesystem; +use Closure; use Illuminate\Contracts\Filesystem\Cloud as CloudFilesystemContract; use Illuminate\Contracts\Filesystem\FileExistsException as ContractFileExistsException; use Illuminate\Contracts\Filesystem\FileNotFoundException as ContractFileNotFoundException; @@ -11,6 +12,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; use League\Flysystem\Adapter\Ftp; use League\Flysystem\Adapter\Local as LocalAdapter; @@ -20,8 +22,10 @@ use League\Flysystem\Cached\CachedAdapter; use League\Flysystem\FileExistsException; use League\Flysystem\FileNotFoundException; use League\Flysystem\FilesystemInterface; +use League\Flysystem\Sftp\SftpAdapter as Sftp; use PHPUnit\Framework\Assert as PHPUnit; use Psr\Http\Message\StreamInterface; +use Psr\Http\Message\UriInterface; use RuntimeException; use Symfony\Component\HttpFoundation\StreamedResponse; @@ -30,6 +34,10 @@ use Symfony\Component\HttpFoundation\StreamedResponse; */ class FilesystemAdapter implements CloudFilesystemContract { + use Macroable { + __call as macroCall; + } + /** * The Flysystem filesystem implementation. * @@ -37,6 +45,13 @@ class FilesystemAdapter implements CloudFilesystemContract */ protected $driver; + /** + * The temporary URL builder callback. + * + * @var \Closure|null + */ + protected $temporaryUrlCallback; + /** * Create a new filesystem adapter instance. * @@ -52,16 +67,29 @@ class FilesystemAdapter implements CloudFilesystemContract * Assert that the given file exists. * * @param string|array $path + * @param string|null $content * @return $this */ - public function assertExists($path) + public function assertExists($path, $content = null) { + clearstatcache(); + $paths = Arr::wrap($path); foreach ($paths as $path) { PHPUnit::assertTrue( $this->exists($path), "Unable to find a file at path [{$path}]." ); + + if (! is_null($content)) { + $actual = $this->get($path); + + PHPUnit::assertSame( + $content, + $actual, + "File [{$path}] was found, but content [{$actual}] does not match [{$content}]." + ); + } } return $this; @@ -75,6 +103,8 @@ class FilesystemAdapter implements CloudFilesystemContract */ public function assertMissing($path) { + clearstatcache(); + $paths = Arr::wrap($path); foreach ($paths as $path) { @@ -204,7 +234,7 @@ class FilesystemAdapter implements CloudFilesystemContract * Write the contents of a file. * * @param string $path - * @param string|resource $contents + * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents * @param mixed $options * @return bool */ @@ -438,7 +468,7 @@ class FilesystemAdapter implements CloudFilesystemContract return $this->driver->getUrl($path); } elseif ($adapter instanceof AwsS3Adapter) { return $this->getAwsUrl($adapter, $path); - } elseif ($adapter instanceof Ftp) { + } elseif ($adapter instanceof Ftp || $adapter instanceof Sftp) { return $this->getFtpUrl($path); } elseif ($adapter instanceof LocalAdapter) { return $this->getLocalUrl($path); @@ -556,11 +586,19 @@ class FilesystemAdapter implements CloudFilesystemContract if (method_exists($adapter, 'getTemporaryUrl')) { return $adapter->getTemporaryUrl($path, $expiration, $options); - } elseif ($adapter instanceof AwsS3Adapter) { - return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options); - } else { - throw new RuntimeException('This driver does not support creating temporary URLs.'); } + + if ($this->temporaryUrlCallback) { + return $this->temporaryUrlCallback->bindTo($this, static::class)( + $path, $expiration, $options + ); + } + + if ($adapter instanceof AwsS3Adapter) { + return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options); + } + + throw new RuntimeException('This driver does not support creating temporary URLs.'); } /** @@ -581,9 +619,18 @@ class FilesystemAdapter implements CloudFilesystemContract 'Key' => $adapter->getPathPrefix().$path, ], $options)); - return (string) $client->createPresignedRequest( + $uri = $client->createPresignedRequest( $command, $expiration )->getUri(); + + // If an explicit base URL has been set on the disk configuration then we will use + // it as the base URL instead of the default path. This allows the developer to + // have full control over the base path for this filesystem's generated URLs. + if (! is_null($url = $this->driver->getConfig()->get('temporary_url'))) { + $uri = $this->replaceBaseUrl($uri, $url); + } + + return (string) $uri; } /** @@ -598,6 +645,23 @@ class FilesystemAdapter implements CloudFilesystemContract return rtrim($url, '/').'/'.ltrim($path, '/'); } + /** + * Replace the scheme, host and port of the given UriInterface with values from the given URL. + * + * @param \Psr\Http\Message\UriInterface $uri + * @param string $url + * @return \Psr\Http\Message\UriInterface + */ + protected function replaceBaseUrl($uri, $url) + { + $parsed = parse_url($url); + + return $uri + ->withScheme($parsed['scheme']) + ->withHost($parsed['host']) + ->withPort($parsed['port'] ?? null); + } + /** * Get an array of all files in a directory. * @@ -607,7 +671,7 @@ class FilesystemAdapter implements CloudFilesystemContract */ public function files($directory = null, $recursive = false) { - $contents = $this->driver->listContents($directory, $recursive); + $contents = $this->driver->listContents($directory ?? '', $recursive); return $this->filterContentsByType($contents, 'file'); } @@ -632,7 +696,7 @@ class FilesystemAdapter implements CloudFilesystemContract */ public function directories($directory = null, $recursive = false) { - $contents = $this->driver->listContents($directory, $recursive); + $contents = $this->driver->listContents($directory ?? '', $recursive); return $this->filterContentsByType($contents, 'dir'); } @@ -734,6 +798,17 @@ class FilesystemAdapter implements CloudFilesystemContract throw new InvalidArgumentException("Unknown visibility: {$visibility}."); } + /** + * Define a custom temporary URL builder callback. + * + * @param \Closure $callback + * @return void + */ + public function buildTemporaryUrlsUsing(Closure $callback) + { + $this->temporaryUrlCallback = $callback; + } + /** * Pass dynamic methods call onto Flysystem. * @@ -745,6 +820,10 @@ class FilesystemAdapter implements CloudFilesystemContract */ public function __call($method, array $parameters) { - return $this->driver->{$method}(...array_values($parameters)); + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + return $this->driver->{$method}(...$parameters); } } diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php index 6003ac6b9..684c48738 100644 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php @@ -90,6 +90,20 @@ class FilesystemManager implements FactoryContract return $this->disks[$name] = $this->get($name); } + /** + * Build an on-demand disk. + * + * @param string|array $config + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function build($config) + { + return $this->resolve('ondemand', is_array($config) ? $config : [ + 'driver' => 'local', + 'root' => $config, + ]); + } + /** * Attempt to get the disk from the local cache. * @@ -105,13 +119,14 @@ class FilesystemManager implements FactoryContract * Resolve the given disk. * * @param string $name + * @param array|null $config * @return \Illuminate\Contracts\Filesystem\Filesystem * * @throws \InvalidArgumentException */ - protected function resolve($name) + protected function resolve($name, $config = null) { - $config = $this->getConfig($name); + $config = $config ?? $this->getConfig($name); if (empty($config['driver'])) { throw new InvalidArgumentException("Disk [{$name}] does not have a configured driver."); @@ -125,11 +140,11 @@ class FilesystemManager implements FactoryContract $driverMethod = 'create'.ucfirst($name).'Driver'; - if (method_exists($this, $driverMethod)) { - return $this->{$driverMethod}($config); - } else { + if (! method_exists($this, $driverMethod)) { throw new InvalidArgumentException("Driver [{$name}] is not supported."); } + + return $this->{$driverMethod}($config); } /** @@ -243,7 +258,7 @@ class FilesystemManager implements FactoryContract { $cache = Arr::pull($config, 'cache'); - $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']); + $config = Arr::only($config, ['visibility', 'disable_asserts', 'url', 'temporary_url']); if ($cache) { $adapter = new CachedAdapter($adapter, $this->createCacheStore($cache)); @@ -326,7 +341,7 @@ class FilesystemManager implements FactoryContract */ public function getDefaultCloudDriver() { - return $this->app['config']['filesystems.cloud']; + return $this->app['config']['filesystems.cloud'] ?? 's3'; } /** @@ -344,6 +359,19 @@ class FilesystemManager implements FactoryContract return $this; } + /** + * Disconnect the given disk and remove from local cache. + * + * @param string|null $name + * @return void + */ + public function purge($name = null) + { + $name = $name ?? $this->getDefaultDriver(); + + unset($this->disks[$name]); + } + /** * Register a custom driver creator Closure. * @@ -358,6 +386,19 @@ class FilesystemManager implements FactoryContract return $this; } + /** + * Set the application instance used by the manager. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return $this + */ + public function setApplication($app) + { + $this->app = $app; + + return $this; + } + /** * Dynamically call the default driver instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php b/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php new file mode 100644 index 000000000..58bd934f3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php @@ -0,0 +1,194 @@ +path = $path; + + $this->ensureDirectoryExists($path); + $this->createResource($path, $mode); + } + + /** + * Create the file's directory if necessary. + * + * @param string $path + * @return void + */ + protected function ensureDirectoryExists($path) + { + if (! file_exists(dirname($path))) { + @mkdir(dirname($path), 0777, true); + } + } + + /** + * Create the file resource. + * + * @param string $path + * @param string $mode + * @return void + * + * @throws \Exception + */ + protected function createResource($path, $mode) + { + $this->handle = @fopen($path, $mode); + + if (! $this->handle) { + throw new Exception('Unable to create lockable file: '.$path.'. Please ensure you have permission to create files in this location.'); + } + } + + /** + * Read the file contents. + * + * @param int|null $length + * @return string + */ + public function read($length = null) + { + clearstatcache(true, $this->path); + + return fread($this->handle, $length ?? ($this->size() ?: 1)); + } + + /** + * Get the file size. + * + * @return int + */ + public function size() + { + return filesize($this->path); + } + + /** + * Write to the file. + * + * @param string $contents + * @return string + */ + public function write($contents) + { + fwrite($this->handle, $contents); + + fflush($this->handle); + + return $this; + } + + /** + * Truncate the file. + * + * @return $this + */ + public function truncate() + { + rewind($this->handle); + + ftruncate($this->handle, 0); + + return $this; + } + + /** + * Get a shared lock on the file. + * + * @param bool $block + * @return $this + * + * @throws \Illuminate\Contracts\Filesystem\LockTimeoutException + */ + public function getSharedLock($block = false) + { + if (! flock($this->handle, LOCK_SH | ($block ? 0 : LOCK_NB))) { + throw new LockTimeoutException("Unable to acquire file lock at path [{$this->path}]."); + } + + $this->isLocked = true; + + return $this; + } + + /** + * Get an exclusive lock on the file. + * + * @param bool $block + * @return bool + * + * @throws \Illuminate\Contracts\Filesystem\LockTimeoutException + */ + public function getExclusiveLock($block = false) + { + if (! flock($this->handle, LOCK_EX | ($block ? 0 : LOCK_NB))) { + throw new LockTimeoutException("Unable to acquire file lock at path [{$this->path}]."); + } + + $this->isLocked = true; + + return $this; + } + + /** + * Release the lock on the file. + * + * @return $this + */ + public function releaseLock() + { + flock($this->handle, LOCK_UN); + + $this->isLocked = false; + + return $this; + } + + /** + * Close the file. + * + * @return bool + */ + public function close() + { + if ($this->isLocked) { + $this->releaseLock(); + } + + return fclose($this->handle); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json index f1a48239e..ca82b7a27 100644 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json @@ -14,10 +14,12 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "symfony/finder": "^5.0" + "php": "^7.3|^8.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "symfony/finder": "^5.4" }, "autoload": { "psr-4": { @@ -26,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { @@ -37,7 +39,8 @@ "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "symfony/mime": "Required to enable support for guessing extensions (^5.0)." + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", + "symfony/mime": "Required to enable support for guessing extensions (^5.4)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php index b8765339f..0f12b6c74 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php @@ -100,7 +100,7 @@ class AliasLoader */ protected function ensureFacadeExists($alias) { - if (file_exists($path = storage_path('framework/cache/facade-'.sha1($alias).'.php'))) { + if (is_file($path = storage_path('framework/cache/facade-'.sha1($alias).'.php'))) { return $path; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php index 642a309c3..0aa6a98e0 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php @@ -33,7 +33,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * * @var string */ - const VERSION = '7.30.6'; + const VERSION = '8.83.27'; /** * The base path for the Laravel installation. @@ -112,6 +112,13 @@ class Application extends Container implements ApplicationContract, CachesConfig */ protected $databasePath; + /** + * The custom language file path defined by the developer. + * + * @var string + */ + protected $langPath; + /** * The custom storage path defined by the developer. * @@ -150,7 +157,7 @@ class Application extends Container implements ApplicationContract, CachesConfig /** * The prefixes of absolute cache paths for use during normalization. * - * @var array + * @var string[] */ protected $absoluteCachePathPrefixes = ['/', '\\']; @@ -241,7 +248,7 @@ class Application extends Container implements ApplicationContract, CachesConfig */ public function afterLoadingEnvironment(Closure $callback) { - return $this->afterBootstrapping( + $this->afterBootstrapping( LoadEnvironmentVariables::class, $callback ); } @@ -344,7 +351,7 @@ class Application extends Container implements ApplicationContract, CachesConfig /** * Get the base path of the Laravel installation. * - * @param string $path Optionally, a path to append to the base path + * @param string $path * @return string */ public function basePath($path = '') @@ -355,7 +362,7 @@ class Application extends Container implements ApplicationContract, CachesConfig /** * Get the path to the bootstrap directory. * - * @param string $path Optionally, a path to append to the bootstrap path + * @param string $path * @return string */ public function bootstrapPath($path = '') @@ -366,7 +373,7 @@ class Application extends Container implements ApplicationContract, CachesConfig /** * Get the path to the application configuration files. * - * @param string $path Optionally, a path to append to the config path + * @param string $path * @return string */ public function configPath($path = '') @@ -377,7 +384,7 @@ class Application extends Container implements ApplicationContract, CachesConfig /** * Get the path to the database directory. * - * @param string $path Optionally, a path to append to the database path + * @param string $path * @return string */ public function databasePath($path = '') @@ -407,7 +414,30 @@ class Application extends Container implements ApplicationContract, CachesConfig */ public function langPath() { - return $this->resourcePath().DIRECTORY_SEPARATOR.'lang'; + if ($this->langPath) { + return $this->langPath; + } + + if (is_dir($path = $this->resourcePath().DIRECTORY_SEPARATOR.'lang')) { + return $path; + } + + return $this->basePath().DIRECTORY_SEPARATOR.'lang'; + } + + /** + * Set the language file directory. + * + * @param string $path + * @return $this + */ + public function useLangPath($path) + { + $this->langPath = $path; + + $this->instance('path.lang', $path); + + return $this; } /** @@ -456,6 +486,21 @@ class Application extends Container implements ApplicationContract, CachesConfig return $this->basePath.DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path); } + /** + * Get the path to the views directory. + * + * This method returns the first configured path in the array of view paths. + * + * @param string $path + * @return string + */ + public function viewPath($path = '') + { + $basePath = $this['config']->get('view.paths')[0]; + + return rtrim($basePath, DIRECTORY_SEPARATOR).($path ? DIRECTORY_SEPARATOR.$path : $path); + } + /** * Get the path to the environment file directory. * @@ -530,7 +575,7 @@ class Application extends Container implements ApplicationContract, CachesConfig } /** - * Determine if application is in local environment. + * Determine if the application is in the local environment. * * @return bool */ @@ -540,7 +585,7 @@ class Application extends Container implements ApplicationContract, CachesConfig } /** - * Determine if application is in production environment. + * Determine if the application is in the production environment. * * @return bool */ @@ -583,7 +628,17 @@ class Application extends Container implements ApplicationContract, CachesConfig */ public function runningUnitTests() { - return $this['env'] === 'testing'; + return $this->bound('env') && $this['env'] === 'testing'; + } + + /** + * Determine if the application is running with debug mode enabled. + * + * @return bool + */ + public function hasDebugModeEnabled() + { + return (bool) $this['config']->get('app.debug'); } /** @@ -593,7 +648,7 @@ class Application extends Container implements ApplicationContract, CachesConfig */ public function registerConfiguredProviders() { - $providers = Collection::make($this->config['app.providers']) + $providers = Collection::make($this->make('config')->get('app.providers')) ->partition(function ($provider) { return strpos($provider, 'Illuminate\\') === 0; }); @@ -859,13 +914,17 @@ class Application extends Container implements ApplicationContract, CachesConfig * Boot the given service provider. * * @param \Illuminate\Support\ServiceProvider $provider - * @return mixed + * @return void */ protected function bootProvider(ServiceProvider $provider) { + $provider->callBootingCallbacks(); + if (method_exists($provider, 'boot')) { - return $this->call([$provider, 'boot']); + $this->call([$provider, 'boot']); } + + $provider->callBootedCallbacks(); } /** @@ -890,7 +949,7 @@ class Application extends Container implements ApplicationContract, CachesConfig $this->bootedCallbacks[] = $callback; if ($this->isBooted()) { - $this->fireAppCallbacks([$callback]); + $callback($this); } } @@ -900,15 +959,21 @@ class Application extends Container implements ApplicationContract, CachesConfig * @param callable[] $callbacks * @return void */ - protected function fireAppCallbacks(array $callbacks) + protected function fireAppCallbacks(array &$callbacks) { - foreach ($callbacks as $callback) { - $callback($this); + $index = 0; + + while ($index < count($callbacks)) { + $callbacks[$index]($this); + + $index++; } } /** * {@inheritdoc} + * + * @return \Symfony\Component\HttpFoundation\Response */ public function handle(SymfonyRequest $request, int $type = self::MASTER_REQUEST, bool $catch = true) { @@ -953,7 +1018,7 @@ class Application extends Container implements ApplicationContract, CachesConfig */ public function configurationIsCached() { - return file_exists($this->getCachedConfigPath()); + return is_file($this->getCachedConfigPath()); } /** @@ -1053,7 +1118,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * @param int $code * @param string $message * @param array $headers - * @return void + * @return never * * @throws \Symfony\Component\HttpKernel\Exception\HttpException * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException @@ -1087,8 +1152,12 @@ class Application extends Container implements ApplicationContract, CachesConfig */ public function terminate() { - foreach ($this->terminatingCallbacks as $terminating) { - $this->call($terminating); + $index = 0; + + while ($index < count($this->terminatingCallbacks)) { + $this->call($this->terminatingCallbacks[$index]); + + $index++; } } @@ -1177,6 +1246,16 @@ class Application extends Container implements ApplicationContract, CachesConfig return $this['config']->get('app.locale'); } + /** + * Get the current application locale. + * + * @return string + */ + public function currentLocale() + { + return $this->getLocale(); + } + /** * Get the current application fallback locale. * @@ -1216,7 +1295,7 @@ class Application extends Container implements ApplicationContract, CachesConfig } /** - * Determine if application locale is the given locale. + * Determine if the application locale is the given locale. * * @param string $locale * @return bool @@ -1234,44 +1313,44 @@ class Application extends Container implements ApplicationContract, CachesConfig public function registerCoreContainerAliases() { foreach ([ - 'app' => [self::class, \Illuminate\Contracts\Container\Container::class, \Illuminate\Contracts\Foundation\Application::class, \Psr\Container\ContainerInterface::class], - 'auth' => [\Illuminate\Auth\AuthManager::class, \Illuminate\Contracts\Auth\Factory::class], - 'auth.driver' => [\Illuminate\Contracts\Auth\Guard::class], - 'blade.compiler' => [\Illuminate\View\Compilers\BladeCompiler::class], - 'cache' => [\Illuminate\Cache\CacheManager::class, \Illuminate\Contracts\Cache\Factory::class], - 'cache.store' => [\Illuminate\Cache\Repository::class, \Illuminate\Contracts\Cache\Repository::class, \Psr\SimpleCache\CacheInterface::class], - 'cache.psr6' => [\Symfony\Component\Cache\Adapter\Psr16Adapter::class, \Symfony\Component\Cache\Adapter\AdapterInterface::class, \Psr\Cache\CacheItemPoolInterface::class], - 'config' => [\Illuminate\Config\Repository::class, \Illuminate\Contracts\Config\Repository::class], - 'cookie' => [\Illuminate\Cookie\CookieJar::class, \Illuminate\Contracts\Cookie\Factory::class, \Illuminate\Contracts\Cookie\QueueingFactory::class], - 'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class], - 'db' => [\Illuminate\Database\DatabaseManager::class, \Illuminate\Database\ConnectionResolverInterface::class], - 'db.connection' => [\Illuminate\Database\Connection::class, \Illuminate\Database\ConnectionInterface::class], - 'events' => [\Illuminate\Events\Dispatcher::class, \Illuminate\Contracts\Events\Dispatcher::class], - 'files' => [\Illuminate\Filesystem\Filesystem::class], - 'filesystem' => [\Illuminate\Filesystem\FilesystemManager::class, \Illuminate\Contracts\Filesystem\Factory::class], - 'filesystem.disk' => [\Illuminate\Contracts\Filesystem\Filesystem::class], - 'filesystem.cloud' => [\Illuminate\Contracts\Filesystem\Cloud::class], - 'hash' => [\Illuminate\Hashing\HashManager::class], - 'hash.driver' => [\Illuminate\Contracts\Hashing\Hasher::class], - 'translator' => [\Illuminate\Translation\Translator::class, \Illuminate\Contracts\Translation\Translator::class], - 'log' => [\Illuminate\Log\LogManager::class, \Psr\Log\LoggerInterface::class], - 'mail.manager' => [\Illuminate\Mail\MailManager::class, \Illuminate\Contracts\Mail\Factory::class], - 'mailer' => [\Illuminate\Mail\Mailer::class, \Illuminate\Contracts\Mail\Mailer::class, \Illuminate\Contracts\Mail\MailQueue::class], - 'auth.password' => [\Illuminate\Auth\Passwords\PasswordBrokerManager::class, \Illuminate\Contracts\Auth\PasswordBrokerFactory::class], + 'app' => [self::class, \Illuminate\Contracts\Container\Container::class, \Illuminate\Contracts\Foundation\Application::class, \Psr\Container\ContainerInterface::class], + 'auth' => [\Illuminate\Auth\AuthManager::class, \Illuminate\Contracts\Auth\Factory::class], + 'auth.driver' => [\Illuminate\Contracts\Auth\Guard::class], + 'blade.compiler' => [\Illuminate\View\Compilers\BladeCompiler::class], + 'cache' => [\Illuminate\Cache\CacheManager::class, \Illuminate\Contracts\Cache\Factory::class], + 'cache.store' => [\Illuminate\Cache\Repository::class, \Illuminate\Contracts\Cache\Repository::class, \Psr\SimpleCache\CacheInterface::class], + 'cache.psr6' => [\Symfony\Component\Cache\Adapter\Psr16Adapter::class, \Symfony\Component\Cache\Adapter\AdapterInterface::class, \Psr\Cache\CacheItemPoolInterface::class], + 'config' => [\Illuminate\Config\Repository::class, \Illuminate\Contracts\Config\Repository::class], + 'cookie' => [\Illuminate\Cookie\CookieJar::class, \Illuminate\Contracts\Cookie\Factory::class, \Illuminate\Contracts\Cookie\QueueingFactory::class], + 'db' => [\Illuminate\Database\DatabaseManager::class, \Illuminate\Database\ConnectionResolverInterface::class], + 'db.connection' => [\Illuminate\Database\Connection::class, \Illuminate\Database\ConnectionInterface::class], + 'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\StringEncrypter::class], + 'events' => [\Illuminate\Events\Dispatcher::class, \Illuminate\Contracts\Events\Dispatcher::class], + 'files' => [\Illuminate\Filesystem\Filesystem::class], + 'filesystem' => [\Illuminate\Filesystem\FilesystemManager::class, \Illuminate\Contracts\Filesystem\Factory::class], + 'filesystem.disk' => [\Illuminate\Contracts\Filesystem\Filesystem::class], + 'filesystem.cloud' => [\Illuminate\Contracts\Filesystem\Cloud::class], + 'hash' => [\Illuminate\Hashing\HashManager::class], + 'hash.driver' => [\Illuminate\Contracts\Hashing\Hasher::class], + 'translator' => [\Illuminate\Translation\Translator::class, \Illuminate\Contracts\Translation\Translator::class], + 'log' => [\Illuminate\Log\LogManager::class, \Psr\Log\LoggerInterface::class], + 'mail.manager' => [\Illuminate\Mail\MailManager::class, \Illuminate\Contracts\Mail\Factory::class], + 'mailer' => [\Illuminate\Mail\Mailer::class, \Illuminate\Contracts\Mail\Mailer::class, \Illuminate\Contracts\Mail\MailQueue::class], + 'auth.password' => [\Illuminate\Auth\Passwords\PasswordBrokerManager::class, \Illuminate\Contracts\Auth\PasswordBrokerFactory::class], 'auth.password.broker' => [\Illuminate\Auth\Passwords\PasswordBroker::class, \Illuminate\Contracts\Auth\PasswordBroker::class], - 'queue' => [\Illuminate\Queue\QueueManager::class, \Illuminate\Contracts\Queue\Factory::class, \Illuminate\Contracts\Queue\Monitor::class], - 'queue.connection' => [\Illuminate\Contracts\Queue\Queue::class], - 'queue.failer' => [\Illuminate\Queue\Failed\FailedJobProviderInterface::class], - 'redirect' => [\Illuminate\Routing\Redirector::class], - 'redis' => [\Illuminate\Redis\RedisManager::class, \Illuminate\Contracts\Redis\Factory::class], - 'redis.connection' => [\Illuminate\Redis\Connections\Connection::class, \Illuminate\Contracts\Redis\Connection::class], - 'request' => [\Illuminate\Http\Request::class, \Symfony\Component\HttpFoundation\Request::class], - 'router' => [\Illuminate\Routing\Router::class, \Illuminate\Contracts\Routing\Registrar::class, \Illuminate\Contracts\Routing\BindingRegistrar::class], - 'session' => [\Illuminate\Session\SessionManager::class], - 'session.store' => [\Illuminate\Session\Store::class, \Illuminate\Contracts\Session\Session::class], - 'url' => [\Illuminate\Routing\UrlGenerator::class, \Illuminate\Contracts\Routing\UrlGenerator::class], - 'validator' => [\Illuminate\Validation\Factory::class, \Illuminate\Contracts\Validation\Factory::class], - 'view' => [\Illuminate\View\Factory::class, \Illuminate\Contracts\View\Factory::class], + 'queue' => [\Illuminate\Queue\QueueManager::class, \Illuminate\Contracts\Queue\Factory::class, \Illuminate\Contracts\Queue\Monitor::class], + 'queue.connection' => [\Illuminate\Contracts\Queue\Queue::class], + 'queue.failer' => [\Illuminate\Queue\Failed\FailedJobProviderInterface::class], + 'redirect' => [\Illuminate\Routing\Redirector::class], + 'redis' => [\Illuminate\Redis\RedisManager::class, \Illuminate\Contracts\Redis\Factory::class], + 'redis.connection' => [\Illuminate\Redis\Connections\Connection::class, \Illuminate\Contracts\Redis\Connection::class], + 'request' => [\Illuminate\Http\Request::class, \Symfony\Component\HttpFoundation\Request::class], + 'router' => [\Illuminate\Routing\Router::class, \Illuminate\Contracts\Routing\Registrar::class, \Illuminate\Contracts\Routing\BindingRegistrar::class], + 'session' => [\Illuminate\Session\SessionManager::class], + 'session.store' => [\Illuminate\Session\Store::class, \Illuminate\Contracts\Session\Session::class], + 'url' => [\Illuminate\Routing\UrlGenerator::class, \Illuminate\Contracts\Routing\UrlGenerator::class], + 'validator' => [\Illuminate\Validation\Factory::class, \Illuminate\Contracts\Validation\Factory::class], + 'view' => [\Illuminate\View\Factory::class, \Illuminate\Contracts\View\Factory::class], ] as $key => $aliases) { foreach ($aliases as $alias) { $this->alias($key, $alias); @@ -1297,8 +1376,11 @@ class Application extends Container implements ApplicationContract, CachesConfig $this->serviceProviders = []; $this->resolvingCallbacks = []; $this->terminatingCallbacks = []; + $this->beforeResolvingCallbacks = []; $this->afterResolvingCallbacks = []; + $this->globalBeforeResolvingCallbacks = []; $this->globalResolvingCallbacks = []; + $this->globalAfterResolvingCallbacks = []; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php index dd0ba609f..d8cf50dbc 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php @@ -18,6 +18,18 @@ trait Authorizable return app(Gate::class)->forUser($this)->check($abilities, $arguments); } + /** + * Determine if the entity has any of the given abilities. + * + * @param iterable|string $abilities + * @param array|mixed $arguments + * @return bool + */ + public function canAny($abilities, $arguments = []) + { + return app(Gate::class)->forUser($this)->any($abilities, $arguments); + } + /** * Determine if the entity does not have the given abilities. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php index 85a9596f9..fe0ba0c58 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php @@ -74,14 +74,18 @@ trait AuthorizesRequests /** * Authorize a resource action based on the incoming request. * - * @param string $model - * @param string|null $parameter + * @param string|array $model + * @param string|array|null $parameter * @param array $options * @param \Illuminate\Http\Request|null $request * @return void */ public function authorizeResource($model, $parameter = null, array $options = [], $request = null) { + $model = is_array($model) ? implode(',', $model) : $model; + + $parameter = is_array($parameter) ? implode(',', $parameter) : $parameter; + $parameter = $parameter ?: Str::snake(class_basename($model)); $middleware = []; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/EmailVerificationRequest.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/EmailVerificationRequest.php new file mode 100644 index 000000000..081d66bdd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/EmailVerificationRequest.php @@ -0,0 +1,66 @@ +user()->getKey(), + (string) $this->route('id'))) { + return false; + } + + if (! hash_equals(sha1($this->user()->getEmailForVerification()), + (string) $this->route('hash'))) { + return false; + } + + return true; + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + // + ]; + } + + /** + * Fulfill the email verification request. + * + * @return void + */ + public function fulfill() + { + if (! $this->user()->hasVerifiedEmail()) { + $this->user()->markEmailAsVerified(); + + event(new Verified($this->user())); + } + } + + /** + * Configure the validator instance. + * + * @param \Illuminate\Validation\Validator $validator + * @return void + */ + public function withValidator($validator) + { + return $validator; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php index 280efaa87..286c2fec3 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php @@ -6,6 +6,8 @@ use ErrorException; use Exception; use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Log\LogManager; +use Monolog\Handler\NullHandler; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\ErrorHandler\Error\FatalError; use Throwable; @@ -34,7 +36,7 @@ class HandleExceptions */ public function bootstrap(Application $app) { - self::$reservedMemory = str_repeat('x', 10240); + self::$reservedMemory = str_repeat('x', 32768); $this->app = $app; @@ -52,7 +54,7 @@ class HandleExceptions } /** - * Convert PHP errors to ErrorException instances. + * Report PHP deprecations, or convert PHP errors to ErrorException instances. * * @param int $level * @param string $message @@ -65,11 +67,86 @@ class HandleExceptions */ public function handleError($level, $message, $file = '', $line = 0, $context = []) { + if ($this->isDeprecation($level)) { + return $this->handleDeprecation($message, $file, $line); + } + if (error_reporting() & $level) { throw new ErrorException($message, 0, $level, $file, $line); } } + /** + * Reports a deprecation to the "deprecations" logger. + * + * @param string $message + * @param string $file + * @param int $line + * @return void + */ + public function handleDeprecation($message, $file, $line) + { + if (! class_exists(LogManager::class) + || ! $this->app->hasBeenBootstrapped() + || $this->app->runningUnitTests() + ) { + return; + } + + try { + $logger = $this->app->make(LogManager::class); + } catch (Exception $e) { + return; + } + + $this->ensureDeprecationLoggerIsConfigured(); + + with($logger->channel('deprecations'), function ($log) use ($message, $file, $line) { + $log->warning(sprintf('%s in %s on line %s', + $message, $file, $line + )); + }); + } + + /** + * Ensure the "deprecations" logger is configured. + * + * @return void + */ + protected function ensureDeprecationLoggerIsConfigured() + { + with($this->app['config'], function ($config) { + if ($config->get('logging.channels.deprecations')) { + return; + } + + $this->ensureNullLogDriverIsConfigured(); + + $driver = $config->get('logging.deprecations') ?? 'null'; + + $config->set('logging.channels.deprecations', $config->get("logging.channels.{$driver}")); + }); + } + + /** + * Ensure the "null" log driver is configured. + * + * @return void + */ + protected function ensureNullLogDriverIsConfigured() + { + with($this->app['config'], function ($config) { + if ($config->get('logging.channels.null')) { + return; + } + + $config->set('logging.channels.null', [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ]); + }); + } + /** * Handle an uncaught exception from the application. * @@ -82,9 +159,9 @@ class HandleExceptions */ public function handleException(Throwable $e) { - try { - self::$reservedMemory = null; + self::$reservedMemory = null; + try { $this->getExceptionHandler()->report($e); } catch (Exception $e) { // @@ -126,6 +203,8 @@ class HandleExceptions */ public function handleShutdown() { + self::$reservedMemory = null; + if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) { $this->handleException($this->fatalErrorFromPhpError($error, 0)); } @@ -143,6 +222,17 @@ class HandleExceptions return new FatalError($error['message'], 0, $error, $traceOffset); } + /** + * Determine if the error level is a deprecation. + * + * @param int $level + * @return bool + */ + protected function isDeprecation($level) + { + return in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]); + } + /** * Determine if the error type is fatal. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php index 60dd3707f..5549a50a1 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php @@ -68,7 +68,7 @@ class LoadEnvironmentVariables */ protected function setEnvironmentFilePath($app, $file) { - if (file_exists($app->environmentPath().'/'.$file)) { + if (is_file($app->environmentPath().'/'.$file)) { $app->loadEnvironmentFrom($file); return true; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php index f088497c2..3e90e4120 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php @@ -12,15 +12,16 @@ trait Dispatchable * * @return \Illuminate\Foundation\Bus\PendingDispatch */ - public static function dispatch() + public static function dispatch(...$arguments) { - return new PendingDispatch(new static(...func_get_args())); + return new PendingDispatch(new static(...$arguments)); } /** * Dispatch the job with the given arguments if the given truth test passes. * * @param bool $boolean + * @param mixed ...$arguments * @return \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent */ public static function dispatchIf($boolean, ...$arguments) @@ -34,6 +35,7 @@ trait Dispatchable * Dispatch the job with the given arguments unless the given truth test passes. * * @param bool $boolean + * @param mixed ...$arguments * @return \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent */ public static function dispatchUnless($boolean, ...$arguments) @@ -46,11 +48,25 @@ trait Dispatchable /** * Dispatch a command to its appropriate handler in the current process. * + * Queueable jobs will be dispatched to the "sync" queue. + * * @return mixed */ - public static function dispatchNow() + public static function dispatchSync(...$arguments) { - return app(Dispatcher::class)->dispatchNow(new static(...func_get_args())); + return app(Dispatcher::class)->dispatchSync(new static(...$arguments)); + } + + /** + * Dispatch a command to its appropriate handler in the current process. + * + * @return mixed + * + * @deprecated Will be removed in a future Laravel version. + */ + public static function dispatchNow(...$arguments) + { + return app(Dispatcher::class)->dispatchNow(new static(...$arguments)); } /** @@ -58,9 +74,9 @@ trait Dispatchable * * @return mixed */ - public static function dispatchAfterResponse() + public static function dispatchAfterResponse(...$arguments) { - return app(Dispatcher::class)->dispatchAfterResponse(new static(...func_get_args())); + return app(Dispatcher::class)->dispatchAfterResponse(new static(...$arguments)); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php index 46d6e5b4d..d52115852 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php @@ -22,9 +22,24 @@ trait DispatchesJobs * * @param mixed $job * @return mixed + * + * @deprecated Will be removed in a future Laravel version. */ public function dispatchNow($job) { return app(Dispatcher::class)->dispatchNow($job); } + + /** + * Dispatch a job to its appropriate handler in the current process. + * + * Queueable jobs will be dispatched to the "sync" queue. + * + * @param mixed $job + * @return mixed + */ + public function dispatchSync($job) + { + return app(Dispatcher::class)->dispatchSync($job); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php index 090e44d4c..73ae364c5 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php @@ -3,7 +3,9 @@ namespace Illuminate\Foundation\Bus; use Closure; +use Illuminate\Contracts\Bus\Dispatcher; use Illuminate\Queue\CallQueuedClosure; +use Illuminate\Queue\SerializableClosureFactory; class PendingChain { @@ -21,6 +23,34 @@ class PendingChain */ public $chain; + /** + * The name of the connection the chain should be sent to. + * + * @var string|null + */ + public $connection; + + /** + * The name of the queue the chain should be sent to. + * + * @var string|null + */ + public $queue; + + /** + * The number of seconds before the chain should be made available. + * + * @var \DateTimeInterface|\DateInterval|int|null + */ + public $delay; + + /** + * The callbacks to be executed on failure. + * + * @var array + */ + public $catchCallbacks = []; + /** * Create a new PendingChain instance. * @@ -34,6 +64,70 @@ class PendingChain $this->chain = $chain; } + /** + * Set the desired connection for the job. + * + * @param string|null $connection + * @return $this + */ + public function onConnection($connection) + { + $this->connection = $connection; + + return $this; + } + + /** + * Set the desired queue for the job. + * + * @param string|null $queue + * @return $this + */ + public function onQueue($queue) + { + $this->queue = $queue; + + return $this; + } + + /** + * Set the desired delay for the chain. + * + * @param \DateTimeInterface|\DateInterval|int|null $delay + * @return $this + */ + public function delay($delay) + { + $this->delay = $delay; + + return $this; + } + + /** + * Add a callback to be executed on job failure. + * + * @param callable $callback + * @return $this + */ + public function catch($callback) + { + $this->catchCallbacks[] = $callback instanceof Closure + ? SerializableClosureFactory::make($callback) + : $callback; + + return $this; + } + + /** + * Get the "catch" callbacks that have been registered. + * + * @return array + */ + public function catchCallbacks() + { + return $this->catchCallbacks ?? []; + } + /** * Dispatch the job with the given arguments. * @@ -49,6 +143,23 @@ class PendingChain $firstJob = $this->job; } - return (new PendingDispatch($firstJob))->chain($this->chain); + if ($this->connection) { + $firstJob->chainConnection = $this->connection; + $firstJob->connection = $firstJob->connection ?: $this->connection; + } + + if ($this->queue) { + $firstJob->chainQueue = $this->queue; + $firstJob->queue = $firstJob->queue ?: $this->queue; + } + + if ($this->delay) { + $firstJob->delay = ! is_null($firstJob->delay) ? $firstJob->delay : $this->delay; + } + + $firstJob->chain($this->chain); + $firstJob->chainCatchCallbacks = $this->catchCallbacks(); + + return app(Dispatcher::class)->dispatch($firstJob); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingClosureDispatch.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingClosureDispatch.php new file mode 100644 index 000000000..84cc14a77 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingClosureDispatch.php @@ -0,0 +1,21 @@ +job->onFailure($callback); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php index 89329515e..76c16db62 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php @@ -2,7 +2,11 @@ namespace Illuminate\Foundation\Bus; +use Illuminate\Bus\UniqueLock; +use Illuminate\Container\Container; use Illuminate\Contracts\Bus\Dispatcher; +use Illuminate\Contracts\Cache\Repository as Cache; +use Illuminate\Contracts\Queue\ShouldBeUnique; class PendingDispatch { @@ -96,6 +100,30 @@ class PendingDispatch return $this; } + /** + * Indicate that the job should be dispatched after all database transactions have committed. + * + * @return $this + */ + public function afterCommit() + { + $this->job->afterCommit(); + + return $this; + } + + /** + * Indicate that the job should not wait until database transactions have been committed before dispatching. + * + * @return $this + */ + public function beforeCommit() + { + $this->job->beforeCommit(); + + return $this; + } + /** * Set the jobs that should run if this job is successful. * @@ -121,6 +149,35 @@ class PendingDispatch return $this; } + /** + * Determine if the job should be dispatched. + * + * @return bool + */ + protected function shouldDispatch() + { + if (! $this->job instanceof ShouldBeUnique) { + return true; + } + + return (new UniqueLock(Container::getInstance()->make(Cache::class))) + ->acquire($this->job); + } + + /** + * Dynamically proxy methods to the underlying job. + * + * @param string $method + * @param array $parameters + * @return $this + */ + public function __call($method, $parameters) + { + $this->job->{$method}(...$parameters); + + return $this; + } + /** * Handle the object's destruction. * @@ -128,7 +185,9 @@ class PendingDispatch */ public function __destruct() { - if ($this->afterResponse) { + if (! $this->shouldDispatch()) { + return; + } elseif ($this->afterResponse) { app(Dispatcher::class)->dispatchAfterResponse($this->job); } else { app(Dispatcher::class)->dispatch($this->job); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php b/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php index fcda187fd..8cf568409 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php @@ -54,11 +54,15 @@ class ComposerScripts { $laravel = new Application(getcwd()); - if (file_exists($servicesPath = $laravel->getCachedServicesPath())) { + if (is_file($configPath = $laravel->getCachedConfigPath())) { + @unlink($configPath); + } + + if (is_file($servicesPath = $laravel->getCachedServicesPath())) { @unlink($servicesPath); } - if (file_exists($packagesPath = $laravel->getCachedPackagesPath())) { + if (is_file($packagesPath = $laravel->getCachedPackagesPath())) { @unlink($packagesPath); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php index fd390de10..3fa3a667f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php @@ -34,7 +34,20 @@ class CastMakeCommand extends GeneratorCommand */ protected function getStub() { - return __DIR__.'/stubs/cast.stub'; + return $this->resolveStubPath('/stubs/cast.stub'); + } + + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php index 202d81cfd..756fce6de 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php @@ -36,7 +36,7 @@ class ChannelMakeCommand extends GeneratorCommand protected function buildClass($name) { return str_replace( - 'DummyUser', + ['DummyUser', '{{ userModel }}'], class_basename($this->userProviderModel()), parent::buildClass($name) ); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php index 399a44dc5..87ea044b8 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php @@ -27,11 +27,11 @@ class ClearCompiledCommand extends Command */ public function handle() { - if (file_exists($servicesPath = $this->laravel->getCachedServicesPath())) { + if (is_file($servicesPath = $this->laravel->getCachedServicesPath())) { @unlink($servicesPath); } - if (file_exists($packagesPath = $this->laravel->getCachedPackagesPath())) { + if (is_file($packagesPath = $this->laravel->getCachedPackagesPath())) { @unlink($packagesPath); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php index 88ab48002..4cd54e8e4 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php @@ -56,6 +56,17 @@ class ClosureCommand extends Command ); } + /** + * Set the description for the command. + * + * @param string $description + * @return $this + */ + public function purpose($description) + { + return $this->describe($description); + } + /** * Set the description for the command. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php index 8ab3e8eee..b0a334418 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php @@ -54,15 +54,21 @@ class ComponentMakeCommand extends GeneratorCommand protected function writeView() { $path = $this->viewPath( - str_replace('.', '/', 'components.'.$this->getView()) + str_replace('.', '/', 'components.'.$this->getView()).'.blade.php' ); if (! $this->files->isDirectory(dirname($path))) { $this->files->makeDirectory(dirname($path), 0777, true, true); } + if ($this->files->exists($path) && ! $this->option('force')) { + $this->error('View already exists!'); + + return; + } + file_put_contents( - $path.'.blade.php', + $path, '
    ' @@ -79,14 +85,14 @@ class ComponentMakeCommand extends GeneratorCommand { if ($this->option('inline')) { return str_replace( - 'DummyView', + ['DummyView', '{{ view }}'], "<<<'blade'\n
    \n \n
    \nblade", parent::buildClass($name) ); } return str_replace( - 'DummyView', + ['DummyView', '{{ view }}'], 'view(\'components.'.$this->getView().'\')', parent::buildClass($name) ); @@ -115,7 +121,20 @@ class ComponentMakeCommand extends GeneratorCommand */ protected function getStub() { - return __DIR__.'/stubs/view-component.stub'; + return $this->resolveStubPath('/stubs/view-component.stub'); + } + + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php index cada887f9..90607c77d 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php @@ -2,12 +2,15 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; class ConsoleMakeCommand extends GeneratorCommand { + use CreatesMatchingTest; + /** * The console command name. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php index af2f6eb95..676715af4 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php @@ -2,29 +2,33 @@ namespace Illuminate\Foundation\Console; +use App\Http\Middleware\PreventRequestsDuringMaintenance; use Exception; use Illuminate\Console\Command; -use Illuminate\Support\InteractsWithTime; +use Illuminate\Foundation\Events\MaintenanceModeEnabled; +use Illuminate\Foundation\Exceptions\RegisterErrorViewPaths; +use Throwable; class DownCommand extends Command { - use InteractsWithTime; - /** * The console command signature. * * @var string */ - protected $signature = 'down {--message= : The message for the maintenance mode} + protected $signature = 'down {--redirect= : The path that users should be redirected to} + {--render= : The view that should be prerendered for display during maintenance mode} {--retry= : The number of seconds after which the request may be retried} - {--allow=* : IP or networks allowed to access the application while in maintenance mode}'; + {--refresh= : The number of seconds after which the browser may refresh} + {--secret= : The secret phrase that may be used to bypass maintenance mode} + {--status=503 : The status code that should be used when returning the maintenance mode response}'; /** * The console command description. * * @var string */ - protected $description = 'Put the application into maintenance mode'; + protected $description = 'Put the application into maintenance / demo mode'; /** * Execute the console command. @@ -34,15 +38,23 @@ class DownCommand extends Command public function handle() { try { - if (file_exists(storage_path('framework/down'))) { + if (is_file(storage_path('framework/down'))) { $this->comment('Application is already down.'); - return true; + return 0; } - file_put_contents(storage_path('framework/down'), - json_encode($this->getDownFilePayload(), - JSON_PRETTY_PRINT)); + file_put_contents( + storage_path('framework/down'), + json_encode($this->getDownFilePayload(), JSON_PRETTY_PRINT) + ); + + file_put_contents( + storage_path('framework/maintenance.php'), + file_get_contents(__DIR__.'/stubs/maintenance-mode.stub') + ); + + $this->laravel->get('events')->dispatch(MaintenanceModeEnabled::class); $this->comment('Application is now in maintenance mode.'); } catch (Exception $e) { @@ -62,13 +74,58 @@ class DownCommand extends Command protected function getDownFilePayload() { return [ - 'time' => $this->currentTime(), - 'message' => $this->option('message'), + 'except' => $this->excludedPaths(), + 'redirect' => $this->redirectPath(), 'retry' => $this->getRetryTime(), - 'allowed' => $this->option('allow'), + 'refresh' => $this->option('refresh'), + 'secret' => $this->option('secret'), + 'status' => (int) $this->option('status', 503), + 'template' => $this->option('render') ? $this->prerenderView() : null, ]; } + /** + * Get the paths that should be excluded from maintenance mode. + * + * @return array + */ + protected function excludedPaths() + { + try { + return $this->laravel->make(PreventRequestsDuringMaintenance::class)->getExcludedPaths(); + } catch (Throwable $e) { + return []; + } + } + + /** + * Get the path that users should be redirected to. + * + * @return string + */ + protected function redirectPath() + { + if ($this->option('redirect') && $this->option('redirect') !== '/') { + return '/'.trim($this->option('redirect'), '/'); + } + + return $this->option('redirect'); + } + + /** + * Prerender the specified view so that it can be rendered even before loading Composer. + * + * @return string + */ + protected function prerenderView() + { + (new RegisterErrorViewPaths)(); + + return view($this->option('render'), [ + 'retryAfter' => $this->option('retry'), + ])->render(); + } + /** * Get the number of seconds the client should wait before retrying their request. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php index af7bf5261..632be4b65 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php @@ -46,7 +46,20 @@ class EventMakeCommand extends GeneratorCommand */ protected function getStub() { - return __DIR__.'/stubs/event.stub'; + return $this->resolveStubPath('/stubs/event.stub'); + } + + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php index 57c9a93b2..bec3d9d10 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php @@ -2,11 +2,14 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputOption; class JobMakeCommand extends GeneratorCommand { + use CreatesMatchingTest; + /** * The console command name. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php index e6b079849..cdfaeaf3a 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php @@ -57,7 +57,7 @@ class Kernel implements KernelContract /** * The bootstrap classes for the application. * - * @var array + * @var string[] */ protected $bootstrappers = [ \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class, @@ -111,7 +111,7 @@ class Kernel implements KernelContract */ protected function scheduleCache() { - return Env::get('SCHEDULE_CACHE_DRIVER'); + return $this->app['config']->get('cache.schedule_store', Env::get('SCHEDULE_CACHE_DRIVER')); } /** @@ -172,7 +172,7 @@ class Kernel implements KernelContract } /** - * Register the Closure based commands for the application. + * Register the commands for the application. * * @return void */ @@ -223,7 +223,7 @@ class Kernel implements KernelContract $command = $namespace.str_replace( ['/', '.php'], ['\\', ''], - Str::after($command->getPathname(), realpath(app_path()).DIRECTORY_SEPARATOR) + Str::after($command->getRealPath(), realpath(app_path()).DIRECTORY_SEPARATOR) ); if (is_subclass_of($command, Command::class) && diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php index 0ded743aa..b27e79863 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php @@ -2,12 +2,15 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; use Symfony\Component\Console\Input\InputOption; class ListenerMakeCommand extends GeneratorCommand { + use CreatesMatchingTest; + /** * The console command name. * @@ -44,15 +47,15 @@ class ListenerMakeCommand extends GeneratorCommand 'Illuminate', '\\', ])) { - $event = $this->laravel->getNamespace().'Events\\'.$event; + $event = $this->laravel->getNamespace().'Events\\'.str_replace('/', '\\', $event); } $stub = str_replace( - 'DummyEvent', class_basename($event), parent::buildClass($name) + ['DummyEvent', '{{ event }}'], class_basename($event), parent::buildClass($name) ); return str_replace( - 'DummyFullEvent', trim($event, '\\'), $stub + ['DummyFullEvent', '{{ eventNamespace }}'], trim($event, '\\'), $stub ); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php index 19bef8db3..e32e2e20f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php @@ -2,11 +2,15 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; +use Illuminate\Support\Str; use Symfony\Component\Console\Input\InputOption; class MailMakeCommand extends GeneratorCommand { + use CreatesMatchingTest; + /** * The console command name. * @@ -39,7 +43,7 @@ class MailMakeCommand extends GeneratorCommand return; } - if ($this->option('markdown')) { + if ($this->option('markdown') !== false) { $this->writeMarkdownTemplate(); } } @@ -52,7 +56,7 @@ class MailMakeCommand extends GeneratorCommand protected function writeMarkdownTemplate() { $path = $this->viewPath( - str_replace('.', '/', $this->option('markdown')).'.blade.php' + str_replace('.', '/', $this->getView()).'.blade.php' ); if (! $this->files->isDirectory(dirname($path))) { @@ -72,13 +76,29 @@ class MailMakeCommand extends GeneratorCommand { $class = parent::buildClass($name); - if ($this->option('markdown')) { - $class = str_replace('DummyView', $this->option('markdown'), $class); + if ($this->option('markdown') !== false) { + $class = str_replace(['DummyView', '{{ view }}'], $this->getView(), $class); } return $class; } + /** + * Get the view name. + * + * @return string + */ + protected function getView() + { + $view = $this->option('markdown'); + + if (! $view) { + $view = 'mail.'.Str::kebab(class_basename($this->argument('name'))); + } + + return $view; + } + /** * Get the stub file for the generator. * @@ -86,9 +106,23 @@ class MailMakeCommand extends GeneratorCommand */ protected function getStub() { - return $this->option('markdown') - ? __DIR__.'/stubs/markdown-mail.stub' - : __DIR__.'/stubs/mail.stub'; + return $this->resolveStubPath( + $this->option('markdown') !== false + ? '/stubs/markdown-mail.stub' + : '/stubs/mail.stub'); + } + + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** @@ -112,7 +146,7 @@ class MailMakeCommand extends GeneratorCommand return [ ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the mailable already exists'], - ['markdown', 'm', InputOption::VALUE_OPTIONAL, 'Create a new Markdown template for the mailable'], + ['markdown', 'm', InputOption::VALUE_OPTIONAL, 'Create a new Markdown template for the mailable', false], ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php index 9500e4b04..4f03aae01 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php @@ -2,12 +2,15 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; use Symfony\Component\Console\Input\InputOption; class ModelMakeCommand extends GeneratorCommand { + use CreatesMatchingTest; + /** * The console command name. * @@ -45,6 +48,7 @@ class ModelMakeCommand extends GeneratorCommand $this->input->setOption('seed', true); $this->input->setOption('migration', true); $this->input->setOption('controller', true); + $this->input->setOption('policy', true); $this->input->setOption('resource', true); } @@ -63,6 +67,10 @@ class ModelMakeCommand extends GeneratorCommand if ($this->option('controller') || $this->option('resource') || $this->option('api')) { $this->createController(); } + + if ($this->option('policy')) { + $this->createPolicy(); + } } /** @@ -72,7 +80,7 @@ class ModelMakeCommand extends GeneratorCommand */ protected function createFactory() { - $factory = Str::studly(class_basename($this->argument('name'))); + $factory = Str::studly($this->argument('name')); $this->call('make:factory', [ 'name' => "{$factory}Factory", @@ -108,7 +116,7 @@ class ModelMakeCommand extends GeneratorCommand { $seeder = Str::studly(class_basename($this->argument('name'))); - $this->call('make:seed', [ + $this->call('make:seeder', [ 'name' => "{$seeder}Seeder", ]); } @@ -125,12 +133,28 @@ class ModelMakeCommand extends GeneratorCommand $modelName = $this->qualifyClass($this->getNameInput()); $this->call('make:controller', array_filter([ - 'name' => "{$controller}Controller", + 'name' => "{$controller}Controller", '--model' => $this->option('resource') || $this->option('api') ? $modelName : null, '--api' => $this->option('api'), + '--requests' => $this->option('requests') || $this->option('all'), ])); } + /** + * Create a policy file for the model. + * + * @return void + */ + protected function createPolicy() + { + $policy = Str::studly(class_basename($this->argument('name'))); + + $this->call('make:policy', [ + 'name' => "{$policy}Policy", + '--model' => $this->qualifyClass($this->getNameInput()), + ]); + } + /** * Get the stub file for the generator. * @@ -156,6 +180,17 @@ class ModelMakeCommand extends GeneratorCommand : __DIR__.$stub; } + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return is_dir(app_path('Models')) ? $rootNamespace.'\\Models' : $rootNamespace; + } + /** * Get the console command options. * @@ -164,15 +199,17 @@ class ModelMakeCommand extends GeneratorCommand protected function getOptions() { return [ - ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, and resource controller for the model'], + ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, policy, and resource controller for the model'], ['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model'], ['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'], ['force', null, InputOption::VALUE_NONE, 'Create the class even if the model already exists'], ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'], - ['seed', 's', InputOption::VALUE_NONE, 'Create a new seeder file for the model'], + ['policy', null, InputOption::VALUE_NONE, 'Create a new policy for the model'], + ['seed', 's', InputOption::VALUE_NONE, 'Create a new seeder for the model'], ['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'], ['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'], ['api', null, InputOption::VALUE_NONE, 'Indicates if the generated controller should be an API controller'], + ['requests', 'R', InputOption::VALUE_NONE, 'Create new form request classes and use them in the resource controller'], ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php index 6eb66e282..f8a5bf8c8 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php @@ -2,11 +2,14 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputOption; class NotificationMakeCommand extends GeneratorCommand { + use CreatesMatchingTest; + /** * The console command name. * @@ -73,7 +76,7 @@ class NotificationMakeCommand extends GeneratorCommand $class = parent::buildClass($name); if ($this->option('markdown')) { - $class = str_replace('DummyView', $this->option('markdown'), $class); + $class = str_replace(['DummyView', '{{ view }}'], $this->option('markdown'), $class); } return $class; @@ -87,8 +90,21 @@ class NotificationMakeCommand extends GeneratorCommand protected function getStub() { return $this->option('markdown') - ? __DIR__.'/stubs/markdown-notification.stub' - : __DIR__.'/stubs/notification.stub'; + ? $this->resolveStubPath('/stubs/markdown-notification.stub') + : $this->resolveStubPath('/stubs/notification.stub'); + } + + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php index b1f1346a5..a2661f3fa 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php @@ -3,7 +3,7 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; -use Illuminate\Support\Str; +use InvalidArgumentException; use Symfony\Component\Console\Input\InputOption; class ObserverMakeCommand extends GeneratorCommand @@ -44,18 +44,6 @@ class ObserverMakeCommand extends GeneratorCommand return $model ? $this->replaceModel($stub, $model) : $stub; } - /** - * Get the stub file for the generator. - * - * @return string - */ - protected function getStub() - { - return $this->option('model') - ? __DIR__.'/stubs/observer.stub' - : __DIR__.'/stubs/observer.plain.stub'; - } - /** * Replace the model for the given stub. * @@ -65,27 +53,65 @@ class ObserverMakeCommand extends GeneratorCommand */ protected function replaceModel($stub, $model) { - $model = str_replace('/', '\\', $model); + $modelClass = $this->parseModel($model); - $namespaceModel = $this->laravel->getNamespace().$model; + $replace = [ + 'DummyFullModelClass' => $modelClass, + '{{ namespacedModel }}' => $modelClass, + '{{namespacedModel}}' => $modelClass, + 'DummyModelClass' => class_basename($modelClass), + '{{ model }}' => class_basename($modelClass), + '{{model}}' => class_basename($modelClass), + 'DummyModelVariable' => lcfirst(class_basename($modelClass)), + '{{ modelVariable }}' => lcfirst(class_basename($modelClass)), + '{{modelVariable}}' => lcfirst(class_basename($modelClass)), + ]; - if (Str::startsWith($model, '\\')) { - $stub = str_replace('NamespacedDummyModel', trim($model, '\\'), $stub); - } else { - $stub = str_replace('NamespacedDummyModel', $namespaceModel, $stub); + return str_replace( + array_keys($replace), array_values($replace), $stub + ); + } + + /** + * Get the fully-qualified model class name. + * + * @param string $model + * @return string + * + * @throws \InvalidArgumentException + */ + protected function parseModel($model) + { + if (preg_match('([^A-Za-z0-9_/\\\\])', $model)) { + throw new InvalidArgumentException('Model name contains invalid characters.'); } - $stub = str_replace( - "use {$namespaceModel};\nuse {$namespaceModel};", "use {$namespaceModel};", $stub - ); + return $this->qualifyModel($model); + } - $model = class_basename(trim($model, '\\')); + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return $this->option('model') + ? $this->resolveStubPath('/stubs/observer.stub') + : $this->resolveStubPath('/stubs/observer.plain.stub'); + } - $stub = str_replace('DocDummyModel', Str::snake($model, ' '), $stub); - - $stub = str_replace('DummyModel', $model, $stub); - - return str_replace('dummyModel', Str::camel($model), $stub); + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php index 0bd92dfee..7506cc26a 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php @@ -27,6 +27,7 @@ class OptimizeClearCommand extends Command */ public function handle() { + $this->call('event:clear'); $this->call('view:clear'); $this->call('cache:clear'); $this->call('route:clear'); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php index 8b6380ca9..aeb959092 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php @@ -4,6 +4,7 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; +use LogicException; use Symfony\Component\Console\Input\InputOption; class PolicyMakeCommand extends GeneratorCommand @@ -71,6 +72,8 @@ class PolicyMakeCommand extends GeneratorCommand * Get the model for the guard's user provider. * * @return string|null + * + * @throws \LogicException */ protected function userProviderModel() { @@ -78,8 +81,16 @@ class PolicyMakeCommand extends GeneratorCommand $guard = $this->option('guard') ?: $config->get('auth.defaults.guard'); + if (is_null($guardProvider = $config->get('auth.guards.'.$guard.'.provider'))) { + throw new LogicException('The ['.$guard.'] guard is not defined in your "auth" configuration file.'); + } + + if (! $config->get('auth.providers.'.$guardProvider.'.model')) { + return 'App\\Models\\User'; + } + return $config->get( - 'auth.providers.'.$config->get('auth.guards.'.$guard.'.provider').'.model' + 'auth.providers.'.$guardProvider.'.model' ); } @@ -97,7 +108,7 @@ class PolicyMakeCommand extends GeneratorCommand if (Str::startsWith($model, '\\')) { $namespacedModel = trim($model, '\\'); } else { - $namespacedModel = $this->laravel->getNamespace().$model; + $namespacedModel = $this->qualifyModel($model); } $model = class_basename(trim($model, '\\')); @@ -126,8 +137,13 @@ class PolicyMakeCommand extends GeneratorCommand array_keys($replace), array_values($replace), $stub ); - return str_replace( - "use {$namespacedModel};\nuse {$namespacedModel};", "use {$namespacedModel};", $stub + return preg_replace( + vsprintf('/use %s;[\r\n]+use %s;/', [ + preg_quote($namespacedModel, '/'), + preg_quote($namespacedModel, '/'), + ]), + "use {$namespacedModel};", + $stub ); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php index fa887edb6..ffe649981 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php @@ -34,7 +34,20 @@ class ProviderMakeCommand extends GeneratorCommand */ protected function getStub() { - return __DIR__.'/stubs/provider.stub'; + return $this->resolveStubPath('/stubs/provider.stub'); + } + + /** + * Resolve the fully-qualified path to the stub. + * + * @param string $stub + * @return string + */ + protected function resolveStubPath($stub) + { + return file_exists($customPath = $this->laravel->basePath(trim($stub, '/'))) + ? $customPath + : __DIR__.$stub; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php index dca0156ab..956a6519e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -36,14 +36,14 @@ class RouteListCommand extends Command /** * The table headers for the command. * - * @var array + * @var string[] */ protected $headers = ['Domain', 'Method', 'URI', 'Name', 'Action', 'Middleware']; /** * The columns to display when using the "compact" flag. * - * @var array + * @var string[] */ protected $compactColumns = ['method', 'uri', 'action']; @@ -67,6 +67,8 @@ class RouteListCommand extends Command */ public function handle() { + $this->router->flushMiddlewareGroups(); + if (empty($this->router->getRoutes())) { return $this->error("Your application doesn't have any routes."); } @@ -89,7 +91,7 @@ class RouteListCommand extends Command return $this->getRouteInformation($route); })->filter()->all(); - if ($sort = $this->option('sort')) { + if (($sort = $this->option('sort')) !== 'precedence') { $routes = $this->sortRoutes($sort, $routes); } @@ -111,8 +113,8 @@ class RouteListCommand extends Command return $this->filterRoute([ 'domain' => $route->domain(), 'method' => implode('|', $route->methods()), - 'uri' => $route->uri(), - 'name' => $route->getName(), + 'uri' => $route->uri(), + 'name' => $route->getName(), 'action' => ltrim($route->getActionName(), '\\'), 'middleware' => $this->getMiddleware($route), ]); @@ -154,7 +156,7 @@ class RouteListCommand extends Command protected function displayRoutes(array $routes) { if ($this->option('json')) { - $this->line(json_encode(array_values($routes))); + $this->line($this->asJson($routes)); return; } @@ -163,7 +165,7 @@ class RouteListCommand extends Command } /** - * Get before filters. + * Get the middleware for the route. * * @param \Illuminate\Routing\Route $route * @return string @@ -189,6 +191,14 @@ class RouteListCommand extends Command return; } + if ($this->option('except-path')) { + foreach (explode(',', $this->option('except-path')) as $path) { + if (Str::contains($route['uri'], $path)) { + return; + } + } + } + return $route; } @@ -243,6 +253,24 @@ class RouteListCommand extends Command return array_map('strtolower', $results); } + /** + * Convert the given routes to JSON. + * + * @param array $routes + * @return string + */ + protected function asJson(array $routes) + { + return collect($routes) + ->map(function ($route) { + $route['middleware'] = empty($route['middleware']) ? [] : explode("\n", $route['middleware']); + + return $route; + }) + ->values() + ->toJson(); + } + /** * Get the console command options. * @@ -256,9 +284,10 @@ class RouteListCommand extends Command ['json', null, InputOption::VALUE_NONE, 'Output the route list as JSON'], ['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method'], ['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name'], - ['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path'], + ['path', null, InputOption::VALUE_OPTIONAL, 'Only show routes matching the given path pattern'], + ['except-path', null, InputOption::VALUE_OPTIONAL, 'Do not display the routes matching the given path pattern'], ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes'], - ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (domain, method, uri, name, action, middleware) to sort by', 'uri'], + ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (precedence, domain, method, uri, name, action, middleware) to sort by', 'uri'], ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php index 111facb53..b6f2a1d3b 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php @@ -3,6 +3,7 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; +use Symfony\Component\Console\Input\InputOption; class RuleMakeCommand extends GeneratorCommand { @@ -27,6 +28,23 @@ class RuleMakeCommand extends GeneratorCommand */ protected $type = 'Rule'; + /** + * Build the class with the given name. + * + * @param string $name + * @return string + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException + */ + protected function buildClass($name) + { + return str_replace( + '{{ ruleType }}', + $this->option('implicit') ? 'ImplicitRule' : 'Rule', + parent::buildClass($name) + ); + } + /** * Get the stub file for the generator. * @@ -51,4 +69,16 @@ class RuleMakeCommand extends GeneratorCommand { return $rootNamespace.'\Rules'; } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['implicit', 'i', InputOption::VALUE_NONE, 'Generate an implicit rule.'], + ]; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php index b931ea227..ddb07e824 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php @@ -4,9 +4,9 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Support\Env; -use Illuminate\Support\ProcessUtils; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Process; class ServeCommand extends Command { @@ -42,9 +42,41 @@ class ServeCommand extends Command { chdir(public_path()); - $this->line("Laravel development server started: http://{$this->host()}:{$this->port()}"); + $this->line("Starting Laravel development server: http://{$this->host()}:{$this->port()}"); - passthru($this->serverCommand(), $status); + $environmentFile = $this->option('env') + ? base_path('.env').'.'.$this->option('env') + : base_path('.env'); + + $hasEnvironment = file_exists($environmentFile); + + $environmentLastModified = $hasEnvironment + ? filemtime($environmentFile) + : now()->addDays(30)->getTimestamp(); + + $process = $this->startProcess($hasEnvironment); + + while ($process->isRunning()) { + if ($hasEnvironment) { + clearstatcache(false, $environmentFile); + } + + if (! $this->option('no-reload') && + $hasEnvironment && + filemtime($environmentFile) > $environmentLastModified) { + $environmentLastModified = filemtime($environmentFile); + + $this->comment('Environment modified. Restarting server...'); + + $process->stop(5); + + $process = $this->startProcess($hasEnvironment); + } + + usleep(500 * 1000); + } + + $status = $process->getExitCode(); if ($status && $this->canTryAnotherPort()) { $this->portOffset += 1; @@ -55,19 +87,51 @@ class ServeCommand extends Command return $status; } + /** + * Start a new server process. + * + * @param bool $hasEnvironment + * @return \Symfony\Component\Process\Process + */ + protected function startProcess($hasEnvironment) + { + $process = new Process($this->serverCommand(), null, collect($_ENV)->mapWithKeys(function ($value, $key) use ($hasEnvironment) { + if ($this->option('no-reload') || ! $hasEnvironment) { + return [$key => $value]; + } + + return in_array($key, [ + 'APP_ENV', + 'LARAVEL_SAIL', + 'PHP_CLI_SERVER_WORKERS', + 'PHP_IDE_CONFIG', + 'SYSTEMROOT', + 'XDEBUG_CONFIG', + 'XDEBUG_MODE', + 'XDEBUG_SESSION', + ]) ? [$key => $value] : [$key => false]; + })->all()); + + $process->start(function ($type, $buffer) { + $this->output->write($buffer); + }); + + return $process; + } + /** * Get the full server command. * - * @return string + * @return array */ protected function serverCommand() { - return sprintf('%s -S %s:%s %s', - ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)), - $this->host(), - $this->port(), - ProcessUtils::escapeArgument(base_path('server.php')) - ); + return [ + (new PhpExecutableFinder)->find(false), + '-S', + $this->host().':'.$this->port(), + base_path('server.php'), + ]; } /** @@ -77,7 +141,9 @@ class ServeCommand extends Command */ protected function host() { - return $this->input->getOption('host'); + [$host, ] = $this->getHostAndPort(); + + return $host; } /** @@ -87,13 +153,34 @@ class ServeCommand extends Command */ protected function port() { - $port = $this->input->getOption('port') ?: 8000; + $port = $this->input->getOption('port'); + + if (is_null($port)) { + [, $port] = $this->getHostAndPort(); + } + + $port = $port ?: 8000; return $port + $this->portOffset; } /** - * Check if command has reached its max amount of port tries. + * Get the host and port from the host option string. + * + * @return array + */ + protected function getHostAndPort() + { + $hostParts = explode(':', $this->input->getOption('host')); + + return [ + $hostParts[0], + $hostParts[1] ?? null, + ]; + } + + /** + * Check if the command has reached its max amount of port tries. * * @return bool */ @@ -112,10 +199,9 @@ class ServeCommand extends Command { return [ ['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on', '127.0.0.1'], - ['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on', Env::get('SERVER_PORT')], - ['tries', null, InputOption::VALUE_OPTIONAL, 'The max number of ports to attempt to serve from', 10], + ['no-reload', null, InputOption::VALUE_NONE, 'Do not reload the development server on .env file changes'], ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php index 81f7a1762..7926d8077 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php @@ -3,8 +3,6 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; -use RuntimeException; -use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem; class StorageLinkCommand extends Command { @@ -13,7 +11,9 @@ class StorageLinkCommand extends Command * * @var string */ - protected $signature = 'storage:link {--relative : Create the symbolic link using relative paths}'; + protected $signature = 'storage:link + {--relative : Create the symbolic link using relative paths} + {--force : Recreate existing symbolic links}'; /** * The console command description. @@ -29,18 +29,25 @@ class StorageLinkCommand extends Command */ public function handle() { + $relative = $this->option('relative'); + foreach ($this->links() as $link => $target) { - if (file_exists($link)) { + if (file_exists($link) && ! $this->isRemovableSymlink($link, $this->option('force'))) { $this->error("The [$link] link already exists."); - } else { - if ($this->option('relative')) { - $target = $this->getRelativeTarget($link, $target); - } - - $this->laravel->make('files')->link($target, $link); - - $this->info("The [$link] link has been connected to [$target]."); + continue; } + + if (is_link($link)) { + $this->laravel->make('files')->delete($link); + } + + if ($relative) { + $this->laravel->make('files')->relativeLink($target, $link); + } else { + $this->laravel->make('files')->link($target, $link); + } + + $this->info("The [$link] link has been connected to [$target]."); } $this->info('The links have been created.'); @@ -58,18 +65,14 @@ class StorageLinkCommand extends Command } /** - * Get the relative path to the target. + * Determine if the provided path is a symlink that can be removed. * * @param string $link - * @param string $target - * @return string + * @param bool $force + * @return bool */ - protected function getRelativeTarget($link, $target) + protected function isRemovableSymlink(string $link, bool $force): bool { - if (! class_exists(SymfonyFilesystem::class)) { - throw new RuntimeException('To enable support for relative links, please install the symfony/filesystem package.'); - } - - return (new SymfonyFilesystem)->makePathRelative($target, dirname($link)); + return is_link($link) && $force; } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php index 55e86a958..4594f07cd 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php @@ -33,24 +33,34 @@ class StubPublishCommand extends Command } $files = [ + __DIR__.'/stubs/cast.stub' => $stubsPath.'/cast.stub', + __DIR__.'/stubs/console.stub' => $stubsPath.'/console.stub', + __DIR__.'/stubs/event.stub' => $stubsPath.'/event.stub', __DIR__.'/stubs/job.queued.stub' => $stubsPath.'/job.queued.stub', __DIR__.'/stubs/job.stub' => $stubsPath.'/job.stub', + __DIR__.'/stubs/mail.stub' => $stubsPath.'/mail.stub', + __DIR__.'/stubs/markdown-mail.stub' => $stubsPath.'/markdown-mail.stub', + __DIR__.'/stubs/markdown-notification.stub' => $stubsPath.'/markdown-notification.stub', __DIR__.'/stubs/model.pivot.stub' => $stubsPath.'/model.pivot.stub', __DIR__.'/stubs/model.stub' => $stubsPath.'/model.stub', + __DIR__.'/stubs/notification.stub' => $stubsPath.'/notification.stub', + __DIR__.'/stubs/observer.plain.stub' => $stubsPath.'/observer.plain.stub', + __DIR__.'/stubs/observer.stub' => $stubsPath.'/observer.stub', + __DIR__.'/stubs/policy.plain.stub' => $stubsPath.'/policy.plain.stub', + __DIR__.'/stubs/policy.stub' => $stubsPath.'/policy.stub', + __DIR__.'/stubs/provider.stub' => $stubsPath.'/provider.stub', __DIR__.'/stubs/request.stub' => $stubsPath.'/request.stub', - __DIR__.'/stubs/resource.stub' => $stubsPath.'/resource.stub', __DIR__.'/stubs/resource-collection.stub' => $stubsPath.'/resource-collection.stub', + __DIR__.'/stubs/resource.stub' => $stubsPath.'/resource.stub', + __DIR__.'/stubs/rule.stub' => $stubsPath.'/rule.stub', __DIR__.'/stubs/test.stub' => $stubsPath.'/test.stub', __DIR__.'/stubs/test.unit.stub' => $stubsPath.'/test.unit.stub', + __DIR__.'/stubs/view-component.stub' => $stubsPath.'/view-component.stub', realpath(__DIR__.'/../../Database/Console/Factories/stubs/factory.stub') => $stubsPath.'/factory.stub', realpath(__DIR__.'/../../Database/Console/Seeds/stubs/seeder.stub') => $stubsPath.'/seeder.stub', realpath(__DIR__.'/../../Database/Migrations/stubs/migration.create.stub') => $stubsPath.'/migration.create.stub', realpath(__DIR__.'/../../Database/Migrations/stubs/migration.stub') => $stubsPath.'/migration.stub', realpath(__DIR__.'/../../Database/Migrations/stubs/migration.update.stub') => $stubsPath.'/migration.update.stub', - realpath(__DIR__.'/../../Foundation/Console/stubs/console.stub') => $stubsPath.'/console.stub', - realpath(__DIR__.'/../../Foundation/Console/stubs/policy.plain.stub') => $stubsPath.'/policy.plain.stub', - realpath(__DIR__.'/../../Foundation/Console/stubs/policy.stub') => $stubsPath.'/policy.stub', - realpath(__DIR__.'/../../Foundation/Console/stubs/rule.stub') => $stubsPath.'/rule.stub', realpath(__DIR__.'/../../Routing/Console/stubs/controller.api.stub') => $stubsPath.'/controller.api.stub', realpath(__DIR__.'/../../Routing/Console/stubs/controller.invokable.stub') => $stubsPath.'/controller.invokable.stub', realpath(__DIR__.'/../../Routing/Console/stubs/controller.model.api.stub') => $stubsPath.'/controller.model.api.stub', diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php index 0a176cbab..eced47b91 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php @@ -4,6 +4,7 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; +use Symfony\Component\Console\Input\InputOption; class TestMakeCommand extends GeneratorCommand { @@ -12,7 +13,7 @@ class TestMakeCommand extends GeneratorCommand * * @var string */ - protected $signature = 'make:test {name : The name of the class} {--unit : Create a unit test}'; + protected $name = 'make:test'; /** * The console command description. @@ -35,9 +36,11 @@ class TestMakeCommand extends GeneratorCommand */ protected function getStub() { - return $this->option('unit') - ? $this->resolveStubPath('/stubs/test.unit.stub') - : $this->resolveStubPath('/stubs/test.stub'); + $suffix = $this->option('unit') ? '.unit.stub' : '.stub'; + + return $this->option('pest') + ? $this->resolveStubPath('/stubs/pest'.$suffix) + : $this->resolveStubPath('/stubs/test'.$suffix); } /** @@ -90,4 +93,17 @@ class TestMakeCommand extends GeneratorCommand { return 'Tests'; } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['unit', 'u', InputOption::VALUE_NONE, 'Create a unit test.'], + ['pest', 'p', InputOption::VALUE_NONE, 'Create a Pest test.'], + ]; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php index 9f6599208..b651247db 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php @@ -4,6 +4,7 @@ namespace Illuminate\Foundation\Console; use Exception; use Illuminate\Console\Command; +use Illuminate\Foundation\Events\MaintenanceModeDisabled; class UpCommand extends Command { @@ -29,14 +30,20 @@ class UpCommand extends Command public function handle() { try { - if (! file_exists(storage_path('framework/down'))) { + if (! is_file(storage_path('framework/down'))) { $this->comment('Application is already up.'); - return true; + return 0; } unlink(storage_path('framework/down')); + if (is_file(storage_path('framework/maintenance.php'))) { + unlink(storage_path('framework/maintenance.php')); + } + + $this->laravel->get('events')->dispatch(MaintenanceModeDisabled::class); + $this->info('Application is now live.'); } catch (Exception $e) { $this->error('Failed to disable maintenance mode.'); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php index 17a459e72..db28b9e6b 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php @@ -4,6 +4,7 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; +use Illuminate\Foundation\Events\VendorTagPublished; use Illuminate\Support\Arr; use Illuminate\Support\ServiceProvider; use League\Flysystem\Adapter\Local as LocalAdapter; @@ -159,14 +160,18 @@ class VendorPublishCommand extends Command { $published = false; - foreach ($this->pathsToPublish($tag) as $from => $to) { + $pathsToPublish = $this->pathsToPublish($tag); + + foreach ($pathsToPublish as $from => $to) { $this->publishItem($from, $to); $published = true; } if ($published === false) { - $this->error('Unable to locate publishable resources.'); + $this->comment('No publishable resources for tag ['.$tag.'].'); + } else { + $this->laravel['events']->dispatch(new VendorTagPublished($tag, $pathsToPublish)); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub index 26bfd985e..25d35b68e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub @@ -1,10 +1,10 @@ = time()) { + return; + } +} + +// Redirect to the proper path if necessary... +if (isset($data['redirect']) && $_SERVER['REQUEST_URI'] !== $data['redirect']) { + http_response_code(302); + header('Location: '.$data['redirect']); + + exit; +} + +// Output the prerendered template... +http_response_code($data['status'] ?? 503); + +if (isset($data['retry'])) { + header('Retry-After: '.$data['retry']); +} + +if (isset($data['refresh'])) { + header('Refresh: '.$data['refresh']); +} + +echo $data['template']; + +exit; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub index 7bf41616d..e4c7cd4b9 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub @@ -1,13 +1,13 @@ markdown('DummyView'); + return $this->markdown('{{ view }}'); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub index a2c060d63..5438f0455 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub @@ -1,13 +1,13 @@ markdown('DummyView'); + return (new MailMessage)->markdown('{{ view }}'); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub index 279313ea1..2956d090e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub @@ -2,9 +2,10 @@ namespace {{ namespace }}; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class {{ class }} extends Model { - // + use HasFactory; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/notification.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/notification.stub index ae56ec0c2..b170a463c 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/notification.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/notification.stub @@ -1,13 +1,13 @@ get('/'); + + $response->assertStatus(200); +}); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/pest.unit.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/pest.unit.stub new file mode 100644 index 000000000..61cd84c32 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/pest.unit.stub @@ -0,0 +1,5 @@ +toBeTrue(); +}); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub index 969963e2d..985babb51 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub @@ -14,7 +14,7 @@ class {{ class }} * Determine whether the user can view any models. * * @param \{{ namespacedUserModel }} $user - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function viewAny({{ user }} $user) { @@ -26,7 +26,7 @@ class {{ class }} * * @param \{{ namespacedUserModel }} $user * @param \{{ namespacedModel }} ${{ modelVariable }} - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function view({{ user }} $user, {{ model }} ${{ modelVariable }}) { @@ -37,7 +37,7 @@ class {{ class }} * Determine whether the user can create models. * * @param \{{ namespacedUserModel }} $user - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function create({{ user }} $user) { @@ -49,7 +49,7 @@ class {{ class }} * * @param \{{ namespacedUserModel }} $user * @param \{{ namespacedModel }} ${{ modelVariable }} - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function update({{ user }} $user, {{ model }} ${{ modelVariable }}) { @@ -61,7 +61,7 @@ class {{ class }} * * @param \{{ namespacedUserModel }} $user * @param \{{ namespacedModel }} ${{ modelVariable }} - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function delete({{ user }} $user, {{ model }} ${{ modelVariable }}) { @@ -73,7 +73,7 @@ class {{ class }} * * @param \{{ namespacedUserModel }} $user * @param \{{ namespacedModel }} ${{ modelVariable }} - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function restore({{ user }} $user, {{ model }} ${{ modelVariable }}) { @@ -85,7 +85,7 @@ class {{ class }} * * @param \{{ namespacedUserModel }} $user * @param \{{ namespacedModel }} ${{ modelVariable }} - * @return mixed + * @return \Illuminate\Auth\Access\Response|bool */ public function forceDelete({{ user }} $user, {{ model }} ${{ modelVariable }}) { diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub index fcd5d1241..6dedc5842 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub @@ -1,10 +1,10 @@ get('/'); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.unit.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.unit.stub index 98af65293..b6816aa72 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.unit.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.unit.stub @@ -11,7 +11,7 @@ class {{ class }} extends TestCase * * @return void */ - public function testExample() + public function test_example() { $this->assertTrue(true); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub index 20cdaa2a8..eab8fd353 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub @@ -1,10 +1,10 @@ files()->in($listenerPath), $basePath - ))->mapToDictionary(function ($event, $listener) { - return [$event => $listener]; - })->all(); + )); + + $discoveredEvents = []; + + foreach ($listeners as $listener => $events) { + foreach ($events as $event) { + if (! isset($discoveredEvents[$event])) { + $discoveredEvents[$event] = []; + } + + $discoveredEvents[$event][] = $listener; + } + } + + return $discoveredEvents; } /** @@ -59,7 +71,7 @@ class DiscoverEvents } $listenerEvents[$listener->name.'@'.$method->name] = - Reflector::getParameterClassName($method->getParameters()[0]); + Reflector::getParameterClassNames($method->getParameters()[0]); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php index c2acd7759..ff633150f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php @@ -18,6 +18,7 @@ trait Dispatchable * Dispatch the event with the given arguments if the given truth test passes. * * @param bool $boolean + * @param mixed ...$arguments * @return void */ public static function dispatchIf($boolean, ...$arguments) @@ -31,6 +32,7 @@ trait Dispatchable * Dispatch the event with the given arguments unless the given truth test passes. * * @param bool $boolean + * @param mixed ...$arguments * @return void */ public static function dispatchUnless($boolean, ...$arguments) diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Events/MaintenanceModeDisabled.php b/vendor/laravel/framework/src/Illuminate/Foundation/Events/MaintenanceModeDisabled.php new file mode 100644 index 000000000..f8edf47d0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Events/MaintenanceModeDisabled.php @@ -0,0 +1,8 @@ +tag = $tag; + $this->paths = $paths; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php index 923e6c6d1..444caf709 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php @@ -2,6 +2,7 @@ namespace Illuminate\Foundation\Exceptions; +use Closure; use Exception; use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\AuthenticationException; @@ -10,6 +11,8 @@ use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract; use Illuminate\Contracts\Support\Responsable; use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\MultipleRecordsFoundException; +use Illuminate\Database\RecordsNotFoundException; use Illuminate\Http\Exceptions\HttpResponseException; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; @@ -18,10 +21,11 @@ use Illuminate\Routing\Router; use Illuminate\Session\TokenMismatchException; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\View; use Illuminate\Support\Reflector; +use Illuminate\Support\Traits\ReflectsClosures; use Illuminate\Support\ViewErrorBag; use Illuminate\Validation\ValidationException; +use InvalidArgumentException; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Application as ConsoleApplication; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; @@ -38,6 +42,8 @@ use Whoops\Run as Whoops; class Handler implements ExceptionHandlerContract { + use ReflectsClosures; + /** * The container implementation. * @@ -48,14 +54,35 @@ class Handler implements ExceptionHandlerContract /** * A list of the exception types that are not reported. * - * @var array + * @var string[] */ protected $dontReport = []; + /** + * The callbacks that should be used during reporting. + * + * @var \Illuminate\Foundation\Exceptions\ReportableHandler[] + */ + protected $reportCallbacks = []; + + /** + * The callbacks that should be used during rendering. + * + * @var \Closure[] + */ + protected $renderCallbacks = []; + + /** + * The registered exception mappings. + * + * @var array + */ + protected $exceptionMap = []; + /** * A list of the internal exception types that should not be reported. * - * @var array + * @var string[] */ protected $internalDontReport = [ AuthenticationException::class, @@ -63,6 +90,8 @@ class Handler implements ExceptionHandlerContract HttpException::class, HttpResponseException::class, ModelNotFoundException::class, + MultipleRecordsFoundException::class, + RecordsNotFoundException::class, SuspiciousOperationException::class, TokenMismatchException::class, ValidationException::class, @@ -71,9 +100,10 @@ class Handler implements ExceptionHandlerContract /** * A list of the inputs that are never flashed for validation exceptions. * - * @var array + * @var string[] */ protected $dontFlash = [ + 'current_password', 'password', 'password_confirmation', ]; @@ -87,6 +117,95 @@ class Handler implements ExceptionHandlerContract public function __construct(Container $container) { $this->container = $container; + + $this->register(); + } + + /** + * Register the exception handling callbacks for the application. + * + * @return void + */ + public function register() + { + // + } + + /** + * Register a reportable callback. + * + * @param callable $reportUsing + * @return \Illuminate\Foundation\Exceptions\ReportableHandler + */ + public function reportable(callable $reportUsing) + { + if (! $reportUsing instanceof Closure) { + $reportUsing = Closure::fromCallable($reportUsing); + } + + return tap(new ReportableHandler($reportUsing), function ($callback) { + $this->reportCallbacks[] = $callback; + }); + } + + /** + * Register a renderable callback. + * + * @param callable $renderUsing + * @return $this + */ + public function renderable(callable $renderUsing) + { + if (! $renderUsing instanceof Closure) { + $renderUsing = Closure::fromCallable($renderUsing); + } + + $this->renderCallbacks[] = $renderUsing; + + return $this; + } + + /** + * Register a new exception mapping. + * + * @param \Closure|string $from + * @param \Closure|string|null $to + * @return $this + * + * @throws \InvalidArgumentException + */ + public function map($from, $to = null) + { + if (is_string($to)) { + $to = function ($exception) use ($to) { + return new $to('', 0, $exception); + }; + } + + if (is_callable($from) && is_null($to)) { + $from = $this->firstClosureParameterType($to = $from); + } + + if (! is_string($from) || ! $to instanceof Closure) { + throw new InvalidArgumentException('Invalid exception mapping.'); + } + + $this->exceptionMap[$from] = $to; + + return $this; + } + + /** + * Indicate that the given exception type should not be reported. + * + * @param string $class + * @return $this + */ + protected function ignore(string $class) + { + $this->dontReport[] = $class; + + return $this; } /** @@ -99,14 +218,24 @@ class Handler implements ExceptionHandlerContract */ public function report(Throwable $e) { + $e = $this->mapException($e); + if ($this->shouldntReport($e)) { return; } if (Reflector::isCallable($reportCallable = [$e, 'report'])) { - $this->container->call($reportCallable); + if ($this->container->call($reportCallable) !== false) { + return; + } + } - return; + foreach ($this->reportCallbacks as $reportCallback) { + if ($reportCallback->handles($e)) { + if ($reportCallback($e) === false) { + return; + } + } } try { @@ -159,6 +288,10 @@ class Handler implements ExceptionHandlerContract */ protected function exceptionContext(Throwable $e) { + if (method_exists($e, 'context')) { + return $e->context(); + } + return []; } @@ -196,7 +329,19 @@ class Handler implements ExceptionHandlerContract return $e->toResponse($request); } - $e = $this->prepareException($e); + $e = $this->prepareException($this->mapException($e)); + + foreach ($this->renderCallbacks as $renderCallback) { + foreach ($this->firstClosureParameterTypes($renderCallback) as $type) { + if (is_a($e, $type)) { + $response = $renderCallback($e, $request); + + if (! is_null($response)) { + return $response; + } + } + } + } if ($e instanceof HttpResponseException) { return $e->getResponse(); @@ -206,11 +351,28 @@ class Handler implements ExceptionHandlerContract return $this->convertValidationExceptionToResponse($e, $request); } - return $request->expectsJson() + return $this->shouldReturnJson($request, $e) ? $this->prepareJsonResponse($request, $e) : $this->prepareResponse($request, $e); } + /** + * Map the exception using a registered mapper if possible. + * + * @param \Throwable $e + * @return \Throwable + */ + protected function mapException(Throwable $e) + { + foreach ($this->exceptionMap as $class => $mapper) { + if (is_a($e, $class)) { + return $mapper($e); + } + } + + return $e; + } + /** * Prepare exception for rendering. * @@ -227,6 +389,8 @@ class Handler implements ExceptionHandlerContract $e = new HttpException(419, $e->getMessage(), $e); } elseif ($e instanceof SuspiciousOperationException) { $e = new NotFoundHttpException('Bad hostname provided.', $e); + } elseif ($e instanceof RecordsNotFoundException) { + $e = new NotFoundHttpException('Not found.', $e); } return $e; @@ -241,7 +405,7 @@ class Handler implements ExceptionHandlerContract */ protected function unauthenticated($request, AuthenticationException $exception) { - return $request->expectsJson() + return $this->shouldReturnJson($request, $exception) ? response()->json(['message' => $exception->getMessage()], 401) : redirect()->guest($exception->redirectTo() ?? route('login')); } @@ -259,7 +423,7 @@ class Handler implements ExceptionHandlerContract return $e->response; } - return $request->expectsJson() + return $this->shouldReturnJson($request, $e) ? $this->invalidJson($request, $e) : $this->invalid($request, $e); } @@ -275,7 +439,7 @@ class Handler implements ExceptionHandlerContract { return redirect($exception->redirectTo ?? url()->previous()) ->withInput(Arr::except($request->input(), $this->dontFlash)) - ->withErrors($exception->errors(), $exception->errorBag); + ->withErrors($exception->errors(), $request->input('_error_bag', $exception->errorBag)); } /** @@ -293,6 +457,18 @@ class Handler implements ExceptionHandlerContract ], $exception->status); } + /** + * Determine if the exception handler response should be JSON. + * + * @param \Illuminate\Http\Request $request + * @param \Throwable $e + * @return bool + */ + protected function shouldReturnJson($request, Throwable $e) + { + return $request->expectsJson(); + } + /** * Prepare a response for the given exception. * @@ -419,11 +595,7 @@ class Handler implements ExceptionHandlerContract */ protected function registerErrorViewPaths() { - $paths = collect(config('view.paths')); - - View::replaceNamespace('errors', $paths->map(function ($path) { - return "{$path}/errors"; - })->push(__DIR__.'/views')->all()); + (new RegisterErrorViewPaths)(); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php new file mode 100644 index 000000000..c88f3261a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php @@ -0,0 +1,20 @@ +map(function ($path) { + return "{$path}/errors"; + })->push(__DIR__.'/views')->all()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/ReportableHandler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/ReportableHandler.php new file mode 100644 index 000000000..06a6172f5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/ReportableHandler.php @@ -0,0 +1,82 @@ +callback = $callback; + } + + /** + * Invoke the handler. + * + * @param \Throwable $e + * @return bool + */ + public function __invoke(Throwable $e) + { + $result = call_user_func($this->callback, $e); + + if ($result === false) { + return false; + } + + return ! $this->shouldStop; + } + + /** + * Determine if the callback handles the given exception. + * + * @param \Throwable $e + * @return bool + */ + public function handles(Throwable $e) + { + foreach ($this->firstClosureParameterTypes($this->callback) as $type) { + if (is_a($e, $type)) { + return true; + } + } + + return false; + } + + /** + * Indicate that report handling should stop after invoking this callback. + * + * @return $this + */ + public function stop() + { + $this->shouldStop = true; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php index acd38100a..c5a9dde14 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php @@ -2,4 +2,4 @@ @section('title', __('Service Unavailable')) @section('code', '503') -@section('message', __($exception->getMessage() ?: 'Service Unavailable')) +@section('message', __('Service Unavailable')) diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php index 64eb7cbb8..2e5b8240b 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php @@ -7,8 +7,8 @@ @yield('title') - - + + + + - -
    -
    - @yield('code') -
    + +
    +
    +
    +
    + @yield('code') +
    -
    - @yield('message') +
    + @yield('message') +
    +
    diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php index 9fe9ffd68..5553fde62 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php @@ -7,6 +7,9 @@ use Illuminate\Support\Facades\Date; use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; use Throwable; +/** + * @deprecated Will be removed in a future Laravel version. + */ class MaintenanceModeException extends ServiceUnavailableHttpException { /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php index 96169f3ce..a20dffe2f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php @@ -3,6 +3,7 @@ namespace Illuminate\Foundation\Http; use Illuminate\Auth\Access\AuthorizationException; +use Illuminate\Auth\Access\Response; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Validation\Factory as ValidationFactory; use Illuminate\Contracts\Validation\ValidatesWhenResolved; @@ -58,6 +59,13 @@ class FormRequest extends Request implements ValidatesWhenResolved */ protected $errorBag = 'default'; + /** + * Indicates whether validation should stop after the first rule failure. + * + * @var bool + */ + protected $stopOnFirstFailure = false; + /** * The validator instance. * @@ -104,7 +112,7 @@ class FormRequest extends Request implements ValidatesWhenResolved return $factory->make( $this->validationData(), $this->container->call([$this, 'rules']), $this->messages(), $this->attributes() - ); + )->stopOnFirstFailure($this->stopOnFirstFailure); } /** @@ -156,11 +164,15 @@ class FormRequest extends Request implements ValidatesWhenResolved * Determine if the request passes the authorization check. * * @return bool + * + * @throws \Illuminate\Auth\Access\AuthorizationException */ protected function passesAuthorization() { if (method_exists($this, 'authorize')) { - return $this->container->call([$this, 'authorize']); + $result = $this->container->call([$this, 'authorize']); + + return $result instanceof Response ? $result->authorize() : $result; } return true; @@ -178,6 +190,19 @@ class FormRequest extends Request implements ValidatesWhenResolved throw new AuthorizationException; } + /** + * Get a validated input container for the validated input. + * + * @param array|null $keys + * @return \Illuminate\Support\ValidatedInput|array + */ + public function safe(array $keys = null) + { + return is_array($keys) + ? $this->validator->safe()->only($keys) + : $this->validator->safe(); + } + /** * Get the validated data from the request. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php index 38f2fd6c0..fa8d9aad3 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php @@ -31,7 +31,7 @@ class Kernel implements KernelContract /** * The bootstrap classes for the application. * - * @var array + * @var string[] */ protected $bootstrappers = [ \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class, @@ -68,13 +68,15 @@ class Kernel implements KernelContract * * Forces non-global middleware to always be in the given order. * - * @var array + * @var string[] */ protected $middlewarePriority = [ + \Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class, \Illuminate\Routing\Middleware\ThrottleRequests::class, + \Illuminate\Routing\Middleware\ThrottleRequestsWithRedis::class, \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Auth\Middleware\Authorize::class, @@ -253,7 +255,7 @@ class Kernel implements KernelContract } /** - * Add a new middleware to beginning of the stack if it does not already exist. + * Add a new middleware to the beginning of the stack if it does not already exist. * * @param string $middleware * @return $this @@ -382,6 +384,16 @@ class Kernel implements KernelContract } } + /** + * Get the priority-sorted list of middleware. + * + * @return array + */ + public function getMiddlewarePriority() + { + return $this->middlewarePriority; + } + /** * Get the bootstrap classes for the application. * @@ -444,4 +456,17 @@ class Kernel implements KernelContract { return $this->app; } + + /** + * Set the Laravel application instance. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return $this + */ + public function setApplication(Application $app) + { + $this->app = $app; + + return $this; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/MaintenanceModeBypassCookie.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/MaintenanceModeBypassCookie.php new file mode 100644 index 000000000..ecb6fb95e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/MaintenanceModeBypassCookie.php @@ -0,0 +1,43 @@ +addHours(12); + + return new Cookie('laravel_maintenance', base64_encode(json_encode([ + 'expires_at' => $expiresAt->getTimestamp(), + 'mac' => hash_hmac('sha256', $expiresAt->getTimestamp(), $key), + ])), $expiresAt); + } + + /** + * Determine if the given maintenance mode bypass cookie is valid. + * + * @param string $cookie + * @param string $key + * @return bool + */ + public static function isValid(string $cookie, string $key) + { + $payload = json_decode(base64_decode($cookie), true); + + return is_array($payload) && + is_numeric($payload['expires_at'] ?? null) && + isset($payload['mac']) && + hash_equals(hash_hmac('sha256', $payload['expires_at'], $key), $payload['mac']) && + (int) $payload['expires_at'] >= Carbon::now()->getTimestamp(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php index 5a34d1860..01a14b44b 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php @@ -2,85 +2,7 @@ namespace Illuminate\Foundation\Http\Middleware; -use Closure; -use Illuminate\Contracts\Foundation\Application; -use Illuminate\Foundation\Http\Exceptions\MaintenanceModeException; -use Symfony\Component\HttpFoundation\IpUtils; - -class CheckForMaintenanceMode +class CheckForMaintenanceMode extends PreventRequestsDuringMaintenance { - /** - * The application implementation. - * - * @var \Illuminate\Contracts\Foundation\Application - */ - protected $app; - - /** - * The URIs that should be accessible while maintenance mode is enabled. - * - * @var array - */ - protected $except = []; - - /** - * Create a new middleware instance. - * - * @param \Illuminate\Contracts\Foundation\Application $app - * @return void - */ - public function __construct(Application $app) - { - $this->app = $app; - } - - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed - * - * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * @throws \Illuminate\Foundation\Http\Exceptions\MaintenanceModeException - */ - public function handle($request, Closure $next) - { - if ($this->app->isDownForMaintenance()) { - $data = json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true); - - if (isset($data['allowed']) && IpUtils::checkIp($request->ip(), (array) $data['allowed'])) { - return $next($request); - } - - if ($this->inExceptArray($request)) { - return $next($request); - } - - throw new MaintenanceModeException($data['time'], $data['retry'], $data['message']); - } - - return $next($request); - } - - /** - * Determine if the request has a URI that should be accessible in maintenance mode. - * - * @param \Illuminate\Http\Request $request - * @return bool - */ - protected function inExceptArray($request) - { - foreach ($this->except as $except) { - if ($except !== '/') { - $except = trim($except, '/'); - } - - if ($request->fullUrlIs($except) || $request->is($except)) { - return true; - } - } - - return false; - } + // } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php index 813c9cf12..d19a07fa4 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php @@ -2,8 +2,35 @@ namespace Illuminate\Foundation\Http\Middleware; +use Closure; + class ConvertEmptyStringsToNull extends TransformsRequest { + /** + * All of the registered skip callbacks. + * + * @var array + */ + protected static $skipCallbacks = []; + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + foreach (static::$skipCallbacks as $callback) { + if ($callback($request)) { + return $next($request); + } + } + + return parent::handle($request, $next); + } + /** * Transform the given value. * @@ -15,4 +42,15 @@ class ConvertEmptyStringsToNull extends TransformsRequest { return is_string($value) && $value === '' ? null : $value; } + + /** + * Register a callback that instructs the middleware to be skipped. + * + * @param \Closure $callback + * @return void + */ + public static function skipWhen(Closure $callback) + { + static::$skipCallbacks[] = $callback; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php new file mode 100644 index 000000000..a8692bc4f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -0,0 +1,166 @@ +app = $app; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + * + * @throws \Symfony\Component\HttpKernel\Exception\HttpException + */ + public function handle($request, Closure $next) + { + if ($this->app->isDownForMaintenance()) { + $data = json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true); + + if (isset($data['secret']) && $request->path() === $data['secret']) { + return $this->bypassResponse($data['secret']); + } + + if ($this->hasValidBypassCookie($request, $data) || + $this->inExceptArray($request)) { + return $next($request); + } + + if (isset($data['redirect'])) { + $path = $data['redirect'] === '/' + ? $data['redirect'] + : trim($data['redirect'], '/'); + + if ($request->path() !== $path) { + return redirect($path); + } + } + + if (isset($data['template'])) { + return response( + $data['template'], + $data['status'] ?? 503, + $this->getHeaders($data) + ); + } + + throw new HttpException( + $data['status'] ?? 503, + 'Service Unavailable', + null, + $this->getHeaders($data) + ); + } + + return $next($request); + } + + /** + * Determine if the incoming request has a maintenance mode bypass cookie. + * + * @param \Illuminate\Http\Request $request + * @param array $data + * @return bool + */ + protected function hasValidBypassCookie($request, array $data) + { + return isset($data['secret']) && + $request->cookie('laravel_maintenance') && + MaintenanceModeBypassCookie::isValid( + $request->cookie('laravel_maintenance'), + $data['secret'] + ); + } + + /** + * Determine if the request has a URI that should be accessible in maintenance mode. + * + * @param \Illuminate\Http\Request $request + * @return bool + */ + protected function inExceptArray($request) + { + foreach ($this->except as $except) { + if ($except !== '/') { + $except = trim($except, '/'); + } + + if ($request->fullUrlIs($except) || $request->is($except)) { + return true; + } + } + + return false; + } + + /** + * Redirect the user back to the root of the application with a maintenance mode bypass cookie. + * + * @param string $secret + * @return \Illuminate\Http\RedirectResponse + */ + protected function bypassResponse(string $secret) + { + return redirect('/')->withCookie( + MaintenanceModeBypassCookie::create($secret) + ); + } + + /** + * Get the headers that should be sent with the response. + * + * @param array $data + * @return array + */ + protected function getHeaders($data) + { + $headers = isset($data['retry']) ? ['Retry-After' => $data['retry']] : []; + + if (isset($data['refresh'])) { + $headers['Refresh'] = $data['refresh']; + } + + return $headers; + } + + /** + * Get the URIs that should be accessible even when maintenance mode is enabled. + * + * @return array + */ + public function getExcludedPaths() + { + return $this->except; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php index a61a1bd72..fca34f837 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php @@ -58,9 +58,11 @@ class TransformsRequest */ protected function cleanArray(array $data, $keyPrefix = '') { - return collect($data)->map(function ($value, $key) use ($keyPrefix) { - return $this->cleanValue($keyPrefix.$key, $value); - })->all(); + foreach ($data as $key => $value) { + $data[$key] = $this->cleanValue($keyPrefix.$key, $value); + } + + return collect($data)->all(); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php index 4c8d1ddba..fe8f8f872 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php @@ -2,8 +2,17 @@ namespace Illuminate\Foundation\Http\Middleware; +use Closure; + class TrimStrings extends TransformsRequest { + /** + * All of the registered skip callbacks. + * + * @var array + */ + protected static $skipCallbacks = []; + /** * The attributes that should not be trimmed. * @@ -13,6 +22,24 @@ class TrimStrings extends TransformsRequest // ]; + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + foreach (static::$skipCallbacks as $callback) { + if ($callback($request)) { + return $next($request); + } + } + + return parent::handle($request, $next); + } + /** * Transform the given value. * @@ -28,4 +55,15 @@ class TrimStrings extends TransformsRequest return is_string($value) ? trim($value) : $value; } + + /** + * Register a callback that instructs the middleware to be skipped. + * + * @param \Closure $callback + * @return void + */ + public static function skipWhen(Closure $callback) + { + static::$skipCallbacks[] = $callback; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php b/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php index 6023f5635..0ca44fd62 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php @@ -23,15 +23,20 @@ class Inspiring 'Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant', 'An unexamined life is not worth living. - Socrates', 'Be present above all else. - Naval Ravikant', + 'Do what you can, with what you have, where you are. - Theodore Roosevelt', 'Happiness is not something readymade. It comes from your own actions. - Dalai Lama', 'He who is contented is rich. - Laozi', - 'I begin to speak only when I am certain what I will say is not better left unsaid - Cato the Younger', + 'I begin to speak only when I am certain what I will say is not better left unsaid. - Cato the Younger', + 'I have not failed. I\'ve just found 10,000 ways that won\'t work. - Thomas Edison', 'If you do not have a consistent goal in life, you can not live it in a consistent way. - Marcus Aurelius', + 'It is never too late to be what you might have been. - George Eliot', 'It is not the man who has too little, but the man who craves more, that is poor. - Seneca', 'It is quality rather than quantity that matters. - Lucius Annaeus Seneca', 'Knowing is not enough; we must apply. Being willing is not enough; we must do. - Leonardo da Vinci', 'Let all your things have their places; let each part of your business have its time. - Benjamin Franklin', + 'Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi', 'No surplus words or unnecessary actions. - Marcus Aurelius', + 'Nothing worth having comes easy. - Theodore Roosevelt', 'Order your soul. Reduce your wants. - Augustine', 'People find pleasure in different ways. I find it in keeping my mind clear. - Marcus Aurelius', 'Simplicity is an acquired taste. - Katharine Gerould', @@ -41,10 +46,16 @@ class Inspiring 'Smile, breathe, and go slowly. - Thich Nhat Hanh', 'The only way to do great work is to love what you do. - Steve Jobs', 'The whole future lies in uncertainty: live immediately. - Seneca', - 'Very little is needed to make a happy life. - Marcus Antoninus', + 'Very little is needed to make a happy life. - Marcus Aurelius', 'Waste no more time arguing what a good man should be, be one. - Marcus Aurelius', 'Well begun is half done. - Aristotle', 'When there is no desire, all things are at peace. - Laozi', + 'Walk as if you are kissing the Earth with your feet. - Thich Nhat Hanh', + 'Because you are alive, everything is possible. - Thich Nhat Hanh', + 'Breathing in, I calm body and mind. Breathing out, I smile. - Thich Nhat Hanh', + 'Life is available only in the present moment. - Thich Nhat Hanh', + 'The best way to take care of the future is to take care of the present moment. - Thich Nhat Hanh', + 'Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less. - Marie Curie', ])->random(); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php b/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php index 271d7dbd6..edd481787 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php @@ -29,9 +29,15 @@ class Mix $manifestDirectory = "/{$manifestDirectory}"; } - if (file_exists(public_path($manifestDirectory.'/hot'))) { + if (is_file(public_path($manifestDirectory.'/hot'))) { $url = rtrim(file_get_contents(public_path($manifestDirectory.'/hot'))); + $customUrl = app('config')->get('app.mix_hot_proxy_url'); + + if (! empty($customUrl)) { + return new HtmlString("{$customUrl}{$path}"); + } + if (Str::startsWith($url, ['http://', 'https://'])) { return new HtmlString(Str::after($url, ':').$path); } @@ -42,7 +48,7 @@ class Mix $manifestPath = public_path($manifestDirectory.'/mix-manifest.json'); if (! isset($manifests[$manifestPath])) { - if (! file_exists($manifestPath)) { + if (! is_file($manifestPath)) { throw new Exception('The Mix manifest does not exist.'); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php b/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php index 9356cef02..202a8beb2 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php @@ -102,11 +102,11 @@ class PackageManifest return $this->manifest; } - if (! file_exists($this->manifestPath)) { + if (! is_file($this->manifestPath)) { $this->build(); } - return $this->manifest = file_exists($this->manifestPath) ? + return $this->manifest = is_file($this->manifestPath) ? $this->files->getRequire($this->manifestPath) : []; } @@ -154,7 +154,7 @@ class PackageManifest */ protected function packagesToIgnore() { - if (! file_exists($this->basePath.'/composer.json')) { + if (! is_file($this->basePath.'/composer.json')) { return []; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php index c76251739..e003ab12c 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php @@ -6,10 +6,17 @@ use Illuminate\Auth\Console\ClearResetsCommand; use Illuminate\Cache\Console\CacheTableCommand; use Illuminate\Cache\Console\ClearCommand as CacheClearCommand; use Illuminate\Cache\Console\ForgetCommand as CacheForgetCommand; +use Illuminate\Console\Scheduling\ScheduleClearCacheCommand; use Illuminate\Console\Scheduling\ScheduleFinishCommand; +use Illuminate\Console\Scheduling\ScheduleListCommand; use Illuminate\Console\Scheduling\ScheduleRunCommand; +use Illuminate\Console\Scheduling\ScheduleTestCommand; +use Illuminate\Console\Scheduling\ScheduleWorkCommand; use Illuminate\Contracts\Support\DeferrableProvider; +use Illuminate\Database\Console\DbCommand; +use Illuminate\Database\Console\DumpCommand; use Illuminate\Database\Console\Factories\FactoryMakeCommand; +use Illuminate\Database\Console\PruneCommand; use Illuminate\Database\Console\Seeds\SeedCommand; use Illuminate\Database\Console\Seeds\SeederMakeCommand; use Illuminate\Database\Console\WipeCommand; @@ -55,12 +62,18 @@ use Illuminate\Foundation\Console\VendorPublishCommand; use Illuminate\Foundation\Console\ViewCacheCommand; use Illuminate\Foundation\Console\ViewClearCommand; use Illuminate\Notifications\Console\NotificationTableCommand; +use Illuminate\Queue\Console\BatchesTableCommand; +use Illuminate\Queue\Console\ClearCommand as QueueClearCommand; use Illuminate\Queue\Console\FailedTableCommand; use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand; use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand; use Illuminate\Queue\Console\ListenCommand as QueueListenCommand; use Illuminate\Queue\Console\ListFailedCommand as ListFailedQueueCommand; +use Illuminate\Queue\Console\MonitorCommand as QueueMonitorCommand; +use Illuminate\Queue\Console\PruneBatchesCommand as PruneBatchesQueueCommand; +use Illuminate\Queue\Console\PruneFailedJobsCommand; use Illuminate\Queue\Console\RestartCommand as QueueRestartCommand; +use Illuminate\Queue\Console\RetryBatchCommand as QueueRetryBatchCommand; use Illuminate\Queue\Console\RetryCommand as QueueRetryCommand; use Illuminate\Queue\Console\TableCommand; use Illuminate\Queue\Console\WorkCommand as QueueWorkCommand; @@ -83,6 +96,8 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid 'ClearResets' => 'command.auth.resets.clear', 'ConfigCache' => 'command.config.cache', 'ConfigClear' => 'command.config.clear', + 'Db' => DbCommand::class, + 'DbPrune' => 'command.db.prune', 'DbWipe' => 'command.db.wipe', 'Down' => 'command.down', 'Environment' => 'command.environment', @@ -93,19 +108,29 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid 'Optimize' => 'command.optimize', 'OptimizeClear' => 'command.optimize.clear', 'PackageDiscover' => 'command.package.discover', + 'QueueClear' => 'command.queue.clear', 'QueueFailed' => 'command.queue.failed', 'QueueFlush' => 'command.queue.flush', 'QueueForget' => 'command.queue.forget', 'QueueListen' => 'command.queue.listen', + 'QueueMonitor' => 'command.queue.monitor', + 'QueuePruneBatches' => 'command.queue.prune-batches', + 'QueuePruneFailedJobs' => 'command.queue.prune-failed-jobs', 'QueueRestart' => 'command.queue.restart', 'QueueRetry' => 'command.queue.retry', + 'QueueRetryBatch' => 'command.queue.retry-batch', 'QueueWork' => 'command.queue.work', 'RouteCache' => 'command.route.cache', 'RouteClear' => 'command.route.clear', 'RouteList' => 'command.route.list', + 'SchemaDump' => 'command.schema.dump', 'Seed' => 'command.seed', 'ScheduleFinish' => ScheduleFinishCommand::class, + 'ScheduleList' => ScheduleListCommand::class, 'ScheduleRun' => ScheduleRunCommand::class, + 'ScheduleClearCache' => ScheduleClearCacheCommand::class, + 'ScheduleTest' => ScheduleTestCommand::class, + 'ScheduleWork' => ScheduleWorkCommand::class, 'StorageLink' => 'command.storage.link', 'Up' => 'command.up', 'ViewCache' => 'command.view.cache', @@ -140,6 +165,7 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid 'ProviderMake' => 'command.provider.make', 'QueueFailedTable' => 'command.queue.failed-table', 'QueueTable' => 'command.queue.table', + 'QueueBatchesTable' => 'command.queue.batches-table', 'RequestMake' => 'command.request.make', 'ResourceMake' => 'command.resource.make', 'RuleMake' => 'command.rule.make', @@ -322,6 +348,28 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerDbCommand() + { + $this->app->singleton(DbCommand::class); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerDbPruneCommand() + { + $this->app->singleton('command.db.prune', function ($app) { + return new PruneCommand($app['events']); + }); + } + /** * Register the command. * @@ -438,7 +486,7 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid protected function registerEventListCommand() { $this->app->singleton('command.event.list', function () { - return new EventListCommand(); + return new EventListCommand; }); } @@ -658,6 +706,42 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerQueueMonitorCommand() + { + $this->app->singleton('command.queue.monitor', function ($app) { + return new QueueMonitorCommand($app['queue'], $app['events']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueuePruneBatchesCommand() + { + $this->app->singleton('command.queue.prune-batches', function () { + return new PruneBatchesQueueCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueuePruneFailedJobsCommand() + { + $this->app->singleton('command.queue.prune-failed-jobs', function () { + return new PruneFailedJobsCommand; + }); + } + /** * Register the command. * @@ -682,6 +766,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerQueueRetryBatchCommand() + { + $this->app->singleton('command.queue.retry-batch', function () { + return new QueueRetryBatchCommand; + }); + } + /** * Register the command. * @@ -694,6 +790,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerQueueClearCommand() + { + $this->app->singleton('command.queue.clear', function () { + return new QueueClearCommand; + }); + } + /** * Register the command. * @@ -718,6 +826,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerQueueBatchesTableCommand() + { + $this->app->singleton('command.queue.batches-table', function ($app) { + return new BatchesTableCommand($app['files'], $app['composer']); + }); + } + /** * Register the command. * @@ -826,6 +946,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerSchemaDumpCommand() + { + $this->app->singleton('command.schema.dump', function () { + return new DumpCommand; + }); + } + /** * Register the command. * @@ -838,6 +970,16 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid }); } + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleClearCacheCommand() + { + $this->app->singleton(ScheduleClearCacheCommand::class); + } + /** * Register the command. * @@ -848,6 +990,16 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid $this->app->singleton(ScheduleFinishCommand::class); } + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleListCommand() + { + $this->app->singleton(ScheduleListCommand::class); + } + /** * Register the command. * @@ -858,6 +1010,26 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid $this->app->singleton(ScheduleRunCommand::class); } + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleTestCommand() + { + $this->app->singleton(ScheduleTestCommand::class); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleWorkCommand() + { + $this->app->singleton(ScheduleWorkCommand::class); + } + /** * Register the command. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php index b23f18731..f6131ca5e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php @@ -11,7 +11,7 @@ class ConsoleSupportServiceProvider extends AggregateServiceProvider implements /** * The provider class names. * - * @var array + * @var string[] */ protected $providers = [ ArtisanServiceProvider::class, diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index b9d844965..bb69c8850 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -3,8 +3,11 @@ namespace Illuminate\Foundation\Providers; use Illuminate\Http\Request; +use Illuminate\Log\Events\MessageLogged; use Illuminate\Support\AggregateServiceProvider; use Illuminate\Support\Facades\URL; +use Illuminate\Testing\LoggedExceptionCollection; +use Illuminate\Testing\ParallelTestingServiceProvider; use Illuminate\Validation\ValidationException; class FoundationServiceProvider extends AggregateServiceProvider @@ -12,10 +15,11 @@ class FoundationServiceProvider extends AggregateServiceProvider /** * The provider class names. * - * @var array + * @var string[] */ protected $providers = [ FormRequestServiceProvider::class, + ParallelTestingServiceProvider::class, ]; /** @@ -43,6 +47,7 @@ class FoundationServiceProvider extends AggregateServiceProvider $this->registerRequestValidation(); $this->registerRequestSignatureValidation(); + $this->registerExceptionTracking(); } /** @@ -79,5 +84,33 @@ class FoundationServiceProvider extends AggregateServiceProvider Request::macro('hasValidSignature', function ($absolute = true) { return URL::hasValidSignature($this, $absolute); }); + + Request::macro('hasValidRelativeSignature', function () { + return URL::hasValidSignature($this, $absolute = false); + }); + } + + /** + * Register an event listener to track logged exceptions. + * + * @return void + */ + protected function registerExceptionTracking() + { + if (! $this->app->runningUnitTests()) { + return; + } + + $this->app->instance( + LoggedExceptionCollection::class, + new LoggedExceptionCollection + ); + + $this->app->make('events')->listen(MessageLogged::class, function ($event) { + if (isset($event->context['exception'])) { + $this->app->make(LoggedExceptionCollection::class) + ->push($event->context['exception']); + } + }); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php index 11e63a8d0..70ea3086e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php @@ -27,19 +27,31 @@ class EventServiceProvider extends ServiceProvider * * @return void */ + public function register() + { + $this->booting(function () { + $events = $this->getEvents(); + + foreach ($events as $event => $listeners) { + foreach (array_unique($listeners) as $listener) { + Event::listen($event, $listener); + } + } + + foreach ($this->subscribe as $subscriber) { + Event::subscribe($subscriber); + } + }); + } + + /** + * Boot any application services. + * + * @return void + */ public function boot() { - $events = $this->getEvents(); - - foreach ($events as $event => $listeners) { - foreach (array_unique($listeners) as $listener) { - Event::listen($event, $listener); - } - } - - foreach ($this->subscribe as $subscriber) { - Event::subscribe($subscriber); - } + // } /** @@ -107,7 +119,7 @@ class EventServiceProvider extends ServiceProvider ->reduce(function ($discovered, $directory) { return array_merge_recursive( $discovered, - DiscoverEvents::within($directory, base_path()) + DiscoverEvents::within($directory, $this->eventDiscoveryBasePath()) ); }, []); } @@ -123,4 +135,14 @@ class EventServiceProvider extends ServiceProvider $this->app->path('Listeners'), ]; } + + /** + * Get the base path to be used during event discovery. + * + * @return string + */ + protected function eventDiscoveryBasePath() + { + return base_path(); + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php index b281da1a5..c8679e51e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\Foundation\Support\Providers; +use Closure; use Illuminate\Contracts\Routing\UrlGenerator; use Illuminate\Routing\Router; use Illuminate\Support\ServiceProvider; @@ -21,6 +22,36 @@ class RouteServiceProvider extends ServiceProvider */ protected $namespace; + /** + * The callback that should be used to load the application's routes. + * + * @var \Closure|null + */ + protected $loadRoutesUsing; + + /** + * Register any application services. + * + * @return void + */ + public function register() + { + $this->booted(function () { + $this->setRootControllerNamespace(); + + if ($this->routesAreCached()) { + $this->loadCachedRoutes(); + } else { + $this->loadRoutes(); + + $this->app->booted(function () { + $this->app['router']->getRoutes()->refreshNameLookups(); + $this->app['router']->getRoutes()->refreshActionLookups(); + }); + } + }); + } + /** * Bootstrap any application services. * @@ -28,18 +59,20 @@ class RouteServiceProvider extends ServiceProvider */ public function boot() { - $this->setRootControllerNamespace(); + // + } - if ($this->routesAreCached()) { - $this->loadCachedRoutes(); - } else { - $this->loadRoutes(); + /** + * Register the callback that will be used to load the application's routes. + * + * @param \Closure $routesCallback + * @return $this + */ + protected function routes(Closure $routesCallback) + { + $this->loadRoutesUsing = $routesCallback; - $this->app->booted(function () { - $this->app['router']->getRoutes()->refreshNameLookups(); - $this->app['router']->getRoutes()->refreshActionLookups(); - }); - } + return $this; } /** @@ -83,7 +116,9 @@ class RouteServiceProvider extends ServiceProvider */ protected function loadRoutes() { - if (method_exists($this, 'map')) { + if (! is_null($this->loadRoutesUsing)) { + $this->app->call($this->loadRoutesUsing); + } elseif (method_exists($this, 'map')) { $this->app->call([$this, 'map']); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php index 404a8bfb6..9e8c0f587 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php @@ -10,30 +10,30 @@ trait InteractsWithAuthentication * Set the currently logged in user for the application. * * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string|null $driver + * @param string|null $guard * @return $this */ - public function actingAs(UserContract $user, $driver = null) + public function actingAs(UserContract $user, $guard = null) { - return $this->be($user, $driver); + return $this->be($user, $guard); } /** * Set the currently logged in user for the application. * * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string|null $driver + * @param string|null $guard * @return $this */ - public function be(UserContract $user, $driver = null) + public function be(UserContract $user, $guard = null) { if (isset($user->wasRecentlyCreated) && $user->wasRecentlyCreated) { $user->wasRecentlyCreated = false; } - $this->app['auth']->guard($driver)->setUser($user); + $this->app['auth']->guard($guard)->setUser($user); - $this->app['auth']->shouldUse($driver); + $this->app['auth']->shouldUse($guard); return $this; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php index b34777910..38409d3d6 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php @@ -23,7 +23,14 @@ trait InteractsWithConsole public $expectedOutput = []; /** - * All of the expected ouput tables. + * All of the output lines that aren't expected to be displayed. + * + * @var array + */ + public $unexpectedOutput = []; + + /** + * All of the expected output tables. * * @var array */ diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php index c84852e00..6949f6f8c 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php @@ -77,6 +77,19 @@ trait InteractsWithContainer return $this->instance($abstract, Mockery::spy(...array_filter(func_get_args()))); } + /** + * Instruct the container to forget a previously mocked / spied instance of an object. + * + * @param string $abstract + * @return $this + */ + protected function forgetMock($abstract) + { + $this->app->forgetInstance($abstract); + + return $this; + } + /** * Register an empty handler for Laravel Mix in the container. * diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php index 10efb827b..8ccd7e2f3 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php @@ -2,11 +2,14 @@ namespace Illuminate\Foundation\Testing\Concerns; +use Illuminate\Contracts\Support\Jsonable; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\DB; use Illuminate\Testing\Constraints\CountInDatabase; use Illuminate\Testing\Constraints\HasInDatabase; +use Illuminate\Testing\Constraints\NotSoftDeletedInDatabase; use Illuminate\Testing\Constraints\SoftDeletedInDatabase; use PHPUnit\Framework\Constraint\LogicalNot as ReverseConstraint; @@ -15,7 +18,7 @@ trait InteractsWithDatabase /** * Assert that a given where condition exists in the database. * - * @param string $table + * @param \Illuminate\Database\Eloquent\Model|string $table * @param array $data * @param string|null $connection * @return $this @@ -23,7 +26,7 @@ trait InteractsWithDatabase protected function assertDatabaseHas($table, array $data, $connection = null) { $this->assertThat( - $table, new HasInDatabase($this->getConnection($connection), $data) + $this->getTable($table), new HasInDatabase($this->getConnection($connection), $data) ); return $this; @@ -32,7 +35,7 @@ trait InteractsWithDatabase /** * Assert that a given where condition does not exist in the database. * - * @param string $table + * @param \Illuminate\Database\Eloquent\Model|string $table * @param array $data * @param string|null $connection * @return $this @@ -43,7 +46,7 @@ trait InteractsWithDatabase new HasInDatabase($this->getConnection($connection), $data) ); - $this->assertThat($table, $constraint); + $this->assertThat($this->getTable($table), $constraint); return $this; } @@ -51,7 +54,7 @@ trait InteractsWithDatabase /** * Assert the count of table entries. * - * @param string $table + * @param \Illuminate\Database\Eloquent\Model|string $table * @param int $count * @param string|null $connection * @return $this @@ -59,7 +62,7 @@ trait InteractsWithDatabase protected function assertDatabaseCount($table, int $count, $connection = null) { $this->assertThat( - $table, new CountInDatabase($this->getConnection($connection), $count) + $this->getTable($table), new CountInDatabase($this->getConnection($connection), $count) ); return $this; @@ -79,7 +82,7 @@ trait InteractsWithDatabase return $this->assertDatabaseMissing($table->getTable(), [$table->getKeyName() => $table->getKey()], $table->getConnectionName()); } - $this->assertDatabaseMissing($table, $data, $connection); + $this->assertDatabaseMissing($this->getTable($table), $data, $connection); return $this; } @@ -96,16 +99,78 @@ trait InteractsWithDatabase protected function assertSoftDeleted($table, array $data = [], $connection = null, $deletedAtColumn = 'deleted_at') { if ($this->isSoftDeletableModel($table)) { - return $this->assertSoftDeleted($table->getTable(), [$table->getKeyName() => $table->getKey()], $table->getConnectionName(), $table->getDeletedAtColumn()); + return $this->assertSoftDeleted( + $table->getTable(), + array_merge($data, [$table->getKeyName() => $table->getKey()]), + $table->getConnectionName(), + $table->getDeletedAtColumn() + ); } $this->assertThat( - $table, new SoftDeletedInDatabase($this->getConnection($connection), $data, $deletedAtColumn) + $this->getTable($table), new SoftDeletedInDatabase($this->getConnection($connection), $data, $deletedAtColumn) ); return $this; } + /** + * Assert the given record has not been "soft deleted". + * + * @param \Illuminate\Database\Eloquent\Model|string $table + * @param array $data + * @param string|null $connection + * @param string|null $deletedAtColumn + * @return $this + */ + protected function assertNotSoftDeleted($table, array $data = [], $connection = null, $deletedAtColumn = 'deleted_at') + { + if ($this->isSoftDeletableModel($table)) { + return $this->assertNotSoftDeleted( + $table->getTable(), + array_merge($data, [$table->getKeyName() => $table->getKey()]), + $table->getConnectionName(), + $table->getDeletedAtColumn() + ); + } + + $this->assertThat( + $this->getTable($table), new NotSoftDeletedInDatabase($this->getConnection($connection), $data, $deletedAtColumn) + ); + + return $this; + } + + /** + * Assert the given model exists in the database. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return $this + */ + protected function assertModelExists($model) + { + return $this->assertDatabaseHas( + $model->getTable(), + [$model->getKeyName() => $model->getKey()], + $model->getConnectionName() + ); + } + + /** + * Assert the given model does not exist in the database. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return $this + */ + protected function assertModelMissing($model) + { + return $this->assertDatabaseMissing( + $model->getTable(), + [$model->getKeyName() => $model->getKey()], + $model->getConnectionName() + ); + } + /** * Determine if the argument is a soft deletable model. * @@ -118,6 +183,25 @@ trait InteractsWithDatabase && in_array(SoftDeletes::class, class_uses_recursive($model)); } + /** + * Cast a JSON string to a database compatible type. + * + * @param array|string $value + * @return \Illuminate\Database\Query\Expression + */ + public function castAsJson($value) + { + if ($value instanceof Jsonable) { + $value = $value->toJson(); + } elseif (is_array($value) || is_object($value)) { + $value = json_encode($value); + } + + $value = DB::connection()->getPdo()->quote($value); + + return DB::raw("CAST($value AS JSON)"); + } + /** * Get the database connection. * @@ -133,13 +217,24 @@ trait InteractsWithDatabase return $database->connection($connection); } + /** + * Get the table name from the given model or string. + * + * @param \Illuminate\Database\Eloquent\Model|string $table + * @return string + */ + protected function getTable($table) + { + return is_subclass_of($table, Model::class) ? (new $table)->getTable() : $table; + } + /** * Seed a given database connection. * * @param array|string $class * @return $this */ - public function seed($class = 'DatabaseSeeder') + public function seed($class = 'Database\\Seeders\\DatabaseSeeder') { foreach (Arr::wrap($class) as $class) { $this->artisan('db:seed', ['--class' => $class, '--no-interaction' => true]); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php new file mode 100644 index 000000000..7a914f7e0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php @@ -0,0 +1,49 @@ +originalDeprecationHandler) { + set_error_handler(tap($this->originalDeprecationHandler, function () { + $this->originalDeprecationHandler = null; + })); + } + + return $this; + } + + /** + * Disable deprecation handling for the test. + * + * @return $this + */ + protected function withoutDeprecationHandling() + { + if ($this->originalDeprecationHandler == null) { + $this->originalDeprecationHandler = set_error_handler(function ($level, $message, $file = '', $line = 0) { + if (in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]) || (error_reporting() & $level)) { + throw new ErrorException($message, 0, $level, $file, $line); + } + }); + } + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php index 36253f624..5ce5686d6 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php @@ -125,7 +125,7 @@ trait InteractsWithExceptionHandling if ($e instanceof NotFoundHttpException) { throw new NotFoundHttpException( - "{$request->method()} {$request->url()}", null, $e->getCode() + "{$request->method()} {$request->url()}", $e, $e->getCode() ); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php index a68995b05..5c8d9040e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php @@ -30,22 +30,18 @@ trait InteractsWithRedis */ public function setUpRedis() { - $app = $this->app ?? new Application; - $host = Env::get('REDIS_HOST', '127.0.0.1'); - $port = Env::get('REDIS_PORT', 6379); - if (! extension_loaded('redis')) { $this->markTestSkipped('The redis extension is not installed. Please install the extension to enable '.__CLASS__); - - return; } if (static::$connectionFailedOnceWithDefaultsSkip) { $this->markTestSkipped('Trying default host/port failed, please set environment variable REDIS_HOST & REDIS_PORT to enable '.__CLASS__); - - return; } + $app = $this->app ?? new Application; + $host = Env::get('REDIS_HOST', '127.0.0.1'); + $port = Env::get('REDIS_PORT', 6379); + foreach ($this->redisDriverProvider() as $driver) { $this->redis[$driver[0]] = new RedisManager($app, $driver[0], [ 'cluster' => false, @@ -57,6 +53,7 @@ trait InteractsWithRedis 'port' => $port, 'database' => 5, 'timeout' => 0.5, + 'name' => 'default', ], ]); } @@ -66,6 +63,7 @@ trait InteractsWithRedis } catch (Exception $e) { if ($host === '127.0.0.1' && $port === 6379 && Env::get('REDIS_HOST') === null) { static::$connectionFailedOnceWithDefaultsSkip = true; + $this->markTestSkipped('Trying default host/port failed, please set environment variable REDIS_HOST & REDIS_PORT to enable '.__CLASS__); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithTime.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithTime.php new file mode 100644 index 000000000..184a2441c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithTime.php @@ -0,0 +1,49 @@ +getPaths())) { + ViewFacade::addLocation(sys_get_temp_dir()); + } + + $tempFileInfo = pathinfo(tempnam($tempDirectory, 'laravel-blade')); + + $tempFile = $tempFileInfo['dirname'].'/'.$tempFileInfo['filename'].'.blade.php'; + + file_put_contents($tempFile, $template); + + return new TestView(view($tempFileInfo['filename'], $data)); + } + + /** + * Render the given view component. + * + * @param string $componentClass + * @param \Illuminate\Contracts\Support\Arrayable|array $data + * @return \Illuminate\Testing\TestComponent + */ + protected function component(string $componentClass, array $data = []) + { + $component = $this->app->make($componentClass, $data); + + $view = value($component->resolveView(), $data); + + $view = $view instanceof View + ? $view->with($component->data()) + : view($view, $component->data()); + + return new TestComponent($component, $view); + } + + /** + * Populate the shared view error bag with the given errors. + * + * @param array $errors + * @param string $key + * @return $this + */ + protected function withViewErrors(array $errors, $key = 'default') + { + ViewFacade::share('errors', (new ViewErrorBag)->put($key, new MessageBag($errors))); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php index 01f843283..36e6734db 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php @@ -6,6 +6,7 @@ use Illuminate\Contracts\Http\Kernel as HttpKernel; use Illuminate\Cookie\CookieValuePrefix; use Illuminate\Http\Request; use Illuminate\Support\Str; +use Illuminate\Testing\LoggedExceptionCollection; use Illuminate\Testing\TestResponse; use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile; use Symfony\Component\HttpFoundation\Request as SymfonyRequest; @@ -509,12 +510,12 @@ trait MakesHttpRequests $request = Request::createFromBase($symfonyRequest) ); + $kernel->terminate($request, $response); + if ($this->followRedirects) { $response = $this->followRedirects($response); } - $kernel->terminate($request, $response); - return $this->createTestResponse($response); } @@ -624,12 +625,12 @@ trait MakesHttpRequests */ protected function followRedirects($response) { + $this->followRedirects = false; + while ($response->isRedirect()) { $response = $this->get($response->headers->get('Location')); } - $this->followRedirects = false; - return $response; } @@ -641,6 +642,12 @@ trait MakesHttpRequests */ protected function createTestResponse($response) { - return TestResponse::fromBaseResponse($response); + return tap(TestResponse::fromBaseResponse($response), function ($response) { + $response->withExceptions( + $this->app->bound(LoggedExceptionCollection::class) + ? $this->app->make(LoggedExceptionCollection::class) + : new LoggedExceptionCollection + ); + }); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php index 7fc360e76..66622950c 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php @@ -8,6 +8,9 @@ use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher; use Illuminate\Support\Facades\Event; use Mockery; +/** + * @deprecated Will be removed in a future Laravel version. + */ trait MocksApplicationServices { /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php index 889a45328..10a3a7300 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php @@ -3,9 +3,12 @@ namespace Illuminate\Foundation\Testing; use Illuminate\Contracts\Console\Kernel; +use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands; trait DatabaseMigrations { + use CanConfigureMigrationCommands; + /** * Define hooks to migrate the database before and after each test. * @@ -13,7 +16,7 @@ trait DatabaseMigrations */ public function runDatabaseMigrations() { - $this->artisan('migrate:fresh'); + $this->artisan('migrate:fresh', $this->migrateFreshUsing()); $this->app[Kernel::class]->setArtisan(null); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php index 9870153bb..e162e188a 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php @@ -14,14 +14,22 @@ trait DatabaseTransactions $database = $this->app->make('db'); foreach ($this->connectionsToTransact() as $name) { - $database->connection($name)->beginTransaction(); + $connection = $database->connection($name); + $dispatcher = $connection->getEventDispatcher(); + + $connection->unsetEventDispatcher(); + $connection->beginTransaction(); + $connection->setEventDispatcher($dispatcher); } $this->beforeApplicationDestroyed(function () use ($database) { foreach ($this->connectionsToTransact() as $name) { $connection = $database->connection($name); + $dispatcher = $connection->getEventDispatcher(); + $connection->unsetEventDispatcher(); $connection->rollBack(); + $connection->setEventDispatcher($dispatcher); $connection->disconnect(); } }); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php new file mode 100644 index 000000000..98204ccea --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php @@ -0,0 +1,34 @@ +app->make('db'); + + $database->beforeExecuting(function () { + if (RefreshDatabaseState::$lazilyRefreshed) { + return; + } + + RefreshDatabaseState::$lazilyRefreshed = true; + + $this->baseRefreshDatabase(); + }); + + $this->beforeApplicationDestroyed(function () { + RefreshDatabaseState::$lazilyRefreshed = false; + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php index 0cbeea12d..48390039b 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php @@ -3,9 +3,12 @@ namespace Illuminate\Foundation\Testing; use Illuminate\Contracts\Console\Kernel; +use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands; trait RefreshDatabase { + use CanConfigureMigrationCommands; + /** * Define hooks to migrate the database before and after each test. * @@ -16,6 +19,8 @@ trait RefreshDatabase $this->usingInMemoryDatabase() ? $this->refreshInMemoryDatabase() : $this->refreshTestDatabase(); + + $this->afterRefreshingDatabase(); } /** @@ -49,7 +54,10 @@ trait RefreshDatabase */ protected function migrateUsing() { - return []; + return [ + '--seed' => $this->shouldSeed(), + '--seeder' => $this->seeder(), + ]; } /** @@ -70,19 +78,6 @@ trait RefreshDatabase $this->beginDatabaseTransaction(); } - /** - * The parameters that should be used when running "migrate:fresh". - * - * @return array - */ - protected function migrateFreshUsing() - { - return [ - '--drop-views' => $this->shouldDropViews(), - '--drop-types' => $this->shouldDropTypes(), - ]; - } - /** * Begin a database transaction on the testing database. * @@ -107,7 +102,7 @@ trait RefreshDatabase $dispatcher = $connection->getEventDispatcher(); $connection->unsetEventDispatcher(); - $connection->rollback(); + $connection->rollBack(); $connection->setEventDispatcher($dispatcher); $connection->disconnect(); } @@ -126,24 +121,12 @@ trait RefreshDatabase } /** - * Determine if views should be dropped when refreshing the database. + * Perform any work that should take place once the database has finished refreshing. * - * @return bool + * @return void */ - protected function shouldDropViews() + protected function afterRefreshingDatabase() { - return property_exists($this, 'dropViews') - ? $this->dropViews : false; - } - - /** - * Determine if types should be dropped when refreshing the database. - * - * @return bool - */ - protected function shouldDropTypes() - { - return property_exists($this, 'dropTypes') - ? $this->dropTypes : false; + // ... } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabaseState.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabaseState.php index 1f3308739..a42d3d081 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabaseState.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabaseState.php @@ -10,4 +10,11 @@ class RefreshDatabaseState * @var bool */ public static $migrated = false; + + /** + * Indicates if a lazy refresh hook has been invoked. + * + * @var bool + */ + public static $lazilyRefreshed = false; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php index 3bcd3f026..b18d0adb4 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php @@ -6,7 +6,9 @@ use Carbon\Carbon; use Carbon\CarbonImmutable; use Illuminate\Console\Application as Artisan; use Illuminate\Database\Eloquent\Model; +use Illuminate\Queue\Queue; use Illuminate\Support\Facades\Facade; +use Illuminate\Support\Facades\ParallelTesting; use Illuminate\Support\Str; use Mockery; use Mockery\Exception\InvalidCountException; @@ -20,14 +22,17 @@ abstract class TestCase extends BaseTestCase Concerns\InteractsWithAuthentication, Concerns\InteractsWithConsole, Concerns\InteractsWithDatabase, + Concerns\InteractsWithDeprecationHandling, Concerns\InteractsWithExceptionHandling, Concerns\InteractsWithSession, + Concerns\InteractsWithTime, + Concerns\InteractsWithViews, Concerns\MocksApplicationServices; /** * The Illuminate application instance. * - * @var \Illuminate\Contracts\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $app; @@ -79,6 +84,8 @@ abstract class TestCase extends BaseTestCase if (! $this->app) { $this->refreshApplication(); + + ParallelTesting::callSetUpTestCaseCallbacks($this); } $this->setUpTraits(); @@ -150,6 +157,8 @@ abstract class TestCase extends BaseTestCase if ($this->app) { $this->callBeforeApplicationDestroyedCallbacks(); + ParallelTesting::callTearDownTestCaseCallbacks($this); + $this->app->flush(); $this->app = null; @@ -192,6 +201,8 @@ abstract class TestCase extends BaseTestCase Artisan::forgetBootstrappers(); + Queue::createPayloadUsing(null); + if ($this->callbackException) { throw $this->callbackException; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Traits/CanConfigureMigrationCommands.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Traits/CanConfigureMigrationCommands.php new file mode 100644 index 000000000..aafca6f1f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Traits/CanConfigureMigrationCommands.php @@ -0,0 +1,64 @@ +seeder(); + + return array_merge( + [ + '--drop-views' => $this->shouldDropViews(), + '--drop-types' => $this->shouldDropTypes(), + ], + $seeder ? ['--seeder' => $seeder] : ['--seed' => $this->shouldSeed()] + ); + } + + /** + * Determine if views should be dropped when refreshing the database. + * + * @return bool + */ + protected function shouldDropViews() + { + return property_exists($this, 'dropViews') ? $this->dropViews : false; + } + + /** + * Determine if types should be dropped when refreshing the database. + * + * @return bool + */ + protected function shouldDropTypes() + { + return property_exists($this, 'dropTypes') ? $this->dropTypes : false; + } + + /** + * Determine if the seed task should be run when refreshing the database. + * + * @return bool + */ + protected function shouldSeed() + { + return property_exists($this, 'seed') ? $this->seed : false; + } + + /** + * Determine the specific seeder class that should be used when refreshing the database. + * + * @return mixed + */ + protected function seeder() + { + return property_exists($this, 'seeder') ? $this->seeder : false; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Wormhole.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Wormhole.php new file mode 100644 index 000000000..54fe0fa0b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Wormhole.php @@ -0,0 +1,245 @@ +value = $value; + } + + /** + * Travel forward the given number of milliseconds. + * + * @param callable|null $callback + * @return mixed + */ + public function millisecond($callback = null) + { + return $this->milliseconds($callback); + } + + /** + * Travel forward the given number of milliseconds. + * + * @param callable|null $callback + * @return mixed + */ + public function milliseconds($callback = null) + { + Carbon::setTestNow(Carbon::now()->addMilliseconds($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of seconds. + * + * @param callable|null $callback + * @return mixed + */ + public function second($callback = null) + { + return $this->seconds($callback); + } + + /** + * Travel forward the given number of seconds. + * + * @param callable|null $callback + * @return mixed + */ + public function seconds($callback = null) + { + Carbon::setTestNow(Carbon::now()->addSeconds($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of minutes. + * + * @param callable|null $callback + * @return mixed + */ + public function minute($callback = null) + { + return $this->minutes($callback); + } + + /** + * Travel forward the given number of minutes. + * + * @param callable|null $callback + * @return mixed + */ + public function minutes($callback = null) + { + Carbon::setTestNow(Carbon::now()->addMinutes($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of hours. + * + * @param callable|null $callback + * @return mixed + */ + public function hour($callback = null) + { + return $this->hours($callback); + } + + /** + * Travel forward the given number of hours. + * + * @param callable|null $callback + * @return mixed + */ + public function hours($callback = null) + { + Carbon::setTestNow(Carbon::now()->addHours($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of days. + * + * @param callable|null $callback + * @return mixed + */ + public function day($callback = null) + { + return $this->days($callback); + } + + /** + * Travel forward the given number of days. + * + * @param callable|null $callback + * @return mixed + */ + public function days($callback = null) + { + Carbon::setTestNow(Carbon::now()->addDays($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of weeks. + * + * @param callable|null $callback + * @return mixed + */ + public function week($callback = null) + { + return $this->weeks($callback); + } + + /** + * Travel forward the given number of weeks. + * + * @param callable|null $callback + * @return mixed + */ + public function weeks($callback = null) + { + Carbon::setTestNow(Carbon::now()->addWeeks($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of months. + * + * @param callable|null $callback + * @return mixed + */ + public function month($callback = null) + { + return $this->months($callback); + } + + /** + * Travel forward the given number of months. + * + * @param callable|null $callback + * @return mixed + */ + public function months($callback = null) + { + Carbon::setTestNow(Carbon::now()->addMonths($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel forward the given number of years. + * + * @param callable|null $callback + * @return mixed + */ + public function year($callback = null) + { + return $this->years($callback); + } + + /** + * Travel forward the given number of years. + * + * @param callable|null $callback + * @return mixed + */ + public function years($callback = null) + { + Carbon::setTestNow(Carbon::now()->addYears($this->value)); + + return $this->handleCallback($callback); + } + + /** + * Travel back to the current time. + * + * @return \DateTimeInterface + */ + public static function back() + { + Carbon::setTestNow(); + + return Carbon::now(); + } + + /** + * Handle the given optional execution callback. + * + * @param callable|null $callback + * @return mixed + */ + protected function handleCallback($callback) + { + if ($callback) { + return tap($callback(), function () { + Carbon::setTestNow(); + }); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php index 5fbc613ac..bd879a8f6 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php @@ -12,7 +12,7 @@ use Illuminate\Contracts\Routing\UrlGenerator; use Illuminate\Contracts\Support\Responsable; use Illuminate\Contracts\Validation\Factory as ValidationFactory; use Illuminate\Contracts\View\Factory as ViewFactory; -use Illuminate\Database\Eloquent\Factory as EloquentFactory; +use Illuminate\Foundation\Bus\PendingClosureDispatch; use Illuminate\Foundation\Bus\PendingDispatch; use Illuminate\Foundation\Mix; use Illuminate\Http\Exceptions\HttpResponseException; @@ -28,7 +28,7 @@ if (! function_exists('abort')) { * @param \Symfony\Component\HttpFoundation\Response|\Illuminate\Contracts\Support\Responsable|int $code * @param string $message * @param array $headers - * @return void + * @return never * * @throws \Symfony\Component\HttpKernel\Exception\HttpException * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException @@ -384,11 +384,25 @@ if (! function_exists('dispatch')) { */ function dispatch($job) { - if ($job instanceof Closure) { - $job = CallQueuedClosure::create($job); - } + return $job instanceof Closure + ? new PendingClosureDispatch(CallQueuedClosure::create($job)) + : new PendingDispatch($job); + } +} - return new PendingDispatch($job); +if (! function_exists('dispatch_sync')) { + /** + * Dispatch a command to its appropriate handler in the current process. + * + * Queueable jobs will be dispatched to the "sync" queue. + * + * @param mixed $job + * @param mixed $handler + * @return mixed + */ + function dispatch_sync($job, $handler = null) + { + return app(Dispatcher::class)->dispatchSync($job, $handler); } } @@ -399,6 +413,8 @@ if (! function_exists('dispatch_now')) { * @param mixed $job * @param mixed $handler * @return mixed + * + * @deprecated Will be removed in a future Laravel version. */ function dispatch_now($job, $handler = null) { @@ -406,48 +422,6 @@ if (! function_exists('dispatch_now')) { } } -if (! function_exists('elixir')) { - /** - * Get the path to a versioned Elixir file. - * - * @param string $file - * @param string $buildDirectory - * @return string - * - * @throws \InvalidArgumentException - * - * @deprecated Use Laravel Mix instead. - */ - function elixir($file, $buildDirectory = 'build') - { - static $manifest = []; - static $manifestPath; - - if (empty($manifest) || $manifestPath !== $buildDirectory) { - $path = public_path($buildDirectory.'/rev-manifest.json'); - - if (file_exists($path)) { - $manifest = json_decode(file_get_contents($path), true); - $manifestPath = $buildDirectory; - } - } - - $file = ltrim($file, '/'); - - if (isset($manifest[$file])) { - return '/'.trim($buildDirectory.'/'.$manifest[$file], '/'); - } - - $unversioned = public_path($file); - - if (file_exists($unversioned)) { - return '/'.trim($file, '/'); - } - - throw new InvalidArgumentException("File {$file} not defined in asset manifest."); - } -} - if (! function_exists('encrypt')) { /** * Encrypt the given value. @@ -477,26 +451,6 @@ if (! function_exists('event')) { } } -if (! function_exists('factory')) { - /** - * Create a model factory builder for a given class and amount. - * - * @param string $class - * @param int $amount - * @return \Illuminate\Database\Eloquent\FactoryBuilder - */ - function factory($class, $amount = null) - { - $factory = app(EloquentFactory::class); - - if (isset($amount) && is_int($amount)) { - return $factory->of($class)->times($amount); - } - - return $factory->of($class); - } -} - if (! function_exists('info')) { /** * Write some information to the log. @@ -529,6 +483,19 @@ if (! function_exists('logger')) { } } +if (! function_exists('lang_path')) { + /** + * Get the path to the language folder. + * + * @param string $path + * @return string + */ + function lang_path($path = '') + { + return app('path.lang').($path ? DIRECTORY_SEPARATOR.$path : $path); + } +} + if (! function_exists('logs')) { /** * Get a log driver instance. @@ -650,11 +617,15 @@ if (! function_exists('report')) { /** * Report an exception. * - * @param \Throwable $exception + * @param \Throwable|string $exception * @return void */ - function report(Throwable $exception) + function report($exception) { + if (is_string($exception)) { + $exception = new Exception($exception); + } + app(ExceptionHandler::class)->report($exception); } } @@ -665,7 +636,7 @@ if (! function_exists('request')) { * * @param array|string|null $key * @param mixed $default - * @return \Illuminate\Http\Request|string|array + * @return \Illuminate\Http\Request|string|array|null */ function request($key = null, $default = null) { @@ -701,7 +672,7 @@ if (! function_exists('rescue')) { report($e); } - return $rescue instanceof Closure ? $rescue($e) : $rescue; + return value($rescue, $e); } } } @@ -737,7 +708,7 @@ if (! function_exists('response')) { /** * Return a new response from the application. * - * @param \Illuminate\View\View|string|array|null $content + * @param \Illuminate\Contracts\View\View|string|array|null $content * @param int $status * @param array $headers * @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory @@ -948,7 +919,7 @@ if (! function_exists('view')) { * @param string|null $view * @param \Illuminate\Contracts\Support\Arrayable|array $data * @param array $mergeData - * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory + * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory */ function view($view = null, $data = [], $mergeData = []) { diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php b/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php index 41109c9b0..b999257f4 100644 --- a/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php +++ b/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php @@ -45,7 +45,7 @@ class ArgonHasher extends AbstractHasher implements HasherContract { $this->time = $options['time'] ?? $this->time; $this->memory = $options['memory'] ?? $this->memory; - $this->threads = $options['threads'] ?? $this->threads; + $this->threads = $this->threads($options); $this->verifyAlgorithm = $options['verify'] ?? $this->verifyAlgorithm; } @@ -180,13 +180,17 @@ class ArgonHasher extends AbstractHasher implements HasherContract } /** - * Extract the threads value from the options array. + * Extract the thread's value from the options array. * * @param array $options * @return int */ protected function threads(array $options) { + if (defined('PASSWORD_ARGON2_PROVIDER') && PASSWORD_ARGON2_PROVIDER === 'sodium') { + return 1; + } + return $options['threads'] ?? $this->threads; } } diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json index c264eb493..6ad3411c7 100755 --- a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json @@ -14,9 +14,9 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { @@ -25,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Events/ConnectionFailed.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Events/ConnectionFailed.php new file mode 100644 index 000000000..504006c80 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Events/ConnectionFailed.php @@ -0,0 +1,26 @@ +request = $request; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Events/RequestSending.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Events/RequestSending.php new file mode 100644 index 000000000..1b363fb75 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Events/RequestSending.php @@ -0,0 +1,26 @@ +request = $request; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Events/ResponseReceived.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Events/ResponseReceived.php new file mode 100644 index 000000000..77be7aba7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Events/ResponseReceived.php @@ -0,0 +1,36 @@ +request = $request; + $this->response = $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php index 1749de8a5..131e669a4 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php @@ -3,18 +3,67 @@ namespace Illuminate\Http\Client; use Closure; -use function GuzzleHttp\Promise\promise_for; +use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Psr7\Response as Psr7Response; +use GuzzleHttp\TransferStats; +use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Str; use Illuminate\Support\Traits\Macroable; use PHPUnit\Framework\Assert as PHPUnit; +/** + * @method \Illuminate\Http\Client\PendingRequest accept(string $contentType) + * @method \Illuminate\Http\Client\PendingRequest acceptJson() + * @method \Illuminate\Http\Client\PendingRequest asForm() + * @method \Illuminate\Http\Client\PendingRequest asJson() + * @method \Illuminate\Http\Client\PendingRequest asMultipart() + * @method \Illuminate\Http\Client\PendingRequest async() + * @method \Illuminate\Http\Client\PendingRequest attach(string|array $name, string|resource $contents = '', string|null $filename = null, array $headers = []) + * @method \Illuminate\Http\Client\PendingRequest baseUrl(string $url) + * @method \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback) + * @method \Illuminate\Http\Client\PendingRequest bodyFormat(string $format) + * @method \Illuminate\Http\Client\PendingRequest contentType(string $contentType) + * @method \Illuminate\Http\Client\PendingRequest dd() + * @method \Illuminate\Http\Client\PendingRequest dump() + * @method \Illuminate\Http\Client\PendingRequest retry(int $times, int $sleep = 0, ?callable $when = null) + * @method \Illuminate\Http\Client\PendingRequest sink(string|resource $to) + * @method \Illuminate\Http\Client\PendingRequest stub(callable $callback) + * @method \Illuminate\Http\Client\PendingRequest timeout(int $seconds) + * @method \Illuminate\Http\Client\PendingRequest withBasicAuth(string $username, string $password) + * @method \Illuminate\Http\Client\PendingRequest withBody(resource|string $content, string $contentType) + * @method \Illuminate\Http\Client\PendingRequest withCookies(array $cookies, string $domain) + * @method \Illuminate\Http\Client\PendingRequest withDigestAuth(string $username, string $password) + * @method \Illuminate\Http\Client\PendingRequest withHeaders(array $headers) + * @method \Illuminate\Http\Client\PendingRequest withMiddleware(callable $middleware) + * @method \Illuminate\Http\Client\PendingRequest withOptions(array $options) + * @method \Illuminate\Http\Client\PendingRequest withToken(string $token, string $type = 'Bearer') + * @method \Illuminate\Http\Client\PendingRequest withUserAgent(string $userAgent) + * @method \Illuminate\Http\Client\PendingRequest withoutRedirecting() + * @method \Illuminate\Http\Client\PendingRequest withoutVerifying() + * @method array pool(callable $callback) + * @method \Illuminate\Http\Client\Response delete(string $url, array $data = []) + * @method \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null) + * @method \Illuminate\Http\Client\Response head(string $url, array|string|null $query = null) + * @method \Illuminate\Http\Client\Response patch(string $url, array $data = []) + * @method \Illuminate\Http\Client\Response post(string $url, array $data = []) + * @method \Illuminate\Http\Client\Response put(string $url, array $data = []) + * @method \Illuminate\Http\Client\Response send(string $method, string $url, array $options = []) + * + * @see \Illuminate\Http\Client\PendingRequest + */ class Factory { use Macroable { __call as macroCall; } + /** + * The event dispatcher implementation. + * + * @var \Illuminate\Contracts\Events\Dispatcher|null + */ + protected $dispatcher; + /** * The stub callables that will handle requests. * @@ -46,10 +95,13 @@ class Factory /** * Create a new factory instance. * + * @param \Illuminate\Contracts\Events\Dispatcher|null $dispatcher * @return void */ - public function __construct() + public function __construct(Dispatcher $dispatcher = null) { + $this->dispatcher = $dispatcher; + $this->stubCallbacks = collect(); } @@ -69,7 +121,11 @@ class Factory $headers['Content-Type'] = 'application/json'; } - return promise_for(new Psr7Response($status, $headers, $body)); + $response = new Psr7Response($status, $headers, $body); + + return class_exists(\GuzzleHttp\Promise\Create::class) + ? \GuzzleHttp\Promise\Create::promiseFor($response) + : \GuzzleHttp\Promise\promise_for($response); } /** @@ -93,6 +149,8 @@ class Factory { $this->record(); + $this->recorded = []; + if (is_null($callback)) { $callback = function () { return static::response(); @@ -108,11 +166,20 @@ class Factory } $this->stubCallbacks = $this->stubCallbacks->merge(collect([ - $callback instanceof Closure - ? $callback - : function () use ($callback) { - return $callback; - }, + function ($request, $options) use ($callback) { + $response = $callback instanceof Closure + ? $callback($request, $options) + : $callback; + + if ($response instanceof PromiseInterface) { + $options['on_stats'](new TransferStats( + $request->toPsrRequest(), + $response->wait(), + )); + } + + return $response; + }, ])); return $this; @@ -191,6 +258,28 @@ class Factory ); } + /** + * Assert that the given request was sent in the given order. + * + * @param array $callbacks + * @return void + */ + public function assertSentInOrder($callbacks) + { + $this->assertSentCount(count($callbacks)); + + foreach ($callbacks as $index => $url) { + $callback = is_callable($url) ? $url : function ($request) use ($url) { + return $request->url() == $url; + }; + + PHPUnit::assertTrue($callback( + $this->recorded[$index][0], + $this->recorded[$index][1] + ), 'An expected request (#'.($index + 1).') was not recorded.'); + } + } + /** * Assert that a request / response pair was not recorded matching a given truth test. * @@ -250,7 +339,7 @@ class Factory * @param callable $callback * @return \Illuminate\Support\Collection */ - public function recorded($callback) + public function recorded($callback = null) { if (empty($this->recorded)) { return collect(); @@ -265,6 +354,26 @@ class Factory }); } + /** + * Create a new pending request instance for this factory. + * + * @return \Illuminate\Http\Client\PendingRequest + */ + protected function newPendingRequest() + { + return new PendingRequest($this); + } + + /** + * Get the current event dispatcher implementation. + * + * @return \Illuminate\Contracts\Events\Dispatcher|null + */ + public function getDispatcher() + { + return $this->dispatcher; + } + /** * Execute a method against a new pending request instance. * @@ -278,7 +387,7 @@ class Factory return $this->macroCall($method, $parameters); } - return tap(new PendingRequest($this), function ($request) { + return tap($this->newPendingRequest(), function ($request) { $request->stub($this->stubCallbacks); })->{$method}(...$parameters); } diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php b/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php index 304151cac..fdf5f06d4 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php @@ -5,14 +5,24 @@ namespace Illuminate\Http\Client; use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\TransferException; use GuzzleHttp\HandlerStack; +use Illuminate\Http\Client\Events\ConnectionFailed; +use Illuminate\Http\Client\Events\RequestSending; +use Illuminate\Http\Client\Events\ResponseReceived; +use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use Illuminate\Support\Traits\Conditionable; use Illuminate\Support\Traits\Macroable; +use Psr\Http\Message\MessageInterface; +use Psr\Http\Message\RequestInterface; +use Symfony\Component\VarDumper\VarDumper; class PendingRequest { - use Macroable; + use Conditionable, Macroable; /** * The factory instance. @@ -21,6 +31,13 @@ class PendingRequest */ protected $factory; + /** + * The Guzzle client instance. + * + * @var \GuzzleHttp\Client + */ + protected $client; + /** * The base URL for the request. * @@ -84,6 +101,13 @@ class PendingRequest */ protected $retryDelay = 100; + /** + * The callback that will determine if the request should be retried. + * + * @var callable|null + */ + protected $retryWhenCallback = null; + /** * The callbacks that should execute before the request is sent. * @@ -105,6 +129,41 @@ class PendingRequest */ protected $middleware; + /** + * Whether the requests should be asynchronous. + * + * @var bool + */ + protected $async = false; + + /** + * The pending request promise. + * + * @var \GuzzleHttp\Promise\PromiseInterface + */ + protected $promise; + + /** + * The sent request object, if a request has been made. + * + * @var \Illuminate\Http\Client\Request|null + */ + protected $request; + + /** + * The Guzzle request options that are mergable via array_merge_recursive. + * + * @var array + */ + protected $mergableOptions = [ + 'cookies', + 'form_params', + 'headers', + 'json', + 'multipart', + 'query', + ]; + /** * Create a new HTTP Client instance. * @@ -122,8 +181,11 @@ class PendingRequest 'http_errors' => false, ]; - $this->beforeSendingCallbacks = collect([function (Request $request, array $options) { - $this->cookies = $options['cookies']; + $this->beforeSendingCallbacks = collect([function (Request $request, array $options, PendingRequest $pendingRequest) { + $pendingRequest->request = $request; + $pendingRequest->cookies = $options['cookies']; + + $pendingRequest->dispatchRequestSendingEvent(); }]); } @@ -143,7 +205,7 @@ class PendingRequest /** * Attach a raw body to the request. * - * @param resource|string $content + * @param string $content * @param string $contentType * @return $this */ @@ -181,14 +243,22 @@ class PendingRequest /** * Attach a file to the request. * - * @param string $name - * @param string $contents + * @param string|array $name + * @param string|resource $contents * @param string|null $filename * @param array $headers * @return $this */ - public function attach($name, $contents, $filename = null, array $headers = []) + public function attach($name, $contents = '', $filename = null, array $headers = []) { + if (is_array($name)) { + foreach ($name as $file) { + $this->attach(...$file); + } + + return $this; + } + $this->asMultipart(); $this->pendingFiles[] = array_filter([ @@ -313,6 +383,19 @@ class PendingRequest }); } + /** + * Specify the user agent for the request. + * + * @param string $userAgent + * @return $this + */ + public function withUserAgent($userAgent) + { + return tap($this, function ($request) use ($userAgent) { + return $this->options['headers']['User-Agent'] = trim($userAgent); + }); + } + /** * Specify the cookies that should be included with the request. * @@ -384,18 +467,20 @@ class PendingRequest * * @param int $times * @param int $sleep + * @param callable|null $when * @return $this */ - public function retry(int $times, int $sleep = 0) + public function retry(int $times, int $sleep = 0, ?callable $when = null) { $this->tries = $times; $this->retryDelay = $sleep; + $this->retryWhenCallback = $when; return $this; } /** - * Merge new options into the client. + * Replace the specified options on the request. * * @param array $options * @return $this @@ -403,7 +488,10 @@ class PendingRequest public function withOptions(array $options) { return tap($this, function ($request) use ($options) { - return $this->options = array_merge_recursive($this->options, $options); + return $this->options = array_replace_recursive( + array_merge_recursive($this->options, Arr::only($options, $this->mergableOptions)), + $options + ); }); } @@ -433,6 +521,40 @@ class PendingRequest }); } + /** + * Dump the request before sending. + * + * @return $this + */ + public function dump() + { + $values = func_get_args(); + + return $this->beforeSending(function (Request $request, array $options) use ($values) { + foreach (array_merge($values, [$request, $options]) as $value) { + VarDumper::dump($value); + } + }); + } + + /** + * Dump the request before sending and end the script. + * + * @return $this + */ + public function dd() + { + $values = func_get_args(); + + return $this->beforeSending(function (Request $request, array $options) use ($values) { + foreach (array_merge($values, [$request, $options]) as $value) { + VarDumper::dump($value); + } + + exit(1); + }); + } + /** * Issue a GET request to the given URL. * @@ -442,7 +564,7 @@ class PendingRequest */ public function get(string $url, $query = null) { - return $this->send('GET', $url, [ + return $this->send('GET', $url, func_num_args() === 1 ? [] : [ 'query' => $query, ]); } @@ -456,7 +578,7 @@ class PendingRequest */ public function head(string $url, $query = null) { - return $this->send('HEAD', $url, [ + return $this->send('HEAD', $url, func_num_args() === 1 ? [] : [ 'query' => $query, ]); } @@ -517,6 +639,25 @@ class PendingRequest ]); } + /** + * Send a pool of asynchronous requests concurrently. + * + * @param callable $callback + * @return array + */ + public function pool(callable $callback) + { + $results = []; + + $requests = tap(new Pool($this->factory), $callback)->getRequests(); + + foreach ($requests as $key => $item) { + $results[$key] = $item instanceof static ? $item->getPromise()->wait() : $item->wait(); + } + + return $results; + } + /** * Send the request to the given URL. * @@ -543,31 +684,33 @@ class PendingRequest $options[$this->bodyFormat], $this->pendingFiles ); } + } else { + $options[$this->bodyFormat] = $this->pendingBody; } [$this->pendingBody, $this->pendingFiles] = [null, []]; + if ($this->async) { + return $this->makePromise($method, $url, $options); + } + return retry($this->tries ?? 1, function () use ($method, $url, $options) { try { - $laravelData = $this->parseRequestData($method, $url, $options); - - return tap(new Response($this->buildClient()->request($method, $url, $this->mergeOptions([ - 'laravel_data' => $laravelData, - 'on_stats' => function ($transferStats) { - $this->transferStats = $transferStats; - }, - ], $options))), function ($response) { - $response->cookies = $this->cookies; - $response->transferStats = $this->transferStats; + return tap(new Response($this->sendRequest($method, $url, $options)), function ($response) { + $this->populateResponse($response); if ($this->tries > 1 && ! $response->successful()) { $response->throw(); } + + $this->dispatchResponseReceivedEvent($response); }); } catch (ConnectException $e) { + $this->dispatchConnectionFailedEvent(); + throw new ConnectionException($e->getMessage(), 0, $e); } - }, $this->retryDelay ?? 100); + }, $this->retryDelay ?? 100, $this->retryWhenCallback); } /** @@ -583,6 +726,52 @@ class PendingRequest })->values()->all(); } + /** + * Send an asynchronous request to the given URL. + * + * @param string $method + * @param string $url + * @param array $options + * @return \GuzzleHttp\Promise\PromiseInterface + */ + protected function makePromise(string $method, string $url, array $options = []) + { + return $this->promise = $this->sendRequest($method, $url, $options) + ->then(function (MessageInterface $message) { + return tap(new Response($message), function ($response) { + $this->populateResponse($response); + $this->dispatchResponseReceivedEvent($response); + }); + }) + ->otherwise(function (TransferException $e) { + return $e instanceof RequestException ? $this->populateResponse(new Response($e->getResponse())) : $e; + }); + } + + /** + * Send a request either synchronously or asynchronously. + * + * @param string $method + * @param string $url + * @param array $options + * @return \Psr\Http\Message\MessageInterface|\GuzzleHttp\Promise\PromiseInterface + * + * @throws \Exception + */ + protected function sendRequest(string $method, string $url, array $options = []) + { + $clientMethod = $this->async ? 'requestAsync' : 'request'; + + $laravelData = $this->parseRequestData($method, $url, $options); + + return $this->buildClient()->$clientMethod($method, $url, $this->mergeOptions([ + 'laravel_data' => $laravelData, + 'on_stats' => function ($transferStats) { + $this->transferStats = $transferStats; + }, + ], $options)); + } + /** * Get the request data as an array so that we can attach it to the request for convenient assertions. * @@ -610,27 +799,86 @@ class PendingRequest return $laravelData; } + /** + * Populate the given response with additional data. + * + * @param \Illuminate\Http\Client\Response $response + * @return \Illuminate\Http\Client\Response + */ + protected function populateResponse(Response $response) + { + $response->cookies = $this->cookies; + + $response->transferStats = $this->transferStats; + + return $response; + } + /** * Build the Guzzle client. * * @return \GuzzleHttp\Client */ public function buildClient() + { + return $this->requestsReusableClient() + ? $this->getReusableClient() + : $this->createClient($this->buildHandlerStack()); + } + + /** + * Determine if a reusable client is required. + * + * @return bool + */ + protected function requestsReusableClient() + { + return ! is_null($this->client) || $this->async; + } + + /** + * Retrieve a reusable Guzzle client. + * + * @return \GuzzleHttp\Client + */ + protected function getReusableClient() + { + return $this->client = $this->client ?: $this->createClient($this->buildHandlerStack()); + } + + /** + * Create new Guzzle client. + * + * @param \GuzzleHttp\HandlerStack $handlerStack + * @return \GuzzleHttp\Client + */ + public function createClient($handlerStack) { return new Client([ - 'handler' => $this->buildHandlerStack(), + 'handler' => $handlerStack, 'cookies' => true, ]); } /** - * Build the before sending handler stack. + * Build the Guzzle client handler stack. * * @return \GuzzleHttp\HandlerStack */ public function buildHandlerStack() { - return tap(HandlerStack::create(), function ($stack) { + return $this->pushHandlers(HandlerStack::create()); + } + + /** + * Add the necessary handlers to the given handler stack. + * + * @param \GuzzleHttp\HandlerStack $handlerStack + * @return \GuzzleHttp\HandlerStack + */ + public function pushHandlers($handlerStack) + { + return tap($handlerStack, function ($stack) { $stack->push($this->buildBeforeSendingHandler()); $stack->push($this->buildRecorderHandler()); $stack->push($this->buildStubHandler()); @@ -664,7 +912,7 @@ class PendingRequest { return function ($handler) { return function ($request, $options) use ($handler) { - $promise = $handler($this->runBeforeSendingCallbacks($request, $options), $options); + $promise = $handler($request, $options); return $promise->then(function ($response) use ($request, $options) { optional($this->factory)->recordRequestResponsePair( @@ -737,27 +985,37 @@ class PendingRequest * * @param \GuzzleHttp\Psr7\RequestInterface $request * @param array $options - * @return \Closure + * @return \GuzzleHttp\Psr7\RequestInterface */ public function runBeforeSendingCallbacks($request, array $options) { - return tap($request, function ($request) use ($options) { - $this->beforeSendingCallbacks->each->__invoke( - (new Request($request))->withData($options['laravel_data']), - $options - ); + return tap($request, function (&$request) use ($options) { + $this->beforeSendingCallbacks->each(function ($callback) use (&$request, $options) { + $callbackResult = call_user_func( + $callback, (new Request($request))->withData($options['laravel_data']), $options, $this + ); + + if ($callbackResult instanceof RequestInterface) { + $request = $callbackResult; + } elseif ($callbackResult instanceof Request) { + $request = $callbackResult->toPsrRequest(); + } + }); }); } /** - * Merge the given options with the current request options. + * Replace the given options with the current request options. * * @param array $options * @return array */ public function mergeOptions(...$options) { - return array_merge_recursive($this->options, ...$options); + return array_replace_recursive( + array_merge_recursive($this->options, Arr::only($options, $this->mergableOptions)), + ...$options + ); } /** @@ -772,4 +1030,105 @@ class PendingRequest return $this; } + + /** + * Toggle asynchronicity in requests. + * + * @param bool $async + * @return $this + */ + public function async(bool $async = true) + { + $this->async = $async; + + return $this; + } + + /** + * Retrieve the pending request promise. + * + * @return \GuzzleHttp\Promise\PromiseInterface|null + */ + public function getPromise() + { + return $this->promise; + } + + /** + * Dispatch the RequestSending event if a dispatcher is available. + * + * @return void + */ + protected function dispatchRequestSendingEvent() + { + if ($dispatcher = optional($this->factory)->getDispatcher()) { + $dispatcher->dispatch(new RequestSending($this->request)); + } + } + + /** + * Dispatch the ResponseReceived event if a dispatcher is available. + * + * @param \Illuminate\Http\Client\Response $response + * @return void + */ + protected function dispatchResponseReceivedEvent(Response $response) + { + if (! ($dispatcher = optional($this->factory)->getDispatcher()) || + ! $this->request) { + return; + } + + $dispatcher->dispatch(new ResponseReceived($this->request, $response)); + } + + /** + * Dispatch the ConnectionFailed event if a dispatcher is available. + * + * @return void + */ + protected function dispatchConnectionFailedEvent() + { + if ($dispatcher = optional($this->factory)->getDispatcher()) { + $dispatcher->dispatch(new ConnectionFailed($this->request)); + } + } + + /** + * Set the client instance. + * + * @param \GuzzleHttp\Client $client + * @return $this + */ + public function setClient(Client $client) + { + $this->client = $client; + + return $this; + } + + /** + * Create a new client instance using the given handler. + * + * @param callable $handler + * @return $this + */ + public function setHandler($handler) + { + $this->client = $this->createClient( + $this->pushHandlers(HandlerStack::create($handler)) + ); + + return $this; + } + + /** + * Get the pending request options. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Pool.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Pool.php new file mode 100644 index 000000000..bedffcb1d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Pool.php @@ -0,0 +1,92 @@ +factory = $factory ?: new Factory(); + + if (method_exists(Utils::class, 'chooseHandler')) { + $this->handler = Utils::chooseHandler(); + } else { + $this->handler = \GuzzleHttp\choose_handler(); + } + } + + /** + * Add a request to the pool with a key. + * + * @param string $key + * @return \Illuminate\Http\Client\PendingRequest + */ + public function as(string $key) + { + return $this->pool[$key] = $this->asyncRequest(); + } + + /** + * Retrieve a new async pending request. + * + * @return \Illuminate\Http\Client\PendingRequest + */ + protected function asyncRequest() + { + return $this->factory->setHandler($this->handler)->async(); + } + + /** + * Retrieve the requests in the pool. + * + * @return array + */ + public function getRequests() + { + return $this->pool; + } + + /** + * Add a request to the pool with a numeric index. + * + * @param string $method + * @param array $parameters + * @return \Illuminate\Http\Client\PendingRequest + */ + public function __call($method, $parameters) + { + return $this->pool[] = $this->asyncRequest()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php index 6cea5fb00..0e493f1fa 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php @@ -5,10 +5,13 @@ namespace Illuminate\Http\Client; use ArrayAccess; use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Illuminate\Support\Traits\Macroable; use LogicException; class Request implements ArrayAccess { + use Macroable; + /** * The underlying PSR request. * @@ -117,9 +120,7 @@ class Request implements ArrayAccess */ public function headers() { - return collect($this->request->getHeaders())->mapWithKeys(function ($values, $header) { - return [$header => $values]; - })->all(); + return $this->request->getHeaders(); } /** @@ -260,6 +261,7 @@ class Request implements ArrayAccess * @param string $offset * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->data()[$offset]); @@ -271,6 +273,7 @@ class Request implements ArrayAccess * @param string $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->data()[$offset]; @@ -285,6 +288,7 @@ class Request implements ArrayAccess * * @throws \LogicException */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw new LogicException('Request data may not be mutated using array access.'); @@ -298,6 +302,7 @@ class Request implements ArrayAccess * * @throws \LogicException */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { throw new LogicException('Request data may not be mutated using array access.'); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php b/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php index 09909db7e..fa4f41839 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php @@ -19,8 +19,25 @@ class RequestException extends HttpClientException */ public function __construct(Response $response) { - parent::__construct("HTTP request returned status code {$response->status()}.", $response->status()); + parent::__construct($this->prepareMessage($response), $response->status()); $this->response = $response; } + + /** + * Prepare the exception message. + * + * @param \Illuminate\Http\Client\Response $response + * @return string + */ + protected function prepareMessage(Response $response) + { + $message = "HTTP request returned status code {$response->status()}"; + + $summary = class_exists(\GuzzleHttp\Psr7\Message::class) + ? \GuzzleHttp\Psr7\Message::bodySummary($response->toPsrResponse()) + : \GuzzleHttp\Psr7\get_message_body_summary($response->toPsrResponse()); + + return is_null($summary) ? $message : $message .= ":\n{$summary}\n"; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php index 991705d96..703b3570d 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php @@ -3,6 +3,7 @@ namespace Illuminate\Http\Client; use ArrayAccess; +use Illuminate\Support\Collection; use Illuminate\Support\Traits\Macroable; use LogicException; @@ -50,15 +51,21 @@ class Response implements ArrayAccess /** * Get the JSON decoded body of the response as an array or scalar value. * + * @param string|null $key + * @param mixed $default * @return mixed */ - public function json() + public function json($key = null, $default = null) { if (! $this->decoded) { $this->decoded = json_decode($this->body(), true); } - return $this->decoded; + if (is_null($key)) { + return $this->decoded; + } + + return data_get($this->decoded, $key, $default); } /** @@ -71,6 +78,17 @@ class Response implements ArrayAccess return json_decode($this->body(), false); } + /** + * Get the JSON decoded body of the response as a collection. + * + * @param string|null $key + * @return \Illuminate\Support\Collection + */ + public function collect($key = null) + { + return Collection::make($this->json($key)); + } + /** * Get a header from the response. * @@ -89,9 +107,7 @@ class Response implements ArrayAccess */ public function headers() { - return collect($this->response->getHeaders())->mapWithKeys(function ($v, $k) { - return [$k => $v]; - })->all(); + return $this->response->getHeaders(); } /** @@ -104,14 +120,24 @@ class Response implements ArrayAccess return (int) $this->response->getStatusCode(); } + /** + * Get the reason phrase of the response. + * + * @return string + */ + public function reason() + { + return $this->response->getReasonPhrase(); + } + /** * Get the effective URI of the response. * - * @return \Psr\Http\Message\UriInterface + * @return \Psr\Http\Message\UriInterface|null */ public function effectiveUri() { - return $this->transferStats->getEffectiveUri(); + return optional($this->transferStats)->getEffectiveUri(); } /** @@ -144,6 +170,26 @@ class Response implements ArrayAccess return $this->status() >= 300 && $this->status() < 400; } + /** + * Determine if the response was a 401 "Unauthorized" response. + * + * @return bool + */ + public function unauthorized() + { + return $this->status() === 401; + } + + /** + * Determine if the response was a 403 "Forbidden" response. + * + * @return bool + */ + public function forbidden() + { + return $this->status() === 403; + } + /** * Determine if the response indicates a client or server error occurred. * @@ -174,6 +220,21 @@ class Response implements ArrayAccess return $this->status() >= 500; } + /** + * Execute the given callback if there was a server or client error. + * + * @param callable $callback + * @return $this + */ + public function onError(callable $callback) + { + if ($this->failed()) { + $callback($this); + } + + return $this; + } + /** * Get the response cookies. * @@ -184,6 +245,28 @@ class Response implements ArrayAccess return $this->cookies; } + /** + * Get the handler stats of the response. + * + * @return array + */ + public function handlerStats() + { + return optional($this->transferStats)->getHandlerStats() ?? []; + } + + /** + * Close the stream and any underlying resources. + * + * @return $this + */ + public function close() + { + $this->response->getBody()->close(); + + return $this; + } + /** * Get the underlying PSR response for the response. * @@ -194,28 +277,61 @@ class Response implements ArrayAccess return $this->response; } + /** + * Create an exception if a server or client error occurred. + * + * @return \Illuminate\Http\Client\RequestException|null + */ + public function toException() + { + if ($this->failed()) { + return new RequestException($this); + } + } + /** * Throw an exception if a server or client error occurred. * + * @param \Closure|null $callback * @return $this * * @throws \Illuminate\Http\Client\RequestException */ public function throw() { - if ($this->serverError() || $this->clientError()) { - throw new RequestException($this); + $callback = func_get_args()[0] ?? null; + + if ($this->failed()) { + throw tap($this->toException(), function ($exception) use ($callback) { + if ($callback && is_callable($callback)) { + $callback($this, $exception); + } + }); } return $this; } + /** + * Throw an exception if a server or client error occurred and the given condition evaluates to true. + * + * @param bool $condition + * @return $this + * + * @throws \Illuminate\Http\Client\RequestException + */ + public function throwIf($condition) + { + return $condition ? $this->throw() : $this; + } + /** * Determine if the given offset exists. * * @param string $offset * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->json()[$offset]); @@ -227,6 +343,7 @@ class Response implements ArrayAccess * @param string $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->json()[$offset]; @@ -241,6 +358,7 @@ class Response implements ArrayAccess * * @throws \LogicException */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw new LogicException('Response data may not be mutated using array access.'); @@ -254,6 +372,7 @@ class Response implements ArrayAccess * * @throws \LogicException */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { throw new LogicException('Response data may not be mutated using array access.'); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php b/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php index 66d0ec6bb..dcf8633a3 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php @@ -2,10 +2,13 @@ namespace Illuminate\Http\Client; +use Illuminate\Support\Traits\Macroable; use OutOfBoundsException; class ResponseSequence { + use Macroable; + /** * The responses in the sequence. * @@ -137,6 +140,8 @@ class ResponseSequence * Get the next response in the sequence. * * @return mixed + * + * @throws \OutOfBoundsException */ public function __invoke() { diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php index 25d6ec1e9..0d5f62fc7 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php @@ -6,24 +6,6 @@ use Illuminate\Support\Str; trait InteractsWithContentTypes { - /** - * Determine if the given content types match. - * - * @param string $actual - * @param string $type - * @return bool - */ - public static function matchesType($actual, $type) - { - if ($actual === $type) { - return true; - } - - $split = explode('/', $actual); - - return isset($split[1]) && preg_match('#'.preg_quote($split[0], '#').'/.+\+'.preg_quote($split[1], '#').'#', $type); - } - /** * Determine if the request is sending JSON. * @@ -53,7 +35,7 @@ trait InteractsWithContentTypes { $acceptable = $this->getAcceptableContentTypes(); - return isset($acceptable[0]) && Str::contains($acceptable[0], ['/json', '+json']); + return isset($acceptable[0]) && Str::contains(strtolower($acceptable[0]), ['/json', '+json']); } /** @@ -78,6 +60,10 @@ trait InteractsWithContentTypes } foreach ($types as $type) { + $accept = strtolower($accept); + + $type = strtolower($type); + if ($this->matchesType($accept, $type) || $accept === strtok($type, '/').'/*') { return true; } @@ -111,6 +97,10 @@ trait InteractsWithContentTypes $type = $mimeType; } + $accept = strtolower($accept); + + $type = strtolower($type); + if ($this->matchesType($type, $accept) || $accept === strtok($type, '/').'/*') { return $contentType; } @@ -152,6 +142,24 @@ trait InteractsWithContentTypes return $this->accepts('text/html'); } + /** + * Determine if the given content types match. + * + * @param string $actual + * @param string $type + * @return bool + */ + public static function matchesType($actual, $type) + { + if ($actual === $type) { + return true; + } + + $split = explode('/', $actual); + + return isset($split[1]) && preg_match('#'.preg_quote($split[0], '#').'/.+\+'.preg_quote($split[1], '#').'#', $type); + } + /** * Get the data format expected in the response. * diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php index 25e11a954..6682e5427 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php @@ -9,7 +9,7 @@ trait InteractsWithFlashData * * @param string|null $key * @param string|array|null $default - * @return string|array + * @return string|array|null */ public function old($key = null, $default = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php index 4550271b0..ae8b6fe73 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php @@ -4,9 +4,10 @@ namespace Illuminate\Http\Concerns; use Illuminate\Http\UploadedFile; use Illuminate\Support\Arr; -use Illuminate\Support\Str; +use Illuminate\Support\Facades\Date; use SplFileInfo; use stdClass; +use Symfony\Component\VarDumper\VarDumper; trait InteractsWithInput { @@ -54,8 +55,12 @@ trait InteractsWithInput { $header = $this->header('Authorization', ''); - if (Str::startsWith($header, 'Bearer ')) { - return Str::substr($header, 7); + $position = strrpos($header, 'Bearer '); + + if ($position !== false) { + $header = substr($header, $position + 7); + + return strpos($header, ',') !== false ? strstr($header, ',', true) : $header; } } @@ -111,14 +116,19 @@ trait InteractsWithInput * * @param string $key * @param callable $callback + * @param callable|null $default * @return $this|mixed */ - public function whenHas($key, callable $callback) + public function whenHas($key, callable $callback, callable $default = null) { if ($this->has($key)) { return $callback(data_get($this->all(), $key)) ?: $this; } + if ($default) { + return $default(); + } + return $this; } @@ -184,14 +194,19 @@ trait InteractsWithInput * * @param string $key * @param callable $callback + * @param callable|null $default * @return $this|mixed */ - public function whenFilled($key, callable $callback) + public function whenFilled($key, callable $callback, callable $default = null) { if ($this->filled($key)) { return $callback(data_get($this->all(), $key)) ?: $this; } + if ($default) { + return $default(); + } + return $this; } @@ -282,6 +297,38 @@ trait InteractsWithInput return filter_var($this->input($key, $default), FILTER_VALIDATE_BOOLEAN); } + /** + * Retrieve input from the request as a Carbon instance. + * + * @param string $key + * @param string|null $format + * @param string|null $tz + * @return \Illuminate\Support\Carbon|null + */ + public function date($key, $format = null, $tz = null) + { + if ($this->isNotFilled($key)) { + return null; + } + + if (is_null($format)) { + return Date::parse($this->input($key), $tz); + } + + return Date::createFromFormat($format, $this->input($key), $tz); + } + + /** + * Retrieve input from the request as a collection. + * + * @param array|string|null $key + * @return \Illuminate\Support\Collection + */ + public function collect($key = null) + { + return collect(is_array($key) ? $this->only($key) : $this->input($key)); + } + /** * Get a subset containing the provided keys with values from the input data. * @@ -462,4 +509,32 @@ trait InteractsWithInput return $this->$source->get($key, $default); } + + /** + * Dump the request items and end the script. + * + * @param mixed $keys + * @return void + */ + public function dd(...$keys) + { + $this->dump(...$keys); + + exit(1); + } + + /** + * Dump the items. + * + * @param mixed $keys + * @return $this + */ + public function dump($keys = []) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + VarDumper::dump(count($keys) > 0 ? $this->only($keys) : $this->all()); + + return $this; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php index 9f87e6c31..84a68f971 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php @@ -22,13 +22,24 @@ class JsonResponse extends BaseJsonResponse * @param int $status * @param array $headers * @param int $options + * @param bool $json * @return void */ - public function __construct($data = null, $status = 200, $headers = [], $options = 0) + public function __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false) { $this->encodingOptions = $options; - parent::__construct($data, $status, $headers); + parent::__construct($data, $status, $headers, $json); + } + + /** + * {@inheritdoc} + * + * @return static + */ + public static function fromJsonString(?string $data = null, int $status = 200, array $headers = []) + { + return new static($data, $status, $headers, 0, true); } /** @@ -56,11 +67,16 @@ class JsonResponse extends BaseJsonResponse /** * {@inheritdoc} + * + * @return static */ public function setData($data = []) { $this->original = $data; + // Ensure json_last_error() is cleared... + json_decode('[]'); + if ($data instanceof Jsonable) { $this->data = $data->toJson($this->encodingOptions); } elseif ($data instanceof JsonSerializable) { @@ -100,6 +116,8 @@ class JsonResponse extends BaseJsonResponse /** * {@inheritdoc} + * + * @return static */ public function setEncodingOptions($options) { diff --git a/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php b/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php index b6d964bc2..b42dc2f2f 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php @@ -55,7 +55,7 @@ class SetCacheHeaders */ protected function parseOptions($options) { - return collect(explode(';', $options))->mapWithKeys(function ($option) { + return collect(explode(';', rtrim($options, ';')))->mapWithKeys(function ($option) { $data = explode('=', $option, 2); return [$data[0] => $data[1] ?? true]; diff --git a/vendor/fideloper/proxy/src/TrustProxies.php b/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php similarity index 59% rename from vendor/fideloper/proxy/src/TrustProxies.php rename to vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php index 4f3b2afa9..872fd3ca2 100644 --- a/vendor/fideloper/proxy/src/TrustProxies.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php @@ -1,81 +1,62 @@ config = $config; - } + protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return mixed */ public function handle(Request $request, Closure $next) { - $request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests + $request::setTrustedProxies([], $this->getTrustedHeaderNames()); + $this->setTrustedProxyIpAddresses($request); return $next($request); } /** - * Sets the trusted proxies on the request to the value of trustedproxy.proxies + * Sets the trusted proxies on the request. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * @return void */ protected function setTrustedProxyIpAddresses(Request $request) { - $trustedIps = $this->proxies ?: $this->config->get('trustedproxy.proxies'); + $trustedIps = $this->proxies() ?: config('trustedproxy.proxies'); - // Trust any IP address that calls us - // `**` for backwards compatibility, but is deprecated if ($trustedIps === '*' || $trustedIps === '**') { return $this->setTrustedProxyIpAddressesToTheCallingIp($request); } - // Support IPs addresses separated by comma - $trustedIps = is_string($trustedIps) ? array_map('trim', explode(',', $trustedIps)) : $trustedIps; + $trustedIps = is_string($trustedIps) + ? array_map('trim', explode(',', $trustedIps)) + : $trustedIps; - // Only trust specific IP addresses if (is_array($trustedIps)) { return $this->setTrustedProxyIpAddressesToSpecificIps($request, $trustedIps); } @@ -84,20 +65,22 @@ class TrustProxies /** * Specify the IP addresses to trust explicitly. * - * @param \Illuminate\Http\Request $request - * @param array $trustedIps + * @param \Illuminate\Http\Request $request + * @param array $trustedIps + * @return void */ - private function setTrustedProxyIpAddressesToSpecificIps(Request $request, $trustedIps) + protected function setTrustedProxyIpAddressesToSpecificIps(Request $request, array $trustedIps) { - $request->setTrustedProxies((array) $trustedIps, $this->getTrustedHeaderNames()); + $request->setTrustedProxies($trustedIps, $this->getTrustedHeaderNames()); } /** - * Set the trusted proxy to be the IP address calling this servers + * Set the trusted proxy to be the IP address calling this servers. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * @return void */ - private function setTrustedProxyIpAddressesToTheCallingIp(Request $request) + protected function setTrustedProxyIpAddressesToTheCallingIp(Request $request) { $request->setTrustedProxies([$request->server->get('REMOTE_ADDR')], $this->getTrustedHeaderNames()); } @@ -109,36 +92,45 @@ class TrustProxies */ protected function getTrustedHeaderNames() { - $headers = $this->headers ?: $this->config->get('trustedproxy.headers'); - switch ($headers) { + switch ($this->headers) { case 'HEADER_X_FORWARDED_AWS_ELB': case Request::HEADER_X_FORWARDED_AWS_ELB: return Request::HEADER_X_FORWARDED_AWS_ELB; - break; + case 'HEADER_FORWARDED': case Request::HEADER_FORWARDED: return Request::HEADER_FORWARDED; - break; + case 'HEADER_X_FORWARDED_FOR': case Request::HEADER_X_FORWARDED_FOR: return Request::HEADER_X_FORWARDED_FOR; - break; + case 'HEADER_X_FORWARDED_HOST': case Request::HEADER_X_FORWARDED_HOST: return Request::HEADER_X_FORWARDED_HOST; - break; + case 'HEADER_X_FORWARDED_PORT': case Request::HEADER_X_FORWARDED_PORT: return Request::HEADER_X_FORWARDED_PORT; - break; + case 'HEADER_X_FORWARDED_PROTO': case Request::HEADER_X_FORWARDED_PROTO: return Request::HEADER_X_FORWARDED_PROTO; - break; + default: return Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; } - return $headers; + return $this->headers; + } + + /** + * Get the trusted proxies. + * + * @return array|string|null + */ + protected function proxies() + { + return $this->proxies; } } diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php index 7f256a399..32bb5fcff 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php @@ -145,6 +145,21 @@ class RedirectResponse extends BaseRedirectResponse return $this; } + /** + * Parse the given errors into an appropriate value. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider + * @return \Illuminate\Support\MessageBag + */ + protected function parseErrors($provider) + { + if ($provider instanceof MessageProvider) { + return $provider->getMessageBag(); + } + + return new MessageBag((array) $provider); + } + /** * Add a fragment identifier to the URL. * @@ -167,21 +182,6 @@ class RedirectResponse extends BaseRedirectResponse return $this->setTargetUrl(Str::before($this->getTargetUrl(), '#')); } - /** - * Parse the given errors into an appropriate value. - * - * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider - * @return \Illuminate\Support\MessageBag - */ - protected function parseErrors($provider) - { - if ($provider instanceof MessageProvider) { - return $provider->getMessageBag(); - } - - return new MessageBag((array) $provider); - } - /** * Get the original response content. * diff --git a/vendor/laravel/framework/src/Illuminate/Http/Request.php b/vendor/laravel/framework/src/Illuminate/Http/Request.php index cf6b90cb1..79175ac44 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Request.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Request.php @@ -133,6 +133,23 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess : $this->fullUrl().$question.Arr::query($query); } + /** + * Get the full URL for the request without the given query string parameters. + * + * @param array|string $query + * @return string + */ + public function fullUrlWithoutQuery($keys) + { + $query = Arr::except($this->query(), $keys); + + $question = $this->getBaseUrl().$this->getPathInfo() === '/' ? '/?' : '?'; + + return count($query) > 0 + ? $this->url().$question.Arr::query($query) + : $this->url(); + } + /** * Get the current path info for the request. * @@ -142,7 +159,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess { $pattern = trim($this->getPathInfo(), '/'); - return $pattern == '' ? '/' : $pattern; + return $pattern === '' ? '/' : $pattern; } /** @@ -212,7 +229,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess } /** - * Determine if the current request URL and query string matches a pattern. + * Determine if the current request URL and query string match a pattern. * * @param mixed ...$patterns * @return bool @@ -241,7 +258,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess } /** - * Determine if the request is the result of an PJAX call. + * Determine if the request is the result of a PJAX call. * * @return bool */ @@ -251,14 +268,14 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess } /** - * Determine if the request is the result of an prefetch call. + * Determine if the request is the result of a prefetch call. * * @return bool */ public function prefetch() { - return strcasecmp($this->server->get('HTTP_X_MOZ'), 'prefetch') === 0 || - strcasecmp($this->headers->get('Purpose'), 'prefetch') === 0; + return strcasecmp($this->server->get('HTTP_X_MOZ') ?? '', 'prefetch') === 0 || + strcasecmp($this->headers->get('Purpose') ?? '', 'prefetch') === 0; } /** @@ -314,6 +331,19 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess return $this; } + /** + * Merge new input into the request's input, but only when that key is missing from the request. + * + * @param array $input + * @return $this + */ + public function mergeIfMissing(array $input) + { + return $this->merge(collect($input)->filter(function ($value, $key) { + return $this->missing($key); + })->toArray()); + } + /** * Replace the input for the current request. * @@ -439,6 +469,8 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess /** * {@inheritdoc} + * + * @return static */ public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) { @@ -634,10 +666,13 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess * @param string $offset * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { + $route = $this->route(); + return Arr::has( - $this->all() + $this->route()->parameters(), + $this->all() + ($route ? $route->parameters() : []), $offset ); } @@ -648,6 +683,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess * @param string $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->__get($offset); @@ -660,6 +696,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->getInputSource()->set($offset, $value); @@ -671,6 +708,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess * @param string $offset * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $this->getInputSource()->remove($offset); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php index a5531f7a0..a4d4faba2 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php @@ -2,9 +2,11 @@ namespace Illuminate\Http\Resources; +use Illuminate\Pagination\AbstractCursorPaginator; use Illuminate\Pagination\AbstractPaginator; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use ReflectionClass; trait CollectsResources { @@ -30,7 +32,7 @@ trait CollectsResources ? $resource->mapInto($collects) : $resource->toBase(); - return $resource instanceof AbstractPaginator + return ($resource instanceof AbstractPaginator || $resource instanceof AbstractCursorPaginator) ? $resource->setCollection($this->collection) : $this->collection; } @@ -47,16 +49,36 @@ trait CollectsResources } if (Str::endsWith(class_basename($this), 'Collection') && - class_exists($class = Str::replaceLast('Collection', '', get_class($this)))) { + (class_exists($class = Str::replaceLast('Collection', '', get_class($this))) || + class_exists($class = Str::replaceLast('Collection', 'Resource', get_class($this))))) { return $class; } } + /** + * Get the JSON serialization options that should be applied to the resource response. + * + * @return int + */ + public function jsonOptions() + { + $collects = $this->collects(); + + if (! $collects) { + return 0; + } + + return (new ReflectionClass($collects)) + ->newInstanceWithoutConstructor() + ->jsonOptions(); + } + /** * Get an iterator for the resource collection. * * @return \ArrayIterator */ + #[\ReturnTypeWillChange] public function getIterator() { return $this->collection->getIterator(); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php index 495b7e3bf..48f455f97 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php @@ -64,6 +64,7 @@ trait DelegatesToResource * @param mixed $offset * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->resource[$offset]); @@ -75,6 +76,7 @@ trait DelegatesToResource * @param mixed $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->resource[$offset]; @@ -87,6 +89,7 @@ trait DelegatesToResource * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->resource[$offset] = $value; @@ -98,6 +101,7 @@ trait DelegatesToResource * @param mixed $offset * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->resource[$offset]); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php index 808aa234d..8c8bf000b 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php @@ -42,7 +42,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou /** * The "data" wrapper that should be applied. * - * @var string + * @var string|null */ public static $wrap = 'data'; @@ -69,7 +69,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou } /** - * Create new anonymous resource collection. + * Create a new anonymous resource collection. * * @param mixed $resource * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection @@ -108,7 +108,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * @return array + * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable */ public function toArray($request) { @@ -164,6 +164,16 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou return $this; } + /** + * Get the JSON serialization options that should be applied to the resource response. + * + * @return int + */ + public function jsonOptions() + { + return 0; + } + /** * Customize the response for a request. * @@ -226,6 +236,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->resolve(Container::getInstance()->make('request')); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php index 5fb35ea07..bd3e8f9ad 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php @@ -23,7 +23,9 @@ class PaginatedResourceResponse extends ResourceResponse $this->resource->additional ) ), - $this->calculateStatus() + $this->calculateStatus(), + [], + $this->resource->jsonOptions() ), function ($response) use ($request) { $response->original = $this->resource->resource->map(function ($item) { return is_array($item) ? Arr::get($item, 'resource') : $item->resource; @@ -43,10 +45,16 @@ class PaginatedResourceResponse extends ResourceResponse { $paginated = $this->resource->resource->toArray(); - return [ + $default = [ 'links' => $this->paginationLinks($paginated), 'meta' => $this->meta($paginated), ]; + + if (method_exists($this->resource, 'paginationInformation')) { + return $this->resource->paginationInformation($request, $paginated, $default); + } + + return $default; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceCollection.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceCollection.php index 2931fd646..65710aa32 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceCollection.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceCollection.php @@ -4,6 +4,7 @@ namespace Illuminate\Http\Resources\Json; use Countable; use Illuminate\Http\Resources\CollectsResources; +use Illuminate\Pagination\AbstractCursorPaginator; use Illuminate\Pagination\AbstractPaginator; use IteratorAggregate; @@ -84,6 +85,7 @@ class ResourceCollection extends JsonResource implements Countable, IteratorAggr * * @return int */ + #[\ReturnTypeWillChange] public function count() { return $this->collection->count(); @@ -93,7 +95,7 @@ class ResourceCollection extends JsonResource implements Countable, IteratorAggr * Transform the resource into a JSON array. * * @param \Illuminate\Http\Request $request - * @return array + * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable */ public function toArray($request) { @@ -108,7 +110,7 @@ class ResourceCollection extends JsonResource implements Countable, IteratorAggr */ public function toResponse($request) { - if ($this->resource instanceof AbstractPaginator) { + if ($this->resource instanceof AbstractPaginator || $this->resource instanceof AbstractCursorPaginator) { return $this->preparePaginatedResponse($request); } diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php index 2e9d326d5..51f36576f 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php @@ -40,7 +40,9 @@ class ResourceResponse implements Responsable $this->resource->with($request), $this->resource->additional ), - $this->calculateStatus() + $this->calculateStatus(), + [], + $this->resource->jsonOptions() ), function ($response) use ($request) { $response->original = $this->resource->resource; diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php index ee557e8f3..fb6880fb7 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php @@ -15,7 +15,7 @@ class MergeValue public $data; /** - * Create new merge value instance. + * Create a new merge value instance. * * @param \Illuminate\Support\Collection|\JsonSerializable|array $data * @return void diff --git a/vendor/laravel/framework/src/Illuminate/Http/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Response.php index f8bc37899..8599a8e53 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/Response.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Response.php @@ -7,6 +7,7 @@ use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Renderable; use Illuminate\Support\Traits\Macroable; +use InvalidArgumentException; use JsonSerializable; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; use Symfony\Component\HttpFoundation\ResponseHeaderBag; @@ -41,6 +42,8 @@ class Response extends SymfonyResponse * * @param mixed $content * @return $this + * + * @throws \InvalidArgumentException */ public function setContent($content) { @@ -53,6 +56,10 @@ class Response extends SymfonyResponse $this->header('Content-Type', 'application/json'); $content = $this->morphToJson($content); + + if ($content === false) { + throw new InvalidArgumentException(json_last_error_msg()); + } } // If this content implements the "Renderable" interface then we will call the diff --git a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php index 46936fb6c..cbe29dcc9 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php +++ b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php @@ -32,6 +32,16 @@ trait ResponseTrait return $this->getStatusCode(); } + /** + * Get the status text for the response. + * + * @return string + */ + public function statusText() + { + return $this->statusText; + } + /** * Get the content of the response. * @@ -116,6 +126,25 @@ trait ResponseTrait return $this; } + /** + * Expire a cookie when sending the response. + * + * @param \Symfony\Component\HttpFoundation\Cookie|mixed $cookie + * @param string|null $path + * @param string|null $domain + * @return $this + */ + public function withoutCookie($cookie, $path = null, $domain = null) + { + if (is_string($cookie) && function_exists('cookie')) { + $cookie = cookie($cookie, null, -2628000, $path, $domain); + } + + $this->headers->setCookie($cookie); + + return $this; + } + /** * Get the callback of the response. * diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php index c15282686..c714529fe 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php @@ -107,6 +107,7 @@ class File extends UploadedFile * * @return int */ + #[\ReturnTypeWillChange] public function getSize() { return $this->sizeToReport ?: parent::getSize(); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php index 5b729ee1e..9e25d72de 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php @@ -2,8 +2,6 @@ namespace Illuminate\Http\Testing; -use Illuminate\Support\Str; - class FileFactory { /** @@ -55,7 +53,7 @@ class FileFactory public function image($name, $width = 10, $height = 10) { return new File($name, $this->generateImage( - $width, $height, Str::endsWith(Str::lower($name), ['.jpg', '.jpeg']) ? 'jpeg' : 'png' + $width, $height, pathinfo($name, PATHINFO_EXTENSION) )); } @@ -64,24 +62,21 @@ class FileFactory * * @param int $width * @param int $height - * @param string $type + * @param string $extension * @return resource */ - protected function generateImage($width, $height, $type) + protected function generateImage($width, $height, $extension) { - return tap(tmpfile(), function ($temp) use ($width, $height, $type) { + return tap(tmpfile(), function ($temp) use ($width, $height, $extension) { ob_start(); + $extension = in_array($extension, ['jpeg', 'png', 'gif', 'webp', 'wbmp', 'bmp']) + ? strtolower($extension) + : 'jpeg'; + $image = imagecreatetruecolor($width, $height); - switch ($type) { - case 'jpeg': - imagejpeg($image); - break; - case 'png': - imagepng($image); - break; - } + call_user_func("image{$extension}", $image); fwrite($temp, ob_get_clean()); }); diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php index aff03d4bb..d188a4be3 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php @@ -22,7 +22,7 @@ class MimeType public static function getMimeTypes() { if (self::$mime === null) { - self::$mime = new MimeTypes(); + self::$mime = new MimeTypes; } return self::$mime; diff --git a/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php b/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php index 4e9f6f65b..7779683e4 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php +++ b/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php @@ -91,7 +91,7 @@ class UploadedFile extends SymfonyUploadedFile /** * Get the contents of the uploaded file. * - * @return bool|string + * @return false|string * * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ diff --git a/vendor/laravel/framework/src/Illuminate/Http/composer.json b/vendor/laravel/framework/src/Illuminate/Http/composer.json index c85bcc734..564c398d6 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Http/composer.json @@ -14,13 +14,15 @@ } ], "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", - "illuminate/session": "^7.0", - "illuminate/support": "^7.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0" + "illuminate/collections": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/session": "^8.0", + "illuminate/support": "^8.0", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/mime": "^5.4" }, "autoload": { "psr-4": { @@ -29,11 +31,11 @@ }, "suggest": { "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", - "guzzlehttp/guzzle": "Required to use the HTTP Client (^6.3.1|^7.0.1)." + "guzzlehttp/guzzle": "Required to use the HTTP Client (^6.5.5|^7.0.1)." }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php index 53bc54ee7..44601a7e3 100644 --- a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php +++ b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php @@ -7,6 +7,7 @@ use Illuminate\Support\Str; use InvalidArgumentException; use Monolog\Formatter\LineFormatter; use Monolog\Handler\ErrorLogHandler; +use Monolog\Handler\FingersCrossedHandler; use Monolog\Handler\FormattableHandlerInterface; use Monolog\Handler\HandlerInterface; use Monolog\Handler\RotatingFileHandler; @@ -61,6 +62,19 @@ class LogManager implements LoggerInterface $this->app = $app; } + /** + * Build an on-demand log channel. + * + * @param array $config + * @return \Psr\Log\LoggerInterface + */ + public function build(array $config) + { + unset($this->channels['ondemand']); + + return $this->get('ondemand', $config); + } + /** * Create a new, on-demand aggregate logger instance. * @@ -95,27 +109,20 @@ class LogManager implements LoggerInterface */ public function driver($driver = null) { - return $this->get($driver ?? $this->getDefaultDriver()); - } - - /** - * @return array - */ - public function getChannels() - { - return $this->channels; + return $this->get($this->parseDriver($driver)); } /** * Attempt to get the log from the local cache. * * @param string $name + * @param array|null $config * @return \Psr\Log\LoggerInterface */ - protected function get($name) + protected function get($name, ?array $config = null) { try { - return $this->channels[$name] ?? with($this->resolve($name), function ($logger) use ($name) { + return $this->channels[$name] ?? with($this->resolve($name, $config), function ($logger) use ($name) { return $this->channels[$name] = $this->tap($name, new Logger($logger, $this->app['events'])); }); } catch (Throwable $e) { @@ -180,13 +187,14 @@ class LogManager implements LoggerInterface * Resolve the given log instance by name. * * @param string $name + * @param array|null $config * @return \Psr\Log\LoggerInterface * * @throws \InvalidArgumentException */ - protected function resolve($name) + protected function resolve($name, ?array $config = null) { - $config = $this->configurationFor($name); + $config = $config ?? $this->configurationFor($name); if (is_null($config)) { throw new InvalidArgumentException("Log [{$name}] is not defined."); @@ -237,15 +245,27 @@ class LogManager implements LoggerInterface */ protected function createStackDriver(array $config) { + if (is_string($config['channels'])) { + $config['channels'] = explode(',', $config['channels']); + } + $handlers = collect($config['channels'])->flatMap(function ($channel) { - return $this->channel($channel)->getHandlers(); + return $channel instanceof LoggerInterface + ? $channel->getHandlers() + : $this->channel($channel)->getHandlers(); + })->all(); + + $processors = collect($config['channels'])->flatMap(function ($channel) { + return $channel instanceof LoggerInterface + ? $channel->getProcessors() + : $this->channel($channel)->getProcessors(); })->all(); if ($config['ignore_exceptions'] ?? false) { $handlers = [new WhatFailureGroupHandler($handlers)]; } - return new Monolog($this->parseChannel($config), $handlers); + return new Monolog($this->parseChannel($config), $handlers, $processors); } /** @@ -389,17 +409,17 @@ class LogManager implements LoggerInterface */ protected function prepareHandler(HandlerInterface $handler, array $config = []) { - $isHandlerFormattable = false; - - if (Monolog::API === 1) { - $isHandlerFormattable = true; - } elseif (Monolog::API === 2 && $handler instanceof FormattableHandlerInterface) { - $isHandlerFormattable = true; + if (isset($config['action_level'])) { + $handler = new FingersCrossedHandler($handler, $this->actionLevel($config)); } - if ($isHandlerFormattable && ! isset($config['formatter'])) { + if (Monolog::API !== 1 && (Monolog::API !== 2 || ! $handler instanceof FormattableHandlerInterface)) { + return $handler; + } + + if (! isset($config['formatter'])) { $handler->setFormatter($this->formatter()); - } elseif ($isHandlerFormattable && $config['formatter'] !== 'default') { + } elseif ($config['formatter'] !== 'default') { $handler->setFormatter($this->app->make($config['formatter'], $config['formatter_with'] ?? [])); } @@ -442,7 +462,7 @@ class LogManager implements LoggerInterface /** * Get the default log driver name. * - * @return string + * @return string|null */ public function getDefaultDriver() { @@ -482,13 +502,40 @@ class LogManager implements LoggerInterface */ public function forgetChannel($driver = null) { - $driver = $driver ?? $this->getDefaultDriver(); + $driver = $this->parseDriver($driver); if (isset($this->channels[$driver])) { unset($this->channels[$driver]); } } + /** + * Parse the driver name. + * + * @param string|null $driver + * @return string|null + */ + protected function parseDriver($driver) + { + $driver = $driver ?? $this->getDefaultDriver(); + + if ($this->app->runningUnitTests()) { + $driver = $driver ?? 'null'; + } + + return $driver; + } + + /** + * Get all of the resolved log channels. + * + * @return array + */ + public function getChannels() + { + return $this->channels; + } + /** * System is unusable. * diff --git a/vendor/laravel/framework/src/Illuminate/Log/Logger.php b/vendor/laravel/framework/src/Illuminate/Log/Logger.php index e5a8de628..382b77c64 100755 --- a/vendor/laravel/framework/src/Illuminate/Log/Logger.php +++ b/vendor/laravel/framework/src/Illuminate/Log/Logger.php @@ -26,6 +26,13 @@ class Logger implements LoggerInterface */ protected $dispatcher; + /** + * Any context to be added to logs. + * + * @var array + */ + protected $context = []; + /** * Create a new log writer instance. * @@ -171,11 +178,39 @@ class Logger implements LoggerInterface */ protected function writeLog($level, $message, $context) { - $this->logger->{$level}($message = $this->formatMessage($message), $context); + $this->logger->{$level}( + $message = $this->formatMessage($message), + $context = array_merge($this->context, $context) + ); $this->fireLogEvent($level, $message, $context); } + /** + * Add context to all future logs. + * + * @param array $context + * @return $this + */ + public function withContext(array $context = []) + { + $this->context = array_merge($this->context, $context); + + return $this; + } + + /** + * Flush the existing context array. + * + * @return $this + */ + public function withoutContext() + { + $this->context = []; + + return $this; + } + /** * Register a new callback handler for when a log event is triggered. * diff --git a/vendor/laravel/framework/src/Illuminate/Log/ParsesLogConfiguration.php b/vendor/laravel/framework/src/Illuminate/Log/ParsesLogConfiguration.php index f40cf6b50..fd0d5ed57 100644 --- a/vendor/laravel/framework/src/Illuminate/Log/ParsesLogConfiguration.php +++ b/vendor/laravel/framework/src/Illuminate/Log/ParsesLogConfiguration.php @@ -49,6 +49,23 @@ trait ParsesLogConfiguration throw new InvalidArgumentException('Invalid log level.'); } + /** + * Parse the action level from the given configuration. + * + * @param array $config + * @return int + */ + protected function actionLevel(array $config) + { + $level = $config['action_level'] ?? 'debug'; + + if (isset($this->levels[$level])) { + return $this->levels[$level]; + } + + throw new InvalidArgumentException('Invalid log action level.'); + } + /** * Extract the log channel from the given configuration. * diff --git a/vendor/laravel/framework/src/Illuminate/Log/composer.json b/vendor/laravel/framework/src/Illuminate/Log/composer.json index 53ebba890..1fd148d9a 100755 --- a/vendor/laravel/framework/src/Illuminate/Log/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Log/composer.json @@ -14,9 +14,9 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", + "php": "^7.3|^8.0", + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0", "monolog/monolog": "^2.0" }, "autoload": { @@ -26,7 +26,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/fideloper/proxy/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Macroable/LICENSE.md similarity index 55% rename from vendor/fideloper/proxy/LICENSE.md rename to vendor/laravel/framework/src/Illuminate/Macroable/LICENSE.md index 6d77e4fcc..79810c848 100644 --- a/vendor/fideloper/proxy/LICENSE.md +++ b/vendor/laravel/framework/src/Illuminate/Macroable/LICENSE.md @@ -1,8 +1,16 @@ -MIT License +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Copyright (c) Taylor Otwell -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php b/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php similarity index 94% rename from vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php rename to vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php index 406f65edc..2269142ec 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php +++ b/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php @@ -62,6 +62,16 @@ trait Macroable return isset(static::$macros[$name]); } + /** + * Flush the existing macros. + * + * @return void + */ + public static function flushMacros() + { + static::$macros = []; + } + /** * Dynamically handle calls to the class. * diff --git a/vendor/laravel/framework/src/Illuminate/Macroable/composer.json b/vendor/laravel/framework/src/Illuminate/Macroable/composer.json new file mode 100644 index 000000000..dfa5c62be --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Macroable/composer.json @@ -0,0 +1,33 @@ +{ + "name": "illuminate/macroable", + "description": "The Illuminate Macroable package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": "^7.3|^8.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php b/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php index 4c70e9a12..05d6d8e3c 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php @@ -18,6 +18,7 @@ use Postmark\ThrowExceptionOnFailurePlugin; use Postmark\Transport as PostmarkTransport; use Psr\Log\LoggerInterface; use Swift_DependencyContainer; +use Swift_FailoverTransport as FailoverTransport; use Swift_Mailer; use Swift_SendmailTransport as SendmailTransport; use Swift_SmtpTransport as SmtpTransport; @@ -63,7 +64,7 @@ class MailManager implements FactoryContract * Get a mailer instance by name. * * @param string|null $name - * @return \Illuminate\Mail\Mailer + * @return \Illuminate\Contracts\Mail\Mailer */ public function mailer($name = null) { @@ -156,6 +157,8 @@ class MailManager implements FactoryContract * * @param array $config * @return \Swift_Transport + * + * @throws \InvalidArgumentException */ public function createTransport(array $config) { @@ -168,7 +171,7 @@ class MailManager implements FactoryContract return call_user_func($this->customCreators[$transport], $config); } - if (trim($transport) === '' || ! method_exists($this, $method = 'create'.ucfirst($transport).'Transport')) { + if (trim($transport ?? '') === '' || ! method_exists($this, $method = 'create'.ucfirst($transport).'Transport')) { throw new InvalidArgumentException("Unsupported mail transport [{$transport}]."); } @@ -260,11 +263,11 @@ class MailManager implements FactoryContract */ protected function createSesTransport(array $config) { - if (! isset($config['secret'])) { - $config = array_merge($this->app['config']->get('services.ses', []), [ - 'version' => 'latest', 'service' => 'email', - ]); - } + $config = array_merge( + $this->app['config']->get('services.ses', []), + ['version' => 'latest', 'service' => 'email'], + $config + ); $config = Arr::except($config, ['transport']); @@ -327,13 +330,46 @@ class MailManager implements FactoryContract */ protected function createPostmarkTransport(array $config) { + $headers = isset($config['message_stream_id']) ? [ + 'X-PM-Message-Stream' => $config['message_stream_id'], + ] : []; + return tap(new PostmarkTransport( - $config['token'] ?? $this->app['config']->get('services.postmark.token') + $config['token'] ?? $this->app['config']->get('services.postmark.token'), + $headers ), function ($transport) { - $transport->registerPlugin(new ThrowExceptionOnFailurePlugin()); + $transport->registerPlugin(new ThrowExceptionOnFailurePlugin); }); } + /** + * Create an instance of the Failover Swift Transport driver. + * + * @param array $config + * @return \Swift_FailoverTransport + */ + protected function createFailoverTransport(array $config) + { + $transports = []; + + foreach ($config['mailers'] as $name) { + $config = $this->getConfig($name); + + if (is_null($config)) { + throw new InvalidArgumentException("Mailer [{$name}] is not defined."); + } + + // Now, we will check if the "driver" key exists and if it does we will set + // the transport configuration parameter in order to offer compatibility + // with any Laravel <= 6.x application style mail configuration files. + $transports[] = $this->app['config']['mail.driver'] + ? $this->createTransport(array_merge($config, ['transport' => $name])) + : $this->createTransport($config); + } + + return new FailoverTransport($transports); + } + /** * Create an instance of the Log Swift Transport driver. * @@ -440,6 +476,19 @@ class MailManager implements FactoryContract $this->app['config']['mail.default'] = $name; } + /** + * Disconnect the given mailer and remove from local cache. + * + * @param string|null $name + * @return void + */ + public function purge($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + unset($this->mailers[$name]); + } + /** * Register a custom transport creator Closure. * @@ -454,6 +503,41 @@ class MailManager implements FactoryContract return $this; } + /** + * Get the application instance used by the manager. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public function getApplication() + { + return $this->app; + } + + /** + * Set the application instance used by the manager. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return $this + */ + public function setApplication($app) + { + $this->app = $app; + + return $this; + } + + /** + * Forget all of the resolved mailer instances. + * + * @return $this + */ + public function forgetMailers() + { + $this->mailers = []; + + return $this; + } + /** * Dynamically call the default driver instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php index 6876ba487..3df0074ba 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php @@ -7,18 +7,21 @@ use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory; use Illuminate\Contracts\Mail\Factory as MailFactory; use Illuminate\Contracts\Mail\Mailable as MailableContract; use Illuminate\Contracts\Queue\Factory as Queue; +use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\Support\Renderable; use Illuminate\Support\Collection; use Illuminate\Support\HtmlString; use Illuminate\Support\Str; +use Illuminate\Support\Traits\Conditionable; use Illuminate\Support\Traits\ForwardsCalls; use Illuminate\Support\Traits\Localizable; +use PHPUnit\Framework\Assert as PHPUnit; use ReflectionClass; use ReflectionProperty; class Mailable implements MailableContract, Renderable { - use ForwardsCalls, Localizable; + use Conditionable, ForwardsCalls, Localizable; /** * The locale of the message. @@ -74,7 +77,7 @@ class Mailable implements MailableContract, Renderable * * @var string */ - protected $markdown; + public $markdown; /** * The HTML to use for the message. @@ -146,6 +149,13 @@ class Mailable implements MailableContract, Renderable */ public $mailer; + /** + * The rendered mailable views for testing / assertions. + * + * @var array + */ + protected $assertionableRenderStrings; + /** * The callback that should be invoked while building the view data. * @@ -161,7 +171,7 @@ class Mailable implements MailableContract, Renderable */ public function send($mailer) { - return $this->withLocale($this->locale, function () use ($mailer) { + $this->withLocale($this->locale, function () use ($mailer) { Container::getInstance()->call([$this, 'build']); $mailer = $mailer instanceof MailFactory @@ -224,7 +234,11 @@ class Mailable implements MailableContract, Renderable */ protected function newQueuedJob() { - return new SendQueuedMailable($this); + return (new SendQueuedMailable($this)) + ->through(array_merge( + method_exists($this, 'middleware') ? $this->middleware() : [], + $this->middleware ?? [] + )); } /** @@ -604,6 +618,10 @@ class Mailable implements MailableContract, Renderable */ protected function setAddress($address, $name = null, $property = 'to') { + if (empty($address)) { + return $this; + } + foreach ($this->addressesToArray($address, $name) as $recipient) { $recipient = $this->normalizeRecipient($recipient); @@ -665,6 +683,10 @@ class Mailable implements MailableContract, Renderable */ protected function hasRecipient($address, $name = null, $property = 'to') { + if (empty($address)) { + return false; + } + $expected = $this->normalizeRecipient( $this->addressesToArray($address, $name)[0] ); @@ -844,6 +866,114 @@ class Mailable implements MailableContract, Renderable return $this; } + /** + * Assert that the given text is present in the HTML email body. + * + * @param string $string + * @return $this + */ + public function assertSeeInHtml($string) + { + [$html, $text] = $this->renderForAssertions(); + + PHPUnit::assertTrue( + Str::contains($html, $string), + "Did not see expected text [{$string}] within email body." + ); + + return $this; + } + + /** + * Assert that the given text is not present in the HTML email body. + * + * @param string $string + * @return $this + */ + public function assertDontSeeInHtml($string) + { + [$html, $text] = $this->renderForAssertions(); + + PHPUnit::assertFalse( + Str::contains($html, $string), + "Saw unexpected text [{$string}] within email body." + ); + + return $this; + } + + /** + * Assert that the given text is present in the plain-text email body. + * + * @param string $string + * @return $this + */ + public function assertSeeInText($string) + { + [$html, $text] = $this->renderForAssertions(); + + PHPUnit::assertTrue( + Str::contains($text, $string), + "Did not see expected text [{$string}] within text email body." + ); + + return $this; + } + + /** + * Assert that the given text is not present in the plain-text email body. + * + * @param string $string + * @return $this + */ + public function assertDontSeeInText($string) + { + [$html, $text] = $this->renderForAssertions(); + + PHPUnit::assertFalse( + Str::contains($text, $string), + "Saw unexpected text [{$string}] within text email body." + ); + + return $this; + } + + /** + * Render the HTML and plain-text version of the mailable into views for assertions. + * + * @return array + * + * @throws \ReflectionException + */ + protected function renderForAssertions() + { + if ($this->assertionableRenderStrings) { + return $this->assertionableRenderStrings; + } + + return $this->assertionableRenderStrings = $this->withLocale($this->locale, function () { + Container::getInstance()->call([$this, 'build']); + + $html = Container::getInstance()->make('mailer')->render( + $view = $this->buildView(), $this->buildViewData() + ); + + if (is_array($view) && isset($view[1])) { + $text = $view[1]; + } + + $text = $text ?? $view['text'] ?? ''; + + if (! empty($text) && ! $text instanceof Htmlable) { + $text = Container::getInstance()->make('mailer')->render( + $text, $this->buildViewData() + ); + } + + return [(string) $html, (string) $text]; + }); + } + /** * Set the name of the mailer that should send the message. * @@ -881,25 +1011,6 @@ class Mailable implements MailableContract, Renderable static::$viewDataCallback = $callback; } - /** - * Apply the callback's message changes if the given "value" is true. - * - * @param mixed $value - * @param callable $callback - * @param mixed $default - * @return mixed|$this - */ - public function when($value, $callback, $default = null) - { - if ($value) { - return $callback($this, $value) ?: $this; - } elseif ($default) { - return $default($this, $value) ?: $this; - } - - return $this; - } - /** * Dynamically bind parameters to the message. * diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php index 668d68baa..128f211f7 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php @@ -197,7 +197,7 @@ class Mailer implements MailerContract, MailQueueContract */ public function html($html, $callback) { - return $this->send(['html' => new HtmlString($html)], [], $callback); + $this->send(['html' => new HtmlString($html)], [], $callback); } /** @@ -209,7 +209,7 @@ class Mailer implements MailerContract, MailQueueContract */ public function raw($text, $callback) { - return $this->send(['raw' => $text], [], $callback); + $this->send(['raw' => $text], [], $callback); } /** @@ -222,7 +222,7 @@ class Mailer implements MailerContract, MailQueueContract */ public function plain($view, array $data, $callback) { - return $this->send(['text' => $view], $data, $callback); + $this->send(['text' => $view], $data, $callback); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php b/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php index 65b6bdeb9..9bd083605 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php @@ -6,7 +6,6 @@ use Illuminate\Contracts\View\Factory as ViewFactory; use Illuminate\Support\HtmlString; use Illuminate\Support\Str; use League\CommonMark\CommonMarkConverter; -use League\CommonMark\Environment; use League\CommonMark\Extension\Table\TableExtension; use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles; @@ -63,9 +62,13 @@ class Markdown 'mail', $this->htmlComponentPaths() )->make($view, $data)->render(); - $theme = Str::contains($this->theme, '::') - ? $this->theme - : 'mail::themes.'.$this->theme; + if ($this->view->exists($customTheme = Str::start($this->theme, 'mail.'))) { + $theme = $customTheme; + } else { + $theme = Str::contains($this->theme, '::') + ? $this->theme + : 'mail::themes.'.$this->theme; + } return new HtmlString(($inliner ?: new CssToInlineStyles)->convert( $contents, $this->view->make($theme, $data)->render() @@ -100,15 +103,13 @@ class Markdown */ public static function parse($text) { - $environment = Environment::createCommonMarkEnvironment(); - - $environment->addExtension(new TableExtension); - $converter = new CommonMarkConverter([ 'allow_unsafe_links' => false, - ], $environment); + ]); - return new HtmlString($converter->convertToHtml($text)); + $converter->getEnvironment()->addExtension(new TableExtension()); + + return new HtmlString((string) $converter->convertToHtml($text)); } /** @@ -170,4 +171,14 @@ class Markdown return $this; } + + /** + * Get the theme currently being used by the renderer. + * + * @return string + */ + public function getTheme() + { + return $this->theme; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Message.php b/vendor/laravel/framework/src/Illuminate/Mail/Message.php index d701fba9f..cab6c026d 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/Message.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Message.php @@ -137,7 +137,7 @@ class Message } /** - * Add a reply to address to the message. + * Add a "reply to" address to the message. * * @param string|array $address * @param string|null $name diff --git a/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php b/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php index f59d3fc62..8fbabc4bd 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php @@ -5,9 +5,12 @@ namespace Illuminate\Mail; use Illuminate\Contracts\Mail\Mailable as MailableContract; use Illuminate\Contracts\Mail\Mailer as MailerContract; use Illuminate\Contracts\Translation\HasLocalePreference; +use Illuminate\Support\Traits\Conditionable; class PendingMail { + use Conditionable; + /** * The mailer instance. * @@ -114,24 +117,11 @@ class PendingMail * Send a new mailable message instance. * * @param \Illuminate\Contracts\Mail\Mailable $mailable - * @return mixed + * @return void */ public function send(MailableContract $mailable) { - return $this->mailer->send($this->fill($mailable)); - } - - /** - * Send a mailable message immediately. - * - * @param \Illuminate\Contracts\Mail\Mailable $mailable - * @return mixed - * - * @deprecated Use send() instead. - */ - public function sendNow(MailableContract $mailable) - { - return $this->mailer->send($this->fill($mailable)); + $this->mailer->send($this->fill($mailable)); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php b/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php index 0747a884a..1009789b4 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php @@ -2,11 +2,15 @@ namespace Illuminate\Mail; +use Illuminate\Bus\Queueable; use Illuminate\Contracts\Mail\Factory as MailFactory; use Illuminate\Contracts\Mail\Mailable as MailableContract; +use Illuminate\Contracts\Queue\ShouldBeEncrypted; class SendQueuedMailable { + use Queueable; + /** * The mailable message instance. * @@ -28,6 +32,13 @@ class SendQueuedMailable */ public $timeout; + /** + * Indicates if the job should be encrypted. + * + * @var bool + */ + public $shouldBeEncrypted = false; + /** * Create a new job instance. * @@ -39,6 +50,8 @@ class SendQueuedMailable $this->mailable = $mailable; $this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null; $this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null; + $this->afterCommit = property_exists($mailable, 'afterCommit') ? $mailable->afterCommit : null; + $this->shouldBeEncrypted = $mailable instanceof ShouldBeEncrypted; } /** @@ -76,17 +89,17 @@ class SendQueuedMailable } /** - * Get the retry delay for the mailable object. + * Get the number of seconds before a released mailable will be available. * * @return mixed */ - public function retryAfter() + public function backoff() { - if (! method_exists($this->mailable, 'retryAfter') && ! isset($this->mailable->retryAfter)) { + if (! method_exists($this->mailable, 'backoff') && ! isset($this->mailable->backoff)) { return; } - return $this->mailable->retryAfter ?? $this->mailable->retryAfter(); + return $this->mailable->backoff ?? $this->mailable->backoff(); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php index fbedec956..fe6fdf7dd 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php @@ -26,6 +26,8 @@ class ArrayTransport extends Transport /** * {@inheritdoc} + * + * @return int */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php index 43a2faa20..21f1aae96 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php @@ -28,6 +28,8 @@ class LogTransport extends Transport /** * {@inheritdoc} + * + * @return int */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php index 195c00032..71ceccfa0 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php @@ -3,7 +3,9 @@ namespace Illuminate\Mail\Transport; use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\GuzzleException; use Swift_Mime_SimpleMessage; +use Swift_TransportException; class MailgunTransport extends Transport { @@ -55,6 +57,8 @@ class MailgunTransport extends Transport /** * {@inheritdoc} + * + * @return int */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { @@ -66,15 +70,20 @@ class MailgunTransport extends Transport $message->setBcc([]); - $response = $this->client->request( - 'POST', - "https://{$this->endpoint}/v3/{$this->domain}/messages.mime", - $this->payload($message, $to) - ); + try { + $response = $this->client->request( + 'POST', + "https://{$this->endpoint}/v3/{$this->domain}/messages.mime", + $this->payload($message, $to) + ); + } catch (GuzzleException $e) { + throw new Swift_TransportException('Request to Mailgun API failed.', $e->getCode(), $e); + } - $message->getHeaders()->addTextHeader( - 'X-Mailgun-Message-ID', $this->getMessageId($response) - ); + $messageId = $this->getMessageId($response); + + $message->getHeaders()->addTextHeader('X-Message-ID', $messageId); + $message->getHeaders()->addTextHeader('X-Mailgun-Message-ID', $messageId); $message->setBcc($bcc); diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php index 0dc8584a4..7dd81a227 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php @@ -2,8 +2,10 @@ namespace Illuminate\Mail\Transport; +use Aws\Exception\AwsException; use Aws\Ses\SesClient; use Swift_Mime_SimpleMessage; +use Swift_TransportException; class SesTransport extends Transport { @@ -36,23 +38,32 @@ class SesTransport extends Transport /** * {@inheritdoc} + * + * @return int */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); - $result = $this->ses->sendRawEmail( - array_merge( - $this->options, [ - 'Source' => key($message->getSender() ?: $message->getFrom()), - 'RawMessage' => [ - 'Data' => $message->toString(), - ], - ] - ) - ); + try { + $result = $this->ses->sendRawEmail( + array_merge( + $this->options, [ + 'Source' => key($message->getSender() ?: $message->getFrom()), + 'RawMessage' => [ + 'Data' => $message->toString(), + ], + ] + ) + ); + } catch (AwsException $e) { + throw new Swift_TransportException('Request to AWS SES API failed.', $e->getCode(), $e); + } - $message->getHeaders()->addTextHeader('X-SES-Message-ID', $result->get('MessageId')); + $messageId = $result->get('MessageId'); + + $message->getHeaders()->addTextHeader('X-Message-ID', $messageId); + $message->getHeaders()->addTextHeader('X-SES-Message-ID', $messageId); $this->sendPerformed($message); diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php index b26bff3ff..62b44957c 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php @@ -18,6 +18,8 @@ abstract class Transport implements Swift_Transport /** * {@inheritdoc} + * + * @return bool */ public function isStarted() { @@ -42,6 +44,8 @@ abstract class Transport implements Swift_Transport /** * {@inheritdoc} + * + * @return bool */ public function ping() { diff --git a/vendor/laravel/framework/src/Illuminate/Mail/composer.json b/vendor/laravel/framework/src/Illuminate/Mail/composer.json index 0eb541fac..cfddcb3a3 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Mail/composer.json @@ -14,14 +14,16 @@ } ], "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "league/commonmark": "^1.3", - "psr/log": "^1.0", - "swiftmailer/swiftmailer": "^6.0", + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "league/commonmark": "^1.3|^2.0.2", + "psr/log": "^1.0|^2.0", + "swiftmailer/swiftmailer": "^6.3", "tijsverkoyen/css-to-inline-styles": "^2.2.2" }, "autoload": { @@ -31,12 +33,12 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { - "aws/aws-sdk-php": "Required to use the SES mail driver (^3.155).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver (^6.3.1|^7.0.1).", + "aws/aws-sdk-php": "Required to use the SES mail driver (^3.198.1).", + "guzzlehttp/guzzle": "Required to use the Mailgun mail driver (^6.5.5|^7.0.1).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php index 02a54e2da..21d349b39 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php @@ -3,8 +3,8 @@ - - + + + + diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css index 350fb838f..2483b1168 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css @@ -113,6 +113,7 @@ img { .logo { height: 75px; + max-height: 75px; width: 75px; } diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php b/vendor/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php index eab959b7c..aa4d7bbc7 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php @@ -20,6 +20,8 @@ class AnonymousNotifiable * @param string $channel * @param mixed $route * @return $this + * + * @throws \InvalidArgumentException */ public function route($channel, $route) { diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php b/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php index d2344ab68..8eb9c2510 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php @@ -34,7 +34,7 @@ class ChannelManager extends Manager implements DispatcherContract, FactoryContr */ public function send($notifiables, $notification) { - return (new NotificationSender( + (new NotificationSender( $this, $this->container->make(Bus::class), $this->container->make(Dispatcher::class), $this->locale) )->send($notifiables, $notification); } @@ -49,7 +49,7 @@ class ChannelManager extends Manager implements DispatcherContract, FactoryContr */ public function sendNow($notifiables, $notification, array $channels = null) { - return (new NotificationSender( + (new NotificationSender( $this, $this->container->make(Bus::class), $this->container->make(Dispatcher::class), $this->locale) )->sendNow($notifiables, $notification, $channels); } diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php index d281b9b13..1389f49c6 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php @@ -18,7 +18,7 @@ class BroadcastChannel protected $events; /** - * Create a new database channel. + * Create a new broadcast channel. * * @param \Illuminate\Contracts\Events\Dispatcher $events * @return void diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php index bd8af6231..8b3167b01 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php @@ -21,6 +21,25 @@ class DatabaseChannel ); } + /** + * Build an array payload for the DatabaseNotification Model. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return array + */ + protected function buildPayload($notifiable, Notification $notification) + { + return [ + 'id' => $notification->id, + 'type' => method_exists($notification, 'databaseType') + ? $notification->databaseType($notifiable) + : get_class($notification), + 'data' => $this->getData($notifiable, $notification), + 'read_at' => null, + ]; + } + /** * Get the data for the notification. * @@ -43,21 +62,4 @@ class DatabaseChannel throw new RuntimeException('Notification is missing toDatabase / toArray method.'); } - - /** - * Build an array payload for the DatabaseNotification Model. - * - * @param mixed $notifiable - * @param \Illuminate\Notifications\Notification $notification - * @return array - */ - protected function buildPayload($notifiable, Notification $notification) - { - return [ - 'id' => $notification->id, - 'type' => get_class($notification), - 'data' => $this->getData($notifiable, $notification), - 'read_at' => null, - ]; - } } diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php b/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php index 0dfc7e530..14bc9d659 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php @@ -2,6 +2,7 @@ namespace Illuminate\Notifications; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; class DatabaseNotification extends Model @@ -98,6 +99,28 @@ class DatabaseNotification extends Model return $this->read_at === null; } + /** + * Scope a query to only include read notifications. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeRead(Builder $query) + { + return $query->whereNotNull('read_at'); + } + + /** + * Scope a query to only include unread notifications. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeUnread(Builder $query) + { + return $query->whereNull('read_at'); + } + /** * Create a new database notification collection instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php b/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php index 77498ea39..249588527 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php @@ -92,6 +92,10 @@ class BroadcastNotificationCreated implements ShouldBroadcast */ public function broadcastWith() { + if (method_exists($this->notification, 'broadcastWith')) { + return $this->notification->broadcastWith(); + } + return array_merge($this->data, [ 'id' => $this->notification->id, 'type' => $this->broadcastType(), diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php index 981d8e552..5f999da9a 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php @@ -21,7 +21,7 @@ trait HasDatabaseNotifications */ public function readNotifications() { - return $this->notifications()->whereNotNull('read_at'); + return $this->notifications()->read(); } /** @@ -31,6 +31,6 @@ trait HasDatabaseNotifications */ public function unreadNotifications() { - return $this->notifications()->whereNull('read_at'); + return $this->notifications()->unread(); } } diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php index 08ee2f1f7..94342f30b 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php @@ -6,10 +6,12 @@ use Illuminate\Container\Container; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Renderable; use Illuminate\Mail\Markdown; -use Traversable; +use Illuminate\Support\Traits\Conditionable; class MailMessage extends SimpleMessage implements Renderable { + use Conditionable; + /** * The view to be rendered. * @@ -297,9 +299,7 @@ class MailMessage extends SimpleMessage implements Renderable */ protected function arrayOfAddresses($address) { - return is_array($address) || - $address instanceof Arrayable || - $address instanceof Traversable; + return is_iterable($address) || $address instanceof Arrayable; } /** @@ -315,9 +315,10 @@ class MailMessage extends SimpleMessage implements Renderable ); } - return Container::getInstance() - ->make(Markdown::class) - ->render($this->markdown, $this->data()); + $markdown = Container::getInstance()->make(Markdown::class); + + return $markdown->theme($this->theme ?: $markdown->getTheme()) + ->render($this->markdown, $this->data()); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php index f90b26e99..7dab7e452 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php @@ -157,6 +157,21 @@ class SimpleMessage return $this->with($line); } + /** + * Add lines of text to the notification. + * + * @param iterable $lines + * @return $this + */ + public function lines($lines) + { + foreach ($lines as $line) { + $this->line($line); + } + + return $this; + } + /** * Add a line of text to the notification. * @@ -192,7 +207,7 @@ class SimpleMessage return implode(' ', array_map('trim', $line)); } - return trim(implode(' ', array_map('trim', preg_split('/\\r\\n|\\r|\\n/', $line)))); + return trim(implode(' ', array_map('trim', preg_split('/\\r\\n|\\r|\\n/', $line ?? '')))); } /** @@ -239,7 +254,7 @@ class SimpleMessage 'outroLines' => $this->outroLines, 'actionText' => $this->actionText, 'actionUrl' => $this->actionUrl, - 'displayableActionUrl' => str_replace(['mailto:', 'tel:'], '', $this->actionUrl), + 'displayableActionUrl' => str_replace(['mailto:', 'tel:'], '', $this->actionUrl ?? ''), ]; } } diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php b/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php index 15128a15e..c7b67ecc3 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php @@ -76,7 +76,7 @@ class NotificationSender return $this->queueNotification($notifiables, $notification); } - return $this->sendNow($notifiables, $notification); + $this->sendNow($notifiables, $notification); } /** @@ -162,6 +162,11 @@ class NotificationSender */ protected function shouldSendNotification($notifiable, $notification, $channel) { + if (method_exists($notification, 'shouldSend') && + $notification->shouldSend($notifiable, $channel) === false) { + return false; + } + return $this->events->until( new NotificationSending($notifiable, $notification, $channel) ) !== false; @@ -202,7 +207,10 @@ class NotificationSender (new SendQueuedNotifications($notifiable, $notification, [$channel])) ->onConnection($notification->connection) ->onQueue($queue) - ->delay($notification->delay) + ->delay(is_array($notification->delay) ? + ($notification->delay[$channel] ?? null) + : $notification->delay + ) ->through( array_merge( method_exists($notification, 'middleware') ? $notification->middleware() : [], diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php index 7fc300e50..d83c8906e 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php @@ -3,6 +3,7 @@ namespace Illuminate\Notifications; use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Queue\ShouldBeEncrypted; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Database\Eloquent\Collection as EloquentCollection; use Illuminate\Database\Eloquent\Model; @@ -49,6 +50,13 @@ class SendQueuedNotifications implements ShouldQueue */ public $timeout; + /** + * Indicates if the job should be encrypted. + * + * @var bool + */ + public $shouldBeEncrypted = false; + /** * Create a new job instance. * @@ -64,6 +72,8 @@ class SendQueuedNotifications implements ShouldQueue $this->notifiables = $this->wrapNotifiables($notifiables); $this->tries = property_exists($notification, 'tries') ? $notification->tries : null; $this->timeout = property_exists($notification, 'timeout') ? $notification->timeout : null; + $this->afterCommit = property_exists($notification, 'afterCommit') ? $notification->afterCommit : null; + $this->shouldBeEncrypted = $notification instanceof ShouldBeEncrypted; } /** @@ -118,17 +128,17 @@ class SendQueuedNotifications implements ShouldQueue } /** - * Get the retry delay for the notification. + * Get the number of seconds before a released notification will be available. * * @return mixed */ - public function retryAfter() + public function backoff() { - if (! method_exists($this->notification, 'retryAfter') && ! isset($this->notification->retryAfter)) { + if (! method_exists($this->notification, 'backoff') && ! isset($this->notification->backoff)) { return; } - return $this->notification->retryAfter ?? $this->notification->retryAfter(); + return $this->notification->backoff ?? $this->notification->backoff(); } /** @@ -138,11 +148,11 @@ class SendQueuedNotifications implements ShouldQueue */ public function retryUntil() { - if (! method_exists($this->notification, 'retryUntil') && ! isset($this->notification->timeoutAt)) { + if (! method_exists($this->notification, 'retryUntil') && ! isset($this->notification->retryUntil)) { return; } - return $this->notification->timeoutAt ?? $this->notification->retryUntil(); + return $this->notification->retryUntil ?? $this->notification->retryUntil(); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/composer.json b/vendor/laravel/framework/src/Illuminate/Notifications/composer.json index 183064770..1bc673a22 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Notifications/composer.json @@ -14,15 +14,16 @@ } ], "require": { - "php": "^7.2.5|^8.0", - "illuminate/broadcasting": "^7.0", - "illuminate/bus": "^7.0", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/mail": "^7.0", - "illuminate/queue": "^7.0", - "illuminate/support": "^7.0" + "php": "^7.3|^8.0", + "illuminate/broadcasting": "^8.0", + "illuminate/bus": "^8.0", + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/filesystem": "^8.0", + "illuminate/mail": "^8.0", + "illuminate/queue": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { @@ -31,11 +32,11 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "suggest": { - "illuminate/database": "Required to use the database transport (^7.0)." + "illuminate/database": "Required to use the database transport (^8.0)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php b/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php index e7a56b461..bcf39f0a1 100644 --- a/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php @@ -51,7 +51,7 @@ @isset($actionText) @slot('subcopy') @lang( - "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n". + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\n". 'into your web browser:', [ 'actionText' => $actionText, diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/AbstractCursorPaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractCursorPaginator.php new file mode 100644 index 000000000..12344850b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractCursorPaginator.php @@ -0,0 +1,676 @@ +cursorName => $cursor->encode()]; + + if (count($this->query) > 0) { + $parameters = array_merge($this->query, $parameters); + } + + return $this->path() + .(Str::contains($this->path(), '?') ? '&' : '?') + .Arr::query($parameters) + .$this->buildFragment(); + } + + /** + * Get the URL for the previous page. + * + * @return string|null + */ + public function previousPageUrl() + { + if (is_null($previousCursor = $this->previousCursor())) { + return null; + } + + return $this->url($previousCursor); + } + + /** + * The URL for the next page, or null. + * + * @return string|null + */ + public function nextPageUrl() + { + if (is_null($nextCursor = $this->nextCursor())) { + return null; + } + + return $this->url($nextCursor); + } + + /** + * Get the "cursor" that points to the previous set of items. + * + * @return \Illuminate\Pagination\Cursor|null + */ + public function previousCursor() + { + if (is_null($this->cursor) || + ($this->cursor->pointsToPreviousItems() && ! $this->hasMore)) { + return null; + } + + if ($this->items->isEmpty()) { + return null; + } + + return $this->getCursorForItem($this->items->first(), false); + } + + /** + * Get the "cursor" that points to the next set of items. + * + * @return \Illuminate\Pagination\Cursor|null + */ + public function nextCursor() + { + if ((is_null($this->cursor) && ! $this->hasMore) || + (! is_null($this->cursor) && $this->cursor->pointsToNextItems() && ! $this->hasMore)) { + return null; + } + + if ($this->items->isEmpty()) { + return null; + } + + return $this->getCursorForItem($this->items->last(), true); + } + + /** + * Get a cursor instance for the given item. + * + * @param \ArrayAccess|\stdClass $item + * @param bool $isNext + * @return \Illuminate\Pagination\Cursor + */ + public function getCursorForItem($item, $isNext = true) + { + return new Cursor($this->getParametersForItem($item), $isNext); + } + + /** + * Get the cursor parameters for a given object. + * + * @param \ArrayAccess|\stdClass $item + * @return array + * + * @throws \Exception + */ + public function getParametersForItem($item) + { + return collect($this->parameters) + ->flip() + ->map(function ($_, $parameterName) use ($item) { + if ($item instanceof JsonResource) { + $item = $item->resource; + } + + if ($item instanceof Model && + ! is_null($parameter = $this->getPivotParameterForItem($item, $parameterName))) { + return $parameter; + } elseif ($item instanceof ArrayAccess || is_array($item)) { + return $this->ensureParameterIsPrimitive( + $item[$parameterName] ?? $item[Str::afterLast($parameterName, '.')] + ); + } elseif (is_object($item)) { + return $this->ensureParameterIsPrimitive( + $item->{$parameterName} ?? $item->{Str::afterLast($parameterName, '.')} + ); + } + + throw new Exception('Only arrays and objects are supported when cursor paginating items.'); + })->toArray(); + } + + /** + * Get the cursor parameter value from a pivot model if applicable. + * + * @param \ArrayAccess|\stdClass $item + * @param string $parameterName + * @return string|null + */ + protected function getPivotParameterForItem($item, $parameterName) + { + $table = Str::beforeLast($parameterName, '.'); + + foreach ($item->getRelations() as $relation) { + if ($relation instanceof Pivot && $relation->getTable() === $table) { + return $this->ensureParameterIsPrimitive( + $relation->getAttribute(Str::afterLast($parameterName, '.')) + ); + } + } + } + + /** + * Ensure the parameter is a primitive type. + * + * This can resolve issues that arise the developer uses a value object for an attribute. + * + * @param mixed $parameter + * @return mixed + */ + protected function ensureParameterIsPrimitive($parameter) + { + return is_object($parameter) && method_exists($parameter, '__toString') + ? (string) $parameter + : $parameter; + } + + /** + * Get / set the URL fragment to be appended to URLs. + * + * @param string|null $fragment + * @return $this|string|null + */ + public function fragment($fragment = null) + { + if (is_null($fragment)) { + return $this->fragment; + } + + $this->fragment = $fragment; + + return $this; + } + + /** + * Add a set of query string values to the paginator. + * + * @param array|string|null $key + * @param string|null $value + * @return $this + */ + public function appends($key, $value = null) + { + if (is_null($key)) { + return $this; + } + + if (is_array($key)) { + return $this->appendArray($key); + } + + return $this->addQuery($key, $value); + } + + /** + * Add an array of query string values. + * + * @param array $keys + * @return $this + */ + protected function appendArray(array $keys) + { + foreach ($keys as $key => $value) { + $this->addQuery($key, $value); + } + + return $this; + } + + /** + * Add all current query string values to the paginator. + * + * @return $this + */ + public function withQueryString() + { + if (! is_null($query = Paginator::resolveQueryString())) { + return $this->appends($query); + } + + return $this; + } + + /** + * Add a query string value to the paginator. + * + * @param string $key + * @param string $value + * @return $this + */ + protected function addQuery($key, $value) + { + if ($key !== $this->cursorName) { + $this->query[$key] = $value; + } + + return $this; + } + + /** + * Build the full fragment portion of a URL. + * + * @return string + */ + protected function buildFragment() + { + return $this->fragment ? '#'.$this->fragment : ''; + } + + /** + * Load a set of relationships onto the mixed relationship collection. + * + * @param string $relation + * @param array $relations + * @return $this + */ + public function loadMorph($relation, $relations) + { + $this->getCollection()->loadMorph($relation, $relations); + + return $this; + } + + /** + * Load a set of relationship counts onto the mixed relationship collection. + * + * @param string $relation + * @param array $relations + * @return $this + */ + public function loadMorphCount($relation, $relations) + { + $this->getCollection()->loadMorphCount($relation, $relations); + + return $this; + } + + /** + * Get the slice of items being paginated. + * + * @return array + */ + public function items() + { + return $this->items->all(); + } + + /** + * Transform each item in the slice of items using a callback. + * + * @param callable $callback + * @return $this + */ + public function through(callable $callback) + { + $this->items->transform($callback); + + return $this; + } + + /** + * Get the number of items shown per page. + * + * @return int + */ + public function perPage() + { + return $this->perPage; + } + + /** + * Get the current cursor being paginated. + * + * @return \Illuminate\Pagination\Cursor|null + */ + public function cursor() + { + return $this->cursor; + } + + /** + * Get the query string variable used to store the cursor. + * + * @return string + */ + public function getCursorName() + { + return $this->cursorName; + } + + /** + * Set the query string variable used to store the cursor. + * + * @param string $name + * @return $this + */ + public function setCursorName($name) + { + $this->cursorName = $name; + + return $this; + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function withPath($path) + { + return $this->setPath($path); + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function setPath($path) + { + $this->path = $path; + + return $this; + } + + /** + * Get the base path for paginator generated URLs. + * + * @return string|null + */ + public function path() + { + return $this->path; + } + + /** + * Resolve the current cursor or return the default value. + * + * @param string $cursorName + * @return \Illuminate\Pagination\Cursor|null + */ + public static function resolveCurrentCursor($cursorName = 'cursor', $default = null) + { + if (isset(static::$currentCursorResolver)) { + return call_user_func(static::$currentCursorResolver, $cursorName); + } + + return $default; + } + + /** + * Set the current cursor resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function currentCursorResolver(Closure $resolver) + { + static::$currentCursorResolver = $resolver; + } + + /** + * Get an instance of the view factory from the resolver. + * + * @return \Illuminate\Contracts\View\Factory + */ + public static function viewFactory() + { + return Paginator::viewFactory(); + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return $this->items->getIterator(); + } + + /** + * Determine if the list of items is empty. + * + * @return bool + */ + public function isEmpty() + { + return $this->items->isEmpty(); + } + + /** + * Determine if the list of items is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return $this->items->isNotEmpty(); + } + + /** + * Get the number of items for the current page. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return $this->items->count(); + } + + /** + * Get the paginator's underlying collection. + * + * @return \Illuminate\Support\Collection + */ + public function getCollection() + { + return $this->items; + } + + /** + * Set the paginator's underlying collection. + * + * @param \Illuminate\Support\Collection $collection + * @return $this + */ + public function setCollection(Collection $collection) + { + $this->items = $collection; + + return $this; + } + + /** + * Get the paginator options. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * Determine if the given item exists. + * + * @param mixed $key + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($key) + { + return $this->items->has($key); + } + + /** + * Get the item at the given offset. + * + * @param mixed $key + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($key) + { + return $this->items->get($key); + } + + /** + * Set the item at the given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) + { + $this->items->put($key, $value); + } + + /** + * Unset the item at the given key. + * + * @param mixed $key + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($key) + { + $this->items->forget($key); + } + + /** + * Render the contents of the paginator to HTML. + * + * @return string + */ + public function toHtml() + { + return (string) $this->render(); + } + + /** + * Make dynamic calls into the collection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->forwardCallTo($this->getCollection(), $method, $parameters); + } + + /** + * Render the contents of the paginator when casting to a string. + * + * @return string + */ + public function __toString() + { + return (string) $this->render(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php index 12ad64460..ac9ef4035 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php @@ -8,13 +8,14 @@ use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; use Illuminate\Support\Traits\ForwardsCalls; +use Illuminate\Support\Traits\Tappable; /** * @mixin \Illuminate\Support\Collection */ abstract class AbstractPaginator implements Htmlable { - use ForwardsCalls; + use ForwardsCalls, Tappable; /** * All of the items being paginated. @@ -112,14 +113,14 @@ abstract class AbstractPaginator implements Htmlable * * @var string */ - public static $defaultView = 'pagination::bootstrap-4'; + public static $defaultView = 'pagination::tailwind'; /** * The default "simple" pagination view. * * @var string */ - public static $defaultSimpleView = 'pagination::simple-bootstrap-4'; + public static $defaultSimpleView = 'pagination::simple-tailwind'; /** * Determine if the given value is a valid page number. @@ -335,6 +336,19 @@ abstract class AbstractPaginator implements Htmlable return count($this->items) > 0 ? $this->firstItem() + $this->count() - 1 : null; } + /** + * Transform each item in the slice of items using a callback. + * + * @param callable $callback + * @return $this + */ + public function through(callable $callback) + { + $this->items->transform($callback); + + return $this; + } + /** * Get the number of items shown per page. * @@ -365,6 +379,16 @@ abstract class AbstractPaginator implements Htmlable return $this->currentPage() <= 1; } + /** + * Determine if the paginator is on the last page. + * + * @return bool + */ + public function onLastPage() + { + return ! $this->hasMorePages(); + } + /** * Get the current page. * @@ -498,6 +522,21 @@ abstract class AbstractPaginator implements Htmlable static::$currentPageResolver = $resolver; } + /** + * Resolve the query string or return the default value. + * + * @param string|array|null $default + * @return string + */ + public static function resolveQueryString($default = null) + { + if (isset(static::$queryStringResolver)) { + return (static::$queryStringResolver)(); + } + + return $default; + } + /** * Set with query string resolver callback. * @@ -563,6 +602,17 @@ abstract class AbstractPaginator implements Htmlable static::defaultSimpleView('pagination::simple-tailwind'); } + /** + * Indicate that Bootstrap 4 styling should be used for generated links. + * + * @return void + */ + public static function useBootstrap() + { + static::defaultView('pagination::bootstrap-4'); + static::defaultSimpleView('pagination::simple-bootstrap-4'); + } + /** * Indicate that Bootstrap 3 styling should be used for generated links. * @@ -579,6 +629,7 @@ abstract class AbstractPaginator implements Htmlable * * @return \ArrayIterator */ + #[\ReturnTypeWillChange] public function getIterator() { return $this->items->getIterator(); @@ -609,6 +660,7 @@ abstract class AbstractPaginator implements Htmlable * * @return int */ + #[\ReturnTypeWillChange] public function count() { return $this->items->count(); @@ -653,6 +705,7 @@ abstract class AbstractPaginator implements Htmlable * @param mixed $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->items->has($key); @@ -664,6 +717,7 @@ abstract class AbstractPaginator implements Htmlable * @param mixed $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->items->get($key); @@ -676,6 +730,7 @@ abstract class AbstractPaginator implements Htmlable * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { $this->items->put($key, $value); @@ -687,6 +742,7 @@ abstract class AbstractPaginator implements Htmlable * @param mixed $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { $this->items->forget($key); @@ -715,7 +771,7 @@ abstract class AbstractPaginator implements Htmlable } /** - * Render the contents of the paginator when casting to string. + * Render the contents of the paginator when casting to a string. * * @return string */ diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Cursor.php b/vendor/laravel/framework/src/Illuminate/Pagination/Cursor.php new file mode 100644 index 000000000..e8edf6526 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Cursor.php @@ -0,0 +1,132 @@ +parameters = $parameters; + $this->pointsToNextItems = $pointsToNextItems; + } + + /** + * Get the given parameter from the cursor. + * + * @param string $parameterName + * @return string|null + * + * @throws \UnexpectedValueException + */ + public function parameter(string $parameterName) + { + if (! array_key_exists($parameterName, $this->parameters)) { + throw new UnexpectedValueException("Unable to find parameter [{$parameterName}] in pagination item."); + } + + return $this->parameters[$parameterName]; + } + + /** + * Get the given parameters from the cursor. + * + * @param array $parameterNames + * @return array + */ + public function parameters(array $parameterNames) + { + return collect($parameterNames)->map(function ($parameterName) { + return $this->parameter($parameterName); + })->toArray(); + } + + /** + * Determine whether the cursor points to the next set of items. + * + * @return bool + */ + public function pointsToNextItems() + { + return $this->pointsToNextItems; + } + + /** + * Determine whether the cursor points to the previous set of items. + * + * @return bool + */ + public function pointsToPreviousItems() + { + return ! $this->pointsToNextItems; + } + + /** + * Get the array representation of the cursor. + * + * @return array + */ + public function toArray() + { + return array_merge($this->parameters, [ + '_pointsToNextItems' => $this->pointsToNextItems, + ]); + } + + /** + * Get the encoded string representation of the cursor to construct a URL. + * + * @return string + */ + public function encode() + { + return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(json_encode($this->toArray()))); + } + + /** + * Get a cursor instance from the encoded string representation. + * + * @param string|null $encodedString + * @return static|null + */ + public static function fromEncoded($encodedString) + { + if (is_null($encodedString) || ! is_string($encodedString)) { + return null; + } + + $parameters = json_decode(base64_decode(str_replace(['-', '_'], ['+', '/'], $encodedString)), true); + + if (json_last_error() !== JSON_ERROR_NONE) { + return null; + } + + $pointsToNextItems = $parameters['_pointsToNextItems']; + + unset($parameters['_pointsToNextItems']); + + return new static($parameters, $pointsToNextItems); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/CursorPaginationException.php b/vendor/laravel/framework/src/Illuminate/Pagination/CursorPaginationException.php new file mode 100644 index 000000000..b12ca607f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/CursorPaginationException.php @@ -0,0 +1,13 @@ +options = $options; + + foreach ($options as $key => $value) { + $this->{$key} = $value; + } + + $this->perPage = $perPage; + $this->cursor = $cursor; + $this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path; + + $this->setItems($items); + } + + /** + * Set the items for the paginator. + * + * @param mixed $items + * @return void + */ + protected function setItems($items) + { + $this->items = $items instanceof Collection ? $items : Collection::make($items); + + $this->hasMore = $this->items->count() > $this->perPage; + + $this->items = $this->items->slice(0, $this->perPage); + + if (! is_null($this->cursor) && $this->cursor->pointsToPreviousItems()) { + $this->items = $this->items->reverse()->values(); + } + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function links($view = null, $data = []) + { + return $this->render($view, $data); + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function render($view = null, $data = []) + { + return static::viewFactory()->make($view ?: Paginator::$defaultSimpleView, array_merge($data, [ + 'paginator' => $this, + ])); + } + + /** + * Determine if there are more items in the data source. + * + * @return bool + */ + public function hasMorePages() + { + return (is_null($this->cursor) && $this->hasMore) || + (! is_null($this->cursor) && $this->cursor->pointsToNextItems() && $this->hasMore) || + (! is_null($this->cursor) && $this->cursor->pointsToPreviousItems()); + } + + /** + * Determine if there are enough items to split into multiple pages. + * + * @return bool + */ + public function hasPages() + { + return ! $this->onFirstPage() || $this->hasMorePages(); + } + + /** + * Determine if the paginator is on the first page. + * + * @return bool + */ + public function onFirstPage() + { + return is_null($this->cursor) || ($this->cursor->pointsToPreviousItems() && ! $this->hasMore); + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return [ + 'data' => $this->items->toArray(), + 'path' => $this->path(), + 'per_page' => $this->perPage(), + 'next_page_url' => $this->nextPageUrl(), + 'prev_page_url' => $this->previousPageUrl(), + ]; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php index 46435b843..24f68b121 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php @@ -94,6 +94,36 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array ])); } + /** + * Get the paginator links as a collection (for JSON responses). + * + * @return \Illuminate\Support\Collection + */ + public function linkCollection() + { + return collect($this->elements())->flatMap(function ($item) { + if (! is_array($item)) { + return [['url' => null, 'label' => '...', 'active' => false]]; + } + + return collect($item)->map(function ($url, $page) { + return [ + 'url' => $url, + 'label' => (string) $page, + 'active' => $this->currentPage() === $page, + ]; + }); + })->prepend([ + 'url' => $this->previousPageUrl(), + 'label' => function_exists('__') ? __('pagination.previous') : 'Previous', + 'active' => false, + ])->push([ + 'url' => $this->nextPageUrl(), + 'label' => function_exists('__') ? __('pagination.next') : 'Next', + 'active' => false, + ]); + } + /** * Get the array of elements to pass to the view. * @@ -168,6 +198,7 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array 'from' => $this->firstItem(), 'last_page' => $this->lastPage(), 'last_page_url' => $this->url($this->lastPage()), + 'links' => $this->linkCollection()->toArray(), 'next_page_url' => $this->nextPageUrl(), 'path' => $this->path(), 'per_page' => $this->perPage(), @@ -182,6 +213,7 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->toArray(); diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php index 6510f2f26..e94cebd6c 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php @@ -29,26 +29,6 @@ class PaginationServiceProvider extends ServiceProvider */ public function register() { - Paginator::viewFactoryResolver(function () { - return $this->app['view']; - }); - - Paginator::currentPathResolver(function () { - return $this->app['request']->url(); - }); - - Paginator::currentPageResolver(function ($pageName = 'page') { - $page = $this->app['request']->input($pageName); - - if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { - return (int) $page; - } - - return 1; - }); - - Paginator::queryStringResolver(function () { - return $this->app['request']->query(); - }); + PaginationState::resolveUsing($this->app); } } diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationState.php b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationState.php new file mode 100644 index 000000000..ff8150ff2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationState.php @@ -0,0 +1,41 @@ +url(); + }); + + Paginator::currentPageResolver(function ($pageName = 'page') use ($app) { + $page = $app['request']->input($pageName); + + if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { + return (int) $page; + } + + return 1; + }); + + Paginator::queryStringResolver(function () use ($app) { + return $app['request']->query(); + }); + + CursorPaginator::currentCursorResolver(function ($cursorName = 'cursor') use ($app) { + return Cursor::fromEncoded($app['request']->input($cursorName)); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php index eb664eef3..733edb8e0 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php @@ -158,6 +158,7 @@ class Paginator extends AbstractPaginator implements Arrayable, ArrayAccess, Cou * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->toArray(); diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php b/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php index 33b7216e3..31c7cc2a4 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php @@ -59,9 +59,9 @@ class UrlWindow protected function getSmallSlider() { return [ - 'first' => $this->paginator->getUrlRange(1, $this->lastPage()), + 'first' => $this->paginator->getUrlRange(1, $this->lastPage()), 'slider' => null, - 'last' => null, + 'last' => null, ]; } @@ -145,9 +145,9 @@ class UrlWindow protected function getFullSlider($onEachSide) { return [ - 'first' => $this->getStart(), + 'first' => $this->getStart(), 'slider' => $this->getAdjacentUrlRange($onEachSide), - 'last' => $this->getFinish(), + 'last' => $this->getFinish(), ]; } diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json index 36de9820a..5c8a380b2 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json @@ -14,10 +14,11 @@ } ], "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0" }, "autoload": { "psr-4": { @@ -26,7 +27,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "config": { diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php index 1c5e52f3e..6872cca36 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php @@ -6,14 +6,14 @@ {!! __('pagination.previous') !!} @else - @endif {{-- Next Page Link --}} @if ($paginator->hasMorePages()) - @else diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php index 4b92aaba1..5bf323b40 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php @@ -1,18 +1,18 @@ @if ($paginator->hasPages()) - '); + $('
    PHP DebugBar | Open
    ').addClass(csscls('header')).append(this.$closebtn).appendTo(this.$el); + $('
    DateMethodURLIPFilter data
    ').append(this.$table).appendTo(this.$el); + this.$actions = $('
    ').addClass(csscls('actions')).appendTo(this.$el); + + this.$closebtn.on('click', function() { + self.hide(); + }); + + this.$loadmorebtn = $('Load more') + .appendTo(this.$actions) + .on('click', function() { + self.find(self.last_find_request, self.last_find_request.offset + self.get('items_per_page'), self.handleFind.bind(self)); + }); + + this.$showonlycurrentbtn = $('Show only current URL') + .appendTo(this.$actions) + .on('click', function() { + self.$table.empty(); + self.find({uri: window.location.pathname}, 0, self.handleFind.bind(self)); + }); + + this.$showallbtn = $('Show all') + .appendTo(this.$actions) + .on('click', function() { + self.refresh(); + }); + + this.$clearbtn = $('Delete all') + .appendTo(this.$actions) + .on('click', function() { + self.clear(function() { + self.hide(); + }); + }); + + this.addSearch(); + + this.$overlay = $('
    ').addClass(csscls('overlay')).hide().appendTo('body'); + this.$overlay.on('click', function() { + self.hide(); + }); + }, + + refresh: function() { + this.$table.empty(); + this.$loadmorebtn.show(); + this.find({}, 0, this.handleFind.bind(this)); + }, + + addSearch: function(){ + var self = this; + var searchBtn = $('