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)
Requirements:
- PHP 7+
- Composer
Optional:
- MongoDB
- ElasticSearch
$ composer install
Run the tests:
$ bin/phing test:unit
Use in your own project:
$ composer require martyn82/apha:~0.1
Currently, there is no API documentation available. Coming soon!
Some quickstart examples are available in the examples
directory.
You can run them from the command-line by executing:
$ php examples/ ...
Please consult the file named LICENSE
in the root of the project.