Repository navigation
PHPStan extension installer support
- Support for PHPStan's extension installer, more straightforward config (#9)
- Sample dangerous config (#10)
Migration to extension installer:
If you're not using the extension installer, you're fine with the configuration you already use and can continue using it as long as you wish.
If you're using the extension installer, the extension.neon where the classes are set up will be included automatically by PHPStan and you'll probably get "Multiple services found" when you'll run PHPStan. In that case you'd need to change the configuration slightly:
- Remove
Spaze\PHPStan\Rules\Disallowed\DisallowedHelperfrom yourphpstan.neon - Copy
forbiddenCallskeys and values fromSpaze\PHPStan\Rules\Disallowed\{Method,Static,Function}Callsdefinitions toparameters>disallowedMethodCalls(anddisallowedStaticCalls,disallowedFunctionCalls, respectively), can even put them in a new file (e.g.disallowed-calls.neon) which you can then include manually - Delete
Spaze\PHPStan\Rules\Disallowed\{Method,Static,Function}Callsdefinitions from yourphpstan.neonincluding the keys and values underarguments>forbiddenCalls
If you'd like to switch to using extension.neon even without using the extension installer, follow the steps above and manually include vendor/spaze/phpstan-disallowed-calls/extension.neon in your phpstan.neon.