The easiest way to get started with event sourcing in Laravel
MIT License
Bot releases are hidden (Show)
Published by freekmurze over 3 years ago
Published by freekmurze over 3 years ago
Add EloquentStoredEvent::query()->whereEvent(EventA::class, …)
Add EventQuery
Add AggregateEntity
parent::__construct
from itAdd 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:
apply
methodsMoved Spatie\EventSourcing\Exception\CouldNotPersistAggregate
to Spatie\EventSourcing\AggregateRoots\Exceptions\CouldNotPersistAggregate
Moved Spatie\EventSourcing\Exception\InvalidEloquentSnapshotModel
to Spatie\EventSourcing\AggregateRoots\Exceptions\InvalidEloquentSnapshotModel
Moved Spatie\EventSourcing\Exception\InvalidEloquentStoredEventModel
to Spatie\EventSourcing\AggregateRoots\Exceptions\InvalidEloquentStoredEventModel
Moved Spatie\EventSourcing\Exception\MissingAggregateUuid
to Spatie\EventSourcing\AggregateRoots\Exceptions\MissingAggregateUuid
Moved Spatie\EventSourcing\Exception\InvalidStoredEvent
to Spatie\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()
to EloquentStoredEvent::query()->whereAggregateRoot()
Removed AggregateRoot::$allowConcurrency
Removed $aggregateVersion
from StoredEventRepository::persist
Removed $aggregateVersion
from StoredEventRepository::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
Published by brendt over 3 years ago
Published by brendt over 3 years ago
Published by brendt over 3 years ago
AggregateRoot::$allowConcurrency
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.
Published by brendt over 3 years ago
Published by rubenvanassche over 3 years ago
Published by brendt over 3 years ago
Published by brendt over 3 years ago
Published by freekmurze almost 4 years ago
Published by freekmurze almost 4 years ago
replay_chunk_size
config valuePublished by freekmurze almost 4 years ago
Published by freekmurze about 4 years ago
ShouldBeStored
when possible (#158)Published by freekmurze about 4 years ago
Published by freekmurze about 4 years ago
loadUuid
(#156)Published by freekmurze about 4 years ago
Published by brendt about 4 years ago
Published by brendt about 4 years ago
Published by freekmurze about 4 years ago
Published by freekmurze about 4 years ago