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", "tencentcloud/tencentcloud-sdk-php": "^3.0",
"alibabacloud/client": "^1.5", "alibabacloud/client": "^1.5",
"rmccue/requests": "^2.0", "rmccue/requests": "^2.0",
"w7corp/easywechat": "^6.8" "w7corp/easywechat": "^6.8",
"ebaoquan/junziqian_sdk":">=2.0.2"
}, },
"require-dev": { "require-dev": {
"symfony/var-dumper": "^4.2", "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( return array(
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.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\\view\\driver\\' => array($vendorDir . '/topthink/think-view/src'),
'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'), 'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'),
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/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'), 'clagiordano\\weblibs\\configmanager\\' => array($vendorDir . '/clagiordano/weblibs-configmanager/src'),
'app\\' => array($baseDir . '/app'), 'app\\' => array($baseDir . '/app'),
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'), 'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
@ -49,7 +50,6 @@ return array(
'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'), 'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'), 'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
'Nyholm\\Psr7Server\\' => array($vendorDir . '/nyholm/psr7-server/src'), 'Nyholm\\Psr7Server\\' => array($vendorDir . '/nyholm/psr7-server/src'),
'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'),
'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'), 'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'),

View File

@ -9,7 +9,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
public static $files = array ( public static $files = array (
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
@ -44,6 +43,7 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
), ),
'c' => 'c' =>
array ( array (
'com\\junziqian\\sdk\\' => 18,
'clagiordano\\weblibs\\configmanager\\' => 34, 'clagiordano\\weblibs\\configmanager\\' => 34,
), ),
'a' => 'a' =>
@ -113,7 +113,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
), ),
'M' => 'M' =>
array ( array (
'MyCLabs\\Enum\\' => 13,
'Monolog\\' => 8, 'Monolog\\' => 8,
'Matrix\\' => 7, 'Matrix\\' => 7,
), ),
@ -161,10 +160,14 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
), ),
'think\\' => 'think\\' =>
array ( array (
0 => __DIR__ . '/..' . '/topthink/framework/src/think', 0 => __DIR__ . '/..' . '/topthink/think-helper/src',
1 => __DIR__ . '/..' . '/topthink/think-helper/src', 1 => __DIR__ . '/..' . '/topthink/think-orm/src',
2 => __DIR__ . '/..' . '/topthink/think-orm/src', 2 => __DIR__ . '/..' . '/topthink/think-template/src',
3 => __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\\' => 'clagiordano\\weblibs\\configmanager\\' =>
array ( array (
@ -323,10 +326,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
array ( array (
0 => __DIR__ . '/..' . '/nyholm/psr7-server/src', 0 => __DIR__ . '/..' . '/nyholm/psr7-server/src',
), ),
'MyCLabs\\Enum\\' =>
array (
0 => __DIR__ . '/..' . '/myclabs/php-enum/src',
),
'Monolog\\' => 'Monolog\\' =>
array ( array (
0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', 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', 'name' => 'topthink/think',
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '552d139785125b5b81f054dc0b7cb9d9410f2e0e', 'reference' => 'b55f77d5c3e94177ec3d1ce21fce629a756733b6',
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -47,14 +47,23 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'dragonmantank/cron-expression' => array( 'dragonmantank/cron-expression' => array(
'pretty_version' => 'v3.3.1', 'pretty_version' => 'v3.3.2',
'version' => '3.3.1.0', 'version' => '3.3.2.0',
'reference' => 'be85b3f05b46c39bbc0d95f6c071ddff669510fa', 'reference' => '782ca5968ab8b954773518e9e49a6f892a34b2a8',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../dragonmantank/cron-expression', 'install_path' => __DIR__ . '/../dragonmantank/cron-expression',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, '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( 'ezyang/htmlpurifier' => array(
'pretty_version' => 'v4.16.0', 'pretty_version' => 'v4.16.0',
'version' => '4.16.0.0', 'version' => '4.16.0.0',
@ -65,36 +74,36 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/command' => array( 'guzzlehttp/command' => array(
'pretty_version' => '1.2.3', 'pretty_version' => '1.3.0',
'version' => '1.2.3.0', 'version' => '1.3.0.0',
'reference' => '3c9383aaf2e39fa8d39375ae37b95b55964aaef4', 'reference' => '3372bcfd79d4b357b6871665bf06155515e8d844',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/command', 'install_path' => __DIR__ . '/../guzzlehttp/command',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/guzzle' => array( 'guzzlehttp/guzzle' => array(
'pretty_version' => '7.5.1', 'pretty_version' => '7.7.0',
'version' => '7.5.1.0', 'version' => '7.7.0.0',
'reference' => 'b964ca597e86b752cd994f27293e9fa6b6a95ed9', 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/guzzle-services' => array( 'guzzlehttp/guzzle-services' => array(
'pretty_version' => '1.3.2', 'pretty_version' => '1.4.0',
'version' => '1.3.2.0', 'version' => '1.4.0.0',
'reference' => '4989d902dd4e0411b320e851c46f3c94d652d891', 'reference' => 'f4bb1c205152a56741624b88753732e01a60565c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/promises' => array( 'guzzlehttp/promises' => array(
'pretty_version' => '1.5.2', 'pretty_version' => '2.0.0',
'version' => '1.5.2.0', 'version' => '2.0.0.0',
'reference' => 'b94b2807d85443f9719887892882d0329d1e2598', 'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises', 'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(), 'aliases' => array(),
@ -119,9 +128,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'maennchen/zipstream-php' => array( 'maennchen/zipstream-php' => array(
'pretty_version' => 'v2.4.0', 'pretty_version' => '3.1.0',
'version' => '2.4.0.0', 'version' => '3.1.0.0',
'reference' => '3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3', 'reference' => 'b8174494eda667f7d13876b4a7bfef0f62a7c0d1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../maennchen/zipstream-php', 'install_path' => __DIR__ . '/../maennchen/zipstream-php',
'aliases' => array(), 'aliases' => array(),
@ -146,9 +155,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'monolog/monolog' => array( 'monolog/monolog' => array(
'pretty_version' => '2.9.0', 'pretty_version' => '2.9.1',
'version' => '2.9.0.0', 'version' => '2.9.1.0',
'reference' => 'e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb', 'reference' => 'f259e2b15fb95494c83f52d3caad003bbf5ffaa1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog', 'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' => array(), 'aliases' => array(),
@ -169,15 +178,6 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, '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( 'nyholm/psr7' => array(
'pretty_version' => '1.8.0', 'pretty_version' => '1.8.0',
'version' => '1.8.0.0', 'version' => '1.8.0.0',
@ -224,9 +224,9 @@
), ),
), ),
'phpoffice/phpspreadsheet' => array( 'phpoffice/phpspreadsheet' => array(
'pretty_version' => '1.28.0', 'pretty_version' => '1.29.0',
'version' => '1.28.0.0', 'version' => '1.29.0.0',
'reference' => '6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a', 'reference' => 'fde2ccf55eaef7e86021ff1acce26479160a0fa0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet', 'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
'aliases' => array(), 'aliases' => array(),
@ -257,9 +257,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/http-client' => array( 'psr/http-client' => array(
'pretty_version' => '1.0.1', 'pretty_version' => '1.0.2',
'version' => '1.0.1.0', 'version' => '1.0.2.0',
'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client', 'install_path' => __DIR__ . '/../psr/http-client',
'aliases' => array(), 'aliases' => array(),
@ -332,9 +332,9 @@
), ),
), ),
'qcloud/cos-sdk-v5' => array( 'qcloud/cos-sdk-v5' => array(
'pretty_version' => 'v2.6.2', 'pretty_version' => 'v2.6.4',
'version' => '2.6.2.0', 'version' => '2.6.4.0',
'reference' => '92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed', 'reference' => '06ccc95599635abd3f431f470b79b8fb8ddbd6a0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5', 'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5',
'aliases' => array(), 'aliases' => array(),
@ -359,18 +359,18 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'rmccue/requests' => array( 'rmccue/requests' => array(
'pretty_version' => 'v2.0.5', 'pretty_version' => 'v2.0.7',
'version' => '2.0.5.0', 'version' => '2.0.7.0',
'reference' => 'b717f1d2f4ef7992ec0c127747ed8b7e170c2f49', 'reference' => 'e14a6f4e7438d3f8da3f2657759e6367b906ee23',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../rmccue/requests', 'install_path' => __DIR__ . '/../rmccue/requests',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/cache' => array( 'symfony/cache' => array(
'pretty_version' => 'v5.4.23', 'pretty_version' => 'v5.4.25',
'version' => '5.4.23.0', 'version' => '5.4.25.0',
'reference' => '983c79ff28612cdfd66d8e44e1a06e5afc87e107', 'reference' => 'e2013521c0f07473ae69a01fce0af78fc3ec0f23',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache', 'install_path' => __DIR__ . '/../symfony/cache',
'aliases' => array(), 'aliases' => array(),
@ -392,27 +392,27 @@
), ),
), ),
'symfony/deprecation-contracts' => array( 'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.0.2', 'pretty_version' => 'v3.3.0',
'version' => '3.0.2.0', 'version' => '3.3.0.0',
'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c', 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/http-client' => array( 'symfony/http-client' => array(
'pretty_version' => 'v6.0.20', 'pretty_version' => 'v6.2.12',
'version' => '6.0.20.0', 'version' => '6.2.12.0',
'reference' => '541c04560da1875f62c963c3aab6ea12a7314e11', 'reference' => '7ef37b91629937843e8f52a2da5587ff16d75d25',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client', 'install_path' => __DIR__ . '/../symfony/http-client',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/http-client-contracts' => array( 'symfony/http-client-contracts' => array(
'pretty_version' => 'v3.0.2', 'pretty_version' => 'v3.3.0',
'version' => '3.0.2.0', 'version' => '3.3.0.0',
'reference' => '4184b9b63af1edaf35b6a7974c6f1f9f33294129', 'reference' => '3b66325d0176b4ec826bffab57c9037d759c31fb',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client-contracts', 'install_path' => __DIR__ . '/../symfony/http-client-contracts',
'aliases' => array(), 'aliases' => array(),
@ -425,18 +425,18 @@
), ),
), ),
'symfony/http-foundation' => array( 'symfony/http-foundation' => array(
'pretty_version' => 'v6.0.20', 'pretty_version' => 'v6.1.12',
'version' => '6.0.20.0', 'version' => '6.1.12.0',
'reference' => 'e16b2676a4b3b1fa12378a20b29c364feda2a8d6', 'reference' => 'bd1bcfb0eba14de22c4d086c5023e608f37366ed',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation', 'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/mime' => array( 'symfony/mime' => array(
'pretty_version' => 'v6.0.19', 'pretty_version' => 'v6.3.0',
'version' => '6.0.19.0', 'version' => '6.3.0.0',
'reference' => 'd7052547a0070cbeadd474e172b527a00d657301', 'reference' => '7b5d2121858cd6efbed778abce9cfdd7ab1f62ad',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/mime', 'install_path' => __DIR__ . '/../symfony/mime',
'aliases' => array(), 'aliases' => array(),
@ -542,9 +542,9 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/var-exporter' => array( 'symfony/var-exporter' => array(
'pretty_version' => 'v6.0.19', 'pretty_version' => 'v6.3.0',
'version' => '6.0.19.0', 'version' => '6.3.0.0',
'reference' => 'df56f53818c2d5d9f683f4ad2e365ba73a3b69d2', 'reference' => 'db5416d04269f2827d8c54331ba4cfa42620d350',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-exporter', 'install_path' => __DIR__ . '/../symfony/var-exporter',
'aliases' => array(), 'aliases' => array(),
@ -560,9 +560,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'tencentcloud/tencentcloud-sdk-php' => array( 'tencentcloud/tencentcloud-sdk-php' => array(
'pretty_version' => '3.0.883', 'pretty_version' => '3.0.932',
'version' => '3.0.883.0', 'version' => '3.0.932.0',
'reference' => '883c1da92aac9c8a06fe03aff8ae0384217f4938', 'reference' => '4aea86d788df2ed8e1ffafbfc7703f7263b84cde',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../tencentcloud/tencentcloud-sdk-php', 'install_path' => __DIR__ . '/../tencentcloud/tencentcloud-sdk-php',
'aliases' => array(), 'aliases' => array(),
@ -578,9 +578,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/framework' => array( 'topthink/framework' => array(
'pretty_version' => 'v6.1.2', 'pretty_version' => 'v6.1.4',
'version' => '6.1.2.0', 'version' => '6.1.4.0',
'reference' => '67235be5b919aaaf1de5aed9839f65d8e766aca3', 'reference' => '66eb9cf4d627df12911344cd328faf9bb596bf2c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/framework', 'install_path' => __DIR__ . '/../topthink/framework',
'aliases' => array(), 'aliases' => array(),
@ -589,7 +589,7 @@
'topthink/think' => array( 'topthink/think' => array(
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '552d139785125b5b81f054dc0b7cb9d9410f2e0e', 'reference' => 'b55f77d5c3e94177ec3d1ce21fce629a756733b6',
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -605,9 +605,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-multi-app' => array( 'topthink/think-multi-app' => array(
'pretty_version' => 'v1.0.16', 'pretty_version' => 'v1.0.17',
'version' => '1.0.16.0', 'version' => '1.0.17.0',
'reference' => '07b9183855150455e1f76f8cbe9d77d6d1bc399f', 'reference' => '4055a6187296ac16c0bc7bbab4ed5d92f82f791c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-multi-app', 'install_path' => __DIR__ . '/../topthink/think-multi-app',
'aliases' => array(), 'aliases' => array(),
@ -650,9 +650,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'w7corp/easywechat' => array( 'w7corp/easywechat' => array(
'pretty_version' => '6.8.0', 'pretty_version' => '6.12.3',
'version' => '6.8.0.0', 'version' => '6.12.3.0',
'reference' => '60f0b4ba2ac3144df1a2291193daa34beb949d26', 'reference' => '10b9f31b61b4e5327c9e4457dffcf307de2deb6c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../w7corp/easywechat', 'install_path' => __DIR__ . '/../w7corp/easywechat',
'aliases' => array(), 'aliases' => array(),

View File

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

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

@ -1,5 +1,16 @@
# Change Log # 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 ## [3.3.1] - 2022-01-18
### Added ### 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": { "scripts": {
"phpstan": "./vendor/bin/phpstan analyze", "phpstan": "./vendor/bin/phpstan analyze",
"test": "phpunit" "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 private static function getNearestWeekday(int $currentYear, int $currentMonth, int $targetDay): ?DateTime
{ {
$tday = str_pad((string) $targetDay, 2, '0', STR_PAD_LEFT); $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) { if ($target === false) {
return null; return null;
@ -94,9 +94,9 @@ class DayOfMonthField extends AbstractField
} }
// Check to see if this is the nearest weekday to a particular value // 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 // 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 // Find out if the current day is the nearest day of the week
$nearest = self::getNearestWeekday( $nearest = self::getNearestWeekday(
(int) $date->format('Y'), (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'); $lastDayOfMonth = (int) $date->format('t');
// Find out if this is the last specific weekday of the month // Find out if this is the last specific weekday of the month
if (strpos($value, 'L')) { if ($lPosition = strpos($value, 'L')) {
$weekday = $this->convertLiterals(substr($value, 0, strpos($value, 'L'))); $weekday = $this->convertLiterals(substr($value, 0, $lPosition));
$weekday %= 7; $weekday %= 7;
$daysInMonth = (int) $date->format('t'); $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() * @var array|null Transitions returned by DateTimeZone::getTransitions()
*/ */
protected $transitions = null; protected $transitions = [];
/** /**
* @var int|null Timestamp of the start of the transitions range * @var int|null Timestamp of the start of the transitions range
@ -92,7 +92,7 @@ class HoursField extends AbstractField
$dtLimitStart->getTimestamp(), $dtLimitStart->getTimestamp(),
$dtLimitEnd->getTimestamp() $dtLimitEnd->getTimestamp()
); );
if ($this->transitions === false) { if (empty($this->transitions)) {
return null; return null;
} }
$this->transitionsStart = $dtLimitStart->getTimestamp(); $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": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"guzzlehttp/guzzle": "^7.5.1", "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" "guzzlehttp/psr7": "^1.9.1 || ^2.4.5"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^8.5.19" "bamarni/composer-bin-plugin": "^1.8.1",
"phpunit/phpunit": "^8.5.19 || ^9.5.8"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"GuzzleHttp\\Command\\": "src/" "GuzzleHttp\\Command\\": "src/"
} }
}, },
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
}
},
"config": { "config": {
"preferred-install": "dist", "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 <?php
namespace GuzzleHttp\Command; namespace GuzzleHttp\Command;
use GuzzleHttp\HandlerStack; use GuzzleHttp\HandlerStack;

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

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

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

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

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

@ -1,7 +1,10 @@
<?php <?php
namespace GuzzleHttp\Command\Exception; namespace GuzzleHttp\Command\Exception;
/** /**
* Exception encountered when a 5xx level response is received for a request * 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 <?php
namespace GuzzleHttp\Command; namespace GuzzleHttp\Command;
/** /**
@ -8,9 +9,6 @@ class Result implements ResultInterface
{ {
use HasDataTrait; use HasDataTrait;
/**
* @param array $data
*/
public function __construct(array $data = []) public function __construct(array $data = [])
{ {
$this->data = $data; $this->data = $data;

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

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

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

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

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

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command; namespace GuzzleHttp\Command;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
@ -22,6 +23,7 @@ interface ServiceClientInterface
* @param array $args Arguments to pass to the command * @param array $args Arguments to pass to the command
* *
* @return CommandInterface * @return CommandInterface
*
* @throws \InvalidArgumentException if no command can be found by name * @throws \InvalidArgumentException if no command can be found by name
*/ */
public function getCommand($name, array $args = []); public function getCommand($name, array $args = []);
@ -32,6 +34,7 @@ interface ServiceClientInterface
* @param CommandInterface $command Command to execute * @param CommandInterface $command Command to execute
* *
* @return ResultInterface The result of the executed command * @return ResultInterface The result of the executed command
*
* @throws CommandException * @throws CommandException
*/ */
public function execute(CommandInterface $command); public function execute(CommandInterface $command);
@ -49,13 +52,14 @@ interface ServiceClientInterface
* Executes multiple commands concurrently using a fixed pool size. * Executes multiple commands concurrently using a fixed pool size.
* *
* @param array|\Iterator $commands Array or iterator that contains * @param array|\Iterator $commands Array or iterator that contains
* CommandInterface objects to execute with the client. * CommandInterface objects to execute with the client.
* @param array $options Associative array of options to apply. * @param array $options Associative array of options to apply.
* - concurrency: (int) Max number of commands to execute concurrently. * - concurrency: (int) Max number of commands to execute concurrently.
* - fulfilled: (callable) Function to invoke when a command completes. * - fulfilled: (callable) Function to invoke when a command completes.
* - rejected: (callable) Function to invoke when a command fails. * - rejected: (callable) Function to invoke when a command fails.
* *
* @return array * @return array
*
* @see GuzzleHttp\Command\ServiceClientInterface::createPool for options. * @see GuzzleHttp\Command\ServiceClientInterface::createPool for options.
*/ */
public function executeAll($commands, array $options = []); public function executeAll($commands, array $options = []);
@ -65,13 +69,14 @@ interface ServiceClientInterface
* fixed pool size. * fixed pool size.
* *
* @param array|\Iterator $commands Array or iterator that contains * @param array|\Iterator $commands Array or iterator that contains
* CommandInterface objects to execute with the client. * CommandInterface objects to execute with the client.
* @param array $options Associative array of options to apply. * @param array $options Associative array of options to apply.
* - concurrency: (int) Max number of commands to execute concurrently. * - concurrency: (int) Max number of commands to execute concurrently.
* - fulfilled: (callable) Function to invoke when a command completes. * - fulfilled: (callable) Function to invoke when a command completes.
* - rejected: (callable) Function to invoke when a command fails. * - rejected: (callable) Function to invoke when a command fails.
* *
* @return PromiseInterface * @return PromiseInterface
*
* @see GuzzleHttp\Command\ServiceClientInterface::createPool for options. * @see GuzzleHttp\Command\ServiceClientInterface::createPool for options.
*/ */
public function executeAllAsync($commands, array $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": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"guzzlehttp/guzzle": "^7.4.1", "guzzlehttp/guzzle": "^7.7",
"guzzlehttp/command": "^1.2.2", "guzzlehttp/command": "^1.3",
"guzzlehttp/psr7": "^1.8.3 || ^2.1", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"guzzlehttp/uri-template": "^1.0.1" "guzzlehttp/uri-template": "^1.0.1"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.1",
"phpunit/phpunit": "^8.5.19 || ^9.5.8" "phpunit/phpunit": "^8.5.19 || ^9.5.8"
}, },
"autoload": { "autoload": {
@ -48,12 +49,16 @@
"gimler/guzzle-description-loader": "^0.0.4" "gimler/guzzle-description-loader": "^0.0.4"
}, },
"extra": { "extra": {
"branch-alias": { "bamarni-bin": {
"dev-master": "1.3-dev" "bin-links": true,
"forward-command": false
} }
}, },
"config": { "config": {
"preferred-install": "dist", "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 <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Psr7\Uri; use GuzzleHttp\Psr7\Uri;
@ -35,7 +36,7 @@ class Description implements DescriptionInterface
/** /**
* @param array $config Service description data * @param array $config Service description data
* @param array $options Custom options to apply to the description * @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 * @throws \InvalidArgumentException
*/ */
@ -132,6 +133,7 @@ class Description implements DescriptionInterface
* @param string $name Name of the command * @param string $name Name of the command
* *
* @return Operation * @return Operation
*
* @throws \InvalidArgumentException if the operation is not found * @throws \InvalidArgumentException if the operation is not found
*/ */
public function getOperation($name) public function getOperation($name)
@ -155,6 +157,7 @@ class Description implements DescriptionInterface
* @param string $id ID/name of the model to retrieve * @param string $id ID/name of the model to retrieve
* *
* @return Parameter * @return Parameter
*
* @throws \InvalidArgumentException if the model is not found * @throws \InvalidArgumentException if the model is not found
*/ */
public function getModel($id) 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 * @param string $key Data key to retrieve or null to retrieve all extra
* *
* @return null|mixed * @return mixed|null
*/ */
public function getData($key = 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 <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Psr7\Uri; use GuzzleHttp\Psr7\Uri;
@ -34,6 +35,7 @@ interface DescriptionInterface
* @param string $name Name of the command * @param string $name Name of the command
* *
* @return Operation * @return Operation
*
* @throws \InvalidArgumentException if the operation is not found * @throws \InvalidArgumentException if the operation is not found
*/ */
public function getOperation($name); public function getOperation($name);
@ -44,6 +46,7 @@ interface DescriptionInterface
* @param string $id ID/name of the model to retrieve * @param string $id ID/name of the model to retrieve
* *
* @return Parameter * @return Parameter
*
* @throws \InvalidArgumentException if the model is not found * @throws \InvalidArgumentException if the model is not found
*/ */
public function getModel($id); public function getModel($id);
@ -101,7 +104,7 @@ interface DescriptionInterface
* *
* @param string $key Data key to retrieve or null to retrieve all extra * @param string $key Data key to retrieve or null to retrieve all extra
* *
* @return null|mixed * @return mixed|null
*/ */
public function getData($key = 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 <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\CommandInterface; use GuzzleHttp\Command\CommandInterface;
@ -29,18 +30,17 @@ use Psr\Http\Message\ResponseInterface;
*/ */
class Deserializer class Deserializer
{ {
/** @var ResponseLocationInterface[] $responseLocations */ /** @var ResponseLocationInterface[] */
private $responseLocations; private $responseLocations;
/** @var DescriptionInterface $description */ /** @var DescriptionInterface */
private $description; private $description;
/** @var boolean $process */ /** @var bool */
private $process; private $process;
/** /**
* @param DescriptionInterface $description * @param bool $process
* @param bool $process
* @param ResponseLocationInterface[] $responseLocations Extra response locations * @param ResponseLocationInterface[] $responseLocations Extra response locations
*/ */
public function __construct( public function __construct(
@ -51,12 +51,12 @@ class Deserializer
static $defaultResponseLocations; static $defaultResponseLocations;
if (!$defaultResponseLocations) { if (!$defaultResponseLocations) {
$defaultResponseLocations = [ $defaultResponseLocations = [
'body' => new BodyLocation(), 'body' => new BodyLocation(),
'header' => new HeaderLocation(), 'header' => new HeaderLocation(),
'reasonPhrase' => new ReasonPhraseLocation(), 'reasonPhrase' => new ReasonPhraseLocation(),
'statusCode' => new StatusCodeLocation(), 'statusCode' => new StatusCodeLocation(),
'xml' => new XmlLocation(), 'xml' => new XmlLocation(),
'json' => new JsonLocation(), 'json' => new JsonLocation(),
]; ];
} }
@ -68,9 +68,8 @@ class Deserializer
/** /**
* Deserialize the response into the specified result representation * Deserialize the response into the specified result representation
* *
* @param ResponseInterface $response
* @param RequestInterface|null $request * @param RequestInterface|null $request
* @param CommandInterface $command *
* @return Result|ResultInterface|void|ResponseInterface * @return Result|ResultInterface|void|ResponseInterface
*/ */
public function __invoke(ResponseInterface $response, RequestInterface $request, CommandInterface $command) public function __invoke(ResponseInterface $response, RequestInterface $request, CommandInterface $command)
@ -103,8 +102,6 @@ class Deserializer
/** /**
* Handles visit() and after() methods of the Response locations * Handles visit() and after() methods of the Response locations
* *
* @param Parameter $model
* @param ResponseInterface $response
* @return Result|ResultInterface|void * @return Result|ResultInterface|void
*/ */
protected function visit(Parameter $model, ResponseInterface $response) protected function visit(Parameter $model, ResponseInterface $response)
@ -117,7 +114,7 @@ class Deserializer
} elseif ($model->getType() === 'array') { } elseif ($model->getType() === 'array') {
$result = $this->visitOuterArray($model, $result, $response, $context); $result = $this->visitOuterArray($model, $result, $response, $context);
} else { } 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 // Call the after() method of each found visitor
@ -132,11 +129,8 @@ class Deserializer
/** /**
* Handles the before() method of Response locations * Handles the before() method of Response locations
* *
* @param string $location * @param string $location
* @param Parameter $model *
* @param ResultInterface $result
* @param ResponseInterface $response
* @param array $context
* @return ResultInterface * @return ResultInterface
*/ */
private function triggerBeforeVisitor( private function triggerBeforeVisitor(
@ -164,10 +158,6 @@ class Deserializer
/** /**
* Visits the outer object * Visits the outer object
* *
* @param Parameter $model
* @param ResultInterface $result
* @param ResponseInterface $response
* @param array $context
* @return ResultInterface * @return ResultInterface
*/ */
private function visitOuterObject( private function visitOuterObject(
@ -212,10 +202,6 @@ class Deserializer
/** /**
* Visits the outer array * Visits the outer array
* *
* @param Parameter $model
* @param ResultInterface $result
* @param ResponseInterface $response
* @param array $context
* @return ResultInterface|void * @return ResultInterface|void
*/ */
private function visitOuterArray( private function visitOuterArray(
@ -246,11 +232,6 @@ class Deserializer
* In order for the exception to be properly triggered, all your exceptions must be instance * 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 * of "GuzzleHttp\Command\Exception\CommandException". If that's not the case, your exceptions will be wrapped
* around a CommandException * around a CommandException
*
* @param ResponseInterface $response
* @param RequestInterface $request
* @param CommandInterface $command
* @param Operation $operation
*/ */
protected function handleErrorResponses( protected function handleErrorResponses(
ResponseInterface $response, ResponseInterface $response,
@ -271,7 +252,7 @@ class Deserializer
continue; continue;
} }
if (isset($error['phrase']) && ! ($error['phrase'] === $response->getReasonPhrase())) { if (isset($error['phrase']) && !($error['phrase'] === $response->getReasonPhrase())) {
continue; continue;
} }

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

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
@ -12,7 +13,7 @@ use GuzzleHttp\HandlerStack;
*/ */
class GuzzleClient extends ServiceClient class GuzzleClient extends ServiceClient
{ {
/** @var array $config */ /** @var array */
private $config; private $config;
/** @var DescriptionInterface Guzzle service description */ /** @var DescriptionInterface Guzzle service description */
@ -33,12 +34,12 @@ class GuzzleClient extends ServiceClient
* - response_locations: Associative array of location types mapping to * - response_locations: Associative array of location types mapping to
* ResponseLocationInterface objects. * ResponseLocationInterface objects.
* *
* @param ClientInterface $client HTTP client to use. * @param ClientInterface $client HTTP client to use.
* @param DescriptionInterface $description Guzzle service description * @param DescriptionInterface $description Guzzle service description
* @param callable $commandToRequestTransformer * @param callable $commandToRequestTransformer
* @param callable $responseToResultTransformer * @param callable $responseToResultTransformer
* @param HandlerStack $commandHandlerStack * @param HandlerStack $commandHandlerStack
* @param array $config Configuration options * @param array $config Configuration options
*/ */
public function __construct( public function __construct(
ClientInterface $client, ClientInterface $client,
@ -59,9 +60,11 @@ class GuzzleClient extends ServiceClient
/** /**
* Returns the command if valid; otherwise an Exception * Returns the command if valid; otherwise an Exception
*
* @param string $name * @param string $name
* @param array $args *
* @return CommandInterface * @return CommandInterface
*
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function getCommand($name, array $args = []) public function getCommand($name, array $args = [])
@ -95,6 +98,7 @@ class GuzzleClient extends ServiceClient
* Returns the passed Serializer when set, a new instance otherwise * Returns the passed Serializer when set, a new instance otherwise
* *
* @param callable|null $commandToRequestTransformer * @param callable|null $commandToRequestTransformer
*
* @return \GuzzleHttp\Command\Guzzle\Serializer * @return \GuzzleHttp\Command\Guzzle\Serializer
*/ */
private function getSerializer($commandToRequestTransformer) private function getSerializer($commandToRequestTransformer)
@ -108,11 +112,12 @@ class GuzzleClient extends ServiceClient
* Returns the passed Deserializer when set, a new instance otherwise * Returns the passed Deserializer when set, a new instance otherwise
* *
* @param callable|null $responseToResultTransformer * @param callable|null $responseToResultTransformer
*
* @return \GuzzleHttp\Command\Guzzle\Deserializer * @return \GuzzleHttp\Command\Guzzle\Deserializer
*/ */
private function getDeserializer($responseToResultTransformer) 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 return $responseToResultTransformer !== null
? $responseToResultTransformer ? $responseToResultTransformer
@ -123,6 +128,7 @@ class GuzzleClient extends ServiceClient
* Get the config of the client * Get the config of the client
* *
* @param array|string $option * @param array|string $option
*
* @return mixed * @return mixed
*/ */
public function getConfig($option = null) public function getConfig($option = null)
@ -132,10 +138,6 @@ class GuzzleClient extends ServiceClient
: (isset($this->config[$option]) ? $this->config[$option] : []); : (isset($this->config[$option]) ? $this->config[$option] : []);
} }
/**
* @param $option
* @param $value
*/
public function setConfig($option, $value) public function setConfig($option, $value)
{ {
$this->config[$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\CommandInterface;
use GuzzleHttp\Command\Exception\CommandException; use GuzzleHttp\Command\Exception\CommandException;
@ -12,17 +14,14 @@ use GuzzleHttp\Command\Guzzle\SchemaValidator;
*/ */
class ValidatedDescriptionHandler class ValidatedDescriptionHandler
{ {
/** @var SchemaValidator $validator */ /** @var SchemaValidator */
private $validator; private $validator;
/** @var DescriptionInterface $description */ /** @var DescriptionInterface */
private $description; private $description;
/** /**
* ValidatedDescriptionHandler constructor. * ValidatedDescriptionHandler constructor.
*
* @param DescriptionInterface $description
* @param SchemaValidator|null $schemaValidator
*/ */
public function __construct(DescriptionInterface $description, SchemaValidator $schemaValidator = null) public function __construct(DescriptionInterface $description, SchemaValidator $schemaValidator = null)
{ {
@ -31,7 +30,6 @@ class ValidatedDescriptionHandler
} }
/** /**
* @param callable $handler
* @return \Closure * @return \Closure
*/ */
public function __invoke(callable $handler) public function __invoke(callable $handler)
@ -47,7 +45,7 @@ class ValidatedDescriptionHandler
$value = $schema->filter($value); $value = $schema->filter($value);
} }
if (! $this->validator->validate($schema, $value)) { if (!$this->validator->validate($schema, $value)) {
$errors = array_merge($errors, $this->validator->getErrors()); $errors = array_merge($errors, $this->validator->getErrors());
} elseif ($value !== $command[$name]) { } elseif ($value !== $command[$name]) {
// Update the config value if it changed and no validation errors were encountered. // Update the config value if it changed and no validation errors were encountered.
@ -60,10 +58,10 @@ class ValidatedDescriptionHandler
if ($params = $operation->getAdditionalParameters()) { if ($params = $operation->getAdditionalParameters()) {
foreach ($command->toArray() as $name => $value) { foreach ($command->toArray() as $name => $value) {
// It's only additional if it isn't defined in the schema // 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 // Always set the name so that error messages are useful
$params->setName($name); $params->setName($name);
if (! $this->validator->validate($params, $value)) { if (!$this->validator->validate($params, $value)) {
$errors = array_merge($errors, $this->validator->getErrors()); $errors = array_merge($errors, $this->validator->getErrors());
} elseif ($value !== $command[$name]) { } elseif ($value !== $command[$name]) {
$command[$name] = $value; $command[$name] = $value;
@ -73,7 +71,7 @@ class ValidatedDescriptionHandler
} }
if ($errors) { if ($errors) {
throw new CommandException('Validation errors: ' . implode("\n", $errors), $command); throw new CommandException('Validation errors: '.implode("\n", $errors), $command);
} }
return $handler($command); return $handler($command);

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

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\ToArrayInterface; use GuzzleHttp\Command\ToArrayInterface;
@ -45,8 +46,9 @@ class Operation implements ToArrayInterface
* - additionalParameters: (null|array) Parameter schema to use when an * - additionalParameters: (null|array) Parameter schema to use when an
* option is passed to the operation that is not in the schema * option is passed to the operation that is not in the schema
* *
* @param array $config Array of configuration data * @param array $config Array of configuration data
* @param DescriptionInterface $description Service description used to resolve models if $ref tags are found * @param DescriptionInterface $description Service description used to resolve models if $ref tags are found
*
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function __construct(array $config = [], DescriptionInterface $description = null) public function __construct(array $config = [], DescriptionInterface $description = null)
@ -63,7 +65,7 @@ class Operation implements ToArrayInterface
'data' => [], 'data' => [],
'parameters' => [], 'parameters' => [],
'additionalParameters' => null, 'additionalParameters' => null,
'errorResponses' => [] 'errorResponses' => [],
]; ];
$this->description = $description === null ? new Description([]) : $description; $this->description = $description === null ? new Description([]) : $description;
@ -240,7 +242,7 @@ class Operation implements ToArrayInterface
* Get extra data from the operation * Get extra data from the operation
* *
* @param string $name Name of the data point to retrieve or null to * @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 * @return mixed|null
*/ */
@ -256,14 +258,12 @@ class Operation implements ToArrayInterface
} }
/** /**
* @param $name
* @param array $config
* @return array * @return array
*/ */
private function resolveExtends($name, array $config) private function resolveExtends($name, array $config)
{ {
if (!$this->description->hasOperation($name)) { 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 // 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 <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\ToArrayInterface; use GuzzleHttp\Command\ToArrayInterface;
@ -6,74 +7,75 @@ use GuzzleHttp\Command\ToArrayInterface;
/** /**
* API parameter object used with service descriptions * API parameter object used with service descriptions
*/ */
#[\AllowDynamicProperties]
class Parameter implements ToArrayInterface class Parameter implements ToArrayInterface
{ {
private $originalData; private $originalData;
/** @var string $name */ /** @var string */
private $name; private $name;
/** @var string $description */ /** @var string */
private $description; private $description;
/** @var string|array $type */ /** @var string|array */
private $type; private $type;
/** @var bool $required*/ /** @var bool */
private $required; private $required;
/** @var array|null $enum */ /** @var array|null */
private $enum; private $enum;
/** @var string $pattern */ /** @var string */
private $pattern; private $pattern;
/** @var int $minimum*/ /** @var int */
private $minimum; private $minimum;
/** @var int $maximum */ /** @var int */
private $maximum; private $maximum;
/** @var int $minLength */ /** @var int */
private $minLength; private $minLength;
/** @var int $maxLength */ /** @var int */
private $maxLength; private $maxLength;
/** @var int $minItems */ /** @var int */
private $minItems; private $minItems;
/** @var int $maxItems */ /** @var int */
private $maxItems; private $maxItems;
/** @var mixed $default */ /** @var mixed */
private $default; private $default;
/** @var bool $static */ /** @var bool */
private $static; private $static;
/** @var array $filters */ /** @var array */
private $filters; private $filters;
/** @var string $location */ /** @var string */
private $location; private $location;
/** @var string $sentAs */ /** @var string */
private $sentAs; private $sentAs;
/** @var array $data */ /** @var array */
private $data; private $data;
/** @var array $properties */ /** @var array */
private $properties = []; private $properties = [];
/** @var array|bool|Parameter $additionalProperties */ /** @var array|bool|Parameter */
private $additionalProperties; private $additionalProperties;
/** @var array|Parameter $items */ /** @var array|Parameter */
private $items; private $items;
/** @var string $format */ /** @var string */
private $format; private $format;
private $propertiesCache = null; private $propertiesCache = null;
@ -171,7 +173,7 @@ class Parameter implements ToArrayInterface
* *
* @param array $data Array of data as seen in service descriptions * @param array $data Array of data as seen in service descriptions
* @param array $options Options used when creating the parameter. You can * @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 * @throws \InvalidArgumentException
*/ */
@ -252,8 +254,9 @@ class Parameter implements ToArrayInterface
* @param mixed $value Value to filter * @param mixed $value Value to filter
* *
* @return mixed Returns the filtered value * @return mixed Returns the filtered value
*
* @throws \RuntimeException when trying to format when no service * @throws \RuntimeException when trying to format when no service
* description is available. * description is available.
*/ */
public function filter($value) public function filter($value)
{ {
@ -261,8 +264,9 @@ class Parameter implements ToArrayInterface
if ($this->format) { if ($this->format) {
if (!$this->serviceDescription) { if (!$this->serviceDescription) {
throw new \RuntimeException('No service description was set so ' 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); return $this->serviceDescription->format($this->format, $value);
} }
@ -512,7 +516,7 @@ class Parameter implements ToArrayInterface
* *
* @param string $name Name of the property to retrieve * @param string $name Name of the property to retrieve
* *
* @return null|Parameter * @return Parameter|null
*/ */
public function getProperty($name) public function getProperty($name)
{ {
@ -618,6 +622,7 @@ class Parameter implements ToArrayInterface
* @param string|array $filter Method to filter the value through * @param string|array $filter Method to filter the value through
* *
* @return self * @return self
*
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
private function addFilter($filter) private function addFilter($filter)
@ -643,13 +648,15 @@ class Parameter implements ToArrayInterface
* Check if a parameter has a specific variable and if it set. * Check if a parameter has a specific variable and if it set.
* *
* @param string $var * @param string $var
*
* @return bool * @return bool
*/ */
public function has($var) public function has($var)
{ {
if (!is_string($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}); return isset($this->{$var}) && !empty($this->{$var});
} }
} }

View File

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

View File

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle\RequestLocation; namespace GuzzleHttp\Command\Guzzle\RequestLocation;
use GuzzleHttp\Command\CommandInterface; use GuzzleHttp\Command\CommandInterface;
@ -23,7 +24,7 @@ class JsonLocation extends AbstractLocation
/** /**
* @param string $locationName Name of the location * @param string $locationName Name of the location
* @param string $contentType Content-Type header to add to the request if * @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') 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 * @return RequestInterface
*/ */
public function visit( public function visit(
@ -52,10 +49,6 @@ class JsonLocation extends AbstractLocation
} }
/** /**
* @param CommandInterface $command
* @param RequestInterface $request
* @param Operation $operation
*
* @return MessageInterface * @return MessageInterface
*/ */
public function after( public function after(

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation; namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter; use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/ */
class BodyLocation extends AbstractLocation class BodyLocation extends AbstractLocation
{ {
/** /**
* Set the name of the location * 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 * @return ResultInterface
*/ */
public function visit( public function visit(

View File

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

View File

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

View File

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation; namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter; use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/ */
class ReasonPhraseLocation extends AbstractLocation class ReasonPhraseLocation extends AbstractLocation
{ {
/** /**
* Set the name of the location * 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 * @return ResultInterface
*/ */
public function visit( public function visit(

View File

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

View File

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle\ResponseLocation; namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
use GuzzleHttp\Command\Guzzle\Parameter; use GuzzleHttp\Command\Guzzle\Parameter;
@ -10,7 +11,6 @@ use Psr\Http\Message\ResponseInterface;
*/ */
class StatusCodeLocation extends AbstractLocation class StatusCodeLocation extends AbstractLocation
{ {
/** /**
* Set the name of the location * 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 * @return ResultInterface
*/ */
public function visit( public function visit(

View File

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

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

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

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

@ -1,4 +1,5 @@
<?php <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\ToArrayInterface; use GuzzleHttp\Command\ToArrayInterface;
@ -21,8 +22,8 @@ class SchemaValidator
/** /**
* @param bool $castIntegerToStringType Set to true to convert integers * @param bool $castIntegerToStringType Set to true to convert integers
* into strings when a required type is a string and the input value is * into strings when a required type is a string and the input value is
* an integer. Defaults to true. * an integer. Defaults to true.
*/ */
public function __construct($castIntegerToStringType = true) public function __construct($castIntegerToStringType = true)
{ {
@ -30,8 +31,6 @@ class SchemaValidator
} }
/** /**
* @param Parameter $param
* @param $value
* @return bool * @return bool
*/ */
public function validate(Parameter $param, &$value) public function validate(Parameter $param, &$value)
@ -43,6 +42,7 @@ class SchemaValidator
return true; return true;
} else { } else {
sort($this->errors); sort($this->errors);
return false; return false;
} }
} }
@ -60,8 +60,8 @@ class SchemaValidator
/** /**
* From the allowable types, determine the type that the variable matches * From the allowable types, determine the type that the variable matches
* *
* @param string|array $type Parameter type * @param string|array $type Parameter type
* @param mixed $value Value to determine the type * @param mixed $value Value to determine the type
* *
* @return string|false Returns the matching type on * @return string|false Returns the matching type on
*/ */
@ -97,11 +97,11 @@ class SchemaValidator
/** /**
* Recursively validate a parameter * Recursively validate a parameter
* *
* @param Parameter $param API parameter being validated * @param Parameter $param API parameter being validated
* @param mixed $value Value to validate and validate. The value may * @param mixed $value Value to validate and validate. The value may
* change during this validate. * change during this validate.
* @param string $path Current validation path (used for error reporting) * @param string $path Current validation path (used for error reporting)
* @param int $depth Current depth in the validation validate * @param int $depth Current depth in the validation validate
* *
* @return bool Returns true if valid, or false if invalid * @return bool Returns true if valid, or false if invalid
*/ */
@ -146,6 +146,7 @@ class SchemaValidator
// indexed // indexed
if (isset($value[0])) { if (isset($value[0])) {
$this->errors[] = "{$path} must be an array of properties. Got a numerically indexed array."; $this->errors[] = "{$path} must be an array of properties. Got a numerically indexed array.";
return false; return false;
} }
$traverse = true; $traverse = true;
@ -208,24 +209,24 @@ class SchemaValidator
$valueIsArray = false; $valueIsArray = false;
} }
} }
} elseif ($type == 'array' && $valueIsArray && $param->getItems()) { } elseif ($type == 'array' && $valueIsArray && $param->getItems()) {
foreach ($value as $i => &$item) { foreach ($value as $i => &$item) {
// Validate each item in an array against the items attribute of the schema // 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 // If the value is required and the type is not null, then there is an
// error if the value is not set // error if the value is not set
if ($required && $value === null && $type != 'null') { if ($required && $value === null && $type != 'null') {
$message = "{$path} is " . ($param->getType() $message = "{$path} is ".($param->getType()
? ('a required ' . implode(' or ', (array) $param->getType())) ? ('a required '.implode(' or ', (array) $param->getType()))
: 'required'); : 'required');
if ($param->has('description')) { if ($param->has('description')) {
$message .= ': ' . $param->getDescription(); $message .= ': '.$param->getDescription();
} }
$this->errors[] = $message; $this->errors[] = $message;
return false; return false;
} }
@ -239,7 +240,7 @@ class SchemaValidator
) { ) {
$value = (string) $value; $value = (string) $value;
} else { } 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') { if ($type == 'string') {
// Strings can have enums which are a list of predefined values // Strings can have enums which are a list of predefined values
if (($enum = $param->getEnum()) && !in_array($value, $enum)) { if (($enum = $param->getEnum()) && !in_array($value, $enum)) {
$this->errors[] = "{$path} must be one of " . implode(' or ', array_map(function ($s) { $this->errors[] = "{$path} must be one of ".implode(' or ', array_map(function ($s) {
return '"' . addslashes($s) . '"'; return '"'.addslashes($s).'"';
}, $enum)); }, $enum));
} }
// Strings can have a regex pattern that the value must match // 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}"; $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}"; $this->errors[] = "{$path} length must be less than or equal to {$max}";
} }
} }
} elseif ($type == 'array') { } elseif ($type == 'array') {
$size = null; $size = null;
if ($min = $param->getMinItems()) { if ($min = $param->getMinItems()) {
@ -282,7 +282,6 @@ class SchemaValidator
$this->errors[] = "{$path} must contain {$max} or fewer elements"; $this->errors[] = "{$path} must contain {$max} or fewer elements";
} }
} }
} elseif ($type == 'integer' || $type == 'number' || $type == 'numeric') { } elseif ($type == 'integer' || $type == 'number' || $type == 'numeric') {
if (($min = $param->getMinimum()) && $value < $min) { if (($min = $param->getMinimum()) && $value < $min) {
$this->errors[] = "{$path} must be greater than or equal to {$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 <?php
namespace GuzzleHttp\Command\Guzzle; namespace GuzzleHttp\Command\Guzzle;
use GuzzleHttp\Command\CommandInterface; use GuzzleHttp\Command\CommandInterface;
@ -28,7 +29,6 @@ class Serializer
private $description; private $description;
/** /**
* @param DescriptionInterface $description
* @param RequestLocationInterface[] $requestLocations Extra request locations * @param RequestLocationInterface[] $requestLocations Extra request locations
*/ */
public function __construct( public function __construct(
@ -38,11 +38,11 @@ class Serializer
static $defaultRequestLocations; static $defaultRequestLocations;
if (!$defaultRequestLocations) { if (!$defaultRequestLocations) {
$defaultRequestLocations = [ $defaultRequestLocations = [
'body' => new BodyLocation(), 'body' => new BodyLocation(),
'query' => new QueryLocation(), 'query' => new QueryLocation(),
'header' => new HeaderLocation(), 'header' => new HeaderLocation(),
'json' => new JsonLocation(), 'json' => new JsonLocation(),
'xml' => new XmlLocation(), 'xml' => new XmlLocation(),
'formParam' => new FormParamLocation(), 'formParam' => new FormParamLocation(),
'multipart' => new MultiPartLocation(), 'multipart' => new MultiPartLocation(),
]; ];
@ -53,21 +53,22 @@ class Serializer
} }
/** /**
* @param CommandInterface $command
* @return RequestInterface * @return RequestInterface
*/ */
public function __invoke(CommandInterface $command) public function __invoke(CommandInterface $command)
{ {
$request = $this->createRequest($command); $request = $this->createRequest($command);
return $this->prepareRequest($command, $request); return $this->prepareRequest($command, $request);
} }
/** /**
* Prepares a request for sending using location visitors * Prepares a request for sending using location visitors
* *
* @param CommandInterface $command
* @param RequestInterface $request Request being created * @param RequestInterface $request Request being created
*
* @return RequestInterface * @return RequestInterface
*
* @throws \RuntimeException If a location cannot be handled * @throws \RuntimeException If a location cannot be handled
*/ */
protected function prepareRequest( protected function prepareRequest(
@ -109,9 +110,8 @@ class Serializer
/** /**
* Create a request for the command and operation * Create a request for the command and operation
* *
* @param CommandInterface $command
*
* @return RequestInterface * @return RequestInterface
*
* @throws \RuntimeException * @throws \RuntimeException
*/ */
protected function createRequest(CommandInterface $command) 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 * Create a request for an operation with a uri merged onto a base URI
* *
* @param \GuzzleHttp\Command\Guzzle\Operation $operation * @param \GuzzleHttp\Command\Guzzle\Operation $operation
* @param \GuzzleHttp\Command\CommandInterface $command
* *
* @return \GuzzleHttp\Psr7\Request * @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. 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 ## 7.5.1 - 2023-04-17
### Fixed ### 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` - Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5`
## 7.5.0 - 2022-08-28 ## 7.5.0 - 2022-08-28
### Added ### Added
@ -19,6 +55,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Support PHP 8.2 - Support PHP 8.2
- Add request to delay closure params - Add request to delay closure params
## 7.4.5 - 2022-06-20 ## 7.4.5 - 2022-06-20
### Fixed ### 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 change in port should be considered a change in origin
* Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin * Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin
## 7.4.4 - 2022-06-09 ## 7.4.4 - 2022-06-09
### Fixed ### 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 Authorization header on HTTP downgrade
* Fix failure to strip the Cookie header on change in host or HTTP downgrade * Fix failure to strip the Cookie header on change in host or HTTP downgrade
## 7.4.3 - 2022-05-25 ## 7.4.3 - 2022-05-25
### Fixed ### Fixed
* Fix cross-domain cookie leakage * Fix cross-domain cookie leakage
## 7.4.2 - 2022-03-20 ## 7.4.2 - 2022-03-20
### Fixed ### Fixed
@ -47,6 +87,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- Reject non-HTTP schemes in StreamHandler - Reject non-HTTP schemes in StreamHandler
- Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve` - Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve`
## 7.4.1 - 2021-12-06 ## 7.4.1 - 2021-12-06
### Changed ### 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) - Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950)
## 7.4.0 - 2021-10-18 ## 7.4.0 - 2021-10-18
### Added ### 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) - 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 ## 7.3.0 - 2021-03-23
### Added ### 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) - 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 ## 7.2.0 - 2020-10-10
### Added ### 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) - Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786)
## 7.1.1 - 2020-09-30 ## 7.1.1 - 2020-09-30
### Fixed ### 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. - We dont connect curl `sink` on HEAD requests.
- Removed some PHP 5 workarounds - Removed some PHP 5 workarounds
## 7.1.0 - 2020-09-22 ## 7.1.0 - 2020-09-22
### Added ### Added
@ -142,14 +188,17 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version
- `Utils::defaultCaBundle()` - `Utils::defaultCaBundle()`
- `CurlFactory::LOW_CURL_VERSION_NUMBER` - `CurlFactory::LOW_CURL_VERSION_NUMBER`
## 7.0.1 - 2020-06-27 ## 7.0.1 - 2020-06-27
* Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699) * Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699)
## 7.0.0 - 2020-06-27 ## 7.0.0 - 2020-06-27
No changes since 7.0.0-rc1. No changes since 7.0.0-rc1.
## 7.0.0-rc1 - 2020-06-15 ## 7.0.0-rc1 - 2020-06-15
### Changed ### 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) * 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) * 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 ## 7.0.0-beta2 - 2020-05-25
### Added ### Added
@ -182,6 +232,7 @@ No changes since 7.0.0-rc1.
* Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528) * Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528)
## 7.0.0-beta1 - 2019-12-30 ## 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. 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) * `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) * Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464)
## 6.5.2 - 2019-12-23 ## 6.5.2 - 2019-12-23
* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489) * idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
## 6.5.1 - 2019-12-21 ## 6.5.1 - 2019-12-21
* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454) * 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) * IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
## 6.5.0 - 2019-12-07 ## 6.5.0 - 2019-12-07
* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143) * 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) * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
* Deprecated `ClientInterface::VERSION` * Deprecated `ClientInterface::VERSION`
## 6.4.1 - 2019-10-23 ## 6.4.1 - 2019-10-23
* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that * 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` * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
## 6.4.0 - 2019-10-23 ## 6.4.0 - 2019-10-23
* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108) * 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) * 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) * Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
## 6.3.3 - 2018-04-22 ## 6.3.3 - 2018-04-22
* Fix: Default headers when decode_content is specified * 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) * 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) * 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. + Minor code cleanups, documentation fixes and clarifications.
## 6.2.3 - 2017-02-28 ## 6.2.3 - 2017-02-28
* Fix deprecations with guzzle/psr7 version 1.4 * Fix deprecations with guzzle/psr7 version 1.4
## 6.2.2 - 2016-10-08 ## 6.2.2 - 2016-10-08
* Allow to pass nullable Response to delay callable * 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 * Fix drain case where content-length is the literal string zero
* Obfuscate in-URL credentials in exceptions * Obfuscate in-URL credentials in exceptions
## 6.2.1 - 2016-07-18 ## 6.2.1 - 2016-07-18
* Address HTTP_PROXY security vulnerability, CVE-2016-5385: * 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`. a server does not honor `Connection: close`.
* Ignore URI fragment when sending requests. * Ignore URI fragment when sending requests.
## 6.2.0 - 2016-03-21 ## 6.2.0 - 2016-03-21
* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. * 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. * Bug fix: provide an empty string to `http_build_query` for HHVM workaround.
https://github.com/guzzle/guzzle/pull/1367 https://github.com/guzzle/guzzle/pull/1367
## 6.1.1 - 2015-11-22 ## 6.1.1 - 2015-11-22
* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler * 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`. * Bug fix: fixed regression where MockHandler was not using `sink`.
https://github.com/guzzle/guzzle/pull/1292 https://github.com/guzzle/guzzle/pull/1292
## 6.1.0 - 2015-09-08 ## 6.1.0 - 2015-09-08
* Feature: Added the `on_stats` request option to provide access to transfer * 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. * Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
https://github.com/guzzle/guzzle/pull/1189 https://github.com/guzzle/guzzle/pull/1189
## 6.0.2 - 2015-07-04 ## 6.0.2 - 2015-07-04
* Fixed a memory leak in the curl handlers in which references to callbacks * 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 * Functions are now conditionally required using an additional level of
indirection to help with global Composer installations. indirection to help with global Composer installations.
## 6.0.1 - 2015-05-27 ## 6.0.1 - 2015-05-27
* Fixed a bug with serializing the `query` request option where the `&` * 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. use `form_params` or `multipart` instead.
* Various doc fixes. * Various doc fixes.
## 6.0.0 - 2015-05-26 ## 6.0.0 - 2015-05-26
* See the UPGRADING.md document for more information. * 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. * `$maxHandles` has been removed from CurlMultiHandler.
* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. * `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
## 5.3.0 - 2015-05-19 ## 5.3.0 - 2015-05-19
* Mock now supports `save_to` * 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. * Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
* URL scheme is now always lowercased. * URL scheme is now always lowercased.
## 6.0.0-beta.1 ## 6.0.0-beta.1
* Requires PHP >= 5.5 * 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\QueryParser` has been replaced with the
`GuzzleHttp\Psr7\parse_query`. `GuzzleHttp\Psr7\parse_query`.
## 5.2.0 - 2015-01-27 ## 5.2.0 - 2015-01-27
* Added `AppliesHeadersInterface` to make applying headers to a request based * 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. RingBridge.
* Added a guard in the Pool class to not use recursion for request retries. * Added a guard in the Pool class to not use recursion for request retries.
## 5.1.0 - 2014-12-19 ## 5.1.0 - 2014-12-19
* Pool class no longer uses recursion when a request is intercepted. * 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 * Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
specific exceptions if necessary. specific exceptions if necessary.
## 5.0.3 - 2014-11-03 ## 5.0.3 - 2014-11-03
This change updates query strings so that they are treated as un-encoded values 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 subsequently made, forcing the query-string to be converted into a Query
object). object).
## 5.0.2 - 2014-10-30 ## 5.0.2 - 2014-10-30
* Added a trailing `\r\n` to multipart/form-data payloads. See * 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 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 query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A
## 5.0.1 - 2014-10-16 ## 5.0.1 - 2014-10-16
Bugfix release. Bugfix release.
@ -570,6 +642,7 @@ Bugfix release.
* Fixed an issue where transfer statistics were not being populated in the * Fixed an issue where transfer statistics were not being populated in the
RingBridge. https://github.com/guzzle/guzzle/issues/866 RingBridge. https://github.com/guzzle/guzzle/issues/866
## 5.0.0 - 2014-10-12 ## 5.0.0 - 2014-10-12
Adding support for non-blocking responses and some minor API cleanup. 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 argument. They now accept an associative array of options, including the
"size" key and "metadata" key which can be used to provide custom metadata. "size" key and "metadata" key which can be used to provide custom metadata.
## 4.2.2 - 2014-09-08 ## 4.2.2 - 2014-09-08
* Fixed a memory leak in the CurlAdapter when reusing cURL handles. * 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 Guidance
| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | | 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 | | 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 | | 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 | | 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 | | 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 | | 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-3-repo]: https://github.com/guzzle/guzzle3
[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x [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": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5", "guzzlehttp/promises": "^1.5.3 || ^2.0",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
@ -64,7 +64,8 @@
"require-dev": { "require-dev": {
"ext-curl": "*", "ext-curl": "*",
"bamarni/composer-bin-plugin": "^1.8.1", "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", "phpunit/phpunit": "^8.5.29 || ^9.5.23",
"psr/log": "^1.1 || ^2.0 || ^3.0" "psr/log": "^1.1 || ^2.0 || ^3.0"
}, },
@ -84,9 +85,6 @@
"bamarni-bin": { "bamarni-bin": {
"bin-links": true, "bin-links": true,
"forward-command": false "forward-command": false
},
"branch-alias": {
"dev-master": "7.5-dev"
} }
}, },
"autoload": { "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 public function send(RequestInterface $request, array $options = []): ResponseInterface
{ {
$options[RequestOptions::SYNCHRONOUS] = true; $options[RequestOptions::SYNCHRONOUS] = true;
return $this->sendAsync($request, $options)->wait(); return $this->sendAsync($request, $options)->wait();
} }
/** /**
* The HttpClient PSR (PSR-18) specify this method. * The HttpClient PSR (PSR-18) specify this method.
* *
* @inheritDoc * {@inheritDoc}
*/ */
public function sendRequest(RequestInterface $request): ResponseInterface 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 public function request(string $method, $uri = '', array $options = []): ResponseInterface
{ {
$options[RequestOptions::SYNCHRONOUS] = true; $options[RequestOptions::SYNCHRONOUS] = true;
return $this->requestAsync($method, $uri, $options)->wait(); return $this->requestAsync($method, $uri, $options)->wait();
} }
@ -228,11 +230,11 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
{ {
$defaults = [ $defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings, 'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true, 'http_errors' => true,
'decode_content' => true, 'decode_content' => true,
'verify' => true, 'verify' => true,
'cookies' => false, 'cookies' => false,
'idn_conversion' => false, 'idn_conversion' => false,
]; ];
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. // 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['form_params'])) {
if (isset($options['multipart'])) { if (isset($options['multipart'])) {
throw new InvalidArgumentException('You cannot use ' throw new InvalidArgumentException('You cannot use '
. 'form_params and multipart at the same time. Use the ' .'form_params and multipart at the same time. Use the '
. 'form_params option if you want to send application/' .'form_params option if you want to send application/'
. 'x-www-form-urlencoded requests, and the multipart ' .'x-www-form-urlencoded requests, and the multipart '
. 'option to send multipart/form-data requests.'); .'option to send multipart/form-data requests.');
} }
$options['body'] = \http_build_query($options['form_params'], '', '&'); $options['body'] = \http_build_query($options['form_params'], '', '&');
unset($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. // 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'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']);
$modify['set_headers']['Authorization'] = 'Basic ' $modify['set_headers']['Authorization'] = 'Basic '
. \base64_encode("$value[0]:$value[1]"); .\base64_encode("$value[0]:$value[1]");
break; break;
case 'digest': case 'digest':
// @todo: Do not rely on curl // @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); $request = Psr7\Utils::modifyRequest($request, $modify);
if ($request->getBody() instanceof Psr7\MultipartStream) { if ($request->getBody() instanceof Psr7\MultipartStream) {
// Use a multipart/form-data POST if a Content-Type is not set. // 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. // 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'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
$options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
. $request->getBody()->getBoundary(); .$request->getBody()->getBoundary();
} }
// Merge in conditional headers if they are not present. // 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 private function invalidBody(): InvalidArgumentException
{ {
return new InvalidArgumentException('Passing in the "body" request ' return new InvalidArgumentException('Passing in the "body" request '
. 'option as an array to send a request is not supported. ' .'option as an array to send a request is not supported. '
. 'Please use the "form_params" request option to send a ' .'Please use the "form_params" request option to send a '
. 'application/x-www-form-urlencoded request, or the "multipart" ' .'application/x-www-form-urlencoded request, or the "multipart" '
. 'request option to send a multipart/form-data request.'); .'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(); $cookieJar = new self();
foreach ($cookies as $name => $value) { foreach ($cookies as $name => $value) {
$cookieJar->setCookie(new SetCookie([ $cookieJar->setCookie(new SetCookie([
'Domain' => $domain, 'Domain' => $domain,
'Name' => $name, 'Name' => $name,
'Value' => $value, 'Value' => $value,
'Discard' => true 'Discard' => true,
])); ]));
} }
@ -97,7 +97,7 @@ class CookieJar implements CookieJarInterface
} }
/** /**
* @inheritDoc * {@inheritDoc}
*/ */
public function toArray(): array 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 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
{ {
if (!$domain) { if (!$domain) {
$this->cookies = []; $this->cookies = [];
return; return;
} elseif (!$path) { } elseif (!$path) {
$this->cookies = \array_filter( $this->cookies = \array_filter(
@ -142,7 +143,7 @@ class CookieJar implements CookieJarInterface
} }
/** /**
* @inheritDoc * {@inheritDoc}
*/ */
public function clearSessionCookies(): void public function clearSessionCookies(): void
{ {
@ -155,7 +156,7 @@ class CookieJar implements CookieJarInterface
} }
/** /**
* @inheritDoc * {@inheritDoc}
*/ */
public function setCookie(SetCookie $cookie): bool public function setCookie(SetCookie $cookie): bool
{ {
@ -170,9 +171,10 @@ class CookieJar implements CookieJarInterface
$result = $cookie->validate(); $result = $cookie->validate();
if ($result !== true) { if ($result !== true) {
if ($this->strictMode) { if ($this->strictMode) {
throw new \RuntimeException('Invalid cookie: ' . $result); throw new \RuntimeException('Invalid cookie: '.$result);
} }
$this->removeCookieIfEmpty($cookie); $this->removeCookieIfEmpty($cookie);
return false; return false;
} }
@ -253,7 +255,7 @@ class CookieJar implements CookieJarInterface
/** /**
* Computes cookie path following RFC 6265 section 5.1.4 * 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 private function getCookiePathFromRequest(RequestInterface $request): string
{ {
@ -289,8 +291,8 @@ class CookieJar implements CookieJarInterface
!$cookie->isExpired() && !$cookie->isExpired() &&
(!$cookie->getSecure() || $scheme === 'https') (!$cookie->getSecure() || $scheme === 'https')
) { ) {
$values[] = $cookie->getName() . '=' $values[] = $cookie->getName().'='
. $cookie->getValue(); .$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 * necessary. Subclasses are also responsible for storing and retrieving
* cookies from a file, database, etc. * 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> * @extends \IteratorAggregate<SetCookie>
*/ */
interface CookieJarInterface extends \Countable, \IteratorAggregate 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)); $this->setCookie(new SetCookie($cookie));
} }
} elseif (\strlen($data)) { } 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 * @var array
*/ */
private static $defaults = [ private static $defaults = [
'Name' => null, 'Name' => null,
'Value' => null, 'Value' => null,
'Domain' => null, 'Domain' => null,
'Path' => '/', 'Path' => '/',
'Max-Age' => null, 'Max-Age' => null,
'Expires' => null, 'Expires' => null,
'Secure' => false, 'Secure' => false,
'Discard' => false, 'Discard' => false,
'HttpOnly' => false 'HttpOnly' => false,
]; ];
/** /**
@ -58,7 +58,13 @@ class SetCookie
} else { } else {
foreach (\array_keys(self::$defaults) as $search) { foreach (\array_keys(self::$defaults) as $search) {
if (!\strcasecmp($search, $key)) { 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; continue 2;
} }
} }
@ -74,13 +80,49 @@ class SetCookie
*/ */
public function __construct(array $data = []) public function __construct(array $data = [])
{ {
/** @var array|null $replaced will be null in case of replace error */ $this->data = self::$defaults;
$replaced = \array_replace(self::$defaults, $data);
if ($replaced === null) { if (isset($data['Name'])) {
throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.'); $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 // Extract the Expires value and turn it into a UNIX timestamp if needed
if (!$this->getExpires() && $this->getMaxAge()) { if (!$this->getExpires() && $this->getMaxAge()) {
// Calculate the Expires date // Calculate the Expires date
@ -92,13 +134,13 @@ class SetCookie
public function __toString() public function __toString()
{ {
$str = $this->data['Name'] . '=' . ($this->data['Value'] ?? '') . '; '; $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; ';
foreach ($this->data as $k => $v) { foreach ($this->data as $k => $v) {
if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
if ($k === 'Expires') { 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 { } else {
$str .= ($v === true ? $k : "{$k}={$v}") . '; '; $str .= ($v === true ? $k : "{$k}={$v}").'; ';
} }
} }
} }
@ -394,7 +436,7 @@ class SetCookie
return false; 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 $name
)) { )) {
return 'Cookie name must not contain invalid characters: ASCII ' return 'Cookie name must not contain invalid characters: ASCII '
. 'Control characters (0-31;127), space, tab and the ' .'Control characters (0-31;127), space, tab and the '
. 'following characters: ()<>@,;:\"/?={}'; .'following characters: ()<>@,;:\"/?={}';
} }
// Value must not be null. 0 and empty string are valid. Empty strings // 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