Generic rules extensions for PHPStan
- You should not have
- If you have
symfony/var-dumper, you should not have
- You should use multibyte string function when it exists
We assume that PHPStan is already installed in your project.
To use this extension, require it in Composer:
composer require --dev korbeil/phpstan-generic-rules
If you also install phpstan/extension-installer then you're all set!
If you don't want to use
phpstan/extension-installer, include phpstan-strict-rules.neon in your project's PHPStan config:
includes: - vendor/korbeil/phpstan-generic-rules/extension.neon
You can configure this library with parameters:
parameters: generic_rules: debug_rule: false # To disable the debug rule mb_string_rules: false # To disable the mb_string rule