prooph/pdo-event-store

v1.0.0 2017-03-30 07:41 UTC

README

Build Status Coverage Status Gitter

PDO EventStore implementation for Prooph EventStore

Requirements

  • PHP >= 7.1
  • PDO_MySQL Extension or PDO_PGSQL Extension

For MySQL you need server version >= 5.7.9. For Postgres you need server version >= 9.4.

Setup

For MySQL run the script in scripts/mysql/01_event_streams_table.sql on your server.

For Postgres run the script in scripts/postgres/01_event_streams_table.sql on your server.

This will setup the required event streams table.

If you want to use the projections, run additionally the scripts scripts/mysql/02_projections_table.sql (for MySQL) or scripts/postgres/02_projections_table.sql (for Postgres) on your server.

Tests

If you want to run the unit tests locally you need a runnging MySql server listening on port 3306 and a running Postgres server listening on port 5432. Both should contain an empty database event_store_tests.

Run Tests With Composer

Postgres

$ composer test-postgres

MySql

$ composer test-mysql

Run Tests With Docker

Postgres

$ docker-compose -f docker-compose-tests.yml run -e DB_HOST=postgres --rm composer run-script test-postgres --timeout 0

MySql

$ docker-compose -f docker-compose-tests.yml run -e DB_HOST=mysql --rm composer run-script test-mysql --timeout 0