Skip to content

Fix #13996: array_count_values array key inference broken since 2.1.34 #25408

Fix #13996: array_count_values array key inference broken since 2.1.34

Fix #13996: array_count_values array key inference broken since 2.1.34 #25408

Triggered via pull request February 12, 2026 19:28
Status Failure
Total duration 13m 53s
Artifacts

tests.yml

on: pull_request
Matrix: Tests PHPUnit 12.x
Determine levels tests matrix
34s
Determine levels tests matrix
Matrix: Integration tests
Matrix: Tests PHPUnit 11.x
Matrix: Tests with old PHPUnit
Matrix: Mutation Testing
Matrix: Levels tests
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 2 warnings
Tests with old PHPUnit (8.0, ubuntu-latest)
Process completed with exit code 2.
Tests with old PHPUnit (8.1, ubuntu-latest)
Process completed with exit code 2.
Tests with old PHPUnit (8.0, windows-latest)
Process completed with exit code 1.
Tests with old PHPUnit (8.1, windows-latest)
Process completed with exit code 1.
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
Mutation Testing (8.3, ubuntu-latest)
Process completed with exit code 1.
Mutation Testing (8.4, ubuntu-latest): src/Type/Php/ArrayCountValuesDynamicReturnTypeExtension.php#L61
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ // PHP casts numeric strings to integer keys, so a general string // that might be numeric should produce int|string keys - if ($itemType->isString()->yes() && $itemType->isNumericString()->maybe()) { + if (!$itemType->isString()->no() && $itemType->isNumericString()->maybe()) { $keyType = TypeCombinator::union($keyType, new IntegerType()); }
Mutation Testing (8.3, ubuntu-latest): src/Type/Php/ArrayCountValuesDynamicReturnTypeExtension.php#L61
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ // PHP casts numeric strings to integer keys, so a general string // that might be numeric should produce int|string keys - if ($itemType->isString()->yes() && $itemType->isNumericString()->maybe()) { + if (!$itemType->isString()->no() && $itemType->isNumericString()->maybe()) { $keyType = TypeCombinator::union($keyType, new IntegerType()); }