sbooker / domain-events-persistence-doctrine
Domain events storage Doctrine implementation
Installs: 4 459
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- doctrine/orm: ^2.7
- sbooker/domain-events: ^2.0
- sbooker/domain-events-persistence: 2.5.2 || ^2.6
Requires (Dev)
- doctrine/cache: ^1.12
- gamez/ramsey-uuid-normalizer: ^2.0 || ^3.0
- phpdocumentor/reflection-docblock: ^5.3
- phpunit/phpunit: ^9.0
- ramsey/uuid-doctrine: ^1.6
- sbooker/doctrine-transaction-handler: ^2.0
- sbooker/persistent-pointer-doctrine: ^1.0
- sbooker/persistent-sequences: ^0.5.0
- sbooker/transaction-manager: ^2.2
- symfony/property-access: ^5.0 || ^6.0
- symfony/property-info: ^5.0 || ^6.0
- symfony/serializer: ^5.0 || ^6.0
Suggests
- gamez/ramsey-uuid-normalizer: ^2.0 || ^3.0
- ramsey/uuid-doctrine: ^1.6
- sbooker/doctrine-transaction-handler: ^2.0
- sbooker/persistent-pointer-doctrine: ^1.0
- symfony/property-access: ^5.0 || ^6.0
- symfony/property-info: ^5.0 || ^6.0
- symfony/serializer: ^5.0 || ^6.0
README
Doctrine implementation sbooker/domain-events-persistence
Installation
Install via Composer:
composer require sbooker/domain-events-persistence-doctrine
Configuration
In Symfony:
config/packages/sbooker_domain_events_persistence_doctrine.yaml doctrine: orm: mappings: DomainEvents: is_bundle: false type: xml dir: '%kernel.project_dir%/vendor/sbooker/domain-events-persistence-doctrine-doctrine/src/Mapping' prefix: Sbooker\DomainEvents\Persistence services: Sbooker\DomainEvents\Persistence\ConsumeStorage: alias: Sbooker\DomainEvents\Persistence\Doctrine\PersistentEventDoctrineRepository Sbooker\DomainEvents\Persistence\SearchStorage: alias: Sbooker\DomainEvents\Persistence\Doctrine\PersistentEventDoctrineRepository Sbooker\DomainEvents\Persistence\CleanExpiredStorage: alias: Sbooker\DomainEvents\Persistence\Doctrine\PersistentEventDoctrineRepository Sbooker\DomainEvents\Persistence\Doctrine\PersistentEventDoctrineRepository: class: Sbooker\DomainEvents\Persistence\Doctrine\PersistentEventDoctrineRepository factory: ['@doctrine', getRepository] arguments: - Sbooker\DomainEvents\Persistence\PersistentEvent Sbooker\PersistentPointer\Repository: class: Sbooker\PersistentPointer\Repository arguments: - '@Sbooker\PersistentPointer\PointerStorage' Sbooker\PersistentPointer\PointerStorage: alias: Sbooker\PersistentPointer\PersistentPointerDoctrineRepository Sbooker\PersistentPointer\PersistentPointerDoctrineRepository: class: Sbooker\PersistentPointer\PersistentPointerDoctrineRepository factory: [ '@doctrine', getRepository ] arguments: - Sbooker\PersistentPointer\Pointer Sbooker\DomainEvents\Persistence\DomainEventPreCommitProcessor: class: Sbooker\DomainEvents\Persistence\DomainEventPreCommitProcessor arguments: - '@Sbooker\DomainEvents\Publisher' Sbooker\TransactionManager\TransactionManager: class: Sbooker\TransactionManager\TransactionManager arguments: - '@Sbooker\TransactionManager\DoctrineTransactionHandler' - '@Sbooker\DomainEvents\Persistence\DomainEventPreCommitProcessor' Sbooker\TransactionManager\DoctrineTransactionHandler: class: Sbooker\TransactionManager\DoctrineTransactionHandler arguments: - '@doctrine.orm.default_entity_manager' Sbooker\DomainEvents\Publisher: alias: Sbooker\DomainEvents\Persistence\PersistentPublisher Sbooker\DomainEvents\Persistence\PersistentPublisher: class: Sbooker\DomainEvents\Persistence\PersistentPublisher arguments: - '@Sbooker\TransactionManager\TransactionManager' - '@Sbooker\DomainEvents\Persistence\EventNameGiver' - '@serializer' Sbooker\DomainEvents\Persistence\EventNameGiver: class: Sbooker\DomainEvents\Persistence\MapNameGiver arguments: - [] # Each event consumer must inherit this configuration Sbooker\DomainEvents\Persistence\Consumer: abstract: true class: Sbooker\DomainEvents\Persistence\Consumer arguments: - '@Sbooker\DomainEvents\Persistence\ConsumeStorage' - '@Sbooker\TransactionManager\TransactionManager' - '@serializer' - '@Sbooker\PersistentPointer\Repository' - '@Sbooker\DomainEvents\Persistence\EventNameGiver'
License
See LICENSE file.