Skip to content

Commit

Permalink
Hardcode ENT_QUOTES as int 3 in disallowed-loose-calls.neon con…
Browse files Browse the repository at this point in the history
…fig (#250)

PHPStan 1.10.58 updated nette/di from v3.1.5 to v3.1.10 and possibly that's the reason why `::constant` is not accepted anymore.
phpstan/phpstan-src#2907

The config file is tested so even if the value of the constant would change, however unlikely, it would be detected by failing tests.

Close #249

Introduced in #222 as a fix for phpstan/phpstan#10223
  • Loading branch information
spaze committed Feb 13, 2024
2 parents fe56632 + 00a5929 commit 6d49c14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion disallowed-loose-calls.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ parameters:
function: 'htmlspecialchars()'
message: 'set the $flags parameter to `ENT_QUOTES` to also convert single quotes to entities to prevent some HTML injection bugs'
allowParamFlagsAnywhere:
2: ::constant(ENT_QUOTES)
2: 3 # ENT_QUOTES

0 comments on commit 6d49c14

Please sign in to comment.