Releases: spatie/laravel-event-sourcing
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
- move migrations to default location
5.0.0
-
Add
EloquentStoredEvent::query()->whereEvent(EventA::class, …)
-
Add
EventQuery
-
Add
AggregateEntity
- If you're overriding an aggregate root's constructor, make sure to call
parent::__construct
from it
- If you're overriding an aggregate root's constructor, make sure to call
-
Add command bus and aggregate root handlers
-
Add
Projectionist::fake(OriginalReactor::class, FakeReactor::class)
(#181) -
All event listeners are now registered in the same way: by looking at an event's type hint. This applies to all:
- Aggregate root
apply
methods - Projection listeners
- Reactor listeners
- Event queries
- Aggregate root
-
Moved
Spatie\EventSourcing\Exception\CouldNotPersistAggregate
toSpatie\EventSourcing\AggregateRoots\Exceptions\CouldNotPersistAggregate
-
Moved
Spatie\EventSourcing\Exception\InvalidEloquentSnapshotModel
toSpatie\EventSourcing\AggregateRoots\Exceptions\InvalidEloquentSnapshotModel
-
Moved
Spatie\EventSourcing\Exception\InvalidEloquentStoredEventModel
toSpatie\EventSourcing\AggregateRoots\Exceptions\InvalidEloquentStoredEventModel
-
Moved
Spatie\EventSourcing\Exception\MissingAggregateUuid
toSpatie\EventSourcing\AggregateRoots\Exceptions\MissingAggregateUuid
-
Moved
Spatie\EventSourcing\Exception\InvalidStoredEvent
toSpatie\EventSourcing\StoredEvents\Exceptions\InvalidStoredEvent
-
Dependency injection in handlers isn't supported anymore, use constructor injection instead
-
$storedEvent
and$aggregateRootUuid
are no longer passed to event handler methods. Use$event->storedEventId()
and$event->aggregateRootUuid()
instead. (#180) -
Rename
EloquentStoredEvent::query()->uuid()
toEloquentStoredEvent::query()->whereAggregateRoot()
-
Removed
AggregateRoot::$allowConcurrency
-
Removed
$aggregateVersion
fromStoredEventRepository::persist
-
Removed
$aggregateVersion
fromStoredEventRepository::persistMany
-
Event handlers are no longer called with
app()->call()
(#180) -
$handlesEvents
on Projectors and Reactors isn't supported anymore -
PHP version requirement is now
^8.0
-
Laravel version requirement is now
^8.0
4.10.2
4.10.1
4.10.0
- Deprecate
AggregateRoot::$allowConcurrency
- Fix for race condition in aggregate roots (#170), you will need to run a migration to be able to use it:
public function up()
{
Schema::table('stored_events', function (Blueprint $table) {
$table->unique(['aggregate_uuid', 'aggregate_version']);
});
}
Note: if you run this migration, all aggregate roots using $allowConcurrency
will not work any more.