提交的内容

This commit is contained in:
2025-05-12 15:45:02 +08:00
parent 629c4750da
commit b48c692775
3043 changed files with 34732 additions and 60810 deletions

View File

@ -1,26 +0,0 @@
<?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

View File

@ -1,2 +0,0 @@
test:
vendor/bin/phpunit $(TEST)

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

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

@ -26,13 +26,13 @@
],
"require": {
"php": "^7.2.5 || ^8.0",
"guzzlehttp/guzzle": "^7.7",
"guzzlehttp/command": "^1.3",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"guzzlehttp/uri-template": "^1.0.1"
"guzzlehttp/guzzle": "^7.9.2",
"guzzlehttp/command": "^1.3.2",
"guzzlehttp/psr7": "^2.7.0",
"guzzlehttp/uri-template": "^1.0.4"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.1",
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.19 || ^9.5.8"
},
"autoload": {

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
bootstrap="vendor/autoload.php"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<testsuites>
<testsuite name="unit">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src</directory>
</whitelist>
</filter>
</phpunit>

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

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

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

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

@ -34,19 +34,16 @@ class GuzzleClient extends ServiceClient
* - response_locations: Associative array of location types mapping to
* ResponseLocationInterface objects.
*
* @param ClientInterface $client HTTP client to use.
* @param DescriptionInterface $description Guzzle service description
* @param callable $commandToRequestTransformer
* @param callable $responseToResultTransformer
* @param HandlerStack $commandHandlerStack
* @param array $config Configuration options
* @param ClientInterface $client HTTP client to use.
* @param DescriptionInterface $description Guzzle service description
* @param array $config Configuration options
*/
public function __construct(
ClientInterface $client,
DescriptionInterface $description,
callable $commandToRequestTransformer = null,
callable $responseToResultTransformer = null,
HandlerStack $commandHandlerStack = null,
?callable $commandToRequestTransformer = null,
?callable $responseToResultTransformer = null,
?HandlerStack $commandHandlerStack = null,
array $config = []
) {
$this->config = $config;
@ -99,7 +96,7 @@ class GuzzleClient extends ServiceClient
*
* @param callable|null $commandToRequestTransformer
*
* @return \GuzzleHttp\Command\Guzzle\Serializer
* @return Serializer
*/
private function getSerializer($commandToRequestTransformer)
{
@ -113,7 +110,7 @@ class GuzzleClient extends ServiceClient
*
* @param callable|null $responseToResultTransformer
*
* @return \GuzzleHttp\Command\Guzzle\Deserializer
* @return Deserializer
*/
private function getDeserializer($responseToResultTransformer)
{

View File

@ -23,7 +23,7 @@ class ValidatedDescriptionHandler
/**
* ValidatedDescriptionHandler constructor.
*/
public function __construct(DescriptionInterface $description, SchemaValidator $schemaValidator = null)
public function __construct(DescriptionInterface $description, ?SchemaValidator $schemaValidator = null)
{
$this->description = $description;
$this->validator = $schemaValidator ?: new SchemaValidator();

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

@ -51,7 +51,7 @@ class Operation implements ToArrayInterface
*
* @throws \InvalidArgumentException
*/
public function __construct(array $config = [], DescriptionInterface $description = null)
public function __construct(array $config = [], ?DescriptionInterface $description = null)
{
static $defaults = [
'name' => '',

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

@ -78,7 +78,7 @@ class Parameter implements ToArrayInterface
/** @var string */
private $format;
private $propertiesCache = null;
private $propertiesCache;
/** @var Description */
private $serviceDescription;

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -25,7 +25,7 @@ class QueryLocation extends AbstractLocation
*
* @param string $locationName
*/
public function __construct($locationName = 'query', QuerySerializerInterface $querySerializer = null)
public function __construct($locationName = 'query', ?QuerySerializerInterface $querySerializer = null)
{
parent::__construct($locationName);

View File

View File

View File

View File

View File

View File

@ -26,7 +26,7 @@ class JsonLocation extends AbstractLocation
}
/**
* @return \GuzzleHttp\Command\ResultInterface
* @return ResultInterface
*/
public function before(
ResultInterface $result,

View File

View File

View File

View File

@ -48,8 +48,8 @@ class XmlLocation extends AbstractLocation
) {
// Handle additional, undefined properties
$additional = $model->getAdditionalProperties();
if ($additional instanceof Parameter &&
$additional->getLocation() == $this->locationName
if ($additional instanceof Parameter
&& $additional->getLocation() == $this->locationName
) {
$result = new Result(array_merge(
$result->toArray(),

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

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

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

@ -132,9 +132,7 @@ class Serializer
/**
* Create a request for an operation with a uri merged onto a base URI
*
* @param \GuzzleHttp\Command\Guzzle\Operation $operation
*
* @return \GuzzleHttp\Psr7\Request
* @return Request
*/
private function createCommandWithUri(
Operation $operation,

View File

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