PHPackages                             busfactor/busfactor - 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. busfactor/busfactor

ActiveLibrary[API Development](/categories/api)

busfactor/busfactor
===================

CQRS and Event Sourcing infrastructure for modern PHP

v1.0.14(3y ago)99.4k↑50%1MITPHPPHP ^7.3 || ^8.0

Since Jul 22Pushed 3y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (16)Used By (0)

BusFactor
=========

[](#busfactor)

[![Latest Version](https://camo.githubusercontent.com/9164b9cd6c02619601115dd8f42820992620829f2395444e889de60fe0282a7b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f627573666163746f722f627573666163746f722e737667)](https://github.com/busfactor/busfactor/releases)[![Software License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

BusFactor is a modern PHP library providing several components you can mix and match to implement the CQRS and Event Sourcing patterns in your application.

Install
-------

[](#install)

Using [Composer](https://getcomposer.org/):

```
$ composer require busfactor/busfactor

```

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

[](#requirements)

- PHP &gt;=7.3 with `json` and `pdo` extensions enabled.

Components
----------

[](#components)

ComponentDescription`Aggregate`Interfaces and traits for plain DDD aggregates and domain events.`AggregateStore`Persistence for aggregates.`CacheProjectionStoreMiddleware`Caching middleware for `ProjectionStore`.`CommandBus`Implementation of the Command Bus pattern.`EventBus`Implementation of the Publish-Subscribe pattern for event streams.`EventSourcedAggregate`Interface and trait for event-sourced aggregates.`EventSourcedAggregateStore``AggregateStore` adapter for event-sourced aggregates persistence.`EventStore`Persistence for event streams.`EventStoreReductionInspection`Output single value from `EventStore` inspection.`EventStream`Event streams for event-sourced aggregates.`LaravelCacheProjectionStore`Laravel Cache adapter for `ProjectionStore`.`MemcachedProjectionStore`Memcached adapter for `ProjectionStore`.`ObjectSerializer`Interface for object serialization.`Pdo`Decorating interface for PHP Data Objects (PDO).`PdoAggregateStore`PDO adapter for `AggregateStore`.`PdoEventStore`PDO adapter for `EventStore`.`PdoProjectionStore`PDO adapter for `ProjectionStore`.`PdoProxy`Lazy-connecting PDO proxy.`Problem`Interface for Problem Details aware exceptions.`Projection`Interface for projections.`ProjectionStore`Persistence for projections.`ReflectionObjectSerializer`Reflection-based adapter for `ObjectSerializer`.`Scenario`Testing infrastructure on top of PHPUnit.`SnapshotAggregateStoreMiddleware``AggregateStore` middleware for event-sourced aggregate snapshots.`StreamEnricher`Interface for event stream enrichers.`StreamEnricherEventBusMiddleware``EventBus` middleware for event stream enrichment with `StreamEnricher`.`StreamEnricherEventStoreMiddleware``EventStore` middleware for event stream enrichment with StreamEnricher`.`StreamPublishingInspection`Publish event streams from `EventStore` inspection.`Uuid`Universally Unique IDentifier (UUID) generation.Testing
-------

[](#testing)

```
$ vendor/bin/phpunit
```

Credits
-------

[](#credits)

- [Maxime Gosselin](https://github.com/maximegosselin)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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 ~84 days

Recently: every ~185 days

Total

15

Last Release

1307d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.3

v1.0.11PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4efed0d18fdb420bcab4a89c4e7db7276ddfb9d713c6c3b6ad60106134028622?d=identicon)[maximegosselin](/maintainers/maximegosselin)

---

Top Contributors

[![maximegosselin](https://avatars.githubusercontent.com/u/3958246?v=4)](https://github.com/maximegosselin "maximegosselin (24 commits)")

---

Tags

aggregatecommandcommand-buscqrsdomain-driven-designeventevent-busevent-sourcingevent-storeevent-streamphpprojection

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[mpociot/laravel-apidoc-generator

Generate beautiful API documentation from your Laravel application

3.5k3.1M12](/packages/mpociot-laravel-apidoc-generator)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)

PHPackages © 2026

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