Skip to content

Releases: spatie/laravel-event-sourcing

5.0.5

26 Jul 03:37
Compare
Choose a tag to compare
  • Use jsonb in migration stubs instead of json (#237)

5.0.4

15 Jun 03:55
Compare
Choose a tag to compare
  • Fix visual glitch in event-sourcing:list command where event handlers wouldn't be shown

5.0.3

14 Jun 14:50
95c1906
Compare
Choose a tag to compare
  • fix $whenResult (#227)

5.0.2

14 Jun 09:23
Compare
Choose a tag to compare
  • Support legacy spatie/laravel-schemaless-attributes:^1.0 as well

5.0.1

10 Jun 14:12
Compare
Choose a tag to compare
  • move migrations to default location

5.0.0

09 Jun 09:59
Compare
Choose a tag to compare
  • 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
  • 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
  • Moved 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

4.10.2

04 May 04:44
Compare
Choose a tag to compare
  • Add missing config key in config stub (#203)

4.10.1

21 Apr 04:14
Compare
Choose a tag to compare
  • Also store aggregate root version when one event is persisted

4.10.0

21 Apr 03:42
Compare
Choose a tag to compare
  • 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.

4.9.0

10 Mar 04:48
Compare
Choose a tag to compare
  • Make base path configurable (#202)