diff --git a/conf/bleedingEdge.neon b/conf/bleedingEdge.neon index 5af3a763db..cde18d2a32 100644 --- a/conf/bleedingEdge.neon +++ b/conf/bleedingEdge.neon @@ -3,5 +3,6 @@ parameters: bleedingEdge: true skipCheckGenericClasses: [] explicitMixedInUnknownGenericNew: true + arrayFilter: true stubFiles: - ../stubs/bleedingEdge/Countable.stub diff --git a/conf/config.level5.neon b/conf/config.level5.neon index a17616c915..3339b0a836 100644 --- a/conf/config.level5.neon +++ b/conf/config.level5.neon @@ -5,10 +5,13 @@ parameters: checkFunctionArgumentTypes: true checkArgumentsPassedByReference: true +conditionalTags: + PHPStan\Rules\Functions\ArrayFilterRule: + phpstan.rules.rule: %featureToggles.arrayFilter% + rules: - PHPStan\Rules\DateTimeInstantiationRule - PHPStan\Rules\Functions\ImplodeFunctionRule - - PHPStan\Rules\Functions\ArrayFilterRule services: - @@ -17,3 +20,6 @@ services: reportMaybes: %reportMaybes% tags: - phpstan.rules.rule + + - + class: PHPStan\Rules\Functions\ArrayFilterRule diff --git a/conf/config.neon b/conf/config.neon index 5f3f094aef..6a0898629d 100644 --- a/conf/config.neon +++ b/conf/config.neon @@ -28,6 +28,7 @@ parameters: - FilterIterator - RecursiveCallbackFilterIterator explicitMixedInUnknownGenericNew: false + arrayFilter: false fileExtensions: - php checkAdvancedIsset: false @@ -205,6 +206,7 @@ parametersSchema: disableRuntimeReflectionProvider: bool(), skipCheckGenericClasses: listOf(string()), explicitMixedInUnknownGenericNew: bool(), + arrayFilter: bool(), ]) fileExtensions: listOf(string()) checkAdvancedIsset: bool()