Skip to content

Fix #11427: Wrong "dead catch" error, side effects of ArrayAccess not considered #25409

Fix #11427: Wrong "dead catch" error, side effects of ArrayAccess not considered

Fix #11427: Wrong "dead catch" error, side effects of ArrayAccess not considered #25409

Triggered via pull request February 12, 2026 19:30
Status Failure
Total duration 16m 37s
Artifacts

tests.yml

on: pull_request
Matrix: Tests PHPUnit 12.x
Determine levels tests matrix
36s
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 18 warnings
Tests with old PHPUnit (8.1, ubuntu-latest)
Process completed with exit code 2.
Tests with old PHPUnit (8.0, ubuntu-latest)
Process completed with exit code 2.
Tests with old PHPUnit (8.1, windows-latest)
Process completed with exit code 1.
Tests with old PHPUnit (8.0, windows-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)
Process completed with exit code 1.
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3930
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ } $varType = $scope->getType($var->var); - if ($varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->yes() || !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) { continue; }
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3930
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator": @@ @@ } $varType = $scope->getType($var->var); - if ($varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->yes() || $varType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->no()) { continue; }
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3930
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ } $varType = $scope->getType($var->var); - if ($varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->no() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { continue; }
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3619
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $scope = $result->getScope(); $varType = $scope->getType($expr->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($expr->var, 'offsetGet'),
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3619
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator": @@ @@ $scope = $result->getScope(); $varType = $scope->getType($expr->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && !$varType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($expr->var, 'offsetGet'),
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3619
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $scope = $result->getScope(); $varType = $scope->getType($expr->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->no() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($expr->var, 'offsetGet'),
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2084
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $impurePoints = array_merge($impurePoints, $exprResult->getImpurePoints()); if ($var instanceof ArrayDimFetch && $var->dim !== null) { $varType = $scope->getType($var->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($var->var, 'offsetUnset'),
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2084
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator": @@ @@ $impurePoints = array_merge($impurePoints, $exprResult->getImpurePoints()); if ($var instanceof ArrayDimFetch && $var->dim !== null) { $varType = $scope->getType($var->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && !$varType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($var->var, 'offsetUnset'),
Mutation Testing (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2084
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $impurePoints = array_merge($impurePoints, $exprResult->getImpurePoints()); if ($var instanceof ArrayDimFetch && $var->dim !== null) { $varType = $scope->getType($var->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->no() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($var->var, 'offsetUnset'),
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3930
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ } $varType = $scope->getType($var->var); - if ($varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->yes() || !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) { continue; }
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3930
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator": @@ @@ } $varType = $scope->getType($var->var); - if ($varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->yes() || $varType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->no()) { continue; }
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3930
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ } $varType = $scope->getType($var->var); - if ($varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->no() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { continue; }
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3619
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $scope = $result->getScope(); $varType = $scope->getType($expr->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($expr->var, 'offsetGet'),
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3619
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator": @@ @@ $scope = $result->getScope(); $varType = $scope->getType($expr->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && !$varType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($expr->var, 'offsetGet'),
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L3619
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $scope = $result->getScope(); $varType = $scope->getType($expr->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->no() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($expr->var, 'offsetGet'),
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2084
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $impurePoints = array_merge($impurePoints, $exprResult->getImpurePoints()); if ($var instanceof ArrayDimFetch && $var->dim !== null) { $varType = $scope->getType($var->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($var->var, 'offsetUnset'),
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2084
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator": @@ @@ $impurePoints = array_merge($impurePoints, $exprResult->getImpurePoints()); if ($var instanceof ArrayDimFetch && $var->dim !== null) { $varType = $scope->getType($var->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if (!$varType->isArray()->yes() && !$varType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($var->var, 'offsetUnset'),
Mutation Testing (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2084
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ $impurePoints = array_merge($impurePoints, $exprResult->getImpurePoints()); if ($var instanceof ArrayDimFetch && $var->dim !== null) { $varType = $scope->getType($var->var); - if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { + if ($varType->isArray()->no() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) { $throwPoints = array_merge($throwPoints, $this->processExprNode( $stmt, new MethodCall($var->var, 'offsetUnset'),