Download the PHP package gember/event-sourcing-universal-service-provider without Composer
On this page you can find all versions of the php package gember/event-sourcing-universal-service-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gember/event-sourcing-universal-service-provider
More information about gember/event-sourcing-universal-service-provider
Files in gember/event-sourcing-universal-service-provider
Package event-sourcing-universal-service-provider
Short Description Universal service provider for Gember Event Sourcing (gember/event-sourcing)
License MIT
Informations about the package event-sourcing-universal-service-provider
🫚 Gember Event Sourcing Universal Service Provider
Universal Service Provider for Gember Event Sourcing , compatible with any application or framework that supports container-interop/service-provider.
Installation
Install the service provider with composer:
Configuration
This package installs Gember Event Sourcing with all required dependency adapters. Some of these adapters need to be configured.
By default, it uses the following configuration:
PSR-11 Container definition (https://www.php-fig.org/psr/psr-11):
You can override any of these defaults however you like.
Required dependencies
Some of the required dependencies also need to be configured separately.
Symfony Messenger (symfony/messenger
)
The default configuration makes use of a service with name event.bus
.
When this bus is configured, Gember Event Sourcing works out of the box.
However, when a different event bus is preferred, it must be a service implementing Symfony\Component\Messenger\MessageBusInterface
.
Example (minimum) configuration for symfony/messenger:
PSR-11 Container definition (https://www.php-fig.org/psr/psr-11):
Symfony Cache (symfony/cache
)
The default configuration makes use of a service with name cache.file
.
When this cache service is configured, Gember Event Sourcing works out of the box.
However, when a different cache pool is preferred, it must be a service implementing Psr\Cache\CacheItemPoolInterface
(PSR-6) or Psr\SimpleCache\CacheInterface
(PSR-16).
Example (minimum) configuration for symfony/cache:
PSR-11 Container definition (https://www.php-fig.org/psr/psr-11):
Symfony Serializer (symfony/serializer
)
The default configuration makes use of a service with name Symfony\Component\Serializer\Serializer
.
When this serializer service is configured, Gember Event Sourcing works out of the box.
However, when a different serializer is preferred, it must be a service implementing Symfony\Component\Serializer\SerializerInterface
.
Example (minimum) configuration for symfony/serializer:
PSR-11 Container definition (https://www.php-fig.org/psr/psr-11):
Doctrine DBAL/ORM (doctrine/dbal
, doctrine/orm
)
The default configuration makes use of a service with name Doctrine\DBAL\Connection
.
When this connection service is configured, Gember Event Sourcing works out of the box.
However, when a different Doctrine connection is preferred, it must be a service implementing Doctrine\DBAL\Connection
.
Example (minimum) configuration for doctrine/dbal:
PSR-11 Container definition (https://www.php-fig.org/psr/psr-11):
Database
In order to persist all domain events in database, a running SQL database is needed. The event store requires two tables. Schema is available in either raw SQL or in a migration file format:
Raw SQL schema: https://github.com/GemberPHP/rdbms-event-store-doctrine-dbal/blob/main/resources/schema.sql
Migrations:
- Doctrine migrations: https://github.com/GemberPHP/rdbms-event-store-doctrine-dbal/blob/main/resources/migrations/doctrine
- Phinx migrations: https://github.com/GemberPHP/rdbms-event-store-doctrine-dbal/tree/main/resources/migrations/phinx
Good to go!
Check the main package gember/event-sourcing or the demo application gember/example-event-sourcing-dcb for examples.
All versions of event-sourcing-universal-service-provider with dependencies
container-interop/service-provider Version ^0.4.1
doctrine/dbal Version ^4.2
gember/event-sourcing Version ^0.3
gember/file-finder-symfony Version ^0.3
gember/file-reflector-roave Version ^0.3
gember/identity-generator-symfony Version ^0.3
gember/message-bus-symfony Version ^0.3
gember/rdbms-event-store-doctrine-dbal Version ^0.3
gember/serializer-symfony Version ^0.3
psr/container Version ^2.0
symfony/cache Version ^7.2
symfony/property-access Version ^7.2
symfony/serializer Version ^7.2
symfony/uid Version ^7.2