micro-module / snapshotting
POC for snapshotting aggregates in broadway/broadway
Installs: 1 502
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- ext-json: *
- doctrine/dbal: ^2.9 | ^3.3
- micro-module/base: ^0.7.0
- micro-module/broadway: ^2.6
- micro-module/value-object: ^0.6.0
Requires (Dev)
- mockery/mockery: ^1.4
- php-parallel-lint/php-console-highlighter: ^0.5.0
- php-parallel-lint/php-parallel-lint: ^1.3
- phpmd/phpmd: ^2.10
- phpstan/phpstan: ^0.12.96
- phpstan/phpstan-mockery: ^0.12.14
- phpstan/phpstan-phpunit: ^0.12.22
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-master
- symplify/easy-coding-standard: ^9.4
- vimeo/psalm: ^4.9
- dev-master
- v0.7.9
- v0.7.8
- v0.7.7
- v0.7.6
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.0.x-dev
- v0.6.0
- v0.5.3
- v0.5.1
- v0.5.0
- v0.4.0
- dev-fix-fetch-dbal
- dev-update-snapshotting-event-sourcing-repository-load-method
- dev-remove-broadway-added-micromodule-broadway-update-playhead-snapshot-logic
- dev-update-broadway-dependencies
- dev-replace-value-object-with-entity
- dev-add-php8-compatibility
This package is auto-updated.
Last update: 2024-12-13 12:43:26 UTC
README
Proof-of-concept component providing snapshotting functionality to broadway/broadway.
Documentation
This project demonstrates taking and using snapshots of an aggregate root in the EventSourcingRepository.
Snaphots can be triggered using different strategies like once every number of events or
after an amount of time has passed. The EventCountTrigger
implements the former strategy.
Getting started
This repository is just a library. It lacks (for now) implementations of the SnapshotRepository
.
For example if you want store your events and snapshots in a database using doctrine/dbal
you will have to:
- create a
DBALSnapshotRepository
implementing theSnapshotRepository
to store and fetch snapshots. You wil have to figure out how to serialize your aggregate root.
License
This project is licensed under the MIT License - see the LICENSE file for details