Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"nette/utils": "^3.0 || ^4.0",
"nikic/php-parser": "^4.0",
"nyholm/symfony-bundle-test": "^3.0",
"phpstan/phpstan": "~1.10.67",
"phpstan/phpstan": "~2.0.0",
"psalm/phar": "~5.14.1",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"swaggest/json-diff": "^3.7",
Expand Down
3 changes: 1 addition & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
parameters:
level: 6
treatPhpDocTypesAsCertain: false
checkMissingCallableSignature: true
checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: false
paths:
- src
Expand All @@ -13,5 +11,6 @@ parameters:
- src/**/tests/*

ignoreErrors:
- identifier: missingType.iterableValue
- '#PHPDoc tag @throws with type Psr\\Cache\\CacheException is not subtype of Throwable$#'
- '#^Dead catch - JsonException is never thrown in the try block\.$#'
5 changes: 2 additions & 3 deletions src/CodeGenerator/src/Generator/OperationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ public function generate(Operation $operation): void
$method->addComment('@see ' . $documentation);
}
$method->addComment('@see ' . $operation->getApiReferenceDocumentationUrl());
if (null !== $prefix = $operation->getService()->getEndpointPrefix()) {
$method->addComment('@see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-' . $prefix . '-' . $operation->getService()->getApiVersion() . '.html#' . strtolower($operation->getName()));
}
$prefix = $operation->getService()->getEndpointPrefix();
$method->addComment('@see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-' . $prefix . '-' . $operation->getService()->getApiVersion() . '.html#' . strtolower($operation->getName()));
[$doc, $memberClassNames] = $this->typeGenerator->generateDocblock($inputShape, $inputClass, true, false, false, [' \'@region\'?: string|null,']);
$method->addComment($doc);
foreach ($memberClassNames as $memberClassName) {
Expand Down
10 changes: 4 additions & 6 deletions src/CodeGenerator/src/Generator/ResponseParser/RestXmlParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,10 @@ private function createPopulateMethod(string $functionName, string $body, Shape
->setType(\SimpleXMLElement::class)
;

if (null !== $shape) {
[$returnType, $parameterType, $memberClassNames] = $this->typeGenerator->getPhpType($shape);
$method
->setComment('@return ' . $parameterType);
$this->imports = array_merge($this->imports, $memberClassNames);
}
[$returnType, $parameterType, $memberClassNames] = $this->typeGenerator->getPhpType($shape);
$method
->setComment('@return ' . $parameterType);
$this->imports = array_merge($this->imports, $memberClassNames);

return $method;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CodeGenerator/src/Generator/TestGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function generateInput(Operation $operation, StructureShape $shape): voi

break;
case 'query':
$stub = substr(var_export($exampleInput ? (\is_array($exampleInput) ? http_build_query($exampleInput, '', '&', \PHP_QUERY_RFC3986) : $exampleInput) : "
$stub = substr(var_export($exampleInput ? http_build_query($exampleInput, '', '&', \PHP_QUERY_RFC3986) : "
Action={$operation->getName()}
&Version={$operation->getApiVersion()}
", true), 1, -1);
Expand Down
1 change: 1 addition & 0 deletions src/Core/src/Signer/SignerV4.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ private function buildCanonicalQuery(Request $request): string
continue;
}

// @phpstan-ignore argument.unresolvableType
sort($values);
foreach ($values as $value) {
$encodedQuery[] = rawurlencode($key) . '=' . rawurlencode($value);
Expand Down
Loading