diff --git a/composer.json b/composer.json index b4f7625..80134c1 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "orchestra/testbench": "^9.0", "phpstan/phpstan": "^1.10", "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.4", "phpunit/phpunit": "^11.0", "staudenmeir/eloquent-json-relations": "^1.11", "staudenmeir/laravel-adjacency-list": "^1.21" diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 7dd51b3..ece647c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,8 @@ includes: - ./vendor/larastan/larastan/extension.neon - ./vendor/phpstan/phpstan-mockery/extension.neon + - ./vendor/phpstan/phpstan-phpunit/extension.neon + - ./vendor/phpstan/phpstan-phpunit/rules.neon parameters: level: 5 paths: @@ -9,3 +11,4 @@ parameters: treatPhpDocTypesAsCertain: false ignoreErrors: - '#Unsafe usage of new static\(\).#' + - '#Parameter \#\d+ \$relations of method Illuminate\\Database\\Eloquent\\Collection<[^>]+\>::load\(\) expects#'