dnsimmons/openweather
dnsimmons/openweather is a Laravel wrapper for the OpenWeather API, offering a simple, expressive interface to fetch current conditions, forecasts, and other weather data in your PHP applications with minimal configuration.
Architecture fit. The package is a thin, opinionated wrapper: a Laravel service provider, a config file, a facade, and a handful of HTTP calls to OpenWeatherMap's free-tier endpoints. It does not own data, introduce queues, or establish any domain model—it is a convenience layer over an API your application could call directly with Illuminate\Support\Facades\Http in roughly 50–100 lines. That means the architectural coupling is low in one sense (easy to swap out) but the value delivered is also low; the package is not solving a hard problem, it is saving boilerplate. For a Laravel monolith that needs current-conditions or forecast data on a page, the fit is fine. For anything requiring normalized domain objects, multi-provider failover, or historical weather data, this package is below the abstraction level you actually need.
Integration feasibility. Mechanically trivial: composer require, Laravel package auto-discovery registers the provider, php artisan vendor:publish for config, drop the API key into .env. Realistic effort is under a day including a smoke test. The blockers are not effort but eligibility—an archived package with a final release in December 2021 will almost certainly carry illuminate/support constraints capped around Laravel 8, and possibly Guzzle 6/7 pins that conflict with a current stack. Feasibility on a modern Laravel (10/11/12) application is therefore low without forking.
Technical risk. High, and concentrated in three areas. First, abandonment: archived status means no security patches, no compatibility updates, and no upstream response to OpenWeatherMap API changes—the provider has since promoted One Call 3.0 and revised free-tier terms, and a 2021 wrapper will not track those. Second, supply-chain exposure: an unmaintained Composer dependency pulls transitive packages that also stop receiving advisories, and a 22-star package is not a realistic target for a fork-and-patch community. Third, secrets and failure handling: API-key handling, retry/backoff, rate-limit (HTTP 429) responses, and caching are exactly the things thin wrappers get wrong, and you cannot rely on upstream to fix them. The 0.19 score and low star count are consistent with "small, single-author, now-dormant utility."
Key questions to answer before any decision.
composer.json constraints on PHP, illuminate/*, and Guzzle, and does a composer require dry-run resolve cleanly against our target Laravel version?Stack fit. Acceptable for a Laravel 8/9 application on PHP 7.4/8.0–8.1 that needs read-only weather data and nothing more. A poor fit for Laravel 10+, PHP 8.3+, or any service with SLOs attached to weather-dependent behavior. The package also assumes synchronous request-path calls, so any user-facing page using it inherits the provider's latency.
Migration path. Do not add it as a live dependency. Treat it as a reference implementation: read the source, copy the endpoint URLs and parameter shapes, and reimplement behind an interface you own (WeatherProvider contract) using Laravel's HTTP client with Cache::remember, explicit timeouts, and a mapped exception type. This costs perhaps one to two engineer-days more than installing it and eliminates the abandonment risk entirely. If a specific behavior in the package is hard to reproduce, fork it into a packages/ directory or a private VCS repo, pin the fork, and take ownership of the composer.json constraints yourself—do not consume it from Packagist.
Compatibility. Verify the PHP and Laravel matrices, then verify the OpenWeatherMap API surface: the free tier's rate limits (on the order of 60 calls/minute and a monthly call ceiling for the standard endpoints; the One Call endpoints have separate, tighter daily quotas) must be reflected in your caching strategy, not in the wrapper. Also confirm TLS/Guzzle behavior against the current OpenWeatherMap hostnames.
Sequencing. (1) Timeboxed spike—half a day—to confirm the package's actual endpoint coverage and composer constraints. (2) Decision gate: adopt-as-is only if the application is already pinned to a matching Laravel version and the weather feature is non-critical. (3) Otherwise, implement the adapter in-house behind an owned interface. (4) Ship with cache TTLs, a circuit breaker, and a stub provider for tests. (5) Record the decision and its rationale in an ADR so the next team does not rediscover the archive status.
Maintenance. Effectively 100% ours. Archived means the maintenance burden does not disappear—it transfers. If adopted directly, expect to fork within 6–12 months on the next Laravel major upgrade. Against a 12–24 month horizon, the wrapper saves hours and costs days.
Support. No upstream support channel, no issue triage, no security advisories. Internal escalation lands on whoever owns the dependency, which is a staffing decision, not a technical one, and should be made explicitly rather than by default.
Scaling. The constraint is the provider's quota, not the package. Any nontrivial traffic volume needs a cache in front of every call (Redis or database-backed, TTL matched to how stale the weather data may be for the use case—minutes for a dashboard, hours for a static widget) and a strategy for quota exhaustion: serve stale cache, degrade the widget, never fail the page. The package is unlikely to provide any of this, so plan for it regardless.
Failure modes to design against.
.env files—keep it in the secret store, never in the published config's defaults.Ramp-up. Very low for the package itself—an engineer is productive in an hour. The real ramp-up cost is organizational: someone must own the fork, the cache policy, the quota budget, and the upgrade path, and that ownership has to be assigned before the dependency is merged. Recommendation: decline the direct dependency, adopt the package's endpoint knowledge, and build a small owned adapter—the total cost is lower and the risk profile is materially better.
How can I help you explore Laravel packages today?