Skip to content

Commit 89849a1

Browse files
SanderMullerclaude
andcommitted
Do not assert the type of a variadic parameter that depends on the PHP version
On PHP 7.4 a variadic parameter has no named args, so its type is a list there and not on PHP 8. The assertion tests no part of the change, so remove it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent bbe09e3 commit 89849a1

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎tests/PHPStan/Analyser/nsrt/array-map-unpacked-args.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public function defaultAfterKnownPositions(array $maybePair, array $maybeTwoArra
126126

127127
(function ($a, $b = 'fallback', ...$rest) {
128128
assertType('mixed', $b);
129-
assertType('array<int<0, max>|string, 2>', $rest);
130129
})(...$maybePair);
131130

132131
array_map(function ($a, $b = 'none') {

0 commit comments

Comments
 (0)