This commit is contained in:
mkm 2023-07-17 09:56:51 +08:00
parent ac32b7b11a
commit 6711c3b600
29637 changed files with 148206 additions and 34868 deletions

View File

@ -33,7 +33,9 @@
"tencentcloud/tencentcloud-sdk-php": "^3.0",
"alibabacloud/client": "^1.5",
"rmccue/requests": "^2.0",
"w7corp/easywechat": "^6.8"
"w7corp/easywechat": "^6.8",
"ebaoquan/junziqian_sdk":">=2.0.2"
},
"require-dev": {
"symfony/var-dumper": "^4.2",

978
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,6 @@ $baseDir = dirname($vendorDir);
return array(
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',

View File

@ -9,7 +9,8 @@ return array(
'think\\view\\driver\\' => array($vendorDir . '/topthink/think-view/src'),
'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'),
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'),
'think\\' => array($vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/framework/src/think'),
'com\\junziqian\\sdk\\' => array($vendorDir . '/ebaoquan/junziqian_sdk/src/com/junziqian/sdk'),
'clagiordano\\weblibs\\configmanager\\' => array($vendorDir . '/clagiordano/weblibs-configmanager/src'),
'app\\' => array($baseDir . '/app'),
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
@ -49,7 +50,6 @@ return array(
'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
'Nyholm\\Psr7Server\\' => array($vendorDir . '/nyholm/psr7-server/src'),
'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'),
'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'),

View File

@ -9,7 +9,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
public static $files = array (
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
@ -44,6 +43,7 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
),
'c' =>
array (
'com\\junziqian\\sdk\\' => 18,
'clagiordano\\weblibs\\configmanager\\' => 34,
),
'a' =>
@ -113,7 +113,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
),
'M' =>
array (
'MyCLabs\\Enum\\' => 13,
'Monolog\\' => 8,
'Matrix\\' => 7,
),
@ -161,10 +160,14 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
),
'think\\' =>
array (
0 => __DIR__ . '/..' . '/topthink/framework/src/think',
1 => __DIR__ . '/..' . '/topthink/think-helper/src',
2 => __DIR__ . '/..' . '/topthink/think-orm/src',
3 => __DIR__ . '/..' . '/topthink/think-template/src',
0 => __DIR__ . '/..' . '/topthink/think-helper/src',
1 => __DIR__ . '/..' . '/topthink/think-orm/src',
2 => __DIR__ . '/..' . '/topthink/think-template/src',
3 => __DIR__ . '/..' . '/topthink/framework/src/think',
),
'com\\junziqian\\sdk\\' =>
array (
0 => __DIR__ . '/..' . '/ebaoquan/junziqian_sdk/src/com/junziqian/sdk',
),
'clagiordano\\weblibs\\configmanager\\' =>
array (
@ -323,10 +326,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
array (
0 => __DIR__ . '/..' . '/nyholm/psr7-server/src',
),
'MyCLabs\\Enum\\' =>
array (
0 => __DIR__ . '/..' . '/myclabs/php-enum/src',
),
'Monolog\\' =>
array (
0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
'name' => 'topthink/think',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '552d139785125b5b81f054dc0b7cb9d9410f2e0e',
'reference' => 'b55f77d5c3e94177ec3d1ce21fce629a756733b6',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -47,14 +47,23 @@
'dev_requirement' => false,
),
'dragonmantank/cron-expression' => array(
'pretty_version' => 'v3.3.1',
'version' => '3.3.1.0',
'reference' => 'be85b3f05b46c39bbc0d95f6c071ddff669510fa',
'pretty_version' => 'v3.3.2',
'version' => '3.3.2.0',
'reference' => '782ca5968ab8b954773518e9e49a6f892a34b2a8',
'type' => 'library',
'install_path' => __DIR__ . '/../dragonmantank/cron-expression',
'aliases' => array(),
'dev_requirement' => false,
),
'ebaoquan/junziqian_sdk' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
'reference' => '1294ea49ff9ecc4532821f8798304816cbf8dd74',
'type' => 'library',
'install_path' => __DIR__ . '/../ebaoquan/junziqian_sdk',
'aliases' => array(),
'dev_requirement' => false,
),
'ezyang/htmlpurifier' => array(
'pretty_version' => 'v4.16.0',
'version' => '4.16.0.0',
@ -65,36 +74,36 @@
'dev_requirement' => false,
),
'guzzlehttp/command' => array(
'pretty_version' => '1.2.3',
'version' => '1.2.3.0',
'reference' => '3c9383aaf2e39fa8d39375ae37b95b55964aaef4',
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'reference' => '3372bcfd79d4b357b6871665bf06155515e8d844',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/command',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
'pretty_version' => '7.5.1',
'version' => '7.5.1.0',
'reference' => 'b964ca597e86b752cd994f27293e9fa6b6a95ed9',
'pretty_version' => '7.7.0',
'version' => '7.7.0.0',
'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/guzzle-services' => array(
'pretty_version' => '1.3.2',
'version' => '1.3.2.0',
'reference' => '4989d902dd4e0411b320e851c46f3c94d652d891',
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'reference' => 'f4bb1c205152a56741624b88753732e01a60565c',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
'pretty_version' => '1.5.2',
'version' => '1.5.2.0',
'reference' => 'b94b2807d85443f9719887892882d0329d1e2598',
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(),
@ -119,9 +128,9 @@
'dev_requirement' => false,
),
'maennchen/zipstream-php' => array(
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
'reference' => '3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3',
'pretty_version' => '3.1.0',
'version' => '3.1.0.0',
'reference' => 'b8174494eda667f7d13876b4a7bfef0f62a7c0d1',
'type' => 'library',
'install_path' => __DIR__ . '/../maennchen/zipstream-php',
'aliases' => array(),
@ -146,9 +155,9 @@
'dev_requirement' => false,
),
'monolog/monolog' => array(
'pretty_version' => '2.9.0',
'version' => '2.9.0.0',
'reference' => 'e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb',
'pretty_version' => '2.9.1',
'version' => '2.9.1.0',
'reference' => 'f259e2b15fb95494c83f52d3caad003bbf5ffaa1',
'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' => array(),
@ -169,15 +178,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
'myclabs/php-enum' => array(
'pretty_version' => '1.8.3',
'version' => '1.8.3.0',
'reference' => 'b942d263c641ddb5190929ff840c68f78713e937',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/php-enum',
'aliases' => array(),
'dev_requirement' => false,
),
'nyholm/psr7' => array(
'pretty_version' => '1.8.0',
'version' => '1.8.0.0',
@ -224,9 +224,9 @@
),
),
'phpoffice/phpspreadsheet' => array(
'pretty_version' => '1.28.0',
'version' => '1.28.0.0',
'reference' => '6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a',
'pretty_version' => '1.29.0',
'version' => '1.29.0.0',
'reference' => 'fde2ccf55eaef7e86021ff1acce26479160a0fa0',
'type' => 'library',
'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
'aliases' => array(),
@ -257,9 +257,9 @@
'dev_requirement' => false,
),
'psr/http-client' => array(
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
'pretty_version' => '1.0.2',
'version' => '1.0.2.0',
'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client',
'aliases' => array(),
@ -332,9 +332,9 @@
),
),
'qcloud/cos-sdk-v5' => array(
'pretty_version' => 'v2.6.2',
'version' => '2.6.2.0',
'reference' => '92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed',
'pretty_version' => 'v2.6.4',
'version' => '2.6.4.0',
'reference' => '06ccc95599635abd3f431f470b79b8fb8ddbd6a0',
'type' => 'library',
'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5',
'aliases' => array(),
@ -359,18 +359,18 @@
'dev_requirement' => false,
),
'rmccue/requests' => array(
'pretty_version' => 'v2.0.5',
'version' => '2.0.5.0',
'reference' => 'b717f1d2f4ef7992ec0c127747ed8b7e170c2f49',
'pretty_version' => 'v2.0.7',
'version' => '2.0.7.0',
'reference' => 'e14a6f4e7438d3f8da3f2657759e6367b906ee23',
'type' => 'library',
'install_path' => __DIR__ . '/../rmccue/requests',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/cache' => array(
'pretty_version' => 'v5.4.23',
'version' => '5.4.23.0',
'reference' => '983c79ff28612cdfd66d8e44e1a06e5afc87e107',
'pretty_version' => 'v5.4.25',
'version' => '5.4.25.0',
'reference' => 'e2013521c0f07473ae69a01fce0af78fc3ec0f23',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache',
'aliases' => array(),
@ -392,27 +392,27 @@
),
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.0.2',
'version' => '3.0.2.0',
'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c',
'pretty_version' => 'v3.3.0',
'version' => '3.3.0.0',
'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client' => array(
'pretty_version' => 'v6.0.20',
'version' => '6.0.20.0',
'reference' => '541c04560da1875f62c963c3aab6ea12a7314e11',
'pretty_version' => 'v6.2.12',
'version' => '6.2.12.0',
'reference' => '7ef37b91629937843e8f52a2da5587ff16d75d25',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client-contracts' => array(
'pretty_version' => 'v3.0.2',
'version' => '3.0.2.0',
'reference' => '4184b9b63af1edaf35b6a7974c6f1f9f33294129',
'pretty_version' => 'v3.3.0',
'version' => '3.3.0.0',
'reference' => '3b66325d0176b4ec826bffab57c9037d759c31fb',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client-contracts',
'aliases' => array(),
@ -425,18 +425,18 @@
),
),
'symfony/http-foundation' => array(
'pretty_version' => 'v6.0.20',
'version' => '6.0.20.0',
'reference' => 'e16b2676a4b3b1fa12378a20b29c364feda2a8d6',
'pretty_version' => 'v6.1.12',
'version' => '6.1.12.0',
'reference' => 'bd1bcfb0eba14de22c4d086c5023e608f37366ed',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/mime' => array(
'pretty_version' => 'v6.0.19',
'version' => '6.0.19.0',
'reference' => 'd7052547a0070cbeadd474e172b527a00d657301',
'pretty_version' => 'v6.3.0',
'version' => '6.3.0.0',
'reference' => '7b5d2121858cd6efbed778abce9cfdd7ab1f62ad',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/mime',
'aliases' => array(),
@ -542,9 +542,9 @@
'dev_requirement' => true,
),
'symfony/var-exporter' => array(
'pretty_version' => 'v6.0.19',
'version' => '6.0.19.0',
'reference' => 'df56f53818c2d5d9f683f4ad2e365ba73a3b69d2',
'pretty_version' => 'v6.3.0',
'version' => '6.3.0.0',
'reference' => 'db5416d04269f2827d8c54331ba4cfa42620d350',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-exporter',
'aliases' => array(),
@ -560,9 +560,9 @@
'dev_requirement' => false,
),
'tencentcloud/tencentcloud-sdk-php' => array(
'pretty_version' => '3.0.883',
'version' => '3.0.883.0',
'reference' => '883c1da92aac9c8a06fe03aff8ae0384217f4938',
'pretty_version' => '3.0.932',
'version' => '3.0.932.0',
'reference' => '4aea86d788df2ed8e1ffafbfc7703f7263b84cde',
'type' => 'library',
'install_path' => __DIR__ . '/../tencentcloud/tencentcloud-sdk-php',
'aliases' => array(),
@ -578,9 +578,9 @@
'dev_requirement' => false,
),
'topthink/framework' => array(
'pretty_version' => 'v6.1.2',
'version' => '6.1.2.0',
'reference' => '67235be5b919aaaf1de5aed9839f65d8e766aca3',
'pretty_version' => 'v6.1.4',
'version' => '6.1.4.0',
'reference' => '66eb9cf4d627df12911344cd328faf9bb596bf2c',
'type' => 'library',
'install_path' => __DIR__ . '/../topthink/framework',
'aliases' => array(),
@ -589,7 +589,7 @@
'topthink/think' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '552d139785125b5b81f054dc0b7cb9d9410f2e0e',
'reference' => 'b55f77d5c3e94177ec3d1ce21fce629a756733b6',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -605,9 +605,9 @@
'dev_requirement' => false,
),
'topthink/think-multi-app' => array(
'pretty_version' => 'v1.0.16',
'version' => '1.0.16.0',
'reference' => '07b9183855150455e1f76f8cbe9d77d6d1bc399f',
'pretty_version' => 'v1.0.17',
'version' => '1.0.17.0',
'reference' => '4055a6187296ac16c0bc7bbab4ed5d92f82f791c',
'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-multi-app',
'aliases' => array(),
@ -650,9 +650,9 @@
'dev_requirement' => false,
),
'w7corp/easywechat' => array(
'pretty_version' => '6.8.0',
'version' => '6.8.0.0',
'reference' => '60f0b4ba2ac3144df1a2291193daa34beb949d26',
'pretty_version' => '6.12.3',
'version' => '6.12.3.0',
'reference' => '10b9f31b61b4e5327c9e4457dffcf307de2deb6c',
'type' => 'library',
'install_path' => __DIR__ . '/../w7corp/easywechat',
'aliases' => array(),

View File

@ -4,8 +4,8 @@
$issues = array();
if (!(PHP_VERSION_ID >= 80002)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.2". You are running ' . PHP_VERSION . '.';
if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {

11
vendor/dragonmantank/cron-expression/CHANGELOG.md vendored Executable file → Normal file
View File

@ -1,5 +1,16 @@
# 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

0
vendor/dragonmantank/cron-expression/LICENSE vendored Executable file → Normal file
View File

0
vendor/dragonmantank/cron-expression/README.md vendored Executable file → Normal file
View File

6
vendor/dragonmantank/cron-expression/composer.json vendored Executable file → Normal file
View File

@ -37,5 +37,11 @@
"scripts": {
"phpstan": "./vendor/bin/phpstan analyze",
"test": "phpunit"
},
"config": {
"allow-plugins": {
"ocramius/package-versions": true,
"phpstan/extension-installer": true
}
}
}

0
vendor/dragonmantank/cron-expression/phpstan.neon vendored Executable file → Normal file
View File

0
vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php vendored Executable file → Normal file
View File

0
vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php vendored Executable file → Normal file
View File

6
vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php vendored Executable file → Normal file
View File

@ -49,7 +49,7 @@ class DayOfMonthField extends AbstractField
private static function getNearestWeekday(int $currentYear, int $currentMonth, int $targetDay): ?DateTime
{
$tday = str_pad((string) $targetDay, 2, '0', STR_PAD_LEFT);
$target = DateTime::createFromFormat('Y-m-d', "${currentYear}-${currentMonth}-${tday}");
$target = DateTime::createFromFormat('Y-m-d', "{$currentYear}-{$currentMonth}-{$tday}");
if ($target === false) {
return null;
@ -94,9 +94,9 @@ class DayOfMonthField extends AbstractField
}
// 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 = (int) 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
$nearest = self::getNearestWeekday(
(int) $date->format('Y'),

4
vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php vendored Executable file → Normal file
View File

@ -68,8 +68,8 @@ class DayOfWeekField extends AbstractField
$lastDayOfMonth = (int) $date->format('t');
// Find out if this is the last specific weekday of the month
if (strpos($value, 'L')) {
$weekday = $this->convertLiterals(substr($value, 0, strpos($value, 'L')));
if ($lPosition = strpos($value, 'L')) {
$weekday = $this->convertLiterals(substr($value, 0, $lPosition));
$weekday %= 7;
$daysInMonth = (int) $date->format('t');

0
vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php vendored Executable file → Normal file
View File

View File

0
vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php vendored Executable file → Normal file
View File

4
vendor/dragonmantank/cron-expression/src/Cron/HoursField.php vendored Executable file → Normal file
View File

@ -25,7 +25,7 @@ class HoursField extends AbstractField
/**
* @var array|null Transitions returned by DateTimeZone::getTransitions()
*/
protected $transitions = null;
protected $transitions = [];
/**
* @var int|null Timestamp of the start of the transitions range
@ -92,7 +92,7 @@ class HoursField extends AbstractField
$dtLimitStart->getTimestamp(),
$dtLimitEnd->getTimestamp()
);
if ($this->transitions === false) {
if (empty($this->transitions)) {
return null;
}
$this->transitionsStart = $dtLimitStart->getTimestamp();

0
vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php vendored Executable file → Normal file
View File

0
vendor/dragonmantank/cron-expression/src/Cron/MonthField.php vendored Executable file → Normal file
View File

1
vendor/ebaoquan/junziqian_sdk vendored Submodule

@ -0,0 +1 @@
Subproject commit 1294ea49ff9ecc4532821f8798304816cbf8dd74

View File

@ -0,0 +1,26 @@
<?php
$config = (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration:risky' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'declare_strict_types' => false,
'global_namespace_import' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'single_line_throw' => false,
'void_return' => false,
'yoda_style' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->name('*.php')
)
;
return $config;

0
vendor/guzzlehttp/command/CHANGELOG.md vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/command/LICENSE vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/command/Makefile vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/command/README.md vendored Executable file → Normal file
View File

16
vendor/guzzlehttp/command/composer.json vendored Executable file → Normal file
View File

@ -27,19 +27,29 @@
"require": {
"php": "^7.2.5 || ^8.0",
"guzzlehttp/guzzle": "^7.5.1",
"guzzlehttp/promises": "^1.5.2",
"guzzlehttp/promises": "^1.5.3 || ^2.0",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5"
},
"require-dev": {
"phpunit/phpunit": "^8.5.19"
"bamarni/composer-bin-plugin": "^1.8.1",
"phpunit/phpunit": "^8.5.19 || ^9.5.8"
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Command\\": "src/"
}
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}

0
vendor/guzzlehttp/command/phpunit.xml.dist vendored Executable file → Normal file
View File

1
vendor/guzzlehttp/command/src/Command.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command;
use GuzzleHttp\HandlerStack;

1
vendor/guzzlehttp/command/src/CommandInterface.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command;
use GuzzleHttp\HandlerStack;

5
vendor/guzzlehttp/command/src/Exception/CommandClientException.php vendored Executable file → Normal file
View File

@ -1,7 +1,10 @@
<?php
namespace GuzzleHttp\Command\Exception;
/**
* Exception encountered when a 4xx level response is received for a request
*/
class CommandClientException extends CommandException {}
class CommandClientException extends CommandException
{
}

16
vendor/guzzlehttp/command/src/Exception/CommandException.php vendored Executable file → Normal file
View File

@ -1,9 +1,10 @@
<?php
namespace GuzzleHttp\Command\Exception;
use GuzzleHttp\Command\CommandInterface;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Command\CommandInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
@ -22,8 +23,6 @@ class CommandException extends \RuntimeException implements GuzzleException
private $response;
/**
* @param CommandInterface $command
* @param \Exception $prev
* @return CommandException
*/
public static function fromPrevious(CommandInterface $command, \Exception $prev)
@ -50,18 +49,17 @@ class CommandException extends \RuntimeException implements GuzzleException
}
// Prepare the message.
$message = 'There was an error executing the ' . $command->getName()
. ' command: ' . $prev->getMessage();
$message = 'There was an error executing the '.$command->getName()
.' command: '.$prev->getMessage();
// Create the exception.
return new $class($message, $command, $prev, $request, $response);
}
/**
* @param string $message Exception message
* @param CommandInterface $command
* @param \Exception $previous Previous exception (if any)
* @param RequestInterface $request
* @param string $message Exception message
* @param \Exception $previous Previous exception (if any)
* @param RequestInterface $request
* @param ResponseInterface $response
*/
public function __construct(

5
vendor/guzzlehttp/command/src/Exception/CommandServerException.php vendored Executable file → Normal file
View File

@ -1,7 +1,10 @@
<?php
namespace GuzzleHttp\Command\Exception;
/**
* Exception encountered when a 5xx level response is received for a request
*/
class CommandServerException extends CommandException {}
class CommandServerException extends CommandException
{
}

0
vendor/guzzlehttp/command/src/HasDataTrait.php vendored Executable file → Normal file
View File

4
vendor/guzzlehttp/command/src/Result.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command;
/**
@ -8,9 +9,6 @@ class Result implements ResultInterface
{
use HasDataTrait;
/**
* @param array $data
*/
public function __construct(array $data = [])
{
$this->data = $data;

1
vendor/guzzlehttp/command/src/ResultInterface.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command;
/**

45
vendor/guzzlehttp/command/src/ServiceClient.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command;
use GuzzleHttp\ClientInterface as HttpClient;
@ -20,7 +21,7 @@ class ServiceClient implements ServiceClientInterface
/** @var HandlerStack */
private $handlerStack;
/** @var callable */
private $commandToRequestTransformer;
@ -30,19 +31,19 @@ class ServiceClient implements ServiceClientInterface
/**
* Instantiates a Guzzle ServiceClient for making requests to a web service.
*
* @param HttpClient $httpClient A fully-configured Guzzle HTTP client that
* will be used to perform the underlying HTTP requests.
* @param callable $commandToRequestTransformer A callable that transforms
* a Command into a Request. The function should accept a
* `GuzzleHttp\Command\CommandInterface` object and return a
* `Psr\Http\Message\RequestInterface` object.
* @param callable $responseToResultTransformer A callable that transforms a
* Response into a Result. The function should accept a
* `Psr\Http\Message\ResponseInterface` object (and optionally a
* `Psr\Http\Message\RequestInterface` object) and return a
* `GuzzleHttp\Command\ResultInterface` object.
* @param HandlerStack $commandHandlerStack A Guzzle HandlerStack, which can
* be used to add command-level middleware to the service client.
* @param HttpClient $httpClient A fully-configured Guzzle HTTP client that
* will be used to perform the underlying HTTP requests.
* @param callable $commandToRequestTransformer A callable that transforms
* a Command into a Request. The function should accept a
* `GuzzleHttp\Command\CommandInterface` object and return a
* `Psr\Http\Message\RequestInterface` object.
* @param callable $responseToResultTransformer A callable that transforms a
* Response into a Result. The function should accept a
* `Psr\Http\Message\ResponseInterface` object (and optionally a
* `Psr\Http\Message\RequestInterface` object) and return a
* `GuzzleHttp\Command\ResultInterface` object.
* @param HandlerStack $commandHandlerStack A Guzzle HandlerStack, which can
* be used to add command-level middleware to the service client.
*/
public function __construct(
HttpClient $httpClient,
@ -106,6 +107,7 @@ class ServiceClient implements ServiceClientInterface
return $this->executeAllAsync($commands, $options)
->then(function () use (&$results) {
ksort($results);
return $results;
})
->wait();
@ -119,12 +121,12 @@ class ServiceClient implements ServiceClientInterface
}
// Convert the iterator of commands to a generator of promises.
$commands = Promise\iter_for($commands);
$commands = Promise\Create::iterFor($commands);
$promises = function () use ($commands) {
foreach ($commands as $key => $command) {
if (!$command instanceof CommandInterface) {
throw new \InvalidArgumentException('The iterator must '
. 'yield instances of ' . CommandInterface::class);
.'yield instances of '.CommandInterface::class);
}
yield $key => $this->executeAsync($command);
}
@ -138,9 +140,10 @@ class ServiceClient implements ServiceClientInterface
* Creates and executes a command for an operation by name.
*
* @param string $name Name of the command to execute.
* @param array $args Arguments to pass to the getCommand method.
* @param array $args Arguments to pass to the getCommand method.
*
* @return ResultInterface|PromiseInterface
*
* @see \GuzzleHttp\Command\ServiceClientInterface::getCommand
*/
public function __call($name, array $args)
@ -148,6 +151,7 @@ class ServiceClient implements ServiceClientInterface
$args = isset($args[0]) ? $args[0] : [];
if (substr($name, -5) === 'Async') {
$command = $this->getCommand(substr($name, 0, -5), $args);
return $this->executeAsync($command);
} else {
return $this->execute($this->getCommand($name, $args));
@ -162,7 +166,7 @@ class ServiceClient implements ServiceClientInterface
private function createCommandHandler()
{
return function (CommandInterface $command) {
return Promise\coroutine(function () use ($command) {
return Promise\Coroutine::of(function () use ($command) {
// Prepare the HTTP options.
$opts = $command['@http'] ?: [];
unset($command['@http']);
@ -185,7 +189,6 @@ class ServiceClient implements ServiceClientInterface
/**
* Transforms a Command object into a Request object.
*
* @param CommandInterface $command
* @return RequestInterface
*/
private function transformCommandToRequest(CommandInterface $command)
@ -195,14 +198,10 @@ class ServiceClient implements ServiceClientInterface
return $transform($command);
}
/**
* Transforms a Response object, also using data from the Request object,
* into a Result object.
*
* @param ResponseInterface $response
* @param RequestInterface $request
* @param CommandInterface $command
* @return ResultInterface
*/
private function transformResponseToResult(

25
vendor/guzzlehttp/command/src/ServiceClientInterface.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command;
use GuzzleHttp\ClientInterface;
@ -22,6 +23,7 @@ interface ServiceClientInterface
* @param array $args Arguments to pass to the command
*
* @return CommandInterface
*
* @throws \InvalidArgumentException if no command can be found by name
*/
public function getCommand($name, array $args = []);
@ -32,6 +34,7 @@ interface ServiceClientInterface
* @param CommandInterface $command Command to execute
*
* @return ResultInterface The result of the executed command
*
* @throws CommandException
*/
public function execute(CommandInterface $command);
@ -49,13 +52,14 @@ interface ServiceClientInterface
* Executes multiple commands concurrently using a fixed pool size.
*
* @param array|\Iterator $commands Array or iterator that contains
* CommandInterface objects to execute with the client.
* @param array $options Associative array of options to apply.
* - concurrency: (int) Max number of commands to execute concurrently.
* - fulfilled: (callable) Function to invoke when a command completes.
* - rejected: (callable) Function to invoke when a command fails.
* CommandInterface objects to execute with the client.
* @param array $options Associative array of options to apply.
* - concurrency: (int) Max number of commands to execute concurrently.
* - fulfilled: (callable) Function to invoke when a command completes.
* - rejected: (callable) Function to invoke when a command fails.
*
* @return array
*
* @see GuzzleHttp\Command\ServiceClientInterface::createPool for options.
*/
public function executeAll($commands, array $options = []);
@ -65,13 +69,14 @@ interface ServiceClientInterface
* fixed pool size.
*
* @param array|\Iterator $commands Array or iterator that contains
* CommandInterface objects to execute with the client.
* @param array $options Associative array of options to apply.
* - concurrency: (int) Max number of commands to execute concurrently.
* - fulfilled: (callable) Function to invoke when a command completes.
* - rejected: (callable) Function to invoke when a command fails.
* CommandInterface objects to execute with the client.
* @param array $options Associative array of options to apply.
* - concurrency: (int) Max number of commands to execute concurrently.
* - fulfilled: (callable) Function to invoke when a command completes.
* - rejected: (callable) Function to invoke when a command fails.
*
* @return PromiseInterface
*
* @see GuzzleHttp\Command\ServiceClientInterface::createPool for options.
*/
public function executeAllAsync($commands, array $options = []);

0
vendor/guzzlehttp/command/src/ToArrayInterface.php vendored Executable file → Normal file
View File

View File

@ -0,0 +1,9 @@
{
"require": {
"php": "^7.4 || ^8.0",
"friendsofphp/php-cs-fixer": "3.16.0"
},
"config": {
"preferred-install": "dist"
}
}

View File

@ -0,0 +1,26 @@
<?php
$config = (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration:risky' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'declare_strict_types' => false,
'global_namespace_import' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'single_line_throw' => false,
'void_return' => false,
'yoda_style' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->name('*.php')
)
;
return $config;

0
vendor/guzzlehttp/guzzle-services/CHANGELOG.md vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle-services/LICENSE vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle-services/Makefile vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle-services/README.md vendored Executable file → Normal file
View File

17
vendor/guzzlehttp/guzzle-services/composer.json vendored Executable file → Normal file
View File

@ -26,12 +26,13 @@
],
"require": {
"php": "^7.2.5 || ^8.0",
"guzzlehttp/guzzle": "^7.4.1",
"guzzlehttp/command": "^1.2.2",
"guzzlehttp/psr7": "^1.8.3 || ^2.1",
"guzzlehttp/guzzle": "^7.7",
"guzzlehttp/command": "^1.3",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"guzzlehttp/uri-template": "^1.0.1"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.1",
"phpunit/phpunit": "^8.5.19 || ^9.5.8"
},
"autoload": {
@ -48,12 +49,16 @@
"gimler/guzzle-description-loader": "^0.0.4"
},
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"bamarni-bin": {
"bin-links": true,
"forward-command": false
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}

0
vendor/guzzlehttp/guzzle-services/phpunit.xml.dist vendored Executable file → Normal file
View File

7
vendor/guzzlehttp/guzzle-services/src/Description.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Psr7\Uri;
@ -35,7 +36,7 @@ class Description implements DescriptionInterface
/**
* @param array $config Service description data
* @param array $options Custom options to apply to the description
* - formatter: Can provide a custom SchemaFormatter class
* - formatter: Can provide a custom SchemaFormatter class
*
* @throws \InvalidArgumentException
*/
@ -132,6 +133,7 @@ class Description implements DescriptionInterface
* @param string $name Name of the command
*
* @return Operation
*
* @throws \InvalidArgumentException if the operation is not found
*/
public function getOperation($name)
@ -155,6 +157,7 @@ class Description implements DescriptionInterface
* @param string $id ID/name of the model to retrieve
*
* @return Parameter
*
* @throws \InvalidArgumentException if the model is not found
*/
public function getModel($id)
@ -250,7 +253,7 @@ class Description implements DescriptionInterface
*
* @param string $key Data key to retrieve or null to retrieve all extra
*
* @return null|mixed
* @return mixed|null
*/
public function getData($key = null)
{

5
vendor/guzzlehttp/guzzle-services/src/DescriptionInterface.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Psr7\Uri;
@ -34,6 +35,7 @@ interface DescriptionInterface
* @param string $name Name of the command
*
* @return Operation
*
* @throws \InvalidArgumentException if the operation is not found
*/
public function getOperation($name);
@ -44,6 +46,7 @@ interface DescriptionInterface
* @param string $id ID/name of the model to retrieve
*
* @return Parameter
*
* @throws \InvalidArgumentException if the model is not found
*/
public function getModel($id);
@ -101,7 +104,7 @@ interface DescriptionInterface
*
* @param string $key Data key to retrieve or null to retrieve all extra
*
* @return null|mixed
* @return mixed|null
*/
public function getData($key = null);
}

49
vendor/guzzlehttp/guzzle-services/src/Deserializer.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\CommandInterface;
@ -29,18 +30,17 @@ use Psr\Http\Message\ResponseInterface;
*/
class Deserializer
{
/** @var ResponseLocationInterface[] $responseLocations */
/** @var ResponseLocationInterface[] */
private $responseLocations;
/** @var DescriptionInterface $description */
/** @var DescriptionInterface */
private $description;
/** @var boolean $process */
/** @var bool */
private $process;
/**
* @param DescriptionInterface $description
* @param bool $process
* @param bool $process
* @param ResponseLocationInterface[] $responseLocations Extra response locations
*/
public function __construct(
@ -51,12 +51,12 @@ class Deserializer
static $defaultResponseLocations;
if (!$defaultResponseLocations) {
$defaultResponseLocations = [
'body' => new BodyLocation(),
'header' => new HeaderLocation(),
'body' => new BodyLocation(),
'header' => new HeaderLocation(),
'reasonPhrase' => new ReasonPhraseLocation(),
'statusCode' => new StatusCodeLocation(),
'xml' => new XmlLocation(),
'json' => new JsonLocation(),
'statusCode' => new StatusCodeLocation(),
'xml' => new XmlLocation(),
'json' => new JsonLocation(),
];
}
@ -68,9 +68,8 @@ class Deserializer
/**
* Deserialize the response into the specified result representation
*
* @param ResponseInterface $response
* @param RequestInterface|null $request
* @param CommandInterface $command
*
* @return Result|ResultInterface|void|ResponseInterface
*/
public function __invoke(ResponseInterface $response, RequestInterface $request, CommandInterface $command)
@ -103,8 +102,6 @@ class Deserializer
/**
* Handles visit() and after() methods of the Response locations
*
* @param Parameter $model
* @param ResponseInterface $response
* @return Result|ResultInterface|void
*/
protected function visit(Parameter $model, ResponseInterface $response)
@ -117,7 +114,7 @@ class Deserializer
} elseif ($model->getType() === 'array') {
$result = $this->visitOuterArray($model, $result, $response, $context);
} else {
throw new \InvalidArgumentException('Invalid response model: ' . $model->getType());
throw new \InvalidArgumentException('Invalid response model: '.$model->getType());
}
// Call the after() method of each found visitor
@ -132,11 +129,8 @@ class Deserializer
/**
* Handles the before() method of Response locations
*
* @param string $location
* @param Parameter $model
* @param ResultInterface $result
* @param ResponseInterface $response
* @param array $context
* @param string $location
*
* @return ResultInterface
*/
private function triggerBeforeVisitor(
@ -164,10 +158,6 @@ class Deserializer
/**
* Visits the outer object
*
* @param Parameter $model
* @param ResultInterface $result
* @param ResponseInterface $response
* @param array $context
* @return ResultInterface
*/
private function visitOuterObject(
@ -212,10 +202,6 @@ class Deserializer
/**
* Visits the outer array
*
* @param Parameter $model
* @param ResultInterface $result
* @param ResponseInterface $response
* @param array $context
* @return ResultInterface|void
*/
private function visitOuterArray(
@ -246,11 +232,6 @@ class Deserializer
* In order for the exception to be properly triggered, all your exceptions must be instance
* of "GuzzleHttp\Command\Exception\CommandException". If that's not the case, your exceptions will be wrapped
* around a CommandException
*
* @param ResponseInterface $response
* @param RequestInterface $request
* @param CommandInterface $command
* @param Operation $operation
*/
protected function handleErrorResponses(
ResponseInterface $response,
@ -271,7 +252,7 @@ class Deserializer
continue;
}
if (isset($error['phrase']) && ! ($error['phrase'] === $response->getReasonPhrase())) {
if (isset($error['phrase']) && !($error['phrase'] === $response->getReasonPhrase())) {
continue;
}

28
vendor/guzzlehttp/guzzle-services/src/GuzzleClient.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\ClientInterface;
@ -12,7 +13,7 @@ use GuzzleHttp\HandlerStack;
*/
class GuzzleClient extends ServiceClient
{
/** @var array $config */
/** @var array */
private $config;
/** @var DescriptionInterface Guzzle service description */
@ -33,12 +34,12 @@ class GuzzleClient extends ServiceClient
* - response_locations: Associative array of location types mapping to
* ResponseLocationInterface objects.
*
* @param ClientInterface $client HTTP client to use.
* @param DescriptionInterface $description Guzzle service description
* @param callable $commandToRequestTransformer
* @param callable $responseToResultTransformer
* @param HandlerStack $commandHandlerStack
* @param array $config Configuration options
* @param ClientInterface $client HTTP client to use.
* @param DescriptionInterface $description Guzzle service description
* @param callable $commandToRequestTransformer
* @param callable $responseToResultTransformer
* @param HandlerStack $commandHandlerStack
* @param array $config Configuration options
*/
public function __construct(
ClientInterface $client,
@ -59,9 +60,11 @@ class GuzzleClient extends ServiceClient
/**
* Returns the command if valid; otherwise an Exception
*
* @param string $name
* @param array $args
*
* @return CommandInterface
*
* @throws \InvalidArgumentException
*/
public function getCommand($name, array $args = [])
@ -95,6 +98,7 @@ class GuzzleClient extends ServiceClient
* Returns the passed Serializer when set, a new instance otherwise
*
* @param callable|null $commandToRequestTransformer
*
* @return \GuzzleHttp\Command\Guzzle\Serializer
*/
private function getSerializer($commandToRequestTransformer)
@ -108,11 +112,12 @@ class GuzzleClient extends ServiceClient
* Returns the passed Deserializer when set, a new instance otherwise
*
* @param callable|null $responseToResultTransformer
*
* @return \GuzzleHttp\Command\Guzzle\Deserializer
*/
private function getDeserializer($responseToResultTransformer)
{
$process = (! isset($this->config['process']) || $this->config['process'] === true);
$process = (!isset($this->config['process']) || $this->config['process'] === true);
return $responseToResultTransformer !== null
? $responseToResultTransformer
@ -123,6 +128,7 @@ class GuzzleClient extends ServiceClient
* Get the config of the client
*
* @param array|string $option
*
* @return mixed
*/
public function getConfig($option = null)
@ -132,10 +138,6 @@ class GuzzleClient extends ServiceClient
: (isset($this->config[$option]) ? $this->config[$option] : []);
}
/**
* @param $option
* @param $value
*/
public function setConfig($option, $value)
{
$this->config[$option] = $value;

View File

@ -1,4 +1,6 @@
<?php namespace GuzzleHttp\Command\Guzzle\Handler;
<?php
namespace GuzzleHttp\Command\Guzzle\Handler;
use GuzzleHttp\Command\CommandInterface;
use GuzzleHttp\Command\Exception\CommandException;
@ -12,17 +14,14 @@ use GuzzleHttp\Command\Guzzle\SchemaValidator;
*/
class ValidatedDescriptionHandler
{
/** @var SchemaValidator $validator */
/** @var SchemaValidator */
private $validator;
/** @var DescriptionInterface $description */
/** @var DescriptionInterface */
private $description;
/**
* ValidatedDescriptionHandler constructor.
*
* @param DescriptionInterface $description
* @param SchemaValidator|null $schemaValidator
*/
public function __construct(DescriptionInterface $description, SchemaValidator $schemaValidator = null)
{
@ -31,7 +30,6 @@ class ValidatedDescriptionHandler
}
/**
* @param callable $handler
* @return \Closure
*/
public function __invoke(callable $handler)
@ -47,7 +45,7 @@ class ValidatedDescriptionHandler
$value = $schema->filter($value);
}
if (! $this->validator->validate($schema, $value)) {
if (!$this->validator->validate($schema, $value)) {
$errors = array_merge($errors, $this->validator->getErrors());
} elseif ($value !== $command[$name]) {
// Update the config value if it changed and no validation errors were encountered.
@ -60,10 +58,10 @@ class ValidatedDescriptionHandler
if ($params = $operation->getAdditionalParameters()) {
foreach ($command->toArray() as $name => $value) {
// It's only additional if it isn't defined in the schema
if (! $operation->hasParam($name)) {
if (!$operation->hasParam($name)) {
// Always set the name so that error messages are useful
$params->setName($name);
if (! $this->validator->validate($params, $value)) {
if (!$this->validator->validate($params, $value)) {
$errors = array_merge($errors, $this->validator->getErrors());
} elseif ($value !== $command[$name]) {
$command[$name] = $value;
@ -73,7 +71,7 @@ class ValidatedDescriptionHandler
}
if ($errors) {
throw new CommandException('Validation errors: ' . implode("\n", $errors), $command);
throw new CommandException('Validation errors: '.implode("\n", $errors), $command);
}
return $handler($command);

14
vendor/guzzlehttp/guzzle-services/src/Operation.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\ToArrayInterface;
@ -45,8 +46,9 @@ class Operation implements ToArrayInterface
* - 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 DescriptionInterface $description Service description used to resolve models if $ref tags are found
* @param array $config Array of configuration data
* @param DescriptionInterface $description Service description used to resolve models if $ref tags are found
*
* @throws \InvalidArgumentException
*/
public function __construct(array $config = [], DescriptionInterface $description = null)
@ -63,7 +65,7 @@ class Operation implements ToArrayInterface
'data' => [],
'parameters' => [],
'additionalParameters' => null,
'errorResponses' => []
'errorResponses' => [],
];
$this->description = $description === null ? new Description([]) : $description;
@ -240,7 +242,7 @@ class Operation implements ToArrayInterface
* Get extra data from the operation
*
* @param string $name Name of the data point to retrieve or null to
* retrieve all of the extra data.
* retrieve all of the extra data.
*
* @return mixed|null
*/
@ -256,14 +258,12 @@ class Operation implements ToArrayInterface
}
/**
* @param $name
* @param array $config
* @return array
*/
private function resolveExtends($name, array $config)
{
if (!$this->description->hasOperation($name)) {
throw new \InvalidArgumentException('No operation named ' . $name);
throw new \InvalidArgumentException('No operation named '.$name);
}
// Merge parameters together one level deep

61
vendor/guzzlehttp/guzzle-services/src/Parameter.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\ToArrayInterface;
@ -6,74 +7,75 @@ use GuzzleHttp\Command\ToArrayInterface;
/**
* API parameter object used with service descriptions
*/
#[\AllowDynamicProperties]
class Parameter implements ToArrayInterface
{
private $originalData;
/** @var string $name */
/** @var string */
private $name;
/** @var string $description */
/** @var string */
private $description;
/** @var string|array $type */
/** @var string|array */
private $type;
/** @var bool $required*/
/** @var bool */
private $required;
/** @var array|null $enum */
/** @var array|null */
private $enum;
/** @var string $pattern */
/** @var string */
private $pattern;
/** @var int $minimum*/
/** @var int */
private $minimum;
/** @var int $maximum */
/** @var int */
private $maximum;
/** @var int $minLength */
/** @var int */
private $minLength;
/** @var int $maxLength */
/** @var int */
private $maxLength;
/** @var int $minItems */
/** @var int */
private $minItems;
/** @var int $maxItems */
/** @var int */
private $maxItems;
/** @var mixed $default */
/** @var mixed */
private $default;
/** @var bool $static */
/** @var bool */
private $static;
/** @var array $filters */
/** @var array */
private $filters;
/** @var string $location */
/** @var string */
private $location;
/** @var string $sentAs */
/** @var string */
private $sentAs;
/** @var array $data */
/** @var array */
private $data;
/** @var array $properties */
/** @var array */
private $properties = [];
/** @var array|bool|Parameter $additionalProperties */
/** @var array|bool|Parameter */
private $additionalProperties;
/** @var array|Parameter $items */
/** @var array|Parameter */
private $items;
/** @var string $format */
/** @var string */
private $format;
private $propertiesCache = null;
@ -171,7 +173,7 @@ class Parameter implements ToArrayInterface
*
* @param array $data Array of data as seen in service descriptions
* @param array $options Options used when creating the parameter. You can
* specify a Guzzle service description in the 'description' key.
* specify a Guzzle service description in the 'description' key.
*
* @throws \InvalidArgumentException
*/
@ -252,8 +254,9 @@ class Parameter implements ToArrayInterface
* @param mixed $value Value to filter
*
* @return mixed Returns the filtered value
*
* @throws \RuntimeException when trying to format when no service
* description is available.
* description is available.
*/
public function filter($value)
{
@ -261,8 +264,9 @@ class Parameter implements ToArrayInterface
if ($this->format) {
if (!$this->serviceDescription) {
throw new \RuntimeException('No service description was set so '
. 'the value cannot be formatted.');
.'the value cannot be formatted.');
}
return $this->serviceDescription->format($this->format, $value);
}
@ -512,7 +516,7 @@ class Parameter implements ToArrayInterface
*
* @param string $name Name of the property to retrieve
*
* @return null|Parameter
* @return Parameter|null
*/
public function getProperty($name)
{
@ -618,6 +622,7 @@ class Parameter implements ToArrayInterface
* @param string|array $filter Method to filter the value through
*
* @return self
*
* @throws \InvalidArgumentException
*/
private function addFilter($filter)
@ -643,13 +648,15 @@ class Parameter implements ToArrayInterface
* Check if a parameter has a specific variable and if it set.
*
* @param string $var
*
* @return bool
*/
public function has($var)
{
if (!is_string($var)) {
throw new \InvalidArgumentException('Expected a string. Got: ' . (is_object($var) ? get_class($var) : gettype($var)));
throw new \InvalidArgumentException('Expected a string. Got: '.(is_object($var) ? get_class($var) : gettype($var)));
}
return isset($this->{$var}) && !empty($this->{$var});
}
}

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\QuerySerializer;
interface QuerySerializerInterface
@ -6,8 +7,7 @@ interface QuerySerializerInterface
/**
* Aggregate query params and transform them into a string
*
* @param array $queryParams
* @return string
*/
public function aggregate(array $queryParams);
}
}

View File

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -13,8 +14,6 @@ abstract class AbstractLocation implements RequestLocationInterface
/**
* Set the name of the location
*
* @param $locationName
*/
public function __construct($locationName)
{
@ -22,9 +21,6 @@ abstract class AbstractLocation implements RequestLocationInterface
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
* @return RequestInterface
*/
public function visit(
@ -36,9 +32,6 @@ abstract class AbstractLocation implements RequestLocationInterface
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
* @return RequestInterface
*/
public function after(
@ -53,8 +46,7 @@ abstract class AbstractLocation implements RequestLocationInterface
* Prepare (filter and set desired name for request item) the value for
* request.
*
* @param mixed $value
* @param Parameter $param
* @param mixed $value
*
* @return array|mixed
*/

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -12,7 +13,6 @@ use Psr\Http\Message\RequestInterface;
*/
class BodyLocation extends AbstractLocation
{
/**
* Set the name of the location
*
@ -24,10 +24,6 @@ class BodyLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
*
* @return MessageInterface
*/
public function visit(
@ -38,10 +34,10 @@ class BodyLocation extends AbstractLocation
$oldValue = $request->getBody()->getContents();
$value = $command[$param->getName()];
$value = $param->getName() . '=' . $param->filter($value);
$value = $param->getName().'='.$param->filter($value);
if ($oldValue !== '') {
$value = $oldValue . '&' . $value;
$value = $oldValue.'&'.$value;
}
return $request->withBody(Psr7\Utils::streamFor($value));

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -12,10 +13,10 @@ use Psr\Http\Message\RequestInterface;
*/
class FormParamLocation extends AbstractLocation
{
/** @var string $contentType */
/** @var string */
protected $contentType = 'application/x-www-form-urlencoded; charset=utf-8';
/** @var array $formParamsData */
/** @var array */
protected $formParamsData = [];
/**
@ -29,10 +30,6 @@ class FormParamLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
*
* @return RequestInterface
*/
public function visit(
@ -49,10 +46,6 @@ class FormParamLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
*
* @return RequestInterface
*/
public function after(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -12,7 +13,6 @@ use Psr\Http\Message\RequestInterface;
*/
class HeaderLocation extends AbstractLocation
{
/**
* Set the name of the location
*
@ -24,10 +24,6 @@ class HeaderLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
*
* @return MessageInterface
*/
public function visit(
@ -41,10 +37,6 @@ class HeaderLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
*
* @return RequestInterface
*/
public function after(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -23,7 +24,7 @@ class JsonLocation extends AbstractLocation
/**
* @param string $locationName Name of the location
* @param string $contentType Content-Type header to add to the request if
* JSON is added to the body. Pass an empty string to omit.
* JSON is added to the body. Pass an empty string to omit.
*/
public function __construct($locationName = 'json', $contentType = 'application/json')
{
@ -32,10 +33,6 @@ class JsonLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
*
* @return RequestInterface
*/
public function visit(
@ -52,10 +49,6 @@ class JsonLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
*
* @return MessageInterface
*/
public function after(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -12,10 +13,10 @@ use Psr\Http\Message\RequestInterface;
*/
class MultiPartLocation extends AbstractLocation
{
/** @var string $contentType */
/** @var string */
protected $contentType = 'multipart/form-data; boundary=';
/** @var array $formParamsData */
/** @var array */
protected $multipartData = [];
/**
@ -29,9 +30,6 @@ class MultiPartLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
* @return RequestInterface
*/
public function visit(
@ -41,17 +39,13 @@ class MultiPartLocation extends AbstractLocation
) {
$this->multipartData[] = [
'name' => $param->getWireName(),
'contents' => $this->prepareValue($command[$param->getName()], $param)
'contents' => $this->prepareValue($command[$param->getName()], $param),
];
return $request;
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
* @return RequestInterface
*/
public function after(
@ -68,7 +62,7 @@ class MultiPartLocation extends AbstractLocation
$request = Psr7\Utils::modifyRequest($request, $modify);
if ($request->getBody() instanceof Psr7\MultipartStream) {
// Use a multipart/form-data POST if a Content-Type is not set.
$request->withHeader('Content-Type', $this->contentType . $request->getBody()->getBoundary());
$request->withHeader('Content-Type', $this->contentType.$request->getBody()->getBoundary());
}
return $request;

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -22,8 +23,7 @@ class QueryLocation extends AbstractLocation
/**
* Set the name of the location
*
* @param string $locationName
* @param QuerySerializerInterface|null $querySerializer
* @param string $locationName
*/
public function __construct($locationName = 'query', QuerySerializerInterface $querySerializer = null)
{
@ -33,10 +33,6 @@ class QueryLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
*
* @return RequestInterface
*/
public function visit(
@ -58,10 +54,6 @@ class QueryLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
*
* @return RequestInterface
*/
public function after(

View File

54
vendor/guzzlehttp/guzzle-services/src/RequestLocation/XmlLocation.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface;
@ -24,8 +25,8 @@ class XmlLocation extends AbstractLocation
/**
* @param string $locationName Name of the location
* @param string $contentType Set to a non-empty string to add a
* Content-Type header to a request if any XML content is added to the
* body. Pass an empty string to disable the addition of the header.
* Content-Type header to a request if any XML content is added to the
* body. Pass an empty string to disable the addition of the header.
*/
public function __construct($locationName = 'xml', $contentType = 'application/xml')
{
@ -34,10 +35,6 @@ class XmlLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Parameter $param
*
* @return RequestInterface
*/
public function visit(
@ -58,10 +55,6 @@ class XmlLocation extends AbstractLocation
}
/**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
*
* @return RequestInterface
*/
public function after(
@ -149,8 +142,8 @@ class XmlLocation extends AbstractLocation
* Recursively build the XML body
*
* @param \XMLWriter $writer XML to modify
* @param Parameter $param API Parameter
* @param mixed $value Value to add
* @param Parameter $param API Parameter
* @param mixed $value Value to add
*/
protected function addXml(\XMLWriter $writer, Parameter $param, $value)
{
@ -179,6 +172,7 @@ class XmlLocation extends AbstractLocation
if (!$param->getData('xmlFlattened')) {
$writer->endElement();
}
return;
}
if ($param->getData('xmlAttribute')) {
@ -191,11 +185,11 @@ class XmlLocation extends AbstractLocation
/**
* Write an attribute with namespace if used
*
* @param \XMLWriter $writer 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
* @param \XMLWriter $writer 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($writer, $prefix, $name, $namespace, $value)
{
@ -209,11 +203,11 @@ class XmlLocation extends AbstractLocation
/**
* Write an element with namespace if used
*
* @param \XMLWriter $writer 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
* @param \XMLWriter $writer 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 $writer, $prefix, $name, $namespace, $value)
{
@ -233,9 +227,10 @@ class XmlLocation extends AbstractLocation
/**
* Create a new xml writer and start a document
*
* @param string $encoding document encoding
* @param string $encoding document encoding
*
* @return \XMLWriter the writer resource
*
* @throws \RuntimeException if the document cannot be started
*/
protected function startDocument($encoding)
@ -267,10 +262,6 @@ class XmlLocation extends AbstractLocation
/**
* Add an array to the XML
*
* @param \XMLWriter $writer
* @param Parameter $param
* @param $value
*/
protected function addXmlArray(\XMLWriter $writer, Parameter $param, &$value)
{
@ -283,10 +274,6 @@ class XmlLocation extends AbstractLocation
/**
* Add an object to the XML
*
* @param \XMLWriter $writer
* @param Parameter $param
* @param $value
*/
protected function addXmlObject(\XMLWriter $writer, Parameter $param, &$value)
{
@ -309,11 +296,6 @@ class XmlLocation extends AbstractLocation
}
}
/**
* @param $value
* @param Parameter $param
* @param Operation $operation
*/
private function visitWithValue(
$value,
Parameter $param,

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -7,18 +8,14 @@ use Psr\Http\Message\ResponseInterface;
/**
* Class AbstractLocation
*
* @package GuzzleHttp\Command\Guzzle\ResponseLocation
*/
abstract class AbstractLocation implements ResponseLocationInterface
{
/** @var string $locationName */
/** @var string */
protected $locationName;
/**
* Set the name of the location
*
* @param $locationName
*/
public function __construct($locationName)
{
@ -26,9 +23,6 @@ abstract class AbstractLocation implements ResponseLocationInterface
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $model
* @return ResultInterface
*/
public function before(
@ -40,9 +34,6 @@ abstract class AbstractLocation implements ResponseLocationInterface
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $model
* @return ResultInterface
*/
public function after(
@ -54,9 +45,6 @@ abstract class AbstractLocation implements ResponseLocationInterface
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
* @return ResultInterface
*/
public function visit(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/
class BodyLocation extends AbstractLocation
{
/**
* Set the name of the location
*
@ -22,9 +22,6 @@ class BodyLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
* @return ResultInterface
*/
public function visit(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/
class HeaderLocation extends AbstractLocation
{
/**
* Set the name of the location
*
@ -22,10 +22,6 @@ class HeaderLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
*
* @return ResultInterface
*/
public function visit(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -25,10 +26,6 @@ class JsonLocation extends AbstractLocation
}
/**
* @param \GuzzleHttp\Command\ResultInterface $result
* @param \Psr\Http\Message\ResponseInterface $response
* @param \GuzzleHttp\Command\Guzzle\Parameter $model
*
* @return \GuzzleHttp\Command\ResultInterface
*/
public function before(
@ -37,7 +34,7 @@ class JsonLocation extends AbstractLocation
Parameter $model
) {
$body = (string) $response->getBody();
$body = $body ?: "{}";
$body = $body ?: '{}';
$this->json = \GuzzleHttp\json_decode($body, true);
// relocate named arrays, so that they have the same structure as
// arrays nested in objects and visit can work on them in the same way
@ -49,9 +46,6 @@ class JsonLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $model
* @return ResultInterface
*/
public function after(
@ -84,9 +78,6 @@ class JsonLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
* @return Result|ResultInterface
*/
public function visit(
@ -123,6 +114,7 @@ class JsonLocation extends AbstractLocation
*
* @param Parameter $param API parameter being validated
* @param mixed $value Value to process.
*
* @return mixed|null
*/
private function recurse(Parameter $param, $value)

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/
class ReasonPhraseLocation extends AbstractLocation
{
/**
* Set the name of the location
*
@ -22,9 +22,6 @@ class ReasonPhraseLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
* @return ResultInterface
*/
public function visit(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/
class StatusCodeLocation extends AbstractLocation
{
/**
* Set the name of the location
*
@ -22,9 +22,6 @@ class StatusCodeLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
* @return ResultInterface
*/
public function visit(

View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter;
@ -25,9 +26,6 @@ class XmlLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $model
* @return ResultInterface
*/
public function before(
@ -41,9 +39,6 @@ class XmlLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $model
* @return Result|ResultInterface
*/
public function after(
@ -68,9 +63,6 @@ class XmlLocation extends AbstractLocation
}
/**
* @param ResultInterface $result
* @param ResponseInterface $response
* @param Parameter $param
* @return ResultInterface
*/
public function visit(
@ -80,7 +72,7 @@ class XmlLocation extends AbstractLocation
) {
$sentAs = $param->getWireName();
$ns = null;
if (strstr($sentAs, ':')) {
if (null !== $sentAs && strstr($sentAs, ':')) {
list($ns, $sentAs) = explode(':', $sentAs);
}
@ -100,6 +92,7 @@ class XmlLocation extends AbstractLocation
*
* @param Parameter $param API parameter being processed
* @param \SimpleXMLElement $node Node being processed
*
* @return array
*/
private function recursiveProcess(
@ -132,8 +125,6 @@ class XmlLocation extends AbstractLocation
}
/**
* @param Parameter $param
* @param \SimpleXMLElement $node
* @return array
*/
private function processArray(Parameter $param, \SimpleXMLElement $node)
@ -144,7 +135,7 @@ class XmlLocation extends AbstractLocation
$result = [];
$ns = null;
if (strstr($sentAs, ':')) {
if (null !== $sentAs && strstr($sentAs, ':')) {
// Get namespace from the wire name
list($ns, $sentAs) = explode(':', $sentAs);
} else {
@ -174,6 +165,7 @@ class XmlLocation extends AbstractLocation
*
* @param Parameter $param API parameter being parsed
* @param \SimpleXMLElement $node Value to process
*
* @return array
*/
private function processObject(Parameter $param, \SimpleXMLElement $node)
@ -243,9 +235,8 @@ class XmlLocation extends AbstractLocation
/**
* Convert an XML document to an array.
*
* @param \SimpleXMLElement $xml
* @param int $nesting
* @param null $ns
* @param int $nesting
* @param null $ns
*
* @return array
*/

19
vendor/guzzlehttp/guzzle-services/src/SchemaFormatter.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
/**
@ -41,6 +42,7 @@ class SchemaFormatter
* @param string $format Format of the result
*
* @return string
*
* @throws \InvalidArgumentException
*/
protected function dateFormatter($dateTime, $format)
@ -58,18 +60,19 @@ class SchemaFormatter
if (!$utc) {
$utc = new \DateTimeZone('UTC');
}
return $dateTime->setTimezone($utc)->format($format);
}
throw new \InvalidArgumentException('Date/Time values must be either '
. 'be a string, integer, or DateTime object');
.'be a string, integer, or DateTime object');
}
/**
* Create a ISO 8601 (YYYY-MM-DDThh:mm:ssZ) formatted date time value in
* UTC time.
*
* @param string|integer|\DateTime $value Date time value
* @param string|int|\DateTime $value Date time value
*
* @return string
*/
@ -81,7 +84,7 @@ class SchemaFormatter
/**
* Create an HTTP date (RFC 1123 / RFC 822) formatted UTC date-time string
*
* @param string|integer|\DateTime $value Date time value
* @param string|int|\DateTime $value Date time value
*
* @return string
*/
@ -93,7 +96,7 @@ class SchemaFormatter
/**
* Create a YYYY-MM-DD formatted string
*
* @param string|integer|\DateTime $value Date time value
* @param string|int|\DateTime $value Date time value
*
* @return string
*/
@ -105,7 +108,7 @@ class SchemaFormatter
/**
* Create a hh:mm:ss formatted string
*
* @param string|integer|\DateTime $value Date time value
* @param string|int|\DateTime $value Date time value
*
* @return string
*/
@ -117,8 +120,8 @@ class SchemaFormatter
/**
* Formats a boolean value as a string
*
* @param string|integer|bool $value Value to convert to a boolean
* 'true' / 'false' value
* @param string|int|bool $value Value to convert to a boolean
* 'true' / 'false' value
*
* @return string
*/
@ -130,7 +133,7 @@ class SchemaFormatter
/**
* Return a UNIX timestamp in the UTC timezone
*
* @param string|integer|\DateTime $value Time value
* @param string|int|\DateTime $value Time value
*
* @return int
*/

43
vendor/guzzlehttp/guzzle-services/src/SchemaValidator.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\ToArrayInterface;
@ -21,8 +22,8 @@ class SchemaValidator
/**
* @param bool $castIntegerToStringType Set to true to convert integers
* into strings when a required type is a string and the input value is
* an integer. Defaults to true.
* into strings when a required type is a string and the input value is
* an integer. Defaults to true.
*/
public function __construct($castIntegerToStringType = true)
{
@ -30,8 +31,6 @@ class SchemaValidator
}
/**
* @param Parameter $param
* @param $value
* @return bool
*/
public function validate(Parameter $param, &$value)
@ -43,6 +42,7 @@ class SchemaValidator
return true;
} else {
sort($this->errors);
return false;
}
}
@ -60,8 +60,8 @@ class SchemaValidator
/**
* From the allowable types, determine the type that the variable matches
*
* @param string|array $type Parameter type
* @param mixed $value Value to determine the type
* @param string|array $type Parameter type
* @param mixed $value Value to determine the type
*
* @return string|false Returns the matching type on
*/
@ -97,11 +97,11 @@ class SchemaValidator
/**
* 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
* @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
*/
@ -146,6 +146,7 @@ class SchemaValidator
// indexed
if (isset($value[0])) {
$this->errors[] = "{$path} must be an array of properties. Got a numerically indexed array.";
return false;
}
$traverse = true;
@ -208,24 +209,24 @@ class SchemaValidator
$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);
$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()))
$message = "{$path} is ".($param->getType()
? ('a required '.implode(' or ', (array) $param->getType()))
: 'required');
if ($param->has('description')) {
$message .= ': ' . $param->getDescription();
$message .= ': '.$param->getDescription();
}
$this->errors[] = $message;
return false;
}
@ -239,7 +240,7 @@ class SchemaValidator
) {
$value = (string) $value;
} else {
$this->errors[] = "{$path} must be of type " . implode(' or ', (array) $param->getType());
$this->errors[] = "{$path} must be of type ".implode(' or ', (array) $param->getType());
}
}
@ -247,12 +248,12 @@ class SchemaValidator
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) . '"';
$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)) {
if (($pattern = $param->getPattern()) && !preg_match($pattern, $value)) {
$this->errors[] = "{$path} must match the following regular expression: {$pattern}";
}
@ -268,7 +269,6 @@ class SchemaValidator
$this->errors[] = "{$path} length must be less than or equal to {$max}";
}
}
} elseif ($type == 'array') {
$size = null;
if ($min = $param->getMinItems()) {
@ -282,7 +282,6 @@ class SchemaValidator
$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}";

21
vendor/guzzlehttp/guzzle-services/src/Serializer.php vendored Executable file → Normal file
View File

@ -1,4 +1,5 @@
<?php
namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\CommandInterface;
@ -28,7 +29,6 @@ class Serializer
private $description;
/**
* @param DescriptionInterface $description
* @param RequestLocationInterface[] $requestLocations Extra request locations
*/
public function __construct(
@ -38,11 +38,11 @@ class Serializer
static $defaultRequestLocations;
if (!$defaultRequestLocations) {
$defaultRequestLocations = [
'body' => new BodyLocation(),
'query' => new QueryLocation(),
'header' => new HeaderLocation(),
'json' => new JsonLocation(),
'xml' => new XmlLocation(),
'body' => new BodyLocation(),
'query' => new QueryLocation(),
'header' => new HeaderLocation(),
'json' => new JsonLocation(),
'xml' => new XmlLocation(),
'formParam' => new FormParamLocation(),
'multipart' => new MultiPartLocation(),
];
@ -53,21 +53,22 @@ class Serializer
}
/**
* @param CommandInterface $command
* @return RequestInterface
*/
public function __invoke(CommandInterface $command)
{
$request = $this->createRequest($command);
return $this->prepareRequest($command, $request);
}
/**
* Prepares a request for sending using location visitors
*
* @param CommandInterface $command
* @param RequestInterface $request Request being created
*
* @return RequestInterface
*
* @throws \RuntimeException If a location cannot be handled
*/
protected function prepareRequest(
@ -109,9 +110,8 @@ class Serializer
/**
* Create a request for the command and operation
*
* @param CommandInterface $command
*
* @return RequestInterface
*
* @throws \RuntimeException
*/
protected function createRequest(CommandInterface $command)
@ -133,7 +133,6 @@ class Serializer
* Create a request for an operation with a uri merged onto a base URI
*
* @param \GuzzleHttp\Command\Guzzle\Operation $operation
* @param \GuzzleHttp\Command\CommandInterface $command
*
* @return \GuzzleHttp\Psr7\Request
*/

View File

@ -0,0 +1,9 @@
{
"require": {
"php": "^7.4 || ^8.0",
"friendsofphp/php-cs-fixer": "3.16.0"
},
"config": {
"preferred-install": "dist"
}
}

76
vendor/guzzlehttp/guzzle/CHANGELOG.md vendored Executable file → Normal file
View File

@ -2,6 +2,41 @@
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
## 7.7.0 - 2023-05-21
### Added
- Support `guzzlehttp/promises` v2
## 7.6.1 - 2023-05-15
### Fixed
- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values
## 7.6.0 - 2023-05-14
### Added
- Support for setting the minimum TLS version in a unified way
- Apply on request the version set in options parameters
## 7.5.2 - 2023-05-14
### Fixed
- Fixed set cookie constructor validation
- Fixed handling of files with `'0'` body
### Changed
- Corrected docs and default connect timeout value to 300 seconds
## 7.5.1 - 2023-04-17
### Fixed
@ -12,6 +47,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5`
## 7.5.0 - 2022-08-28
### Added
@ -19,6 +55,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Support PHP 8.2
- Add request to delay closure params
## 7.4.5 - 2022-06-20
### Fixed
@ -26,6 +63,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
* Fix change in port should be considered a change in origin
* Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin
## 7.4.4 - 2022-06-09
### Fixed
@ -33,12 +71,14 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
* Fix failure to strip Authorization header on HTTP downgrade
* Fix failure to strip the Cookie header on change in host or HTTP downgrade
## 7.4.3 - 2022-05-25
### Fixed
* Fix cross-domain cookie leakage
## 7.4.2 - 2022-03-20
### Fixed
@ -47,6 +87,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Reject non-HTTP schemes in StreamHandler
- Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve`
## 7.4.1 - 2021-12-06
### Changed
@ -58,6 +99,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950)
## 7.4.0 - 2021-10-18
### Added
@ -75,6 +117,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Be more strict with types [#2914](https://github.com/guzzle/guzzle/pull/2914), [#2917](https://github.com/guzzle/guzzle/pull/2917), [#2919](https://github.com/guzzle/guzzle/pull/2919), [#2945](https://github.com/guzzle/guzzle/pull/2945)
## 7.3.0 - 2021-03-23
### Added
@ -87,6 +130,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872)
## 7.2.0 - 2020-10-10
### Added
@ -109,6 +153,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786)
## 7.1.1 - 2020-09-30
### Fixed
@ -120,6 +165,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- We dont connect curl `sink` on HEAD requests.
- Removed some PHP 5 workarounds
## 7.1.0 - 2020-09-22
### Added
@ -142,14 +188,17 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- `Utils::defaultCaBundle()`
- `CurlFactory::LOW_CURL_VERSION_NUMBER`
## 7.0.1 - 2020-06-27
* Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699)
## 7.0.0 - 2020-06-27
No changes since 7.0.0-rc1.
## 7.0.0-rc1 - 2020-06-15
### Changed
@ -157,6 +206,7 @@ No changes since 7.0.0-rc1.
* Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629)
* Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675)
## 7.0.0-beta2 - 2020-05-25
### Added
@ -182,6 +232,7 @@ No changes since 7.0.0-rc1.
* Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528)
## 7.0.0-beta1 - 2019-12-30
The diff might look very big but 95% of Guzzle users will be able to upgrade without modification.
@ -215,15 +266,18 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440)
* Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464)
## 6.5.2 - 2019-12-23
* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
## 6.5.1 - 2019-12-21
* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454)
* IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
## 6.5.0 - 2019-12-07
* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
@ -233,11 +287,13 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
* Deprecated `ClientInterface::VERSION`
## 6.4.1 - 2019-10-23
* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
## 6.4.0 - 2019-10-23
* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
@ -250,6 +306,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
## 6.3.3 - 2018-04-22
* Fix: Default headers when decode_content is specified
@ -291,13 +348,14 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684)
* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827)
+ Minor code cleanups, documentation fixes and clarifications.
## 6.2.3 - 2017-02-28
* Fix deprecations with guzzle/psr7 version 1.4
## 6.2.2 - 2016-10-08
* Allow to pass nullable Response to delay callable
@ -305,6 +363,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Fix drain case where content-length is the literal string zero
* Obfuscate in-URL credentials in exceptions
## 6.2.1 - 2016-07-18
* Address HTTP_PROXY security vulnerability, CVE-2016-5385:
@ -315,6 +374,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
a server does not honor `Connection: close`.
* Ignore URI fragment when sending requests.
## 6.2.0 - 2016-03-21
* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`.
@ -334,6 +394,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Bug fix: provide an empty string to `http_build_query` for HHVM workaround.
https://github.com/guzzle/guzzle/pull/1367
## 6.1.1 - 2015-11-22
* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler
@ -349,6 +410,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Bug fix: fixed regression where MockHandler was not using `sink`.
https://github.com/guzzle/guzzle/pull/1292
## 6.1.0 - 2015-09-08
* Feature: Added the `on_stats` request option to provide access to transfer
@ -383,6 +445,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
https://github.com/guzzle/guzzle/pull/1189
## 6.0.2 - 2015-07-04
* Fixed a memory leak in the curl handlers in which references to callbacks
@ -400,6 +463,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Functions are now conditionally required using an additional level of
indirection to help with global Composer installations.
## 6.0.1 - 2015-05-27
* Fixed a bug with serializing the `query` request option where the `&`
@ -408,6 +472,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
use `form_params` or `multipart` instead.
* Various doc fixes.
## 6.0.0 - 2015-05-26
* See the UPGRADING.md document for more information.
@ -432,6 +497,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* `$maxHandles` has been removed from CurlMultiHandler.
* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
## 5.3.0 - 2015-05-19
* Mock now supports `save_to`
@ -442,6 +508,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
* URL scheme is now always lowercased.
## 6.0.0-beta.1
* Requires PHP >= 5.5
@ -494,6 +561,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* `GuzzleHttp\QueryParser` has been replaced with the
`GuzzleHttp\Psr7\parse_query`.
## 5.2.0 - 2015-01-27
* Added `AppliesHeadersInterface` to make applying headers to a request based
@ -504,6 +572,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
RingBridge.
* Added a guard in the Pool class to not use recursion for request retries.
## 5.1.0 - 2014-12-19
* Pool class no longer uses recursion when a request is intercepted.
@ -524,6 +593,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
specific exceptions if necessary.
## 5.0.3 - 2014-11-03
This change updates query strings so that they are treated as un-encoded values
@ -538,6 +608,7 @@ string that should not be parsed or encoded (unless a call to getQuery() is
subsequently made, forcing the query-string to be converted into a Query
object).
## 5.0.2 - 2014-10-30
* Added a trailing `\r\n` to multipart/form-data payloads. See
@ -559,6 +630,7 @@ object).
string on a URL: Now allowing many more characters to be present in the
query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A
## 5.0.1 - 2014-10-16
Bugfix release.
@ -570,6 +642,7 @@ Bugfix release.
* Fixed an issue where transfer statistics were not being populated in the
RingBridge. https://github.com/guzzle/guzzle/issues/866
## 5.0.0 - 2014-10-12
Adding support for non-blocking responses and some minor API cleanup.
@ -651,6 +724,7 @@ interfaces.
argument. They now accept an associative array of options, including the
"size" key and "metadata" key which can be used to provide custom metadata.
## 4.2.2 - 2014-09-08
* Fixed a memory leak in the CurlAdapter when reusing cURL handles.

0
vendor/guzzlehttp/guzzle/LICENSE vendored Executable file → Normal file
View File

14
vendor/guzzlehttp/guzzle/README.md vendored Executable file → Normal file
View File

@ -60,13 +60,13 @@ composer require guzzlehttp/guzzle
## Version Guidance
| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
|---------|----------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 |
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 |
| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 |
| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 |
| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.3 |
| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 |
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 |
| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 |
| 6.x | Security fixes only | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 |
| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.3 |
[guzzle-3-repo]: https://github.com/guzzle/guzzle3
[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x

0
vendor/guzzlehttp/guzzle/UPGRADING.md vendored Executable file → Normal file
View File

8
vendor/guzzlehttp/guzzle/composer.json vendored Executable file → Normal file
View File

@ -53,7 +53,7 @@
"require": {
"php": "^7.2.5 || ^8.0",
"ext-json": "*",
"guzzlehttp/promises": "^1.5",
"guzzlehttp/promises": "^1.5.3 || ^2.0",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@ -64,7 +64,8 @@
"require-dev": {
"ext-curl": "*",
"bamarni/composer-bin-plugin": "^1.8.1",
"php-http/client-integration-tests": "^3.0",
"php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
"php-http/message-factory": "^1.1",
"phpunit/phpunit": "^8.5.29 || ^9.5.23",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
@ -84,9 +85,6 @@
"bamarni-bin": {
"bin-links": true,
"forward-command": false
},
"branch-alias": {
"dev-master": "7.5-dev"
}
},
"autoload": {

0
vendor/guzzlehttp/guzzle/src/BodySummarizer.php vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php vendored Executable file → Normal file
View File

38
vendor/guzzlehttp/guzzle/src/Client.php vendored Executable file → Normal file
View File

@ -120,13 +120,14 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
public function send(RequestInterface $request, array $options = []): ResponseInterface
{
$options[RequestOptions::SYNCHRONOUS] = true;
return $this->sendAsync($request, $options)->wait();
}
/**
* The HttpClient PSR (PSR-18) specify this method.
*
* @inheritDoc
* {@inheritDoc}
*/
public function sendRequest(RequestInterface $request): ResponseInterface
{
@ -184,6 +185,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
public function request(string $method, $uri = '', array $options = []): ResponseInterface
{
$options[RequestOptions::SYNCHRONOUS] = true;
return $this->requestAsync($method, $uri, $options)->wait();
}
@ -228,11 +230,11 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
{
$defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
'verify' => true,
'cookies' => false,
'idn_conversion' => false,
'http_errors' => true,
'decode_content' => true,
'verify' => true,
'cookies' => false,
'idn_conversion' => false,
];
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
@ -354,10 +356,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
if (isset($options['form_params'])) {
if (isset($options['multipart'])) {
throw new InvalidArgumentException('You cannot use '
. 'form_params and multipart at the same time. Use the '
. 'form_params option if you want to send application/'
. 'x-www-form-urlencoded requests, and the multipart '
. 'option to send multipart/form-data requests.');
.'form_params and multipart at the same time. Use the '
.'form_params option if you want to send application/'
.'x-www-form-urlencoded requests, and the multipart '
.'option to send multipart/form-data requests.');
}
$options['body'] = \http_build_query($options['form_params'], '', '&');
unset($options['form_params']);
@ -403,7 +405,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
// Ensure that we don't have the header in different case and set the new value.
$modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']);
$modify['set_headers']['Authorization'] = 'Basic '
. \base64_encode("$value[0]:$value[1]");
.\base64_encode("$value[0]:$value[1]");
break;
case 'digest':
// @todo: Do not rely on curl
@ -437,13 +439,17 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
}
}
if (isset($options['version'])) {
$modify['version'] = $options['version'];
}
$request = Psr7\Utils::modifyRequest($request, $modify);
if ($request->getBody() instanceof Psr7\MultipartStream) {
// Use a multipart/form-data POST if a Content-Type is not set.
// Ensure that we don't have the header in different case and set the new value.
$options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
$options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
. $request->getBody()->getBoundary();
.$request->getBody()->getBoundary();
}
// Merge in conditional headers if they are not present.
@ -469,9 +475,9 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
private function invalidBody(): InvalidArgumentException
{
return new InvalidArgumentException('Passing in the "body" request '
. 'option as an array to send a request is not supported. '
. 'Please use the "form_params" request option to send a '
. 'application/x-www-form-urlencoded request, or the "multipart" '
. 'request option to send a multipart/form-data request.');
.'option as an array to send a request is not supported. '
.'Please use the "form_params" request option to send a '
.'application/x-www-form-urlencoded request, or the "multipart" '
.'request option to send a multipart/form-data request.');
}
}

0
vendor/guzzlehttp/guzzle/src/ClientInterface.php vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle/src/ClientTrait.php vendored Executable file → Normal file
View File

26
vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php vendored Executable file → Normal file
View File

@ -50,10 +50,10 @@ class CookieJar implements CookieJarInterface
$cookieJar = new self();
foreach ($cookies as $name => $value) {
$cookieJar->setCookie(new SetCookie([
'Domain' => $domain,
'Name' => $name,
'Value' => $value,
'Discard' => true
'Domain' => $domain,
'Name' => $name,
'Value' => $value,
'Discard' => true,
]));
}
@ -97,7 +97,7 @@ class CookieJar implements CookieJarInterface
}
/**
* @inheritDoc
* {@inheritDoc}
*/
public function toArray(): array
{
@ -107,12 +107,13 @@ class CookieJar implements CookieJarInterface
}
/**
* @inheritDoc
* {@inheritDoc}
*/
public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
{
if (!$domain) {
$this->cookies = [];
return;
} elseif (!$path) {
$this->cookies = \array_filter(
@ -142,7 +143,7 @@ class CookieJar implements CookieJarInterface
}
/**
* @inheritDoc
* {@inheritDoc}
*/
public function clearSessionCookies(): void
{
@ -155,7 +156,7 @@ class CookieJar implements CookieJarInterface
}
/**
* @inheritDoc
* {@inheritDoc}
*/
public function setCookie(SetCookie $cookie): bool
{
@ -170,9 +171,10 @@ class CookieJar implements CookieJarInterface
$result = $cookie->validate();
if ($result !== true) {
if ($this->strictMode) {
throw new \RuntimeException('Invalid cookie: ' . $result);
throw new \RuntimeException('Invalid cookie: '.$result);
}
$this->removeCookieIfEmpty($cookie);
return false;
}
@ -253,7 +255,7 @@ class CookieJar implements CookieJarInterface
/**
* Computes cookie path following RFC 6265 section 5.1.4
*
* @link https://tools.ietf.org/html/rfc6265#section-5.1.4
* @see https://tools.ietf.org/html/rfc6265#section-5.1.4
*/
private function getCookiePathFromRequest(RequestInterface $request): string
{
@ -289,8 +291,8 @@ class CookieJar implements CookieJarInterface
!$cookie->isExpired() &&
(!$cookie->getSecure() || $scheme === 'https')
) {
$values[] = $cookie->getName() . '='
. $cookie->getValue();
$values[] = $cookie->getName().'='
.$cookie->getValue();
}
}

2
vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php vendored Executable file → Normal file
View File

@ -13,7 +13,7 @@ use Psr\Http\Message\ResponseInterface;
* necessary. Subclasses are also responsible for storing and retrieving
* cookies from a file, database, etc.
*
* @link https://docs.python.org/2/library/cookielib.html Inspiration
* @see https://docs.python.org/2/library/cookielib.html Inspiration
* @extends \IteratorAggregate<SetCookie>
*/
interface CookieJarInterface extends \Countable, \IteratorAggregate

0
vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php vendored Executable file → Normal file
View File

2
vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php vendored Executable file → Normal file
View File

@ -71,7 +71,7 @@ class SessionCookieJar extends CookieJar
$this->setCookie(new SetCookie($cookie));
}
} elseif (\strlen($data)) {
throw new \RuntimeException("Invalid cookie data");
throw new \RuntimeException('Invalid cookie data');
}
}
}

84
vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php vendored Executable file → Normal file
View File

@ -11,15 +11,15 @@ class SetCookie
* @var array
*/
private static $defaults = [
'Name' => null,
'Value' => null,
'Domain' => null,
'Path' => '/',
'Max-Age' => null,
'Expires' => null,
'Secure' => false,
'Discard' => false,
'HttpOnly' => false
'Name' => null,
'Value' => null,
'Domain' => null,
'Path' => '/',
'Max-Age' => null,
'Expires' => null,
'Secure' => false,
'Discard' => false,
'HttpOnly' => false,
];
/**
@ -58,7 +58,13 @@ class SetCookie
} else {
foreach (\array_keys(self::$defaults) as $search) {
if (!\strcasecmp($search, $key)) {
$data[$search] = $value;
if ($search === 'Max-Age') {
if (is_numeric($value)) {
$data[$search] = (int) $value;
}
} else {
$data[$search] = $value;
}
continue 2;
}
}
@ -74,13 +80,49 @@ class SetCookie
*/
public function __construct(array $data = [])
{
/** @var array|null $replaced will be null in case of replace error */
$replaced = \array_replace(self::$defaults, $data);
if ($replaced === null) {
throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.');
$this->data = self::$defaults;
if (isset($data['Name'])) {
$this->setName($data['Name']);
}
if (isset($data['Value'])) {
$this->setValue($data['Value']);
}
if (isset($data['Domain'])) {
$this->setDomain($data['Domain']);
}
if (isset($data['Path'])) {
$this->setPath($data['Path']);
}
if (isset($data['Max-Age'])) {
$this->setMaxAge($data['Max-Age']);
}
if (isset($data['Expires'])) {
$this->setExpires($data['Expires']);
}
if (isset($data['Secure'])) {
$this->setSecure($data['Secure']);
}
if (isset($data['Discard'])) {
$this->setDiscard($data['Discard']);
}
if (isset($data['HttpOnly'])) {
$this->setHttpOnly($data['HttpOnly']);
}
// Set the remaining values that don't have extra validation logic
foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) {
$this->data[$key] = $data[$key];
}
$this->data = $replaced;
// Extract the Expires value and turn it into a UNIX timestamp if needed
if (!$this->getExpires() && $this->getMaxAge()) {
// Calculate the Expires date
@ -92,13 +134,13 @@ class SetCookie
public function __toString()
{
$str = $this->data['Name'] . '=' . ($this->data['Value'] ?? '') . '; ';
$str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; ';
foreach ($this->data as $k => $v) {
if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
if ($k === 'Expires') {
$str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
$str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; ';
} else {
$str .= ($v === true ? $k : "{$k}={$v}") . '; ';
$str .= ($v === true ? $k : "{$k}={$v}").'; ';
}
}
}
@ -394,7 +436,7 @@ class SetCookie
return false;
}
return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain);
return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain);
}
/**
@ -423,8 +465,8 @@ class SetCookie
$name
)) {
return 'Cookie name must not contain invalid characters: ASCII '
. 'Control characters (0-31;127), space, tab and the '
. 'following characters: ()<>@,;:\"/?={}';
.'Control characters (0-31;127), space, tab and the '
.'following characters: ()<>@,;:\"/?={}';
}
// Value must not be null. 0 and empty string are valid. Empty strings

0
vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/ClientException.php vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php vendored Executable file → Normal file
View File

0
vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php vendored Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More