PHPackages                             martyn82/apha - 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. martyn82/apha

ActiveLibrary

martyn82/apha
=============

Apha CQRS/ES library for PHP

v0.1.0(10y ago)3141MITPHPPHP &gt;=7.0

Since Apr 3Pushed 10y ago1 watchersCompare

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

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

APHA
====

[](#apha)

[![Build Status](https://camo.githubusercontent.com/887a0413272cc6d5f6961eb9103edef0140a69c316ea16b3c04f10fcdf39aae0/68747470733a2f2f7472617669732d63692e6f72672f6d617274796e38322f617068612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/martyn82/apha)[![Latest Stable Version](https://camo.githubusercontent.com/56fb24f4d275527d7c1d4ec122d1ccbfdb343ced68c75b734190bcb8db683c61/68747470733a2f2f706f7365722e707567782e6f72672f6d617274796e38322f617068612f762f737461626c65)](https://packagist.org/packages/martyn82/apha) [![Total Downloads](https://camo.githubusercontent.com/179df08d164894902e7480061d077b7e185ff223965167a5d2e52be7b175d1ed/68747470733a2f2f706f7365722e707567782e6f72672f6d617274796e38322f617068612f646f776e6c6f616473)](https://packagist.org/packages/martyn82/apha) [![Latest Unstable Version](https://camo.githubusercontent.com/1e54609c7ab72289fc088c58054b35d7c8ef5a306771fc97337c1f5e5c58a636/68747470733a2f2f706f7365722e707567782e6f72672f6d617274796e38322f617068612f762f756e737461626c65)](https://packagist.org/packages/martyn82/apha) [![License](https://camo.githubusercontent.com/dee4edd431fbcb63e735efcd7a77f4ad960f0ed1e68795fa31aa2d81bb592b47/68747470733a2f2f706f7365722e707567782e6f72672f6d617274796e38322f617068612f6c6963656e7365)](https://packagist.org/packages/martyn82/apha)

APHA is a CQRS/ES library for PHP. It contains all the building blocks you need to build an application that implements Command-Query Responsibility Segregation either with or without Event Sourcing.

APHA provides:

- Typed command and event handling with annotations
- Using MongoDB as event store and/or read store
- Using ElasticSearch as read store
- Replay of events
- Sagas
- Event scheduling (experimental)

Prerequisites
-------------

[](#prerequisites)

Requirements:

- PHP 7+
- Composer

Optional:

- MongoDB
- ElasticSearch

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

[](#installation)

```
$ composer install

```

Usage
-----

[](#usage)

Run the tests:

```
$ bin/phing test:unit

```

Use in your own project:

```
$ composer require martyn82/apha:~0.1

```

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

[](#documentation)

Currently, there is no API documentation available. Coming soon!

Examples
--------

[](#examples)

Some quickstart examples are available in the `examples` directory. You can run them from the command-line by executing:

```
$ php examples/ ...

```

Licensing
---------

[](#licensing)

Please consult the file named `LICENSE` in the root of the project.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3693d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6ad6c99d618014fc6faa1e10b27184bbf2ecfb8509208f08521415050db5fdb?d=identicon)[martyn82](/maintainers/martyn82)

---

Top Contributors

[![martyn82](https://avatars.githubusercontent.com/u/436726?v=4)](https://github.com/martyn82 "martyn82 (202 commits)")

---

Tags

eventsmessagingrepositorycommandbusevent sourcingcqrscommandsEventSourcingEventStoresagaeventbus

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[spatie/laravel-eventsauce

Use EventSauce in Laravel apps

12115.9k1](/packages/spatie-laravel-eventsauce)[oat-sa/generis

TAO generis library

11140.3k76](/packages/oat-sa-generis)[prooph/http-middleware

http middleware for prooph components

1145.0k](/packages/prooph-http-middleware)[honeybee/honeybee

Library for implementing CQRS driven, event-sourced and distributed architectures.

222.1k4](/packages/honeybee-honeybee)

PHPackages © 2026

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