PHPackages                             wppack/wppack - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wppack/wppack

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wppack/wppack
=============

Modern WordPress Component Library

1.x-dev(2mo ago)20MITPHPPHP ^8.2CI passing

Since Apr 24Pushed 2mo agoCompare

[ Source](https://github.com/wppack-io/wppack)[ Packagist](https://packagist.org/packages/wppack/wppack)[ RSS](/packages/wppack-wppack/feed)WikiDiscussions 1.x Synced today

READMEChangelogDependencies (42)Versions (2)Used By (0)

WPPack — Modern WordPress Component Library
===========================================

[](#wppack--modern-wordpress-component-library)

[![CI](https://camo.githubusercontent.com/1befda11d895f14ee90949404706e703323df7d4049b55ee3dcaf4b91f42d7ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f77707061636b2d696f2f77707061636b2f63692e796d6c3f6272616e63683d312e78)](https://github.com/wppack-io/wppack/actions/workflows/ci.yml)[![Codecov](https://camo.githubusercontent.com/8efbf3f1c8a5f23f3741ef73e8bf19ccedc4f2660e1468b250dcf80d7c1437a0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f77707061636b2d696f2f77707061636b)](https://codecov.io/gh/wppack-io/wppack)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/c2588b5670f2c910b8cc849ace22a22efda8956b7c2f797d11d2096bbfc7b1f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242342e737667)](https://php.net)[![WordPress](https://camo.githubusercontent.com/64babe529b54d28abac0e1bd2d50aad20cc7e96787fbc49998ee3221c4385896/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576f726450726573732d362e372532422d3231373539422e737667)](https://wordpress.org)

WPPack is a Symfony-inspired component library that brings modern PHP development practices to WordPress **without replacing it**. Adopt a single component or a composed stack — every package is independently testable, type-safe, PSR-\* compliant, and fully compatible with the WordPress plugin and theme ecosystem.

Why WPPack?
-----------

[](#why-wppack)

### For plugin and theme authors

[](#for-plugin-and-theme-authors)

- **Compatible with WordPress, not a rewrite of it.** WPPack wraps WordPress APIs; it never replaces them. `$wpdb`, `WP_Query`, hooks, REST controllers, WP-CLI commands, `wp_mail()`, and the object cache all keep working the way third-party plugins and themes expect. Our EventDispatcher dispatches through `$wp_filter`, our Cache wraps `wp_cache_*`, our Mailer calls `wp_mail()`. You can drop WPPack into a site with a dozen existing plugins and nothing breaks.
- **Adopt piece by piece — no bloat.** Each component is an independent Composer package focused on one concern. `composer require wppack/option`for type-safe options, `wppack/database` for a portable `$wpdb` replacement, `wppack/mailer` to swap in SES / SendGrid / Azure Communication without touching call sites. No DI container, no mailer, no hidden dependencies pulled in if you didn't ask for them. Most plugins adopt 2-3 packages, not all 58.
- **Type-safe WordPress with modern PHP attributes.** Declarative event listeners (`#[AsEventListener]`), option injection (`#[Option]`), and routing — backed by a DI container with autowiring and service auto-discovery. Type-safe wrappers over `$wpdb`, `WP_Query`, the Options API, Transients, and object cache follow PSR-3 / PSR-6 / PSR-11 / PSR-14 / PSR-16 / PSR-18 contracts, so they mock cleanly and swap cleanly. IDE autocomplete, PHPStan guarantees, and refactoring safety you can't get from WordPress core alone.
- **Quality you can depend on.** **PHPStan level 8** on 114k LOC of source, php-cs-fixer on PER Coding Style, 149k LOC of tests (1.31:1 test/production ratio), and a 16-job CI matrix — PHP 8.2 / 8.3 / 8.4 / 8.5 × mysql / sqlite / postgresql / legacy wpdb — green on every push. 122 interfaces and `declare(strict_types=1)` throughout.
- **Debug toolbar and profiler out of the box.** `composer require wppack/debug-plugin` activates a debug toolbar with 17 data collectors (database / cache / DI / events / HTTP / mail / REST / Ajax / shortcode / routing / memory / request). An intermediate page on every redirect preserves post-redirect profiling data. A drop-in catches fatal errors and uncaught exceptions *before* the DI container boots — no more white screen.

### For WordPress site operators

[](#for-wordpress-site-operators)

- **Commercial-grade infrastructure plugins, MIT licensed.** Every first-party plugin is engineered for production workloads and tested in the same 16-job CI matrix as the core components: Redis Object Cache, S3 Media Storage, Amazon SES Mailer, EventBridge Scheduler, CloudWatch Monitoring — plus SSO login plugins for SAML 2.0, OAuth 2.0 / OIDC, and WebAuthn / Passkey, and SCIM 2.0 provisioning for directory sync. Deploy only the ones you need.
- **Cloud-ready and multi-cloud.** 25 first-party bridges across AWS / GCP / Azure cover storage (S3 / GCS / Azure Blob), mail (SES / SendGrid / Azure Communication), cache (Redis / Valkey / DynamoDB / Memcached / APCu + ElastiCache IAM), queue (SQS), scheduler (EventBridge), and monitoring (CloudWatch / Cloudflare). Stateless by default with gone-away reconnect, OCC retry, and graceful fallbacks (SQS → synchronous, EventBridge → WP-Cron) — Lambda / Cloud Functions / Fargate just work. Swap providers per domain without touching application code.
- **Multi-engine database, pick per environment.** Write MySQL dialect; run on MySQL, SQLite, PostgreSQL, or Aurora DSQL unchanged thanks to an AST-based query translator. SQLite for local / CI speed, PostgreSQL or Aurora DSQL for production scale — no code changes. Native prepared statements on every engine, reader/writer affinity with read-your-own-writes semantics, transparent reconnect on `server has gone away`.
- **Observability baked in.** PSR-3 logger with a Monolog bridge, PSR-14 event dispatcher on top of the WordPress hook backend for APM integration, and a per-query slow-log threshold with structured, param-redacted context.

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

[](#installation)

Each component is an independent Composer package. Install only what you need.

```
# A single utility inside an existing plugin
composer require wppack/option

# A composed stack
composer require wppack/kernel wppack/dependency-injection wppack/event-dispatcher

# A ready-to-use WordPress plugin
composer require wppack/saml-login-plugin
```

**Composer-based installation is recommended for plugins as well.** A Composer install resolves the shared component dependency graph into `vendor/` once, instead of duplicating the same components inside every plugin bundled under `web/wp-content/plugins/`. That keeps your web-root footprint small and avoids version skew between plugins that share a dependency.

See [`docs/components/`](docs/components/) for the full catalogue of components and their package names, and [`docs/plugins/`](docs/plugins/) for distributable plugins.

Documentation
-------------

[](#documentation)

- [Architecture overview](docs/architecture/) — infrastructure, multi-cloud, and serverless design notes.
- [Component catalogue](docs/components/) — every package, its purpose, and its dependencies.
- [Plugins](docs/plugins/) — ready-to-install WordPress plugins built on top of the components.

Requirements
------------

[](#requirements)

- **PHP 8.2 or higher**
- **WordPress 6.7 or higher** — CI tests against WP 6.7 / 6.8 / 6.9 / 7.0 (beta/RC via `roots/wordpress-full`) across every supported DB engine.
    - WordPress 6.9+ required for PHP 8.5 compatibility.

Development
-----------

[](#development)

```
# Install dependencies
composer install

# Start backing services (MySQL, PostgreSQL, Redis, etc.)
docker compose up -d --wait

# Static analysis (PHPStan level 8)
vendor/bin/phpstan analyse

# Coding style (PER Coding Style)
vendor/bin/php-cs-fixer fix --dry-run --diff

# Tests (default: runs against MySQL via wpdb)
vendor/bin/phpunit

# Tests against a specific engine
DATABASE_DSN='sqlite:///tmp/wppack-test.db' vendor/bin/phpunit
DATABASE_DSN='pgsql://wppack:wppack@127.0.0.1:5433/wppack_test' vendor/bin/phpunit
```

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

[](#contributing)

The repository is in active design phase on the `1.x` branch. Backward compatibility is not preserved across commits; API changes, parameter reordering, and renames may happen at any time until a stable release is tagged.

See [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution process (bug reports, pull requests, review expectations) and [coding-standards.md](coding-standards.md) for code style, commit conventions, testing, and the checklists for adding new components or plugins.

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance86

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

70d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/578548?v=4)[TSURU](/maintainers/ttsuru)[@ttsuru](https://github.com/ttsuru)

---

Top Contributors

[![ttsuru](https://avatars.githubusercontent.com/u/578548?v=4)](https://github.com/ttsuru "ttsuru (1481 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wppack-wppack/health.svg)

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

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M419](/packages/drupal-core-recommended)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.1k](/packages/typo3-cms-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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