Skip to content

Commit f3b7190

Browse files
committed
[BE] Check array functions which require stringish values
1 parent 8c10b73 commit f3b7190

File tree

5 files changed

+4
-17
lines changed

5 files changed

+4
-17
lines changed

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Major new features 🚀
1919
* Check that each trait is used and analysed at least once (level 4) (https://github.com/phpstan/phpstan-src/commit/c4d05276fb8605d6ac20acbe1cc5df31cd6c10b0)
2020
* Check preg_quote delimiter sanity (level 0) ([#3252](https://github.com/phpstan/phpstan-src/pull/3252)), #11338, thanks @staabm!
2121
* Rule for `call_user_func()` (level 5) ([#2479](https://github.com/phpstan/phpstan-src/pull/2479)), thanks @staabm!
22+
* Check array functions which require stringish values (level 5) ([#3132](https://github.com/phpstan/phpstan-src/pull/3132)), #11141, #5848, #3694, #11111, thanks @schlndh!
2223
* ArrayUnpackingRule (level 3) ([#856](https://github.com/phpstan/phpstan-src/pull/856)), thanks @canvural!
2324
* Check unresolvable parameters (level 5) ([#1319](https://github.com/phpstan/phpstan-src/pull/1319)), thanks @rvanvelzen!
2425
* Enforce `@no-named-arguments` (level 5) (https://github.com/phpstan/phpstan-src/commit/74ba8c23696948f2647d880df72f375346f41010), #5968
@@ -86,7 +87,6 @@ Bleeding edge (TODO move to other sections)
8687
* Check `@param-immediately-invoked-callable` and `@param-later-invoked-callable` (https://github.com/phpstan/phpstan-src/commit/580a6add422f4e34191df9e7a77ba1655e914bda), #10932
8788
* Report useless return values of function calls like `var_export` without `$return=true` ([#3225](https://github.com/phpstan/phpstan-src/pull/3225)), #11320, thanks @staabm!
8889
* Check vprintf/vsprintf arguments against placeholder count ([#3126](https://github.com/phpstan/phpstan-src/pull/3126)), thanks @staabm!
89-
* Check array functions which require stringish values ([#3132](https://github.com/phpstan/phpstan-src/pull/3132)), #11141, #5848, #3694, #11111, thanks @schlndh!
9090

9191
Improvements 🔧
9292
=====================

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ parameters:
1818
propertyVariance: true
1919
magicConstantOutOfContext: true
2020
pure: true
21-
checkParameterCastableToStringFunctions: true
2221
uselessReturnValue: true
2322
printfArrayParameters: true
2423
tooWidePropertyType: true

conf/config.level5.neon

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ conditionalTags:
1010
phpstan.rules.rule: %featureToggles.arrayFilter%
1111
PHPStan\Rules\Functions\ArrayValuesRule:
1212
phpstan.rules.rule: %featureToggles.arrayValues%
13-
PHPStan\Rules\Functions\ParameterCastableToStringRule:
14-
phpstan.rules.rule: %featureToggles.checkParameterCastableToStringFunctions%
15-
PHPStan\Rules\Functions\ImplodeParameterCastableToStringRule:
16-
phpstan.rules.rule: %featureToggles.checkParameterCastableToStringFunctions%
17-
PHPStan\Rules\Functions\SortParameterCastableToStringRule:
18-
phpstan.rules.rule: %featureToggles.checkParameterCastableToStringFunctions%
1913

2014
rules:
2115
- PHPStan\Rules\DateTimeInstantiationRule
2216
- PHPStan\Rules\Functions\CallUserFuncRule
17+
- PHPStan\Rules\Functions\ParameterCastableToStringRule
18+
- PHPStan\Rules\Functions\ImplodeParameterCastableToStringRule
19+
- PHPStan\Rules\Functions\SortParameterCastableToStringRule
2320

2421
services:
2522
-
@@ -40,10 +37,3 @@ services:
4037
arguments:
4138
treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
4239
treatPhpDocTypesAsCertainTip: %tips.treatPhpDocTypesAsCertain%
43-
44-
-
45-
class: PHPStan\Rules\Functions\ParameterCastableToStringRule
46-
-
47-
class: PHPStan\Rules\Functions\ImplodeParameterCastableToStringRule
48-
-
49-
class: PHPStan\Rules\Functions\SortParameterCastableToStringRule

conf/config.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ parameters:
4040
stricterFunctionMap: false
4141
magicConstantOutOfContext: false
4242
pure: false
43-
checkParameterCastableToStringFunctions: false
4443
uselessReturnValue: false
4544
printfArrayParameters: false
4645
requireFileExists: false

conf/parametersSchema.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ parametersSchema:
4646
stricterFunctionMap: bool()
4747
magicConstantOutOfContext: bool()
4848
pure: bool()
49-
checkParameterCastableToStringFunctions: bool()
5049
uselessReturnValue: bool()
5150
printfArrayParameters: bool()
5251
tooWidePropertyType: bool()

0 commit comments

Comments
 (0)