{"repo":"johnbillion/wp-compat","free":true,"listed":false,"github":"https://github.com/johnbillion/wp-compat","clone":"git clone https://github.com/johnbillion/wp-compat.git","description":"PHPStan extension to help verify that your plugin or theme remains compatible with its minimum supported version of WordPress","language":"PHP","stars":25,"topics":["phpstan-extension","wordpress","phpstan"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"WPCompat WPCompat is a PHPStan extension which helps verify that your PHP code is compatible with a given version of WordPress. You can use it to help ensure that your plugin or theme remains compatible with its \"Requires at least\" version. It works by checking that any WordPress functions, class methods, actions, or filters that are in use were introduced prior to the minimum version of WordPress that your code supports. For example, if your plugin or theme supports WordPress 6.0 or higher but the get template hierarchy() function is used unconditionally, the extension will trigger an error because that function was only introduced in WordPress 6.1. If your code is correctly guarded with a valid function exists() or method exists() check then an error won't be triggered. Status Version information was last updated for WordPress 7.0. Requirements PHPStan 2.0 or higher PHP 7.4 or higher (tested up to PHP 8.4) Installation If you also install phpstan/extension-installer then you're all set! Manual installation If you don't want to use phpstan/extension-installer , include extension.neon in your project's PHPStan config: Configuration Themes If your style.css file contains a \"Requires at least\" header then wp-compat will read this header and use its value as the minimum supported WordPress version. There is no need for any additional config. Plugins If the name of your main plugin file matches its parent directory -- for example my-plugin/my-plugin.php -- then wp-compat will rea","default_branch":null,"files":null,"tree":[],"storefront":"/r/johnbillion","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/johnbillion/wp-compat/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}