merlindiavova / fix-wordpress-stubs
Fix WordPress stubs for PHP Stubs
Requires
- php: ^7.3
Requires (Dev)
- amesplash/php-coding-standard: dev-master
- composer/composer: *
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0
- jakub-onderka/php-parallel-lint: ^1.0
- phan/phan: ^2.4
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.12.8
- squizlabs/php_codesniffer: ^3.5
- vimeo/psalm: ^3.8
This package is not auto-updated.
Last update: 2024-11-05 16:50:32 UTC
README
When using static analysis tools to analyse your wordpress app or site, you generally need WordPress function stubs. These can be provided by php-stubs/wordpress-stubs or szepeviktor/phpstan-wordpress. Although these do a great job in providing the function stubs you may still run into some issues with duplicated function stubs. This simple package will automatically remove and fix other issues so your analysis toosl can just run.
Usage
First install this package via compsoer
$ composer require --dev merlidiavova/fix-wordpress-stubs
Next we need to composer to run a the FixStubs.php
script on update
{
"scripts": {
"post-update-cmd": [
"MerlinDiavova\\WordPress\\FixStubs::run"
]
}
}
Thats it, now when you run composer update
or composer install
the script will automatically run and fix the wordpress stubs provided by php-stubs/wordpress-stubs and szepeviktor/phpstan-wordpress