locaine/lcn-weather-forecast-bundle
A Laravel bundle for adding weather forecasts to your app. It offers configurable API integration, cached forecast data, and simple Blade helpers, so you can display current conditions and multi-day outlooks without building your own weather service layer.
Architecture fit — mismatch at the foundation. Despite being scoped here as a "Laravel/PHP package," lcn-weather-forecast-bundle is a Symfony 2 bundle — the *Bundle suffix, a DI extension class, a configuration tree, and service definitions in YAML/XML are the tell. Laravel's container is not Symfony's DI container; there is no bundle-registration path. Laravel does consume individual Symfony components (HttpFoundation, Console, Process), but a full bundle with its own extension and compiler passes does not boot inside a ServiceProvider. Making it work means either installing symfony/framework-bundle alongside Laravel (ill-advised) or rewriting the internals.
Integration feasibility — low, and declining. Three independent blockers:
What is technically salvageable. The description advertises "API request normalization and caching" — that is the actual value. A response normalizer (vendor payload → domain DTO) plus a cache decorator around an HTTP client is a ~150-line pattern, provider-agnostic, and worth re-implementing rather than importing.
Technical risk — very high / effectively disqualifying. Zero stars, zero dependents, no visible maintenance. No security patching, no PHP 8 compatibility work, no CVE response path. Supply-chain risk is low in absolute terms (tiny codebase) but integration risk is total: the package cannot execute.
Key questions.
Stack fit — none out of the box; a port is the only viable path. Do not vendor this as a dependency. Extract the two patterns and re-implement natively.
Migration path (re-implementation, ~1 sprint).
WeatherProvider interface: forecast(float $lat, float $lon, CarbonInterface $at): ForecastData.ForecastIoAdapter entirely — legacy keys no longer function. Implement OpenMeteoAdapter (keyless, generous limits) or VisualCrossingAdapter behind the interface.ForecastData DTO plus one normalizer per adapter, so a provider swap never touches call sites.CachedWeatherProvider implements WeatherProvider, backed by Cache::remember() with provider-aware TTLs (10–15 min current conditions, 1–3 h daily). Round coordinates to ~3 decimals to lift hit rate.config/weather.php (provider, key, TTLs, units, locale).Compatibility. Assume nothing from the original runs on PHP 8.1+. Its service definitions, Symfony 2 event dispatch, and era-specific syntax are prose documentation, not code. Any transitive symfony/* constraints in its composer.json will actively conflict with Laravel's pinned Symfony component versions.
Sequencing. Interface → adapter → DTO/normalizer → cache decorator → config + binding → tests (contract tests per adapter, faked HTTP client, time-travel cache assertions) → observability. Ship the interface first so the provider commercial decision is not a blocking dependency.
Maintenance. Zero upstream maintenance. Zero stars, zero dependents, single author, no releases. Treat the repository as an archived design reference. If forked, own the fork explicitly with a CODEOWNERS entry and a recorded rationale.
Support. None. No issue triage, no security advisories, no PHP 8 compatibility work. Every incident is ours alone. This is the strongest argument against adoption independent of the provider question.
Scaling. The caching instinct is correct and scales well: hits collapse N users in a metro area into one upstream call per TTL window. Model these risks: cache stampede at TTL expiry (use Cache::lock or jittered TTLs), key-cardinality blowup from unrounded coordinates, and provider rate-limit ceilings if cache misses are amplified under load.
Failure modes.
fetched_at in the UI and enforce TTL ceilings.Ramp-up. Code volume is small, so reading it is cheap; the real cost is archaeology — decoding Symfony 2 idioms and a dead vendor contract to recover a pattern a competent engineer would write fresh in under a day. Budget it as a design-reference task, not an onboarding task.
Recommendation. Do not integrate. A 0.03 score with zero stars and zero dependents is consistent with an abandoned bundle whose upstream dependency no longer exists. Harvest the normalization-plus-caching pattern, implement it behind a WeatherProvider interface in Laravel, and select a live provider on commercial terms.
How can I help you explore Laravel packages today?