szepeviktor/phpstan-wordpress
PHPStan extension that enables static analysis of WordPress plugins and themes: loads WordPress stubs, adds dynamic return types, defines core constants, and validates apply_filters/do_action docblocks. Requires PHPStan 2.0+ and PHP 7.4+.
Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v2.0.3...v2.0.4
WP_CLI::error from earlyTerminatingMethodCalls config by @lipemat in https://github.com/szepeviktor/phpstan-wordpress/pull/284SAVEQUERIES from the dynamicConstantNames list by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/287WP_CLI from the dynamicConstantNames list by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/288WP_CLI::halt from earlyTerminatingMethodCalls by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/289STYLESHEETPATH and TEMPLATEPATH from bootstrap.php by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/290Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v2.0.2...v2.0.3
Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v2.0.1...v2.0.2
PHPStan 2.0
See #269
Many improvements. More errors spotted.
HookDocBlock as service by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/229One more global constant.
get_approved_comments function by @lipemat in https://github.com/szepeviktor/phpstan-wordpress/pull/211Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v1.3.2...v1.3.3
wp_die() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/204Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v1.3.1...v1.3.2
wp_die() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/201Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v1.3.0...v1.3.1
Thank you @IanDelMar
instanceof from wp_parse_url extension by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/183instanceof by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/184instanceof by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/185Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v1.2.0...v1.3.0
Thank you @IanDelMar
get_comment() return type extension by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/148$type instanceof ConstantStringType by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/150has_filter()/has_action() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/151instanceof by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/152term_exists() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/153get_sites() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/155get_sites() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/157wp_slash() and wp_unslash() by @IanDelMar in https://github.com/szepeviktor/phpstan-wordpress/pull/164Full Changelog: https://github.com/szepeviktor/phpstan-wordpress/compare/v1.1.7...v1.2.0
And many more improvements by @IanDelMar
Add type checking for hook callbacks in add_action and add_filter
Support more WordPress core functions.
Support WP 6.0 and wp_parse_url
Dedicated to @bart-jaskulski :)
Support PHPStan v1.6
Support is_wp_error()
Support 3 more functions
apply_filters calls@johnbillion added many new extensions.
How can I help you explore Laravel packages today?