Skip to content

Commit 4f51382

Browse files
committed
Parameters schema - structured featureToggles to disallow unsupported keys
1 parent c249ade commit 4f51382

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

conf/config.level0.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
parameters:
22
customRulesetUsed: false
33
missingClosureNativeReturnCheckObjectTypehint: false
4-
featureToggles:
5-
closureUsesThis: false
64

75
conditionalTags:
86
PHPStan\Rules\Functions\ClosureUsesThisRule:

conf/config.level5.neon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ conditionalTags:
88
parameters:
99
checkFunctionArgumentTypes: true
1010
checkArgumentsPassedByReference: true
11-
featureToggles:
12-
randomIntParameters: false
11+
1312

1413
services:
1514
-

conf/config.neon

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ parameters:
1111
disableRuntimeReflectionProvider: false
1212
enableScanningPaths: false
1313
resultCache: false
14+
closureUsesThis: false
15+
randomIntParameters: false
1416
fileExtensions:
1517
- php
1618
checkAlwaysTrueCheckTypeFunctionCall: false
@@ -125,7 +127,15 @@ parametersSchema:
125127
autoload_files: listOf(string())
126128
level: schema(anyOf(int(), string()), nullable())
127129
paths: listOf(string())
128-
featureToggles: arrayOf(bool())
130+
featureToggles: structure([
131+
disableRobotLoader: bool(),
132+
staticReflectionForPhpParser: bool(),
133+
disableRuntimeReflectionProvider: bool(),
134+
enableScanningPaths: bool(),
135+
resultCache: bool(),
136+
closureUsesThis: bool(),
137+
randomIntParameters: bool()
138+
])
129139
fileExtensions: listOf(string())
130140
checkAlwaysTrueCheckTypeFunctionCall: bool()
131141
checkAlwaysTrueInstanceof: bool()

0 commit comments

Comments
 (0)