Skip to content

Commit c1f041b

Browse files
henriquemoodyclaude
andcommitted
Update PHPStan config for 2.x compatibility
PHPStan 2.x changed how @mixin handles static return types: instead of resolving static to the calling class, it resolves to the mixin type itself (Mixin interface). This causes chain navigation methods (all(), key(), property()) called after assertion methods to appear undefined on the Mixin type, cascading into method.nonObject errors. Remove the phpt file extension (no .phpt files remain after the switch to PHPUnit integration tests). Retain the existing regex for undefined Mixin method calls and add a new identifier-scoped rule to suppress the cascading method.nonObject false positives in integration tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c20042d commit c1f041b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

phpstan.neon.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ parameters:
33
paths:
44
- src/
55
- tests/
6-
fileExtensions:
7-
- php
8-
- phpt
96
ignoreErrors:
107
- '/Call to an undefined method Respect\\Assertion\\Mixin\\Chain\\Mixin::[a-zA-Z]+\(\)/'
8+
- identifier: method.nonObject
9+
paths:
10+
- tests/integration/

0 commit comments

Comments
 (0)