You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-ing events such as updating, creating and deleting still fire after the transaction commits if ShouldHandleEventsAfterCommit is implemented or $afterCommit = true property is present on the Observer.
The documentation states that these events fire before changes are persisted, but in the case where ShouldHandleEventsAfterCommit is implemented or $afterCommit = true property is present on the Observer, these events fire after changes are persisted.
I think the documentation should at least clearly clarify this behaviour.
In my opinion -ing events should be excluded from this behaviour entirely. I don't believe there is any logical use case for -ing events to fire this way - it makes them redundant as they effectively just become -ed events.
Steps To Reproduce
Set up an observer for a model that implements ShouldHandleEventsAfterCommit or has $afterCommit = true property
Listen for -ing events
Trigger an -ing event
Inspect the model and notice that changes have been persisted