Skip to content

Commit a5e0ba6

Browse files
authored
Merge pull request #88 from weirdan/fix-psalm-compatibility
Fix psalm compatibility
2 parents fca9b22 + 54c50d6 commit a5e0ba6

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/Hooks/TestCaseHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,10 @@ private static function queueClassLikeForScanning(
572572
if (method_exists($codebase, 'queueClassLikeForScanning')) {
573573
$codebase->queueClassLikeForScanning($fq_class_name);
574574
} else {
575-
/** @psalm-suppress InvalidScalarArgument */
575+
/**
576+
* @psalm-suppress InvalidScalarArgument
577+
* @psalm-suppress InvalidArgument
578+
*/
576579
$codebase->scanner->queueClassLikeForScanning($fq_class_name, $file_path);
577580
}
578581
}

tests/acceptance/Prophecy.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Feature: Prophecy
8989
"""
9090
When I run Psalm
9191
Then I see these errors
92-
| Type | Message |
93-
| InvalidScalarArgument | Argument 1 of Prophecy\Argument::that expects callable(mixed...):bool, Closure():string(hello) provided |
92+
| Type | Message |
93+
| InvalidScalarArgument | /Argument 1 of Prophecy\\Argument::that expects callable\(mixed...\):bool, (pure-)?Closure\(\):string\(hello\) provided/ |
9494
And I see no other errors
9595

9696
Scenario: prophesize() provided by ProphecyTrait is generic

tests/acceptance/TestCase.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ Feature: TestCase
142142
"""
143143
When I run Psalm
144144
Then I see these errors
145-
| Type | Message |
146-
| MissingConstructor | NS\MyTestCase has an uninitialized variable $this->i, but no constructor |
145+
| Type | Message |
146+
| MissingConstructor | /NS\\MyTestCase has an uninitialized (variable\|property) \$this->i, but no constructor/ |
147147
And I see no other errors
148148

149149
Scenario: Missing data provider is reported

0 commit comments

Comments
 (0)