/mongodb-event-store

MongoDB implementation of ProophEventStore

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

mongodb-event-store

Build Status Coverage Status Gitter

MongoDB EventStore implementation for Prooph EventStore

Requirements

  • MongoDB >= 4.0
  • MongoDB PHP Driver >= 1.5.2

Setup

Please execute \Prooph\EventStore\MongoDb\MongoDbHelper::createEventStreamsCollection on your server.

This will setup the required event streams table.

If you want to use the projections, run additionally \Prooph\EventStore\MongoDb\MongoDbHelper::createProjectionCollection on your server.

Introduction

Prooph Event Store v7

Tests

If you want to run the unit tests locally you need a running MongoDB Replica cluster. You need to set these environment variables DB_URI, DB_REPLICA_SET and DB_NAME.

Run Tests With Composer

$ vendor/bin/phpunit -c phpunit.xml.dist

Run Tests With Docker Compose

./start.sh
docker-compose -f docker-compose-tests.yml run --rm php php vendor/bin/phpunit -c phpunit.xml.dist
./down.sh

Support

Contribute

Please feel free to fork and extend existing or add new plugins 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.

License

Released under the New BSD License.