hirethunk / verbs

Verbs is an event sourcing package for PHP artisans
https://verbs.thunk.dev
MIT License
412 stars 32 forks source link

Set `last_event_id` in Dispatcher #133

Closed inxilpro closed 5 months ago

inxilpro commented 5 months ago

Right now we only set State::$last_event_id if an apply hook is triggered. This means that events that don't have an apply method can trigger concurrency exceptions, even thought it's not a concurrency issue. This change should resolve that byt setting last_event_id when the event is dispatched regardless of whether there are any hooks registered for that phase.