diff --git a/composer.json b/composer.json index d3a7e67..1e98765 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "require-dev": { "phpunit/phpunit": "^8 || ^9", "phpstan/phpstan": "^1.12 || ^2", - "phpstan/phpstan-strict-rules": "^1 || ^2" + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2" }, "conflict": { "phpstan/phpstan": "<1.11.10" diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e8ae6e5..2a983c6 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -17,4 +17,5 @@ includes: - extension.neon - vendor/phpstan/phpstan/conf/bleedingEdge.neon - vendor/phpstan/phpstan-strict-rules/rules.neon + - vendor/phpstan/phpstan-deprecation-rules/rules.neon - phpstan-baseline.neon diff --git a/tests/BaseTestCase.php b/tests/BaseTestCase.php index 827f646..928caed 100644 --- a/tests/BaseTestCase.php +++ b/tests/BaseTestCase.php @@ -31,8 +31,8 @@ protected function doExpectException(string $class, ?string $message = null): vo protected function doExpectWarning(string $message): void { - $this->expectWarning(); - $this->expectWarningMessage($message); + $this->expectWarning(); // @phpstan-ignore method.deprecated + $this->expectWarningMessage($message); // @phpstan-ignore method.deprecated } protected function expectPcreEngineException(string $pattern): void