Implementation of EventSauce Message- and SnapshotRepository for Google Firestore and Google Datastore
$firestoreClient = new FirestoreClient();
$this->messageRepository = new MessageRepository(
$firestoreClient,
'collectionForAggregateEvents',
new ConstructingMessageSerializer()
);
$this->snapshotRepository = new SnapshotRepository(
$firestoreClient,
'collectionForAggregateSnapshots'
);
$datastoreClient = new DatastoreClient();
$this->messageRepository = new MessageRepository(
$datastoreClient,
'collectionForAggregateEvents',
new ConstructingMessageSerializer()
);
$this->snapshotRepository = new SnapshotRepository(
$datastoreClient,
'collectionForAggregateSnapshots'
);
// starts needed Containers
docker-compose up
// running qualtity tools
docker-compose run --rm php composer verify