Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProophEventStore

PHP 5.4+ EventStore Implementation.

Build Status Coverage Status

About Prooph Software

Prooph is the organisation behind gingerframework - a workflow framework written in PHP. The founder and lead developer is codeliner. Prooph provides CQRS+ES infrastructure components for the gingerframework. The components are split into 3 major libraries ProophServiceBus, ProophEventSourcing, ProophEventStore and various minor libraries which add additional features or provide support for other frameworks. The public APIs of the major components are stable. They are loosely coupled among each other and with the gingerframework, so you can mix and match them with other libraries.

Installation

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

#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.

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 recorded domain events to StreamEvents and to reconstitute an aggregate from it's event history. You are asked to provide an AggregateTranslator for your aggregates or you use ProophEventSourcing that has a ready-to-use AggregateTranslator on board.

** 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

ProophEventStoreModule 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

Releases

Packages

Used by

Contributors

Languages