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.
Architecture fit: Poor — unchanged by v1.0.4. This is a Symfony bundle, not a Laravel package. It ships a bundle class, Symfony DI service definitions, and depends on gedmo/doctrine-extensions plus Doctrine ORM. Laravel's default persistence layer is Eloquent; there is no service provider, no facade, no config file in Laravel's config/*.php idiom. Bringing it in requires a Doctrine-on-Laravel bridge (laravel-doctrine/orm) and a Symfony bundle-registration shim — two layers of impedance for a feature worth roughly 40–60 lines of application code.
What it actually does. Gedmo's IpTraceable extension stamps createdFromIp / updatedFromIp on entities. Gedmo already includes the listener; this bundle is thin glue that wires the listener into the Symfony container and feeds it the current request's client IP. The portable value is the pattern, not the code.
What v1.0.4 changes. One line of substance: "added support for symfony 5." Assessed on its merits:
Integration feasibility: Low, and still not worth the bridge. The realistic path in Laravel is a native reimplementation: a middleware or singleton that resolves $request->ip(), plus an Eloquent observer/saving hook or an auditing package (owen-it/laravel-auditing, spatie/activitylog) that already handles IP, user agent, and actor attribution. Reverse-engineering the bundle buys nothing that a first-party implementation doesn't, and v1.0.4 does not change that arithmetic.
Technical risk: High relative to value.
Key questions for the requirement owner:
Stack fit. Not applicable to a conventional Laravel/Eloquent stack. Viable only if the application already uses laravel-doctrine/orm and accepts Symfony bundle bootstrapping — a combination rare enough that I would not plan around it. v1.0.4 adds Symfony 5 compatibility to that conditional path; it does not widen it.
Recommended path — do not adopt; reimplement (est. 0.5–1 dev-day).
TrustProxies-configured middleware; expose via a request-scoped singleton so console/queue contexts degrade gracefully to null.saving observer or a trait with a boot hook — the direct analogue of the Gedmo listener.owen-it/laravel-auditing instead; it covers IP, user agent, actor, and old/new diffs with a maintained release cadence.If adoption is mandated anyway (e.g., parity with a sibling Symfony service).
gedmo/doctrine-extensions and audit PHP 8.2/8.3 compatibility.Compatibility gates before any code: PHP version matrix, Gedmo major version, Symfony component constraint (v1.0.4 pins you toward the 5.x line, which is EOL — flag this explicitly in any exception request), attribute-vs-annotation mapping mode, and whether the listener tolerates a missing request scope (queue workers, artisan commands, tests).
Sequencing. (1) Confirm the audit requirement and PII sign-off → (2) confirm Doctrine presence → (3) if absent, prototype the native trait/observer and the proxy-aware IP resolver → (4) decide adopt-vs-build on evidence, not on the package's existence. The v1.0.4 release does not clear any gate in this sequence; it does not justify reordering it.
Maintenance: you inherit 100% of it. 0 stars and 0 dependents mean no upstream triage, no security advisories, no issue response. v1.0.4 is a single-constraint release after a multi-year silence targeting an EOL Symfony branch; it evidences a maintainer alive enough to accept a patch, not a support commitment. Any future PHP/Gedmo/Symfony bump is your patch. Keep this in the dependency register as internally maintained, with an owner and a review date — that designation stands.
Support. None beyond the MIT source. Escalation path is "read the code" — acceptable for 60 lines of glue, unacceptable for anything touching a compliance control without a tested fallback. The v1.0.4 release does not create an escalation path.
Scaling. Listener overhead is negligible (one call per write). The real scaling concern is correctness under distribution: horizontal scaling behind a load balancer or CDN will record the proxy IP unless trusted-proxy configuration is explicit and tested. Also watch write amplification if IP stamping is applied broadly to high-volume tables, and confirm the IP column type/length fits IPv6.
Failure modes to design against:
null or throw; must be handled deliberately, not by try/catch.X-Forwarded-For yields attacker-controlled audit data; worse than no data for compliance purposes.Ramp-up. Low for the concept (one middleware + one observer is immediately legible to any Laravel engineer). Moderate for the Symfony/Doctrine bridge path, where a new engineer must reason about bundle registration, DI compiler passes, and Gedmo mapping — knowledge that exists nowhere else in a Laravel codebase, and that v1.0.4 makes no easier.
Recommendation. Score this as a pattern reference, not a dependency. v1.0.4 (Symfony 5 support) is a maintenance data point, not a fitness improvement for our stack: it addresses a line we don't run, on a framework we don't use, and still prescribes no Laravel integration path. Reimplement natively or adopt a maintained Laravel auditing package; the package's only durable contribution is confirming that IP stamping belongs at the persistence boundary, driven by a request-scoped value — a conclusion the team can reach in an afternoon.
How can I help you explore Laravel packages today?