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.
- PHP ^8.0
Require this package as a development dependency with Composer.
composer require --dev php-stubs/facetwp-stubs
Alternatively you may download facetwp-stubs.php
directly.
This package is versioned to match the FacetWP version from which the stubs are generated.
- 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.