Skip to content

Commit

Permalink
Parameters schema - structured featureToggles to disallow unsupported…
Browse files Browse the repository at this point in the history
… keys
  • Loading branch information
ondrejmirtes committed Feb 25, 2020
1 parent c249ade commit 4f51382
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 0 additions & 2 deletions conf/config.level0.neon
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
parameters:
customRulesetUsed: false
missingClosureNativeReturnCheckObjectTypehint: false
featureToggles:
closureUsesThis: false

conditionalTags:
PHPStan\Rules\Functions\ClosureUsesThisRule:
Expand Down
3 changes: 1 addition & 2 deletions conf/config.level5.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ conditionalTags:
parameters:
checkFunctionArgumentTypes: true
checkArgumentsPassedByReference: true
featureToggles:
randomIntParameters: false


services:
-
Expand Down
12 changes: 11 additions & 1 deletion conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ parameters:
disableRuntimeReflectionProvider: false
enableScanningPaths: false
resultCache: false
closureUsesThis: false
randomIntParameters: false
fileExtensions:
- php
checkAlwaysTrueCheckTypeFunctionCall: false
Expand Down Expand Up @@ -125,7 +127,15 @@ parametersSchema:
autoload_files: listOf(string())
level: schema(anyOf(int(), string()), nullable())
paths: listOf(string())
featureToggles: arrayOf(bool())
featureToggles: structure([
disableRobotLoader: bool(),
staticReflectionForPhpParser: bool(),
disableRuntimeReflectionProvider: bool(),
enableScanningPaths: bool(),
resultCache: bool(),
closureUsesThis: bool(),
randomIntParameters: bool()
])
fileExtensions: listOf(string())
checkAlwaysTrueCheckTypeFunctionCall: bool()
checkAlwaysTrueInstanceof: bool()
Expand Down

0 comments on commit 4f51382

Please sign in to comment.