Skip to content

v4.1: Add `onLogEntry` hook for reacting to stored changes

Choose a tag to compare

@thorewi thorewi released this 19 Sep 08:00
· 4 commits to master since this release
Introduces a configurable callback mechanism (`LoggableListener::$onLogEntry`)
that allows external services to process change log entries after they have
been successfully persisted to the database.

This enables use cases like audit trails, notifications, or search index updates.
The callback is executed in `postFlush` and receives:
- The `ChangeLog` entity with its assigned ID.
- The original tracked entity.
- An `announced` flag, indicating if the same `ChangeLog` entry (for the same
  entity) has been announced before within the current request, typically
  meaning its change set has grown.