From 00a592942127144b2866bc2897662be5f7485dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Tue, 13 Feb 2024 19:07:14 +0100 Subject: [PATCH] Hardcode ENT_QUOTES as int 3 in disallowed-loose-calls.neon config 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. https://github.com/phpstan/phpstan-src/pull/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 https://github.com/phpstan/phpstan/issues/10223 --- disallowed-loose-calls.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disallowed-loose-calls.neon b/disallowed-loose-calls.neon index 3e51f05..630633d 100644 --- a/disallowed-loose-calls.neon +++ b/disallowed-loose-calls.neon @@ -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