mralaminahamed/secure-custom-fields-stubs

Secure Custom Fields (ACF-compatible) function and class declaration stubs for static analysis.

Maintainers

Package info

github.com/mralaminahamed/phpstan-secure-custom-fields-stubs

Language:Shell

pkg:composer/mralaminahamed/secure-custom-fields-stubs

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v6.8.9 2026-06-19 11:25 UTC

This package is auto-updated.

Last update: 2026-06-19 11:31:10 UTC


README

PHPStan / static-analysis stubs for the Secure Custom Fields WordPress plugin — the WordPress.org-maintained, ACF-compatible custom-fields plugin.

Use these when your plugin/theme calls Secure Custom Fields (or ACF-compatible) functions like get_field(), the_field(), acf_*(), have_rows(), etc., so PHPStan knows their signatures instead of reporting "undefined function".

Install

composer require --dev mralaminahamed/secure-custom-fields-stubs

Pin to a plugin version if you want stubs matching a specific release:

composer require --dev mralaminahamed/secure-custom-fields-stubs:6.8.9

Use with PHPStan

Reference the stub files in your phpstan.neon:

parameters:
    scanFiles:
        - vendor/mralaminahamed/secure-custom-fields-stubs/secure-custom-fields-stubs.stub
        - vendor/mralaminahamed/secure-custom-fields-stubs/secure-custom-fields-constants-stubs.stub

Versioning

Releases are tagged v<plugin-version> (e.g. v6.8.9) and track the upstream Secure Custom Fields releases. Each tag's stubs are generated from that exact plugin version.

Regenerate locally

composer install
bash bin/release-latest-versions.sh 5   # latest 5 stable versions
# or, against a source/ you placed manually:
bash bin/generate.sh

License

MIT. Stub declarations are generated from the GPL-licensed Secure Custom Fields plugin source using php-stubs/generator.