lunetics/timezone-bundle
Symfony bundle that detects a visitor's timezone from their IP address and exposes it through a simple service, with configurable fallbacks for timezone-aware applications.
Architecture fit
symfony/validator ~2.1). A 4.x line now exists and is the actively maintained one. Neither ships an Illuminate\Support\ServiceProvider, facade, publishable config, or Laravel-neutral view layer — integration is still via AppKernel registration, DependencyInjection/*Extension.php loaders, and compiler passes. The 4.0.1 note that the distribution gate requires the profiler template confirms continued coupling to Symfony's web-profiler/data-collector machinery, which has no Laravel analogue at all.Integration feasibility
symfony/* at 6.4; Laravel 11/12 at 7.x. So the package's own support matrix sits strictly below the floor of any currently supported Laravel. Composer will hard-conflict. Do not attempt.jamesmills/laravel-timezone for per-user persistence, torann/geoip for IP lookup, or — best — capture Intl.DateTimeFormat().resolvedOptions().timeZone once client-side and persist it, eliminating the dependency question entirely.Technical risk
Key questions
Intl API, submitted once and persisted) is insufficient? This eliminates the entire dependency.Stack fit
Migration path
App\Services\TimezoneDetector with explicit ordered strategies (explicit user setting → session → IP lookup → app default), each behind a narrow interface so the geolocation provider is swappable.SetTimezone resolved per request on the web group, wrapped in try/catch with fail-open to the app default.Compatibility
composer.json. Pin nothing. The 4.0.1 notes confirm the compatibility ceiling sits below Laravel's Symfony floor, and that the previously published workaround (use 3.0 on 6.4) is unsound.DateTimeZone::listIdentifiers() before persistence — do not trust provider strings, and never store raw UTC offsets.Sequencing
Audit current timezone handling (storage, display, jobs) before introducing detection — most "wrong timezone" failures originate in UTC-non-normalized persistence. Then: detection service → middleware → per-user persistence → validation → observability. Ship detection last; it is the least load-bearing component.
Maintenance
Support
Scaling
Failure modes
Ramp-up
Recommendation
Do not adopt lunetics/timezone-bundle as a dependency — a conclusion now supported by the maintainer's own compatibility statement rather than by inference. 4.0.1 is a documentation and release-gate release with no runtime change; it improves the project's credibility as a reference (tightened CI, risky tests now fail, changelog corrected) without moving it any closer to installable in a Laravel app. Re-read the 4.x source, document its detection precedence, and implement the equivalent as a single Laravel middleware plus a persisted per-user timezone — or eliminate the requirement entirely with one-time client-side detection.
How can I help you explore Laravel packages today?