diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 0adc3d08e..fec16abeb 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,4 +12,4 @@ on: jobs: static-analysis: name: "Static Analysis" - uses: "doctrine/.github/.github/workflows/static-analysis.yml@2.1.0" + uses: "doctrine/.github/.github/workflows/static-analysis.yml@3.0.0" diff --git a/composer.json b/composer.json index a01223635..0ab51f108 100644 --- a/composer.json +++ b/composer.json @@ -40,10 +40,10 @@ "require-dev": { "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpstan/phpstan": "~1.4.10 || ^1.10.28", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" + "vimeo/psalm": "^4.30 || ^5.14" }, "suggest": { "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" diff --git a/lib/Doctrine/Common/Annotations/DocParser.php b/lib/Doctrine/Common/Annotations/DocParser.php index 5ec150d3e..fbbde94ae 100644 --- a/lib/Doctrine/Common/Annotations/DocParser.php +++ b/lib/Doctrine/Common/Annotations/DocParser.php @@ -49,6 +49,8 @@ * A parser for docblock annotations. * * It is strongly discouraged to change the default annotation parsing process. + * + * @psalm-type Arguments = array{positional_arguments?: array, named_arguments?: array} */ final class DocParser { @@ -1038,7 +1040,7 @@ private function Annotation() /** * MethodCall ::= ["(" [Values] ")"] * - * @return mixed[] + * @psalm-return Arguments * * @throws AnnotationException * @throws ReflectionException @@ -1065,7 +1067,7 @@ private function MethodCall(): array /** * Values ::= Array | Value {"," Value}* [","] * - * @return mixed[] + * @psalm-return Arguments * * @throws AnnotationException * @throws ReflectionException @@ -1427,7 +1429,7 @@ private function isIgnoredAnnotation(string $name): bool /** * Resolve positional arguments (without name) to named ones * - * @param array $arguments + * @psalm-param Arguments $arguments * * @return array */ diff --git a/phpstan.neon b/phpstan.neon index 4d2b2f1d3..08339cda9 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,6 @@ parameters: level: 3 + phpVersion: 80200 paths: - lib - tests diff --git a/psalm.xml b/psalm.xml index e6af38923..3943f431d 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,7 +1,10 @@