Skip to content

Commit 1fc7c68

Browse files
mglamanclaude
andauthored
Fix InspectorTypeExtensionTest failure with PHPStan HEAD (#991)
PHPStan HEAD no longer infers mixed~null (introduced in 2.1.47) in this scope after reassigning $array. Revert the fixture expectation to mixed. The instanceof MixedType check in InspectorTypeExtension::specifyAssertAll() remains correct as it handles both mixed and mixed~null inputs. https://claude.ai/code/session_01HQDbrBSq6Hs6sZNLpZGq5z Co-authored-by: Claude <noreply@anthropic.com>
1 parent b61426d commit 1fc7c68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/src/Type/data/bug-857.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function mixed_function(): mixed {}
1414

1515
// If the type is narrowed before '::assertAll()', it shouldn't change it.
1616
$array = mixed_function();
17-
assertType('mixed~null', $array);
17+
assertType('mixed', $array);
1818
\assert(Inspector::assertAllArrays($array));
1919
assertType('iterable<array>', $array);
2020
\assert(Inspector::assertAll(fn (array $i): bool => TRUE, $array));

0 commit comments

Comments
 (0)