Download the PHP package apermo/phpstan-wordpress-rules without Composer
On this page you can find all versions of the php package apermo/phpstan-wordpress-rules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download apermo/phpstan-wordpress-rules
More information about apermo/phpstan-wordpress-rules
Files in apermo/phpstan-wordpress-rules
Download apermo/phpstan-wordpress-rules
More information about apermo/phpstan-wordpress-rules
Files in apermo/phpstan-wordpress-rules
Vendor apermo
Package phpstan-wordpress-rules
Short Description Custom PHPStan rules for WordPress projects by Apermo.
License MIT
Homepage https://github.com/apermo/apermo-phpstan-wordpress-rules
Package phpstan-wordpress-rules
Short Description Custom PHPStan rules for WordPress projects by Apermo.
License MIT
Homepage https://github.com/apermo/apermo-phpstan-wordpress-rules
Please rate this library. Is it a good library?
Informations about the package phpstan-wordpress-rules
Apermo PHPStan WordPress Rules
Custom PHPStan rules for WordPress projects. Provides a unified static analysis configuration and custom rules across all Apermo projects.
Requirements
- PHP 8.1+
- PHPStan 2.0+
Installation
If you use phpstan/extension-installer, the rules are registered automatically.
Manual Registration
Add to your phpstan.neon:
What's Included
Bundled Extensions
This package automatically includes:
Custom Rules
| Rule | Category | What it detects |
|---|---|---|
| DisallowQueryPostsRule | wp-api | query_posts() usage |
| PostTypeNameLengthRule | wp-api | register_post_type() name > 20 chars |
| TaxonomyNameLengthRule | wp-api | register_taxonomy() name > 32 chars |
| TransientExpirationRule | wp-api | set_transient() without expiration |
| RemoteRequestTimeoutRule | wp-api | wp_remote_* without explicit timeout |
| PreSerializedDataRule | data-integrity | Pre-serialized data in WP storage functions |
| PreEncodedJsonDataRule | data-integrity | Pre-encoded JSON in WP storage functions |
| NoDynamicCodeExecutionRule | security | create_function(), assert() with string, preg_replace() with /e |
| NoEvalRule | security | eval() usage |
| UnsafeUnserializeRule | security | unserialize() without allowed_classes |
| NoHtmlDomParsingRule | code-quality | DOMDocument::loadHTML, tidy functions, Masterminds\HTML5 |
| NoConcatenationInTranslationRule | i18n | String concatenation inside __(), _e(), etc. |
| NoBlanketSuppressionRule | code-quality | phpcs:disable/phpcs:ignore/@phpstan-ignore without specific rules |
Development
Setup
Running Tests
Static Analysis
Coding Standards
License
MIT — see LICENSE for details.
All versions of phpstan-wordpress-rules with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
phpstan/phpstan Version ^2.0
phpstan/phpstan-deprecation-rules Version ^2.0
phpstan/phpstan-strict-rules Version ^2.0
swissspidy/phpstan-no-private Version ^1.0
szepeviktor/phpstan-wordpress Version ^2.0
phpstan/phpstan Version ^2.0
phpstan/phpstan-deprecation-rules Version ^2.0
phpstan/phpstan-strict-rules Version ^2.0
swissspidy/phpstan-no-private Version ^1.0
szepeviktor/phpstan-wordpress Version ^2.0
The package apermo/phpstan-wordpress-rules contains the following files
Loading the files please wait ...