Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Openweather Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • What are the composer.json constraints on PHP, illuminate/*, and Guzzle, and does a composer require dry-run resolve cleanly against our target Laravel version?
  • Which endpoints are actually wrapped, and do they map to the API version and free tier we intend to use?
  • Does it implement caching, timeouts, retries, and 429/5xx handling, or does it let exceptions escape?
  • Is there test coverage, and is the license (likely MIT) compatible with our distribution model?
  • Who is the accountable owner if the OpenWeatherMap response schema shifts?

Integration Approach

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.

Operational Impact

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.

  • Provider outage or elevated latency propagating into request latency—mitigate with short timeouts, a circuit breaker, and stale-while-revalidate caching.
  • Quota exhaustion (429) surfacing as an exception to the user—map to a degraded UI state.
  • API key leakage via config caching, logs, or committed .env files—keep it in the secret store, never in the published config's defaults.
  • Silent shape changes in the provider's JSON breaking assumptions baked into a 2021 wrapper with no schema validation.
  • Dependency rot: an unmaintained transitive package blocking a PHP upgrade across the whole application, which is the highest-cost failure mode here and is invisible until it isn't.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator