makinacorpus / event-store
Simple event store implementation
Installs: 4 686
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
- makinacorpus/goat-query: ^2.1.7 || ^3.0
- makinacorpus/message: ^1.0.1
- makinacorpus/normalization: ^1.0.1
- psr/log: >=1.0
- ramsey/uuid: ^3.8 || ^4
Requires (Dev)
- phpunit/phpunit: ^9
- symfony/config: ^5.4 || ^6.0
- symfony/console: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/event-dispatcher: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/serializer-pack: ^1.0|^5.0
- symfony/validator: ^5.4 || ^6.0
- symfony/yaml: ^5.4 || ^6.0
Suggests
- makinacorpus/goat-query: For using PostgreSQL implementations of everything
- symfony/serializer-pack: For better object serialisation and normalisation within the bus
This package is auto-updated.
Last update: 2024-12-08 16:39:12 UTC
README
Opiniated event store implementation in PHP over PostgreSQL.
Please note that it is built over makinacorpus/goat-query
SQL query builder
and database connector. Any driver that supports PostgreSQL RETURNING
clause
equivalent will work.
Setup
First of all, install this package:
composer install makinacorpus/event-store
It is also recommended to chose an UUID implementation:
composer install ramsey/uuid
Or:
composer install symfony/uid
My favorite remains ramsey/uuid
.
Symfony
Start by installing the makinacorpus/goat-query-bundle
Symfony bundle:
composer install makinacorpus/goat-query-bundle
And configure it as documented.
Then register the bundle into your config/bundles.php
file:
<?php return [ // ... Your other bundles. MakinaCorpus\EventStore\Bridge\Symfony\EventStoreBundle::class => ['all' => true], ];
Standalone
This is not documented yet, but basically only thing you need to do is to
create an instance implementing EventStore
.
Usage
This is not documented yet.
Status
For now this is alpha quality. It was just exported from deprecated legacy
makinacorpus/goat
package and need some beta-testing.
Nevertheless, you should now this code is running in production on many projects for many years.
Run tests
A docker environement with various containers for various PHP versions is
present in the sys/
folder. For tests to work in all PHP versions, you
need to run composer update --prefer-lowest
in case of any failure.
composer install composer update --prefer-lowest cd sys/ ./docker-rebuild.sh # Run this only once ./docker-run.sh
Additionnaly generate coverage report:
./docker-coverage.sh
HTML coverage report will be generated in coverage
folder.