php-stubs / facetwp-stubs
FacetWP stubs for static analysis.
v4.4.1
2025-08-27 11:45 UTC
Requires
- php-stubs/wordpress-stubs: ^4.7 || ^5.0 || ^6.0
Requires (Dev)
- php: ~7.1 || ^8.0
- php-stubs/generator: ^0.8
- phpdocumentor/reflection-docblock: ^5.3
Suggests
- symfony/polyfill-php73: Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
- szepeviktor/phpstan-wordpress: WordPress extensions for PHPStan
This package is auto-updated.
Last update: 2025-08-28 11:03:56 UTC
README
It provides stub declarations for FacetWP core functions, classes and interfaces. These stubs can help plugin and theme developers leverage static analysis tools like PHPStan.
The stubs are generated from source code manually placed in source/facetwp
using php-stubs/generator.
The changelog can be found in FacetWP's Help Center.
Requirements
- PHP ^8.0
Installation
Require this package as a development dependency with Composer.
composer require --dev php-stubs/facetwp-stubs
Alternatively you may download facetwp-stubs.php
directly.
Versioning
This package is versioned to match the FacetWP version from which the stubs are generated.
Updating stubs
- Run modern PHP version
- Clone this repository and
cd
into it - Download the latest source from your FacetWP account and extract the zip in
source/facetwp
directory. You can also download the zip and save it assource/facetwp.zip
. - Run
./release-latest-versions.sh
This will automatically updatefacetwp-stubs.php
per version, tag and commit it.