- Add an
aggregate_version
property to thestored_events
table$table->unsignedInteger('aggregate_version')->nullable();
- Republish the migrations or copy the
create_snapshots_table
migration - The
StoredEventRepository
interface has new methods calledretrieveAllAfterVersion
andgetLatestVersion
that you must implement if you have a custom repository - The
StoredEventRepository
now accepts anaggregateVersion
parameter in thepersist
andpersistMany
methods - The
StoredEventRepository
has a newcountAllStartingFrom
method
Nothing changed, expect that where possible property types and short closures are used
The only change in this version is the naming change from laravel-event-projector
to laravel-event-sourcing
. There are no changes to the API.
To upgrade from v3 of laravel-event-projector
you have to perform these steps:
- Rename
config/event-projector.php
toconfig/event-sourcing.php
- Change
laravel-event-projector:v3
tolaravel-event-sourcing:v1
and runcomposer update
- The namespace has changed, so you need to replace
Spatie\EventProjector
bySpatie\EventSourcing
in your entire project