php-stubs/facetwp-stubs

FacetWP stubs for static analysis.

v4.4.1 2025-08-27 11:45 UTC

This package is auto-updated.

Last update: 2025-08-28 11:03:56 UTC


README

Packagist stats Packagist

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

  1. Run modern PHP version
  2. Clone this repository and cd into it
  3. 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 as source/facetwp.zip.
  4. Run ./release-latest-versions.sh This will automatically update facetwp-stubs.php per version, tag and commit it.