Skip to content

Commit

Permalink
Exclude preg_quote from disallowed preg_* functions
Browse files Browse the repository at this point in the history
The new version of spaze/phpstan-disallowed-calls now detects callables, too, and `preg_quote` is used as a callable in `WinterIsComing::ruleEmail()`. composer/pcre doesn't have a wrapper for `preg_quote` possibly because it has quite a narrow types already.
  • Loading branch information
spaze committed Jan 10, 2025
1 parent b2a8752 commit eab35a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/disallowed-calls.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ parameters:
message: 'use methods from MichalSpacekCz\Http\Cookies'
-
function: 'preg_*()'
exclude:
- 'preg_quote()'
message: 'use the Preg class from composer/pcre'
disallowedStaticCalls:
-
Expand Down

0 comments on commit eab35a7

Please sign in to comment.