/event-store

PHP 5.5+ EventStore Implementation. Part of

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

ProophEventStore

PHP 5.5+ EventStore Implementation.

Build Status Coverage Status

#Features

ProophEventStore is capable of persisting event objects that are organized in streams. The EventStore itself is a facade for different persistence adapters (check the list below) and adds event-driven hook points for features. Features can provide additional functionality like publishing persisted events on an event bus or validate events before they are stored. ProophEventStore ships with different strategies to organize event streams and a base repository implementation for event sourced aggregate roots. Each aggregate repository can work with another stream strategy to offer you maximum flexibility.

Installation

You can install ProophEventStore via composer by adding "prooph/event-store": "~3.0" as requirement to your composer.json.

Available Persistence Adapters

StreamStrategies

** Note ** Check the usage example to see how you can set up a repository with a stream strategy.

AggregateTranslator

ProophEventStore wants to get out of your way as much as it can. To achieve this goal it requires neither a specific aggregate implementation nor a domain event implementation. Instead it uses translation adapters which are responsible for translating custom domain events to Prooph\Common\Messaging\DomainEvent and to reconstitute an aggregate from it's event history. You are asked to provide an AggregateTranslator for your aggregates or you use ProophEventSourcing which has build in support for prooph/event-store.

** Note ** Check the usage example to see how you can set up a repository with an AggregateTranslator.

Usage

Check the example of ProophEventSourcing to see the EventStore in action.

ZF2 Integration

prooph/proophessor seamlessly integrates ProophEventStore with a ZF2 application.

Support

Contribute

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.

Used Third-Party Libraries

Acknowledgements

The library is heavily inspired by event-centric/EventCentric.Core, malocher/event-store, beberlei/litecqrs-php and szjani/predaddy