php-stubs/acf-pro-stubs
PHP stubs for Advanced Custom Fields Pro, providing accurate function and class signatures so IDEs and static analysis tools like PHPStan and Psalm can offer autocompletion and type checking for ACF Pro APIs.
Architecture fit
php-stubs/wordpress-stubs and szepeviktor/phpstan-wordpress; it is not a replacement for either, and it does not pull WordPress stubs transitively.Integration feasibility
composer require --dev plus a single scanFiles (or stubFiles) entry in phpstan.neon. No application code changes, no runtime hooks, no migration script.Technical risk
get_field(), have_rows(), flexible content, block registration) returns mixed in most cases; stubs confirm existence and signatures but do not deliver meaningful type inference. Teams expecting deep typing will be disappointed.Key questions
szepeviktor/phpstan-wordpress already in the stack? If so, is ACF stub loading configured there or standalone?Stack fit
php-stubs/wordpress-stubs. Both should be present for a full WordPress surface.Migration path
Compatibility
^6.2 matching ACF 6.2.x); treat stub bumps as part of the ACF upgrade checklist.scanFiles for symbol discovery or stubFiles if overriding signatures; a misconfigured path fails silently and looks like the package "does nothing."Sequencing
php-stubs/acf-pro-stubs to require-dev pinned to the matching major.minor.phpstan.neon/psalm.xml and verify resolution with a deliberately wrong call.Maintenance
Support
Scaling
Failure modes
mixed; teams over-trust the gate and skip runtime validation for field access.Ramp-up
TPM recommendation Adopt as a low-cost, low-risk dev-tooling improvement if the team already runs static analysis; value is concentrated in IDE autocomplete and symbol existence, not deep type safety. Do not treat it as a runtime dependency or a substitute for functional testing of ACF field access. The deciding factor is not the package's quality (adequate) but whether the team will commit to version-sync discipline.
How can I help you explore Laravel packages today?