spaze / phpstan-disallowed-calls

PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute & superglobal usages
MIT License
255 stars 17 forks source link

Can add more rules for the same call to have different messages for various params #232

Closed spaze closed 10 months ago

spaze commented 10 months ago

The rules have to be sorted from the most specific to the most general to have different messages for different params, see FunctionCallsParamsMessagesTest.

This makes sense mostly|only when you want to show a different message when various params have been disallowed. For which the new config options allowExceptParamsAnyValue and disallowParamsAnyValue (which is an alias for the former) have been added.

Close #155

spaze commented 10 months ago

Released in 3.0.0.