kikwik/iptraceable-listener-bundle
Symfony bundle that automatically records the client IP address on Doctrine entities implementing IpTraceable, using an event listener to populate IP fields on create and update. Simplifies audit trails and traceability with minimal configuration.
IpTraceable). That directly supports compliance-driven features: GDPR Article 32 processing records and proof of consent capture, SOC 2 / ISO 27001 access-and-change logging, and dispute resolution ("this order, consent, or admin change came from this address").Adopt when:
gedmo/doctrine-extensions. Note the correction to the brief: this is a Symfony bundle, not a Laravel package — there is no service provider, facade, or Eloquent integration.Look elsewhere (or replicate the pattern) when:
request()->ip() to a column — roughly the same effort, fully owned by you.Loggable, owen-it/laravel-auditing on the Laravel side, or a dedicated append-only audit service. DB columns can be edited by anyone with database access, so this is not tamper-evident.VARCHAR(45)), be indexed if you query by it, and sit inside a defined PII retention policy.To executives: This is a small, MIT-licensed component that lets us answer "where did this record come from?" — the kind of question that shows up in audits, chargeback disputes, and abuse investigations. It is inexpensive and narrow, and it does not commit us to a vendor. The latest release only adds Symfony 5 compatibility, which tells us the project is being kept barely alive for older applications rather than actively developed; there is still no release since 2021 and no visible adoption. My recommendation is unchanged: absorb the roughly one-file implementation into our own codebase rather than depend on it. That gives us the capability with none of the supply-chain risk.
To engineering: It is a thin Doctrine event listener that writes the request's client IP into annotated entity fields on persist and update, built on Gedmo's IpTraceable. Scope is deliberately minimal: IP only, no user agent, geo, actor, or diff. Release v1.0.4 adds Symfony 5 support — useful only if you are on Symfony 4/5, and irrelevant if you are on Symfony 6/7 or Laravel, so plan to patch or reimplement rather than assume compatibility. Two things to settle before we wire it in — trusted-proxy handling so we capture the real client address behind our CDN, and a decision on retention/hashing since IP is PII. If we are not on Symfony + Doctrine + Gedmo, we should skip the package and implement the same observer pattern natively; it is comparable effort and we keep ownership.
How can I help you explore Laravel packages today?