PHPackages                             middag-io/wordpress - 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. [API Development](/categories/api)
4. /
5. middag-io/wordpress

ActiveLibrary[API Development](/categories/api)

middag-io/wordpress
===================

MIDDAG WordPress adapter — persistence, REST, hooks, cron, Inertia frontend, and email for WordPress plugins

v0.3.1(today)01↑2900%[1 issues](https://github.com/middag-io/middag-php-wordpress/issues)Apache-2.0PHPPHP ^8.2CI passing

Since Jun 26Pushed todayCompare

[ Source](https://github.com/middag-io/middag-php-wordpress)[ Packagist](https://packagist.org/packages/middag-io/wordpress)[ RSS](/packages/middag-io-wordpress/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (10)Versions (4)Used By (0)

middag-io/wordpress
===================

[](#middag-iowordpress)

[![License: Apache 2.0](https://camo.githubusercontent.com/5b60841bea9e11d9d0b0950d690c9bc554e06385634056a7d5d62a15d1a4eabe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4170616368655f322e302d626c75652e737667)](https://opensource.org/licenses/Apache-2.0)

MIDDAG WordPress adapter — persistence, REST, hooks, cron, Inertia frontend, and email implementations of the [`middag-io/framework`](https://github.com/middag-io/middag-php-framework)contracts for WordPress.

> **License:** Apache-2.0.

What this package is
--------------------

[](#what-this-package-is)

`middag-io/wordpress` is the WordPress host adapter for the MIDDAG framework. It provides the WordPress-side implementations of the framework's adapter contracts: `$wpdb` connection and SQL dialect, REST controllers, hooks, wp-cron, config and user context, translation, Inertia frontend glue, `wp_mail` email, and native post/user persistence.

It binds the framework to a WordPress site. A WordPress plugin provides the composition root that wires it in.

### What it does not include

[](#what-it-does-not-include)

- No product features or governed MIDDAG domain capabilities (Item/EAV, QueryEngine, Audit/ActivityFeed, payments, CRM, and similar). Those are not part of this adapter.
- No dependency on any non-OSS MIDDAG package — the adapter builds only on the OSS framework and the host platform. Importing any non-OSS MIDDAG namespace or package is forbidden and enforced by `composer check:boundaries`.
- No bundled WordPress plugin. You wire the adapter into your own plugin.

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

[](#requirements)

- PHP `^8.2` (tested on 8.2, 8.3, 8.4)
- `ext-json`
- A WordPress site (the adapter targets WordPress runtime APIs)

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

[](#installation)

```
composer require middag-io/wordpress
```

This pulls `middag-io/framework` automatically, which in turn pulls [`middag-io/ui`](https://github.com/middag-io/middag-php-ui) — the framework's frontend toolkit that backs this adapter's Inertia frontend glue.

Host integration
----------------

[](#host-integration)

A WordPress plugin owns the composition root that wires the adapter in. Two obligations the host must satisfy at boot:

- **Register the host context.** Call `HostContext::set(new WpComponentContext($componentName, $assetVersion, $basePath))`so the adapter can resolve the component name, asset version, and base path (used for Inertia cache-busting and email-template path resolution).
- **Prime the logger.** Call `Middag\WordPress\Support\LogSupport::primeFromContainer($container)` once the DI container is built. The framework registers a channel-based `LoggerFactory`but no shared `Psr\Log\LoggerInterface`, so this wires the adapter's operational error sites (cron dispatch, email send/render) to the framework PSR-3 logger. Without priming, those sites fall back to PHP's `error_log()`.

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

[](#development)

```
git clone https://github.com/middag-io/middag-php-wordpress
cd middag-php-wordpress
composer install
```

Run the quality gates and the test suite:

```
composer check   # boundaries + PHPStan + PHP-CS-Fixer + Rector (dry-run)
composer test    # PHPUnit
```

Git hooks are configured automatically via `post-install-cmd`. The `commit-msg`hook enforces [Conventional Commits](https://www.conventionalcommits.org/).

### Working against a sibling framework checkout

[](#working-against-a-sibling-framework-checkout)

During development the adapter can resolve `middag-io/framework` from a sibling path repository (`../middag-php-framework`, symlinked) declared in `composer.json`. This is a **development-only** convenience for editing the framework and the adapter side by side. Published releases resolve the dependency through the normal Composer registry — the path repository has no effect on consumers.

### `composer.lock` is gitignored

[](#composerlock-is-gitignored)

Like a typical library, this repo does not commit `composer.lock`; consumers pin versions in their own application. Because the development setup may use a path repository for the framework, a **local** `composer.lock` can show path or dev references. That is expected local development state and **not** a defect in the released package.

See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full contributor setup, including the dependency-resolution notes.

### Commit format

[](#commit-format)

```
type(scope): description

Types: feat, fix, chore, docs, style, refactor, perf, test, build, ci, revert

```

### Releases

[](#releases)

Releases are managed by [release-please](https://github.com/googleapis/release-please). Conventional commits merged to `main` open a Release PR automatically.

License
-------

[](#license)

Licensed under the [Apache License 2.0](LICENSE). See [`NOTICE`](NOTICE) for attribution.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

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

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6410303?v=4)[Michael Douglas Meneses de Souza](/maintainers/michaelmeneses)[@michaelmeneses](https://github.com/michaelmeneses)

---

Top Contributors

[![michaelmeneses](https://avatars.githubusercontent.com/u/6410303?v=4)](https://github.com/michaelmeneses "michaelmeneses (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/middag-io-wordpress/health.svg)

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

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k37](/packages/civicrm-civicrm-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)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[drupal/core-recommended

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

6941.5M396](/packages/drupal-core-recommended)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[typo3/cms-core

TYPO3 CMS Core

3312.9M4.8k](/packages/typo3-cms-core)

PHPackages © 2026

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