kallookoo / wp-stubs
PHP stubs for the WordPress ecosystem
1.2.0
2026-11-02 16:48 UTC
Requires
None
Requires (Dev)
- php-stubs/woocommerce-stubs: >=11.0
- php-stubs/wordpress-globals: ^0.2.0
- php-stubs/wordpress-stubs: >=7.0
- php-stubs/wp-cli-stubs: dev-master
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-02 17:37:05 UTC
README
This repository uses the php-stubs to:
- Have all stubs registered within the stubs folder
- Have a single file with all stubs
Stub packages:
- php-stubs/wordpress-stubs
- php-stubs/wordpress-globals
- php-stubs/woocommerce-stubs
- php-stubs/wp-cli-stubs
Note
wordpress-globals is DEPRECATED but is still being kept for the time being.
Warning
The combined stubs.php file will be removed in a future major release. It only exists for PHPantom <=0.11.1; use the individual files in the stubs/ folder instead.
Usage in PHPantom (<=0.11.1)
- Install
composer require --dev kallookoo/wp-stubs
- Configure it so phpantom detects it
{
"autoload-dev": {
"files": ["vendor/kallookoo/wp-stubs/stubs.php"]
}
}
Or load only what you need
{
"autoload-dev": {
"files": ["vendor/kallookoo/wp-stubs/stubs/wordpress-stubs.php"]
}
}
- Update
Run composer update to refresh the stub package
Usage in PHPantom (> 0.11.1)
More info at:
- https://phpantom-dev.github.io/phpantom_lsp/prerelease/configuration/#stubs
- https://phpantom-dev.github.io/phpantom_lsp/prerelease/configuration/#editor-supplied-stubs
My recommendation if you use it regularly:
- Install it globally
composer global require --dev kallookoo/wp-stubs
- Configure PHPantom globally
[stubs] paths = ["COMPOSER_HOME/vendor/kallookoo/wp-stubs/stubs"]
Replace COMPOSER_HOME with the correct path.
composer config --global home
More info: https://getcomposer.org/doc/03-cli.md#composer_home