Add PHPStan using apermo/phpstan-wordpress-rules.
Once PR #28 is merged (v0.2.0), this package bundles everything:
phpstan/phpstan-strict-rules
szepeviktor/phpstan-wordpress (WP stubs)
phpstan/phpstan-deprecation-rules
- 13 custom WordPress rules (security, i18n, WP API misuse, code quality)
Single dependency
{
"require-dev": {
"apermo/phpstan-wordpress-rules": "^0.2"
}
}
All extensions auto-register via phpstan/extension-installer.
Configuration (phpstan.neon)
parameters:
level: 6
paths:
- apermo-adminbar.php
- classes
That's it — the Apermo package handles the rest (strict rules config, WP stubs, custom rules).
Tasks
Add PHPStan using apermo/phpstan-wordpress-rules.
Once PR #28 is merged (v0.2.0), this package bundles everything:
phpstan/phpstan-strict-rulesszepeviktor/phpstan-wordpress(WP stubs)phpstan/phpstan-deprecation-rulesSingle dependency
{ "require-dev": { "apermo/phpstan-wordpress-rules": "^0.2" } }All extensions auto-register via
phpstan/extension-installer.Configuration (
phpstan.neon)That's it — the Apermo package handles the rest (strict rules config, WP stubs, custom rules).
Tasks
apermo/phpstan-wordpress-rules^0.2 as dev dependencyphpstan/extension-installerto allowed Composer pluginsphpstan.neon(level 6, paths only)"analyse": "phpstan analyse"to Composer scripts