Skip to content

Add nikic/php-parser v5 support #13316

Add nikic/php-parser v5 support

Add nikic/php-parser v5 support #13316

Triggered via pull request August 9, 2024 17:47
Status Failure
Total duration 1m 3s
Artifacts

shepherd.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
DeprecatedConstant: src/Psalm/Internal/Analyzer/ClassAnalyzer.php#L1267
src/Psalm/Internal/Analyzer/ClassAnalyzer.php:1267:36: DeprecatedConstant: Constant PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC is deprecated (see https://psalm.dev/170)
InvalidReturnType: src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php#L695
src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php:695:16: InvalidReturnType: The declared return type 'array<array-key, PhpParser\Node\ArrayItem>|null' for Psalm\Internal\Analyzer\Statements\Block\SwitchCaseAnalyzer::getOptionsFromNestedOr is incorrect, got 'array<array-key, PhpParser\Node\ArrayItem|Psalm\Node\Expr\VirtualArrayItem>|null' (see https://psalm.dev/011)
InvalidReturnStatement: src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php#L713
src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php:713:20: InvalidReturnStatement: The inferred type 'non-empty-array<array-key, PhpParser\Node\ArrayItem|Psalm\Node\Expr\VirtualArrayItem>' does not match the declared return type 'array<array-key, PhpParser\Node\ArrayItem>|null' for Psalm\Internal\Analyzer\Statements\Block\SwitchCaseAnalyzer::getOptionsFromNestedOr (see https://psalm.dev/128)
InvalidArgument: src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php#L737
src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php:737:13: InvalidArgument: Argument 3 of Psalm\Internal\Analyzer\Statements\Block\SwitchCaseAnalyzer::getOptionsFromNestedOr expects array<array-key, PhpParser\Node\ArrayItem>, but non-empty-array<array-key, PhpParser\Node\ArrayItem|Psalm\Node\Expr\VirtualArrayItem> provided (see https://psalm.dev/004)
InvalidReturnType: src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MissingMethodCallHandler.php#L204
src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MissingMethodCallHandler.php:204:25: InvalidReturnType: The declared return type 'PhpParser\Node\ArrayItem' for /home/runner/work/psalm/psalm/src/psalm/internal/analyzer/statements/expression/call/method/missingmethodcallhandler.php:205:7368:-:closure is incorrect, got 'Psalm\Node\Expr\VirtualArrayItem' (see https://psalm.dev/011)
InvalidReturnStatement: src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MissingMethodCallHandler.php#L205
src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MissingMethodCallHandler.php:205:51: InvalidReturnStatement: The inferred type 'Psalm\Node\Expr\VirtualArrayItem' does not match the declared return type 'PhpParser\Node\ArrayItem' for /home/runner/work/psalm/psalm/src/psalm/internal/analyzer/statements/expression/call/method/missingmethodcallhandler.php:205:7368:-:closure (see https://psalm.dev/128)
InvalidArgument: src/Psalm/Internal/Analyzer/Statements/Expression/Call/NamedFunctionCallHandler.php#L399
src/Psalm/Internal/Analyzer/Statements/Expression/Call/NamedFunctionCallHandler.php:399:41: InvalidArgument: Argument 1 of Psalm\Node\Expr\VirtualArray::__construct expects array<array-key, PhpParser\Node\ArrayItem>, but list{0?: Psalm\Node\Expr\VirtualArrayItem, ...<Psalm\Node\Expr\VirtualArrayItem>} provided (see https://psalm.dev/004)
InvalidReturnType: src/Psalm/Internal/Analyzer/Statements/Expression/MatchAnalyzer.php#L335
src/Psalm/Internal/Analyzer/Statements/Expression/MatchAnalyzer.php:335:25: InvalidReturnType: The declared return type 'PhpParser\Node\ArrayItem' for /home/runner/work/psalm/psalm/src/psalm/internal/analyzer/statements/expression/matchanalyzer.php:336:11818:-:closure is incorrect, got 'Psalm\Node\Expr\VirtualArrayItem' (see https://psalm.dev/011)
InvalidReturnStatement: src/Psalm/Internal/Analyzer/Statements/Expression/MatchAnalyzer.php#L337
src/Psalm/Internal/Analyzer/Statements/Expression/MatchAnalyzer.php:337:17: InvalidReturnStatement: The inferred type 'Psalm\Node\Expr\VirtualArrayItem' does not match the declared return type 'PhpParser\Node\ArrayItem' for /home/runner/work/psalm/psalm/src/psalm/internal/analyzer/statements/expression/matchanalyzer.php:336:11818:-:closure (see https://psalm.dev/128)
TypeDoesNotContainType: src/Psalm/Internal/Analyzer/Statements/ExpressionAnalyzer.php#L231
src/Psalm/Internal/Analyzer/Statements/ExpressionAnalyzer.php:231:13: TypeDoesNotContainType: Cannot resolve types for $stmt - PhpParser\Node\Expr does not contain PhpParser\Node\InterpolatedStringPart (see https://psalm.dev/056)