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
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 .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 5 additions & 3 deletions lib/Doctrine/Common/Annotations/DocParser.php
Original file line number Diff line number Diff line change
@@ -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
{
@@ -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<string,mixed> $arguments
* @psalm-param Arguments $arguments
*
* @return array<string,mixed>
*/
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
level: 3
phpVersion: 80200
paths:
- lib
- tests
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -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"