php-stubs/wordpress-tests-stubs

WordPress Tests function and class declaration stubs for static analysis.

Maintainers

👁 szepeviktor

Package info

github.com/php-stubs/wordpress-tests-stubs

pkg:composer/php-stubs/wordpress-tests-stubs

Statistics

Installs: 1 657 914

Dependents: 29

Suggesters: 0

Stars: 5

Open Issues: 0

v7.0.0 2026-05-25 08:19 UTC

Requires

None

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 5745979d58aebec7e7e659e9ffaf0a1b94785442

wordpressstatic analysisPHPStan

This package is auto-updated.

Last update: 2026-06-25 08:49:05 UTC


README

This package provides stub declarations for the WordPress Core Test Suite functions, classes and interfaces.

These stubs can help plugin and theme developers leverage static analysis tools like PHPStan, when writing tests for WordPress plugins, themes, and core.

Stubs are generated directly from the source using giacocorsiglia/stubs-generator.

Requirements

  • PHP >=7.4

Installation

Require this package as a development dependency with Composer.

composer require --dev php-stubs/wordpress-tests-stubs

Alternatively you may download wordpress-tests-stubs.php directly.

Usage in PHPStan

Include all stubs in PHPStan configuration file.

parameters:
 scanFiles:
 - %rootDir%/../../php-stubs/wordpress-stubs/wordpress-stubs.php
 - %rootDir%/../../php-stubs/wordpress-tests-stubs/wordpress-tests-stubs.php