Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psalm 5 #488

Merged
merged 1 commit into from Aug 14, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions lib/Doctrine/Common/Annotations/DocParser.php
Expand Up @@ -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<int, mixed>, named_arguments?: array<string, mixed>}
*/
final class DocParser
{
Expand Down Expand Up @@ -1038,7 +1040,7 @@ private function Annotation()
/**
* MethodCall ::= ["(" [Values] ")"]
*
* @return mixed[]
* @psalm-return Arguments
*
* @throws AnnotationException
* @throws ReflectionException
Expand All @@ -1065,7 +1067,7 @@ private function MethodCall(): array
/**
* Values ::= Array | Value {"," Value}* [","]
*
* @return mixed[]
* @psalm-return Arguments
*
* @throws AnnotationException
* @throws ReflectionException
Expand Down Expand Up @@ -1427,7 +1429,7 @@ private function isIgnoredAnnotation(string $name): bool
/**
* Resolve positional arguments (without name) to named ones
*
* @param array<string,mixed> $arguments
* @psalm-param Arguments $arguments
*
* @return array<string,mixed>
*/
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
@@ -1,5 +1,6 @@
parameters:
level: 3
phpVersion: 80200
paths:
- lib
- tests
Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
phpVersion="8.2"
resolveFromConfigFile="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down