wwwision / dcb-eventstore-esdb
EventSourcing Database adapter for the Dynamic Consistency Boundary implementation
Fund package maintenance!
bwaidelich
Paypal
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:package
pkg:composer/wwwision/dcb-eventstore-esdb
Requires
- php: >=8.4
- guzzlehttp/guzzle: ^7
- psr/clock: ^1.0
- thenativeweb/eventsourcingdb: ^1.0
- webmozart/assert: ^1.11
- wwwision/dcb-eventstore: ^5
Requires (Dev)
- brianium/paratest: ^7
- phpstan/phpstan: ^2
- phpunit/phpunit: ^12
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^4.0.x-dev
- testcontainers/testcontainers: 1.0.3
README
EventSourcing Database adapter for the Dynamic Consistency Boundary implementation.
Usage
Installation
Install via composer:
composer require wwwision/dcb-eventstore-esdb
Create instance
use Wwwision\DCBEventStoreESDB\ESDBEventStore; $eventStore = ESDBEventStore::create(baseUri: 'localhost:3000', apiKey: 'secret');
Specify custom event source / type prefix
EventSourcing Database expects each event to have a source specified. Furthermore, event types have to be namespaced.
By default, the eventSource is set to "https://dcb.events" and the event type is prefixed with "events.dcb." to be compliant.
Those values are removed when reading events via the ESDBEventStore client, so the values are not really important.
However, they can be changed via the with() function:
// ... $eventStore = $eventStore->with( eventSource: 'https://domain.tld', eventTypePrefix: 'tld.domain.' );
See wwwision/dcb-eventstore for more details and usage examples
Contribution
Contributions in the form of issues or pull requests are highly appreciated
License
See LICENSE