This repository was archived by the owner on May 18, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
123 lines (116 loc) · 3.79 KB
/
Copy pathphpstan.neon
File metadata and controls
123 lines (116 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
includes:
- vendor/larastan/larastan/extension.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/script-development/phpstan-warroom-rules/extension.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
level: max
paths:
- app
- bootstrap
- config
- database
- routes
- tests
excludePaths:
- bootstrap/cache
# Larastan-specific rules
checkModelProperties: true
checkOctaneCompatibility: true
noModelMake: true
noUnnecessaryCollectionCall: true
# PHPStan strictness rules
reportUnmatchedIgnoredErrors: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
ignoreErrors:
# Known Larastan + phpstan-strict-rules incompatibility (larastan/larastan#1272,
# phpstan/phpstan-strict-rules#140). Larastan re-declares Eloquent Builder methods
# as static on Models so Model::where() resolves, but this makes phpstan-strict-rules
# flag $builder->where() as a dynamic call on a static method. No upstream fix exists.
# This ignore is scoped by identifier (not fragile regex) and path-limited to app/.
# With reportUnmatchedIgnoredErrors: true, PHPStan will flag this if Larastan fixes
# the issue upstream, prompting removal. Reviewed 2026-03-24.
-
identifier: staticMethod.dynamicCall
path: app/*
# Pest test suite: Pest's DSL uses internal classes, dynamic method chaining,
# and returns mixed types that PHPStan at level max cannot resolve. These are
# scoped strictly to tests/ and do not mask app/ errors. With
# reportUnmatchedIgnoredErrors: true, any category that becomes resolvable
# upstream will surface for cleanup. Reviewed 2026-03-26.
-
identifier: method.notFound
path: tests/*
-
identifier: method.nonObject
path: tests/*
-
identifier: method.internalClass
path: tests/*
-
identifier: argument.type
path: tests/*
-
identifier: property.notFound
path: tests/*
-
identifier: offsetAccess.invalidOffset
path: tests/*
-
identifier: offsetAccess.nonOffsetAccessible
path: tests/*
-
identifier: property.nonObject
path: tests/*
-
identifier: method.dynamicName
path: tests/*
-
identifier: cast.string
path: tests/*
-
identifier: cast.useless
path: tests/*
-
identifier: missingType.generics
path: tests/*
-
identifier: missingType.iterableValue
path: tests/*
-
identifier: foreach.nonIterable
path: tests/*
-
identifier: binaryOp.invalid
path: tests/*
-
identifier: if.condNotBoolean
path: tests/*
-
identifier: return.type
path: tests/*
-
identifier: argument.templateType
path: tests/*
-
identifier: ternary.shortNotAllowed
path: tests/*
-
identifier: staticMethod.dynamicCall
path: tests/*
-
identifier: staticMethod.deprecated
path: tests/*
-
identifier: cast.int
path: tests/*
-
identifier: booleanNot.exprNotBoolean
path: tests/*
-
identifier: booleanAnd.rightNotBoolean
path: tests/*
-
identifier: booleanAnd.leftNotBoolean
path: tests/*