diff --git a/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php b/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php index ec6c6b8a47..f78377e721 100644 --- a/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php +++ b/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php @@ -956,6 +956,10 @@ public function testBug393(): void public function testBug9474(): void { + if (PHP_VERSION_ID < 80100) { + $this->markTestSkipped('Test requires PHP 8.1.'); + } + $this->cliArgumentsVariablesRegistered = true; $this->polluteScopeWithLoopInitialAssignments = true; $this->checkMaybeUndefinedVariables = true; diff --git a/tests/PHPStan/Rules/Variables/data/bug-9474.php b/tests/PHPStan/Rules/Variables/data/bug-9474.php index 443e5ce96e..5ea6ec4104 100644 --- a/tests/PHPStan/Rules/Variables/data/bug-9474.php +++ b/tests/PHPStan/Rules/Variables/data/bug-9474.php @@ -1,4 +1,4 @@ -= 8.1 namespace Bug9474;