/EventStore

EventStore library for RxThunder

Primary LanguagePHPMIT LicenseMIT

Latest Stable Version Total Downloads License

Build

Installation

composer install rxthunder/eventstore

Setup

First you must add new secrets in your .env files

# .env
EVENTSTORE_DSN_HTTP=
EVENTSTORE_DSN_TCP=

Then configure new parameters to be injected in the container

# config/parameters.php

$container->setParameter('eventstore.http', getenv('EVENTSTORE_DSN_HTTP'));
$container->setParameter('eventstore.tcp', getenv('EVENTSTORE_DSN_TCP'));

Register consoles

# config/services.php

require_once __DIR__ . '/../vendor/rxthunder/eventstore/config/services.php';

// Register eventstore consoles
$consoleDefinition = new Definition();
$consoleDefinition->setPublic(true);
$consoleDefinition->setAutowired(true);
$consoleDefinition->setAutoconfigured(true);

$this->registerClasses($definition, 'RxThunder\\eventstore\\Console\\', '../vendor/rxthunder/eventstore/src/Console/*');

Or if you prefer you can include

# config/services.php

require_once __DIR__ . '/../vendor/rxthunder/eventstore/config/services.php';
require_once __DIR__ . '/../vendor/rxthunder/eventstore/config/consoles.php';

Profit

You got new consoles !

php vendor/bin/thunder