PHPackages                             fwestdev/wp-stubs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. fwestdev/wp-stubs

ActiveLibrary

fwestdev/wp-stubs
=================

03

Since Sep 25Pushed 7mo agoCompare

[ Source](https://github.com/frankiewest/fw-wp-stubs)[ Packagist](https://packagist.org/packages/fwestdev/wp-stubs)[ RSS](/packages/fwestdev-wp-stubs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

WordPress Development Stubs
===========================

[](#wordpress-development-stubs)

A Composer package that provides PHP stubs for WordPress, WooCommerce, and Advanced Custom Fields (ACF) along with comprehensive PHP CodeSniffer rules for linting WordPress projects.

What's Included
---------------

[](#whats-included)

This package includes:

- **WordPress Core Stubs** (`php-stubs/wordpress-stubs`) - PHP stubs for WordPress 6.4+
- **WooCommerce Stubs** (`php-stubs/woocommerce-stubs`) - PHP stubs for WooCommerce 8.9+
- **ACF Pro Stubs** (`php-stubs/acf-pro-stubs`) - PHP stubs for Advanced Custom Fields 6.0+
- **WordPress Coding Standards** (`wp-coding-standards/wpcs`) - Official WordPress coding standards
- **PHP Compatibility** (`phpcompatibility/php-compatibility`) - PHP version compatibility checking
- **PHP CodeSniffer** (`squizlabs/php_codesniffer`) - The underlying code analysis tool

Installation
------------

[](#installation)

Install this package as a development dependency in your WordPress project:

```
composer require --dev fwestdev/wp-stubs:dev-main
```

Usage
-----

[](#usage)

### Running PHP CodeSniffer

[](#running-php-codesniffer)

After installation, you can run the linting tools using the provided Composer scripts:

```
# Check code for violations
composer run phpcs

# Automatically fix code violations (where possible)
composer run phpcbf
```

### Manual PHPCS Commands

[](#manual-phpcs-commands)

You can also run PHPCS directly with custom options:

```
# Check specific files or directories
vendor/bin/phpcs path/to/your/files

# Check with specific standards
vendor/bin/phpcs --standard=WordPress path/to/your/files

# Generate a detailed report
vendor/bin/phpcs --report=full path/to/your/files
```

### IDE Integration

[](#ide-integration)

The stubs will automatically be available to your IDE's intellisense and static analysis tools. Popular IDEs like PhpStorm, VS Code (with PHP extensions), and others will recognize WordPress, WooCommerce, and ACF functions without requiring the actual plugins to be installed.

Configuration
-------------

[](#configuration)

### Default Configuration

[](#default-configuration)

The package includes a pre-configured `phpcs.xml.dist` file that:

- Uses WordPress, WordPress-Extra, and WordPress-Docs coding standards
- Sets minimum PHP version to 8.0+
- Sets minimum WordPress version to 6.0+
- Includes custom rules for WooCommerce and ACF functions
- Excludes common directories (`vendor`, `node_modules`, `tests`, `build`, `dist`)
- Allows modern PHP syntax (short arrays, short ternary operators)

### Customizing for Your Project

[](#customizing-for-your-project)

To customize the configuration for your specific project:

1. Copy `phpcs.xml.dist` to `phpcs.xml`
2. Modify the rules as needed for your project
3. Update the prefixes in the `WordPress.NamingConventions.PrefixAllGlobals` rule
4. Adjust the text domain in the `WordPress.WP.I18n` rule

Example customization:

```

```

Benefits
--------

[](#benefits)

### For Development

[](#for-development)

- **Improved IDE Support**: Get full autocomplete and documentation for WordPress, WooCommerce, and ACF functions
- **Static Analysis**: Catch errors before runtime without requiring WordPress installation
- **Code Quality**: Enforce WordPress coding standards automatically
- **PHP Compatibility**: Ensure your code works across different PHP versions

### For CI/CD

[](#for-cicd)

Perfect for continuous integration pipelines:

```
# Example GitHub Actions workflow
- name: Install dependencies
  run: composer install --no-dev --optimize-autoloader

- name: Run PHPCS
  run: composer run phpcs
```

Supported Versions
------------------

[](#supported-versions)

- **PHP**: 8.0+
- **WordPress**: 6.0+
- **WooCommerce**: 8.9+
- **ACF Pro**: 6.0+

Contributing
------------

[](#contributing)

If you find issues with the configuration or have suggestions for improvements, please open an issue or submit a pull request.

License
-------

[](#license)

This package configuration is open source. Please refer to the individual stub packages for their respective licenses:

- [WordPress Stubs](https://github.com/php-stubs/wordpress-stubs)
- [WooCommerce Stubs](https://github.com/php-stubs/woocommerce-stubs)
- [ACF Pro Stubs](https://github.com/php-stubs/acf-pro-stubs)
- [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance44

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33022666?v=4)[Frankie West](/maintainers/frankiewest)[@frankiewest](https://github.com/frankiewest)

---

Top Contributors

[![frankiewest](https://avatars.githubusercontent.com/u/33022666?v=4)](https://github.com/frankiewest "frankiewest (4 commits)")[![fwestdev](https://avatars.githubusercontent.com/u/264845225?v=4)](https://github.com/fwestdev "fwestdev (3 commits)")

### Embed Badge

![Health badge](/badges/fwestdev-wp-stubs/health.svg)

```
[![Health](https://phpackages.com/badges/fwestdev-wp-stubs/health.svg)](https://phpackages.com/packages/fwestdev-wp-stubs)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
