PHPackages                             ecotone/pdo-event-sourcing - 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. [Database &amp; ORM](/categories/database)
4. /
5. ecotone/pdo-event-sourcing

ActiveLibrary[Database &amp; ORM](/categories/database)

ecotone/pdo-event-sourcing
==========================

PDO-backed Event Store for Ecotone — event-sourced aggregates, event-sourced sagas (durable workflows), projections, upcasting, and streaming projections (Kafka, RabbitMQ) on PostgreSQL or MySQL.

1.316.1(3w ago)8180.0k—1.4%42Apache-2.0PHP

Since Mar 4Pushed 3w ago1 watchersCompare

[ Source](https://github.com/ecotoneframework/pdo-event-sourcing)[ Packagist](https://packagist.org/packages/ecotone/pdo-event-sourcing)[ Docs](https://docs.ecotone.tech/)[ GitHub Sponsors](https://github.com/dgafka)[ RSS](/packages/ecotone-pdo-event-sourcing/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (53)Versions (466)Used By (2)

This is Read Only Repository
============================

[](#this-is-read-only-repository)

To contribute make use of [Ecotone-Dev repository](https://github.com/ecotoneframework/ecotone-dev).

[ ![](https://github.com/ecotoneframework/ecotone-dev/raw/main/ecotone_small.png?raw=true)](https://ecotone.tech)

[![Github Actions](https://github.com/ecotoneFramework/ecotone-dev/actions/workflows/split-testing.yml/badge.svg)](https://github.com/ecotoneFramework/ecotone-dev/actions/workflows/split-testing.yml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/6d3fefd097526666ca1a13fdfa023a2d467c0098ea4f7d560fdea28943d80540/68747470733a2f2f706f7365722e707567782e6f72672f65636f746f6e652f65636f746f6e652f762f737461626c65)](https://packagist.org/packages/ecotone/ecotone)[![License](https://camo.githubusercontent.com/0c825aa97178c47064bc47ec45c9d4148075c860403419e45dbabcb9050d510c/68747470733a2f2f706f7365722e707567782e6f72672f65636f746f6e652f65636f746f6e652f6c6963656e7365)](https://packagist.org/packages/ecotone/ecotone)[![Total Downloads](https://camo.githubusercontent.com/2aec5363d172979490a34009950f2a61290dbb48965361bcbfda9aa28504f7e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65636f746f6e652f65636f746f6e65)](https://packagist.org/packages/ecotone/ecotone)[![PHP Version Require](https://camo.githubusercontent.com/b14eabeef1e6ee3612c8d62386855072c5fdad12affbbd987935c1397ebea214/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f65636f746f6e652f65636f746f6e652f7068702e737667)](https://packagist.org/packages/ecotone/ecotone)

**Ecotone is the PHP architecture layer that grows with your system — without rewrites.**

From `#[CommandHandler]` on day one, to event sourcing, sagas, outbox, and distributed messaging at scale — one package, same codebase, no forced migrations between growth stages. Declarative PHP 8 attributes on the classes you already have.

[Event Sourcing](https://ecotone.tech/event-sourcing) (PDO-backed Event Store)
------------------------------------------------------------------------------

[](#event-sourcing-pdo-backed-event-store)

Full Event Sourcing support for Ecotone, backed by your relational database via PDO. Event-sourced aggregates, projections, upcasting, and replay — all driven by attributes on your existing classes.

- **Event-sourced aggregates** via `#[EventSourcingAggregate]` — one attribute flips state-stored to event-sourced
- **Event-sourced sagas** via `#[EventSourcingSaga]` — [durable workflows](https://ecotone.tech/durable-workflows) where every state transition is a replayable event in your database
- **Projections** via `#[Projection]` — catch-up, reset, partition, and streaming variants
- **Event versioning and upcasting** — evolve your event schema without rewriting history
- **Streaming Projections** — process events in real-time with Message Broker transport
- **PostgreSQL and MySQL** supported out of the box

Same testing story as the rest of Ecotone: spin up the event store in memory with `EcotoneLite::bootstrapFlowTesting`, replay events into your projections, and assert on results — no external infrastructure required.

Visit [ecotone.tech](https://ecotone.tech) to learn more.

> Works with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing), [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing), or any PSR-11 framework via [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).

Getting started
---------------

[](#getting-started)

See the [quickstart guide](https://docs.ecotone.tech/quick-start) and [reference documentation](https://docs.ecotone.tech). Read more on the [Ecotone Blog](https://blog.ecotone.tech).

AI-Ready documentation
----------------------

[](#ai-ready-documentation)

Ecotone ships with MCP server, Agentic Skills, and LLMs.txt for any coding agent. See the [AI Integration Guide](https://docs.ecotone.tech/other/ai-integration).

Feature requests and issue reporting
------------------------------------

[](#feature-requests-and-issue-reporting)

Use [issue tracking system](https://github.com/ecotoneframework/ecotone-dev/issues) for new feature request and bugs. Please verify that it's not already reported by someone else.

Contact
-------

[](#contact)

If you want to talk or ask questions about Ecotone

- [**Twitter**](https://twitter.com/EcotonePHP)
- ****
- [**Community Channel**](https://discord.gg/GwM2BSuXeg)

Support Ecotone
---------------

[](#support-ecotone)

If you want to help building and improving Ecotone consider becoming a sponsor:

- [Sponsor Ecotone](https://github.com/sponsors/dgafka)
- [Contribute to Ecotone](https://github.com/ecotoneframework/ecotone-dev).

Tags
----

[](#tags)

PHP, Event Sourcing, Event Store, Projections, Event-Sourced Sagas, Durable Workflows, CQRS, DDD, PostgreSQL, MySQL, Ecotone

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance95

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 75.6% 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 ~4 days

Total

465

Last Release

22d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b6139b0dc15c550b22c76954ec6a96ac6c46b4c19b4a3c1e93c2146481e109e?d=identicon)[dgafka](/maintainers/dgafka)

---

Top Contributors

[![dgafka](https://avatars.githubusercontent.com/u/6060791?v=4)](https://github.com/dgafka "dgafka (487 commits)")[![ecotoneframework-bot](https://avatars.githubusercontent.com/u/174240763?v=4)](https://github.com/ecotoneframework-bot "ecotoneframework-bot (153 commits)")[![unixslayer](https://avatars.githubusercontent.com/u/1131246?v=4)](https://github.com/unixslayer "unixslayer (2 commits)")[![aheissenberger](https://avatars.githubusercontent.com/u/200095?v=4)](https://github.com/aheissenberger "aheissenberger (1 commits)")[![imper86](https://avatars.githubusercontent.com/u/16724155?v=4)](https://github.com/imper86 "imper86 (1 commits)")

---

Tags

cqrsdddevent-sourcinglaravelphpsymfonymysqlpostgresqlpdodddevent sourcingevent storecqrsecotoneprojectionsdurable-workflowsevent-sourced-saga

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ecotone-pdo-event-sourcing/health.svg)

```
[![Health](https://phpackages.com/badges/ecotone-pdo-event-sourcing/health.svg)](https://phpackages.com/packages/ecotone-pdo-event-sourcing)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k605.0M6.8k](/packages/doctrine-dbal)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[nette/database

💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.

5687.0M262](/packages/nette-database)[dibi/dibi

Dibi is Database Abstraction Library for PHP

5014.0M134](/packages/dibi-dibi)[aura/sql

A PDO extension that provides lazy connections, array quoting, query profiling, value binding, and convenience methods for common fetch styles. Because it extends PDO, existing code that uses PDO can use this without any changes to the existing code.

5892.7M56](/packages/aura-sql)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4883.1M39](/packages/aura-sqlquery)

PHPackages © 2026

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