php-stubs/acf-pro-stubs

Advanced Custom Fields PRO stubs for static analysis.

Maintainers

👁 szepeviktor

Package info

github.com/php-stubs/acf-pro-stubs

pkg:composer/php-stubs/acf-pro-stubs

Statistics

Installs: 809 748

Dependents: 57

Suggesters: 0

Stars: 73

Open Issues: 3

v6.8.2 2026-06-01 12:08 UTC

Requires

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT b22454992d9651cd837439a2c1073a0955b68d94

wordpressstatic analysisacfPHPStan

This package is auto-updated.

Last update: 2026-06-02 08:49:19 UTC


README

It provides stub declarations for ACF Pro core functions, classes and interfaces. These stubs can help plugin and theme developers leverage static analysis tools like PHPStan.

The stubs are generated from wpengine/advanced-custom-fields-pro using php-stubs/generator.

Requirements

  • PHP ^8.0

Installation

Require this package as a development dependency with Composer.

composer require --dev php-stubs/acf-pro-stubs

Alternatively you may download acf-pro-stubs.php directly.

Versioning

This package is versioned to match the ACF Pro version from which the stubs are generated.

Updating stubs

  1. Run modern PHP version
  2. Clone this repository and cd into it
  3. Insert your ACF Pro license to auth.json in the project root
  4. Run composer install
  5. Install operating system level packages apt-get install xmlstarlet unzip git
  6. Run ./release-latest-versions.sh

This will update acf-pro-stubs.php per version, tag and commit.

After the script finishes, push the commits and tags manually:

git push --tags && git push

Pushing tags trigger automated GitHub releases.

Commits are intentionally left for a manual push so you can review before they go public.

To use the remote as the source of truth for existing tags (e.g. after a fresh clone or interrupted run):

REMOTE_CHECK=1 ACF_PRO_KEY="..." ./release-latest-versions.sh