PHPackages                             patchlevel/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. patchlevel/event-sourcing

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

patchlevel/event-sourcing
=========================

A lightweight but also all-inclusive event sourcing library with a focus on developer experience

3.19.1(2mo ago)202332.6k↓46.4%13[12 issues](https://github.com/patchlevel/event-sourcing/issues)[12 PRs](https://github.com/patchlevel/event-sourcing/pulls)6MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Mar 15Pushed 3d ago6 watchersCompare

[ Source](https://github.com/patchlevel/event-sourcing)[ Packagist](https://packagist.org/packages/patchlevel/event-sourcing)[ Docs](https://event-sourcing.patchlevel.io)[ RSS](/packages/patchlevel-event-sourcing/feed)WikiDiscussions 3.20.x Synced 1w ago

READMEChangelog (10)Dependencies (52)Versions (135)Used By (6)

[![Mutation testing badge](https://camo.githubusercontent.com/60a9336c2cda28ba0c7d33047c7077b14fc6781ea0454f222cbf910ef944b445/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324670617463686c6576656c2532466576656e742d736f757263696e67253246332e31312e78)](https://dashboard.stryker-mutator.io/reports/github.com/patchlevel/event-sourcing/3.11.x)[![Type Coverage](https://camo.githubusercontent.com/94e5766b49f2f4dd9f6778165b2366b6322d4a306e01fdf32f13fd0c17cfb3e0/68747470733a2f2f73686570686572642e6465762f6769746875622f70617463686c6576656c2f6576656e742d736f757263696e672f636f7665726167652e737667)](https://shepherd.dev/github/patchlevel/event-sourcing)[![Latest Stable Version](https://camo.githubusercontent.com/03ec7ab9307d291fa37ce00a75a423a79809cf3b8acdbf2116a1dfd58f9749ca/68747470733a2f2f706f7365722e707567782e6f72672f70617463686c6576656c2f6576656e742d736f757263696e672f76)](//packagist.org/packages/patchlevel/event-sourcing)[![License](https://camo.githubusercontent.com/37da1d3491ed224d49146b0f08c37dd285293384ad567a2466163dd3e3b6375e/68747470733a2f2f706f7365722e707567782e6f72672f70617463686c6576656c2f6576656e742d736f757263696e672f6c6963656e7365)](//packagist.org/packages/patchlevel/event-sourcing)

Event-Sourcing
==============

[](#event-sourcing)

An event sourcing library, complete with all the essential features, powered by the reliable Doctrine ecosystem and focused on developer experience.

Features
--------

[](#features)

- Everything is included in the package for event sourcing
- Based on [doctrine dbal](https://github.com/doctrine/dbal) and their ecosystem
- Developer experience oriented and fully typed
- Automatic [snapshot](https://patchlevel.github.io/event-sourcing-docs/latest/snapshots/)-system to boost your performance
- [Split](https://patchlevel.github.io/event-sourcing-docs/latest/split_stream/) big aggregates into multiple streams
- Versioned and managed lifecycle of [subscriptions](https://patchlevel.github.io/event-sourcing-docs/latest/subscription/) like projections and processors
- Safe usage of [Personal Data](https://patchlevel.github.io/event-sourcing-docs/latest/personal_data/) with crypto-shredding
- Smooth [upcasting](https://patchlevel.github.io/event-sourcing-docs/latest/upcasting/) of old events
- Simple setup with [scheme management](https://patchlevel.github.io/event-sourcing-docs/latest/store/)and [doctrine migration](https://patchlevel.github.io/event-sourcing-docs/latest/store/)
- Built in [cli commands](https://patchlevel.github.io/event-sourcing-docs/latest/cli/)with [symfony](https://symfony.com/)
- and much more...

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

[](#installation)

```
composer require patchlevel/event-sourcing
```

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

[](#documentation)

- Latest [Docs](https://event-sourcing.patchlevel.io/latest/getting_started/)
- Related [Blog](https://patchlevel.de/blog)

Integration
-----------

[](#integration)

- [Symfony](https://github.com/patchlevel/event-sourcing-bundle)
- [Psalm](https://github.com/patchlevel/event-sourcing-psalm-plugin)

Supported databases
-------------------

[](#supported-databases)

We officially only support the databases and versions listed in the table, as these are tested in the CI. Since the package is based on doctrine dbal, other databases such as OracleDB and MSSQL may also work. But we can only really support the databases if we can also automatically ensure that they don't break due to changes.

Tip

We recommend using PostgreSQL.

DatabaseVersionPostgreSQL14.20, 15.15, 16.11, 17.7, 18.1MariaDB10.6, 10.11, 11.4, 11.8, 12.1MySQL8.0, 8.4, 9.5SQLite3.xSponsors
--------

[](#sponsors)

[![blackfire](https://private-user-images.githubusercontent.com/470138/252316849-d00b7459-23b7-431b-80b4-93cfc1b66216.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODA3OTk4MjcsIm5iZiI6MTc4MDc5OTUyNywicGF0aCI6Ii80NzAxMzgvMjUyMzE2ODQ5LWQwMGI3NDU5LTIzYjctNDMxYi04MGI0LTkzY2ZjMWI2NjIxNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYwN1QwMjMyMDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDgyYjk5YmY2M2UyZTI2NmJkZDI5ZjIxZDc0OGY1ZGUyNTZlYzAyMTc0Njk0MzY3M2U3ZmVhZmVmYjI3ZjE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.RQu-3KVECT83TrMp2WVu4uyECcsb1cPJSl9rroEGMjM)](https://www.blackfire.io)

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance93

Actively maintained with recent releases

Popularity53

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57.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 ~16 days

Total

117

Last Release

11d ago

Major Versions

2.3.1 → 3.0.0-beta72024-01-03

2.3.2 → 3.0.0-rc82024-03-27

2.3.x-dev → 3.0.x-dev2024-10-01

2.0.x-dev → 3.5.02024-10-17

3.19.x-dev → 4.0.x-dev2026-04-24

PHP version history (9 changes)1.0.0-alphaPHP ^7.4|^8.0

1.0.1PHP ~7.4.0|~8.0.0

1.1.0PHP ~8.0.0|~8.1.0

2.0.0-beta5PHP ~8.1.0

2.1.0-beta2PHP ~8.1.0 || ~8.2.0

2.3.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.8.x-devPHP ~8.2.0 || ~8.3.0

3.10.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

3.14.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/470138?v=4)[David Badura](/maintainers/DavidBadura)[@DavidBadura](https://github.com/DavidBadura)

![](https://avatars.githubusercontent.com/u/2017762?v=4)[Daniel Badura](/maintainers/DanielBadura)[@DanielBadura](https://github.com/DanielBadura)

---

Top Contributors

[![DavidBadura](https://avatars.githubusercontent.com/u/470138?v=4)](https://github.com/DavidBadura "DavidBadura (1491 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (551 commits)")[![DanielBadura](https://avatars.githubusercontent.com/u/2017762?v=4)](https://github.com/DanielBadura "DanielBadura (493 commits)")[![llaville](https://avatars.githubusercontent.com/u/364342?v=4)](https://github.com/llaville "llaville (13 commits)")[![robinlehrmann](https://avatars.githubusercontent.com/u/8525833?v=4)](https://github.com/robinlehrmann "robinlehrmann (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![gzumba](https://avatars.githubusercontent.com/u/3403631?v=4)](https://github.com/gzumba "gzumba (5 commits)")[![Brammm](https://avatars.githubusercontent.com/u/851445?v=4)](https://github.com/Brammm "Brammm (3 commits)")[![icanhazstring](https://avatars.githubusercontent.com/u/883543?v=4)](https://github.com/icanhazstring "icanhazstring (3 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (3 commits)")[![fritz-gerneth](https://avatars.githubusercontent.com/u/1294731?v=4)](https://github.com/fritz-gerneth "fritz-gerneth (2 commits)")[![ergosarapu](https://avatars.githubusercontent.com/u/1115717?v=4)](https://github.com/ergosarapu "ergosarapu (2 commits)")[![wikando-ck](https://avatars.githubusercontent.com/u/73299324?v=4)](https://github.com/wikando-ck "wikando-ck (1 commits)")[![tolry](https://avatars.githubusercontent.com/u/259744?v=4)](https://github.com/tolry "tolry (1 commits)")[![ttomdewit](https://avatars.githubusercontent.com/u/2845400?v=4)](https://github.com/ttomdewit "ttomdewit (1 commits)")[![MarcoGiesen](https://avatars.githubusercontent.com/u/8974211?v=4)](https://github.com/MarcoGiesen "MarcoGiesen (1 commits)")

---

Tags

dbaldoctrinedomain-driven-designevent-sourcingphpeventsevent-drivenmessagesDomain Driven Designdddevent sourcingprocessorcqrsprojectionaggregatespatchlevelmessage-drivendcbdynamic-consistency-boundary

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)[sulu/sulu

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

1.3k1.4M195](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

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

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

562565.8k41](/packages/ecotone-ecotone)

PHPackages © 2026

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