diff --git a/composer.json b/composer.json index 64d8376..e6f2f5a 100644 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ }, "require-dev": { "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 5503dac..236fccd 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -1,4 +1,5 @@ includes: + - vendor/phpstan/phpstan-phpunit/extension.neon - ../../../../../.phpstan/extension.neon parameters: @@ -14,10 +15,15 @@ parameters: message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" reportUnmatched: false - - identifier: missingType.iterableValue - path: Tests/* + message: '#^Call to( static)? method PHPUnit\\Framework\\Assert::.* will always evaluate to true\.$#' reportUnmatched: false - identifier: 'symfonyAi.forbidNativeException' path: Tests/* reportUnmatched: false + +services: + - # Conditionally enabled by bleeding edge in phpstan/phpstan-phpunit 2.x + class: PHPStan\Type\PHPUnit\DataProviderReturnTypeIgnoreExtension + tags: + - phpstan.ignoreErrorExtension