- Is happyr/event-tracker-bundle compatible with Laravel?
- No. It is a Symfony bundle that ships a Bundle class, a DI extension, and compiler passes, and it expects the Symfony kernel, service container, and event dispatcher. There is no service provider, no publishable config, no facade, and no Laravel-compatible autoloading contract. In a Laravel app this is a port, not an install.
- How do I install happyr/event-tracker-bundle?
- On Symfony you would require the package with Composer, register the bundle in your kernel's bundle list, configure event types and metadata, and let Doctrine create the event table. That workflow does not map to Laravel's bootstrap/providers.php or config publishing. There is no artisan install command and no Laravel migration shipped with the package.
- Does this bundle support Laravel 10 or Laravel 11 on PHP 8.2?
- No. The package targets Symfony 3.4/4.x on PHP 7.x with Doctrine ORM 2.x, and its last release was 2020-11-11, which predates PHP 8.1, 8.2, and 8.3. A current Laravel app runs PHP 8.2+ with Eloquent and a different container and dispatcher. There is no overlapping supported version window.
- What is the Laravel alternative to this Symfony event tracker?
- Use spatie/laravel-activitylog if you want a mature, actively maintained, Eloquent-backed package. Or use plain Laravel events plus a queued listener writing to your own table, which is roughly a 200-line concern. Both are Laravel-native and avoid inheriting an abandoned Symfony API.
- Can I wrap the tracker service in a Laravel service provider?
- Technically yes, but you would need to replace the Doctrine entity and repository with Eloquent or a query builder, discard the schema-creation listener in favor of a migration, re-point the logger at Laravel's PSR-3 binding, and swap Symfony dispatcher wiring for Laravel listeners. At that point you have rewritten the package and kept its API as a constraint. For a package with four stars and zero dependents there is no ecosystem value to inherit.
- How would I implement event tracking natively in Laravel?
- Create a tracked_events table with id, event name, subject_type and subject_id for a polymorphic relation, a JSON payload, actor_id, ip, and occurred_at. Register a listener against explicit domain events or Event::listen('*') and dispatch tracking onto a queue. This is an estimated one to two engineer-days, fully owned, with no fork or abandoned dependency.
- Is happyr/event-tracker-bundle still maintained and safe for production?
- It has a single maintainer, no security policy, no release cadence, and no issue triage signal, and the last release was in November 2020. Zero dependents means there is no downstream pressure to keep it working and no community to answer questions. The MIT license is clean and does permit forking, but expect deprecation noise and possible hard incompatibilities on modern PHP.
- How do I test event tracking in a Laravel application?
- Use Event::fake() to assert that the expected domain event was dispatched, then test the listener separately against an in-memory SQLite database with RefreshDatabase. If you wrap a third-party tracker, you would have to mock its Symfony-style interfaces, which is another argument for a native implementation. Assert the payload shape, the actor, and the occurred_at timestamp in your listener test.
- How do I handle PII, GDPR, and retention in tracked events?
- A 2020-era package has no data-deletion hooks, no export tooling, and no retention policy. An unbounded event table containing PII is a compliance liability, so decide retention up front, scrub or hash sensitive values at capture time, and implement deletion and export before shipping. Also clarify whether the requirement is an audit log, product analytics, or debugging breadcrumbs, since each has different schema and privacy answers.
- Should event tracking run synchronously on the request path or on a queue?
- Off the request path. Synchronous database writes during a request are a latency and availability risk, especially for high-volume events like page views. Dispatch tracking onto Laravel's queue with a listener, add sampling or rate limits for noisy events, and keep the write path owned by your application rather than a third-party bundle.