Skip to content

Commit 0ea47e0

Browse files
committed
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.
1 parent 9936918 commit 0ea47e0

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

phpstan.neon.dist

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@ parameters:
33
paths:
44
- src
55
- tests
6+
excludePaths:
7+
- src/Laravel
68
tmpDir: .phpstan.cache
7-
ignoreErrors:
8-
-
9-
message: '#Function (app|config) not found#'
10-
path: src/Laravel/ValidatesOpenApiSchema.php
11-
-
12-
message: '#Call to an undefined method Illuminate\\Testing\\TestResponse::#'
13-
path: src/Laravel/ValidatesOpenApiSchema.php
14-
-
15-
message: '#Access to an undefined property Illuminate\\Testing\\TestResponse::\$headers#'
16-
path: src/Laravel/ValidatesOpenApiSchema.php
17-
-
18-
message: '#Function config_path not found#'
19-
path: src/Laravel/OpenApiContractTestingServiceProvider.php
20-
-
21-
message: '#does not specify its types: TResponse#'
22-
path: src/Laravel/ValidatesOpenApiSchema.php

0 commit comments

Comments
 (0)