From 0ea47e0f00e389190892e4cea951fa951d4bbf30 Mon Sep 17 00:00:00 2001 From: wadakatu Date: Mon, 16 Mar 2026 22:50:07 +0900 Subject: [PATCH] refactor(phpstan): exclude Laravel directory instead of ignoring individual errors Replace 5 ignoreErrors entries with excludePaths for src/Laravel. Laravel integration files use framework APIs (app(), config(), TestResponse) that cannot be properly type-checked without Larastan. Excluding the directory is the standard approach for framework-agnostic libraries. --- phpstan.neon.dist | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index a851626..01f1cb9 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -3,20 +3,6 @@ parameters: paths: - src - tests + excludePaths: + - src/Laravel tmpDir: .phpstan.cache - ignoreErrors: - - - message: '#Function (app|config) not found#' - path: src/Laravel/ValidatesOpenApiSchema.php - - - message: '#Call to an undefined method Illuminate\\Testing\\TestResponse::#' - path: src/Laravel/ValidatesOpenApiSchema.php - - - message: '#Access to an undefined property Illuminate\\Testing\\TestResponse::\$headers#' - path: src/Laravel/ValidatesOpenApiSchema.php - - - message: '#Function config_path not found#' - path: src/Laravel/OpenApiContractTestingServiceProvider.php - - - message: '#does not specify its types: TResponse#' - path: src/Laravel/ValidatesOpenApiSchema.php