herdwatch/entity-audit-bundle
Herdwatch EntityAuditBundle adds automatic audit logging to Doctrine entities in Symfony apps. Track who changed what and when, store field-level diffs, and review a complete history of inserts, updates, and deletes without cluttering your domain code.
Architecture fit — unchanged, still low for a Laravel codebase. v2.1.0 is a maintenance release: a single PR merging upstream 1.23.0. It introduces no new features, no API changes, and no deprecations, and — critically — no change to the Symfony/Doctrine bootstrap surface. herdwatch/entity-audit-bundle remains a Symfony bundle built around Doctrine ORM (a downstream fork of simplethings/EntityAuditBundle), shipping a Bundle class, a DI Extension with a Configuration tree, compiler passes, and onFlush/postFlush event-subscriber wiring that writes entity diffs into shadow *_audit tables keyed by revision. None of that exists in Laravel. There is no bundle registration, no container tag system, no doctrine.orm.entity_manager alias. The only way to use it in a Laravel app is to adopt laravel-doctrine/orm and hand-rebuild the bundle's service wiring — at which point you maintain a bespoke integration of a 0-star fork. This release does not move the architecture verdict.
Integration feasibility — unchanged.
| Path | Feasibility | Notes |
|---|---|---|
| Use as-is in a Laravel app | Not viable | Requires Symfony kernel, bundle config, DI tags |
| Use in a Symfony service alongside a Laravel product | Viable with effort | Only if your org already runs Symfony/Doctrine somewhere |
| Borrow the schema + listener design, implement natively | Viable | Revision table + INS/UPD/DEL semantics are simple to replicate in Eloquent |
Technical risk — one risk reduced, one new observation.
simplethings/EntityAuditBundle 1.23.0, which is the first hard evidence that the fork tracks upstream rather than drifting. That converts an open question into an observed (if single-data-point) practice. It is not a commitment to cadence — one merge is not a policy — so the recommendation to pin to a commit SHA and review diffs quarterly still stands.v2.1.0 corresponds to upstream 1.23.0. You cannot infer upstream parity from the fork's version number. Any upgrade review must read the changelog to establish which upstream release is contained, and the vendored copy should record the upstream SHA alongside the fork tag.@maMykola) — mildly positive for bus factor, but a first contribution is not a maintained second maintainer, and a new committer on a package that touches every write path warrants the same scrutiny as any new dependency. Bus-factor is still effectively 1.*_audit table, or a column type mismatch fails the business transaction, not just the audit trail. Unchanged.onFlush diff computation per persisted unit of work; unbounded revision-table growth absent partitioning/retention. Unchanged.Key questions.
Stack fit. Still not a Laravel package. The correct portfolio framing remains: "Symfony/Doctrine audit bundle — relevant only to Doctrine-backed services." Scoring it against a Laravel baseline overstates its apparent relevance.
Recommended path for a Laravel product: do not integrate. v2.1.0 is housekeeping on a package that does not fit the stack; a maintenance release is not a reason to revisit an architecture decision. Adopt a native equivalent:
owen-it/laravel-auditing (mature, MIT, Eloquent-native, active) covers ~80% of the functional surface.audits table (auditable_type, auditable_id, event, old_values, new_values, actor_id, request_id, created_at), populated from model observers inside the same DB transaction, plus a Revision/revision_id column for grouped changesets.The one design idea worth importing remains revision grouping: multiple entity changes in one unit of work share a revision ID, making "what happened in this request" a first-class query. Eloquent observers alone don't give you that; add it explicitly.
Recommended path if a Symfony/Doctrine service genuinely exists: the release strengthens this path slightly, because upstream currency is now evidenced rather than assumed. Still:
1.23.0 as of this release) in the vendoring notes.Migration path (if replacing an existing audit mechanism). Unchanged: inventory regulated entities → add shadow tables in a non-blocking additive migration → decide on a synthetic baseline revision for backfill → enable auditing entity-by-entity behind a config flag → dual-write for one release cycle, compare, decommission.
Compatibility. Pin PHP and Doctrine ORM minor versions explicitly. Doctrine's onFlush UnitOfWork API shifted across ORM 2.x→3.x; the release notes give no indication of supported ORM versions, so verify against your exact minor before committing. Note also that "merged upstream 1.23.0" says nothing about the fork's own compatibility matrix having been re-validated.
Sequencing. Legal/license review → architecture decision (unchanged: reject for Eloquent-only) → if adopt, pin at v2.1.0's commit + review the 1.23.0 delta + stand up the test harness → shadow schema → phased entity enablement → retention/redaction policy → observability.
Maintenance. Still the dominant cost, and this release does not change the ownership arithmetic: 0 stars, 0 dependents, single-vendor fork means you are the maintainer in practice. Budget for annual license/dependency review, upstream diff review, Doctrine upgrade compatibility work, and schema migrations per newly audited entity. What v2.1.0 changes is shape: it demonstrates the fork is alive and syncing, which lowers the probability of abrupt abandonment — but a live upstream also means inbound change you must triage, so expect to consume sync releases on your own cadence rather than enjoying a static, frozen copy. Budget one review per sync as recurring cost.
Support. No vendor SLA, no issue-tracker signal (zero stars implies zero triaged issues), no Stack Overflow footprint for the fork. The new contributor is an encouraging signal but not a support channel. Internal runbooks and a named owner remain mandatory. Ramp-up for an engineer unfamiliar with Symfony bundle conventions and Doctrine's UnitOfWork is still 2–4 days to productivity and 2–3 weeks to safe production operation.
Scaling. Unchanged by this release:
created_at or rev) and archival, history-query performance degrades non-linearly.Failure modes.
| Failure | Impact | Mitigation |
|---|---|---|
Missing *_audit table for a newly audited entity |
Business write rolls back | CI schema-drift check; migration gate per entity |
| Audit schema out of sync after ORM upgrade | Writes fail; potential outage | Pin ORM minor; contract tests on every upgrade |
| Upstream sync changes serialization behaviour (v2.1.0 class of change) | Silent truncation or type errors on write | Review upstream delta before absorbing; test with production-shaped data |
| Unbounded table growth | Slow history queries, disk pressure, backup bloat | Partitioning + retention/archival job |
| Listener exception on unusual type (JSON, blobs, large text) | Write path failure or silent truncation | Explicit per-type serialization config |
| Revert/replay used in production | Data corruption if revisions are partial | Restrict revert to read-only tooling; require approval workflow |
| GDPR erasure request vs. immutable audit log | Compliance conflict | Documented redaction (pseudonymize actor, hash PII), not delete |
| Fork abandoned upstream | Unpatched security/compat issues | Vendor the code, own it formally, schedule reviews — reduced likelihood as of v2.1.0, unchanged impact |
Ramp-up. Plan for a one-time integration spike (1–2 weeks) to prove Doctrine-in-Laravel or a Symfony sidecar works end to end, plus the ongoing ownership cost above. v2.1.0 is a positive maintenance signal but not a functional or architectural one: if the spike is not clearly positive, the correct TPM decision remains to reject this package and standardize on an Eloquent-native auditing solution. The functional delta does not justify adopting an LGPL fork into a Laravel write path — and a version bump that changes nothing in the integration surface is not a reason to reopen that call.
How can I help you explore Laravel packages today?