Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Iptraceable Listener Bundle

Iptraceable Listener Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Listener for gedmo/doctrine-extension IpTraceable feature

Frequently asked questions about Iptraceable Listener Bundle
What does kikwik/iptraceable-listener-bundle do?
It is a Symfony bundle that wires Gedmo's IpTraceable Doctrine extension into the Symfony service container. A Doctrine listener populates configured IP fields on entity persistence, typically createdFromIp and updatedFromIp, for entities implementing the IpTraceable interface. It removes manual setter calls from controllers, but it is Doctrine-centric and not a Laravel package.
Can I use kikwik/iptraceable-listener-bundle in a Laravel application?
Not natively. There is no Laravel service provider, facade, or config file, so you would need laravel-doctrine/orm plus a Symfony bundle-registration shim. That adds two layers of impedance for functionality usually implemented in roughly 40 to 60 lines with middleware and an Eloquent observer. For most Laravel apps a native implementation or an auditing package is the better path.
How do I install kikwik/iptraceable-listener-bundle?
Composer require works at the dependency level, but the install steps are Symfony-oriented: register the bundle and ensure Doctrine ORM plus gedmo/doctrine-extensions are configured. There is no documented Laravel installation path. In Laravel you must first adopt Doctrine and add a bundle shim, so treat the package as a reference rather than a drop-in.
Which Laravel versions are supported by kikwik/iptraceable-listener-bundle?
None are officially supported. The package targets Symfony, and v1.0.4 only adds Symfony 5 support; it does not add Laravel integration. Laravel version compatibility is therefore not a meaningful matrix here, and no Laravel 10 or 11 support statement exists.
How do I configure which entity property stores the IP address?
The stored IP field is configured through Gedmo IpTraceable mapping on the entity and the bundle's Symfony service configuration. You opt in per entity by implementing the IpTraceable interface and declaring the desired property. A Laravel app would have to replicate that through Doctrine metadata or, more simply, a config key and an Eloquent observer.
Does kikwik/iptraceable-listener-bundle work with Eloquent models?
No. It hooks Doctrine ORM prePersist events and depends on gedmo/doctrine-extensions, so Eloquent models and Eloquent events are not supported. In Laravel, use a model observer or saving hook, middleware, or an auditing package that records IP and actor data.
How does it resolve the client IP behind a proxy or CDN?
The bundle feeds the listener the current Symfony request client IP, so correctness depends on Symfony trusted proxy configuration. If proxies or CDNs are not trusted, it will record the load balancer or edge IP, which undermines audit evidence. Laravel has the same concern and requires TrustProxies middleware configuration.
What alternatives should Laravel developers use for IP tracking and audit trails?
For Laravel, owen-it/laravel-auditing and spatie/activitylog provide native Eloquent auditing that can capture IP, user agent, and actor attribution. A small middleware plus model observer is enough if you only need created_from_ip and updated_from_ip fields. These avoid Doctrine and Symfony bundle layers entirely.
Is kikwik/iptraceable-listener-bundle actively maintained?
Adoption is essentially zero: 0 stars, 0 dependents, and a small publisher. Release history shows a 2021 release followed by v1.0.4 adding Symfony 5 support after a multi-year gap, while Symfony 5.4 is end-of-life. There is no Symfony 6 or 7 support statement and PHP 8.x and Gedmo major-version compatibility remain unverified, so treat it as a reference snippet rather than a supported dependency.
How should I test IP tracing in a Laravel app?
In a Laravel-native implementation, write feature tests that set REMOTE_ADDR or use withServerVariables and assert the IP columns after create and update. If you insist on the Doctrine bridge, you need to boot Doctrine metadata and the listener in the test kernel, which requires more setup. Also add a test for trusted proxies so spoofed X-Forwarded-For headers do not pollute audit fields.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager