diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c0d765e..bafebcc 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -23,3 +23,9 @@ parameters: - message: '#Call to an undefined static method \S+#' path: tests/Support/RunkitTest.php + + # PHPUnit 10+ attributes not available in earlier versions + - + message: '#Attribute class PHPUnit\\Framework\\Attributes\\After does not exist\.#' + paths: + - src/EnvironmentVariables.php diff --git a/src/EnvironmentVariables.php b/src/EnvironmentVariables.php index 46db532..c1dca01 100644 --- a/src/EnvironmentVariables.php +++ b/src/EnvironmentVariables.php @@ -16,6 +16,7 @@ trait EnvironmentVariables * * @return void */ + #[\PHPUnit\Framework\Attributes\After] protected function restoreEnvironmentVariables() { foreach ($this->environmentVariables as $variable => $value) {