Repository navigation
Commit 141dc13
Fix CI: green PHPStan and the prefer-lowest / prefer-stable test matrix
Pre-existing failures unrelated to the Psl arg fix, surfaced now that the
suite runs to completion:
- StrictComparisonOfObjectsRule::processNode() must return
list<IdentifierRuleError>; add ->identifier() so the builder yields one.
- basepath(): realpath() is string|false. Guard both calls so preg_match
receives a string and the function never returns false.
- RestrictImplicitDependencyUsage test used Psl\Collection\Vector as the
"undefined package" example, but php-standard-library is now a declared
dependency (the rule itself uses Psl\Type), so Psl\ is an allowed
namespace. Use SebastianBergmann\Diff\Differ — installed transitively via
phpunit but not declared — which is genuinely an implicit dependency.
- Raise phpstan/phpstan floor to ^2.1.13: the rule implements
RestrictedClassNameUsageExtension, added in 2.1.13, so prefer-lowest
previously resolved 2.1.0 (missing the interface) and fatal-errored.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f59a543 commit 141dc13
4 files changed
Lines changed: 11 additions & 4 deletions
File tree
- src
- Rules
- tests/Rules/RestrictImplicitDepndencyUsage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | | - | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
0 commit comments