Repository navigation
Releases: AppsDevTeam/DoctrineLoggable
Releases · AppsDevTeam/DoctrineLoggable
Release list
v4.2.3: ```
Add support for PHP 8.1 Enums in loggable identification ``` Previously, using an Enum in a LoggableIdentification field would result in a "Object of class ... could not be converted to string" error. This change ensures that backed enums are identified by their `value` and unit enums by their `name`. ```
v4.2.2: fix: Resolve change set references regardless of definition order
Previously, `$ref` entries in change sets would fail to resolve if their corresponding `$id` definition appeared later in the document. This led to `UnexpectedValueException` and unreadable change log entries. This change pre-registers all `$id`s found in the document with empty `ChangeSet` instances before decoding begins. This ensures that any `$ref` can find its target instance, allowing for correct resolution even when `$ref` precedes `$id` in the document structure.
v4.2.1: fix: Record change log timestamps in UTC
Cas se bral v zone aplikace, takze change log nesel porovnat s ostatnimi logy (request log, auditni stopa), ktere UTC pisou vzdycky - a v oddelenem ulozisti, kam se odvazeji spolecne, se zaznamy rozchazely o posun zony.
v4.2: Add support for redacting sensitive property values in change logs
Introduce a mechanism to log that a property has changed without storing its actual value. This allows auditing the fact of a change (e.g., a password update) while preventing sensitive data (like password hashes) from being stored in log history.
v4.1: Add `onLogEntry` hook for reacting to stored changes
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.
v4.0.1
v4.0: Merge pull request #14 from AppsDevTeam/feature/json-change-sets
Stores change sets as JSON
v3.0.5: Skip collection lookup for unrelated entity types
Logovaná entita má obvykle víc kolekcí a všem se předává tatáž změněná entita. U kolekce na inverzní straně se pak na té entitě četlo pole podle mappedBy - i když do kolekce vůbec typem nepatřila a takové pole neměla. Skončilo to na 'Call to a member function getValue() on null'.
v3.0.4: Prevent memory exhaustion in change set processing
Addresses two distinct scenarios that previously led to Out-Of-Memory errors during change set calculation: 1. **Cyclic entity graphs:** Implements a recursion guard (`$changeSetsInProgress`) to prevent infinite loops when processing entities with circular references, which would otherwise consume all available memory. 2. **Large collections:** Optimizes checking for entity presence within a collection (`isEntityInCollection`) to avoid hydrating potentially massive Doctrine PersistentCollections. It now leverages `mappedBy` metadata for uninitialized collections, preventing excessive memory usage for large related datasets.
v3.0.3: Remove redundant reflection property accessibility
The properties being accessed via reflection no longer require explicit `setAccessible(true)` calls, streamlining the reflection process without altering behavior.