spiriitlabs/auth-log-bundle
Symfony bundle for tracking authentication activity. It records login successes, failures, and logouts with context such as user, IP address, and user agent, then stores events for auditing and review through configurable persistence and a simple dashboard.
Architecture fit — A significant framing correction first: the package under review is spiriitlabs/auth-log-bundle, a Symfony bundle, not a Laravel package. It integrates via Symfony's bundle/DI container, event dispatcher, and configuration tree. If the target application is Laravel, this is not directly adoptable — it would require a custom bridge or a different package entirely. If the target is Symfony (or the "Laravel/PHP" framing was shorthand for "PHP framework app"), fit is good: it is a focused, single-responsibility authentication audit logger that hooks the security component's login success/failure events and persists records with resolved geolocation. The v4.0.2 release does not alter the architectural contract — it is a patch release with a reliability fix, dependency housekeeping, and CI hardening.
Integration feasibility — Low-to-moderate. Standard Composer install, bundle registration, and a config block. Persistence is pluggable but requires a schema migration for the auth-log table. Geolocation is the only materially non-trivial integration: the v4.0.2 notes confirm GeoIP2 is the recommended production choice (local MaxMind database, no network call on the login path), with API-based resolution as the fallback. The fix(location): timeout on api location change adds a bound on how long an outbound lookup can block before the record is saved — previously an unbounded stall on the authentication path, which is a genuine production risk that this release mitigates.
Technical risk —
feat(deps): messenger and http-client as suggest moves Symfony Messenger and HttpClient into suggest. Correct direction for optionality, but any consumer that implicitly relied on those being transitively installed could see a silent degradation (no async location resolution, or a missing HTTP client at runtime) after upgrade. Must be verified against composer.json, not inferred from the changelog line.Key questions —
require → suggest demotion remove any dependency that previously installed automatically? Is this a breaking change for existing installs despite the patch version number?Stack fit — Validates cleanly for Symfony 6/7 applications already using the Security component and a Doctrine-backed persistence layer. It does not fit a Laravel stack; treat any Laravel requirement as a re-evaluation trigger, not an integration task. Confirm the framework question before committing engineering time.
Migration path — Greenfield adoption: composer require, enable the bundle, publish/author the auth-log migration, configure the location provider, then backfill nothing (logs are forward-only by nature). There is no upgrade path from a prior version in scope — this is a first assessment, and v4.0.2 is a patch on v4.0.1, so no data or config migration is introduced by this release. If a competing or in-house auth logger exists, plan a parallel-run period rather than a cutover, since losing authentication audit continuity is a compliance gap.
Compatibility — Verify the declared Symfony/PHP matrix against our runtime before install. The suggest demotion means we must explicitly require symfony/http-client if using API-based lookup, and symfony/messenger if we want asynchronous persistence. Pin those explicitly in our own composer.json rather than relying on the bundle's transitive graph — that is the durable fix for the risk above. GeoIP2 requires the maxmind-db/reader library plus a licensed MaxMind database and a refresh process; budget for the licence/account step.
Sequencing —
require/suggest diff.Maintenance — Actively maintained, with Dependabot-driven dependency updates, a maintainer-authored reliability fix, documentation improvements, and newly added static analysis in the same release window. That is a healthy cadence for a small package. Bus factor is the concern: a single primary maintainer and a small contributor pool means we should be prepared to fork or vendor if the project stalls. Pin versions and review changelogs; a patch-numbered release that changes dependency declarations is a reminder not to auto-merge.
Support — No commercial support; community issues only. Internal runbook must cover: enabling/disabling the bundle, changing the location provider, rotating the GeoIP database, and pruning old records. Domain-adjacent teams (security, compliance) will have opinions on retention and access — engage them before go-live, not after.
Scaling — Auth-log volume scales with login attempts, not user count, so it is comparatively modest but bursty (credential-stuffing attacks generate large failure spikes precisely when you most need the log to stay available). Watch database growth and index bloat; a retention policy is mandatory, not optional. If location resolution is synchronous, login throughput becomes coupled to lookup latency and to the GeoIP database's local read performance — async via Messenger decouples this but introduces a queue as a new dependency in the critical path.
Failure modes —
Ramp-up — Low for a Symfony developer: a few hours to install, configure, and validate. The real effort is not the package but the surrounding policy work — retention rules, PII handling review, GeoIP licensing, and dashboard/alerting on top of the log stream. Estimate one to two days of engineering plus a compliance review, and treat the framework-compatibility question as a hard prerequisite that can zero out the estimate.
How can I help you explore Laravel packages today?