Skip to content

Commit 36dde49

Browse files
committed
[BE] Check vprintf/vsprintf arguments against placeholder count
1 parent 6703fce commit 36dde49

File tree

5 files changed

+2
-10
lines changed

5 files changed

+2
-10
lines changed

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Major new features 🚀
2121
* Check preg_quote delimiter sanity (level 0) ([#3252](https://github.com/phpstan/phpstan-src/pull/3252)), #11338, thanks @staabm!
2222
* MagicConstantContextRule (level 0) ([#2741](https://github.com/phpstan/phpstan-src/pull/2741)), #10099, thanks @staabm!
2323
* MissingMagicSerializationMethodsRule (level 0) ([#1711](https://github.com/phpstan/phpstan-src/pull/1711)), #7482, thanks @staabm!
24+
* Check vprintf/vsprintf arguments against placeholder count (level 0) ([#3126](https://github.com/phpstan/phpstan-src/pull/3126)), thanks @staabm!
2425
* Report useless return values of function calls like `var_export` without `$return=true` (level 0) ([#3225](https://github.com/phpstan/phpstan-src/pull/3225)), #11320, thanks @staabm!
2526
* Rule for `call_user_func()` (level 5) ([#2479](https://github.com/phpstan/phpstan-src/pull/2479)), thanks @staabm!
2627
* Check array functions which require stringish values (level 5) ([#3132](https://github.com/phpstan/phpstan-src/pull/3132)), #11141, #5848, #3694, #11111, thanks @schlndh!
@@ -87,7 +88,6 @@ Bleeding edge (TODO move to other sections)
8788
* CallToConstructorStatementWithoutSideEffectsRule - report class with no constructor (https://github.com/phpstan/phpstan-src/commit/b116d25a6e4ba6c09f59af6569d9e6f6fd20aff4)
8889
* Check if required file exists ([#3294](https://github.com/phpstan/phpstan-src/pull/3294)), #3397, thanks @Bellangelo!
8990
* Check `@param-immediately-invoked-callable` and `@param-later-invoked-callable` (https://github.com/phpstan/phpstan-src/commit/580a6add422f4e34191df9e7a77ba1655e914bda), #10932
90-
* Check vprintf/vsprintf arguments against placeholder count ([#3126](https://github.com/phpstan/phpstan-src/pull/3126)), thanks @staabm!
9191

9292
Improvements 🔧
9393
=====================

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ parameters:
1313
alwaysTrueAlwaysReported: true
1414
disableUnreachableBranchesRules: true
1515
pure: true
16-
printfArrayParameters: true
1716
requireFileExists: true

conf/config.level0.neon

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ conditionalTags:
88
phpstan.rules.rule: %featureToggles.readOnlyByPhpDoc%
99
PHPStan\Rules\Properties\UninitializedPropertyRule:
1010
phpstan.rules.rule: %checkUninitializedProperties%
11-
PHPStan\Rules\Functions\PrintfArrayParametersRule:
12-
phpstan.rules.rule: %featureToggles.printfArrayParameters%
1311
PHPStan\Rules\Keywords\RequireFileExistsRule:
1412
phpstan.rules.rule: %featureToggles.requireFileExists%
1513

@@ -72,6 +70,7 @@ rules:
7270
- PHPStan\Rules\Functions\InnerFunctionRule
7371
- PHPStan\Rules\Functions\InvalidLexicalVariablesInClosureUseRule
7472
- PHPStan\Rules\Functions\ParamAttributesRule
73+
- PHPStan\Rules\Functions\PrintfArrayParametersRule
7574
- PHPStan\Rules\Functions\PrintfParametersRule
7675
- PHPStan\Rules\Functions\RedefinedParametersRule
7776
- PHPStan\Rules\Functions\ReturnNullsafeByRefRule
@@ -257,10 +256,6 @@ services:
257256
arguments:
258257
additionalConstructors: %additionalConstructors%
259258

260-
261-
-
262-
class: PHPStan\Rules\Functions\PrintfArrayParametersRule
263-
264259
-
265260
class: PHPStan\Rules\Keywords\RequireFileExistsRule
266261
arguments:

conf/config.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ parameters:
3535
disableUnreachableBranchesRules: false
3636
stricterFunctionMap: false
3737
pure: false
38-
printfArrayParameters: false
3938
requireFileExists: false
4039
fileExtensions:
4140
- php

conf/parametersSchema.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ parametersSchema:
4141
disableUnreachableBranchesRules: bool()
4242
stricterFunctionMap: bool()
4343
pure: bool()
44-
printfArrayParameters: bool()
4544
requireFileExists: bool()
4645
])
4746
fileExtensions: listOf(string())

0 commit comments

Comments
 (0)