You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Narrow ConstantArrayType with callable and remove IntersectionType special behavior
Move callable-array narrowing logic entirely into TypeCombinator::intersect():
- Add ConstantArrayType + CallableType handling to narrow value types at offsets 0 and 1
- Update callable-array PHPDoc resolution to use TypeCombinator::intersect()
- Remove redundant hasOffsetValueType/getOffsetValueType callable logic from IntersectionType
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1698,13 +1698,13 @@ parameters:
1698
1698
-
1699
1699
rawMessage:'Doing instanceof PHPStan\Type\CallableType is error-prone and deprecated. Use Type::isCallable() and Type::getCallableParametersAcceptors() instead.'
1700
1700
identifier:phpstanApi.instanceofType
1701
-
count:3
1701
+
count:5
1702
1702
path:src/Type/TypeCombinator.php
1703
1703
1704
1704
-
1705
1705
rawMessage:'Doing instanceof PHPStan\Type\Constant\ConstantArrayType is error-prone and deprecated. Use Type::getConstantArrays() instead.'
0 commit comments