PHPackages                             phauthentic/event-store - 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. phauthentic/event-store

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

phauthentic/event-store
=======================

1.0.0-rc1(2mo ago)01621MITPHPPHP ^8.2

Since Jul 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Phauthentic/event-store)[ Packagist](https://packagist.org/packages/phauthentic/event-store)[ RSS](/packages/phauthentic-event-store/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (1)

Event Store
===========

[](#event-store)

This is an event store abstraction for the [Phauthentic Event Sourcing Library](https://github.com/phauthentic/event-sourcing). It provides a simple interface for storing and retrieving domain events by aggregate, with pluggable backends for different storage engines.

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

[](#requirements)

- PHP 8.2 or higher

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

[](#installation)

```
composer require phauthentic/event-store
```

Features
--------

[](#features)

- **EventStoreInterface** – Contract for storing and replaying events by aggregate
- **PDO Event Store** – SQL-backed store (MySQL, MariaDB, PostgreSQL, SQLite, MS SQL Server)
- **In-Memory Event Store** – For testing, prototyping, and demos
- **EventFactory** – Create events from arrays and convert events to arrays
- **Serialization** – Pluggable serializers for payload and metadata

Quick Start
-----------

[](#quick-start)

```
use Phauthentic\EventStore\Event;
use Phauthentic\EventStore\InMemoryEventStore;
use Phauthentic\EventStore\ReplyFromPositionQuery;

$eventStore = new InMemoryEventStore();

$event = new Event(
    aggregateId: 'order-123',
    aggregateVersion: 1,
    event: 'OrderCreated',
    payload: ['amount' => 99.99],
    createdAt: new \DateTimeImmutable()
);

$eventStore->storeEvent($event);

foreach ($eventStore->replyFromPosition(new ReplyFromPositionQuery('order-123', 1)) as $storedEvent) {
    // Process event...
}
```

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

[](#documentation)

Please start by reading [documentation](docs/Index.md) in this repository.

License
-------

[](#license)

Copyright Florian Krämer

Licensed under the [MIT license](license.txt).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance84

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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

Every ~591 days

Total

2

Last Release

83d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bef35c03b7865d9cad45c22e54eb6fe8f5fc84a4ff64d47cc0f7a1ef28dbe85?d=identicon)[floriankraemer](/maintainers/floriankraemer)

---

Top Contributors

[![floriankraemer](https://avatars.githubusercontent.com/u/4996022?v=4)](https://github.com/floriankraemer "floriankraemer (9 commits)")

---

Tags

cqrsevent-sourcinglibrarysolidsolid-principleseventsevent sourcing

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phauthentic-event-store/health.svg)

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

###  Alternatives

[doctrine/event-manager

The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.

6.1k501.1M115](/packages/doctrine-event-manager)[psr/event-dispatcher

Standard interfaces for event handling.

2.3k618.8M865](/packages/psr-event-dispatcher)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k69.8M225](/packages/laminas-laminas-eventmanager)[simshaun/recurr

PHP library for working with recurrence rules

1.6k15.7M40](/packages/simshaun-recurr)[chelout/laravel-relationship-events

Missing relationship events for Laravel

5252.3M17](/packages/chelout-laravel-relationship-events)[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)

PHPackages © 2026

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