phpstan-wordpress icon indicating copy to clipboard operation
phpstan-wordpress copied to clipboard

WordPress extensions for PHPStan ⛏️

Results 30 phpstan-wordpress issues
Sort by recently updated
recently updated
newest added

From https://github.com/szepeviktor/phpstan-wordpress/pull/227#issuecomment-2197450983

`WPINC` is not overridable but often used to include core files for functions such as `fetch_feed()`

### Description This pull request syncs the 2.x branch with the master branch and removes extensions whose functionality has already been implemented or is about to be implemented by [php-stubs/wordpress-stubs](https://github.com/php-stubs/wordpress-stubs),...

Following PHPStan update 1.12.1, there is a new rule and error showing up when running it (with bleeding edge): `Path in require_once() "1wp-admin/includes/plugin-install.php" is not a file or it does...

I was just experimenting with migrating a project from PHPStan level 9 to 10, and found a lot of instances of `mixed` types. I thought I'd open a tracking issue...

Hello there, I just noticed in `vendor/szepeviktor/phpstan-wordpress/bootstrap.php` that the constants that describe the paths are incorrect set in this stubs library. ```php define('WP_PLUGIN_DIR', './'); define('WPMU_PLUGIN_DIR', './'); define('WP_LANG_DIR', './'); define('WP_CONTENT_DIR', './');...

- false - true - `\_WP_Dependency` depending on the second parameter https://developer.wordpress.org/reference/classes/wp_dependencies/query/

good first issue

Would it be possible to add the following constants to the [bootstrap file](https://github.com/szepeviktor/phpstan-wordpress/blob/2.x/bootstrap.php)? i know the paths are present, but URLs are useful for enqueued scripts etc * WP_CONTENT_URL *...

Allows rules to be disabled. Rules are enabled by default.