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

Weather Underground Laravel Package

suncat/weather-underground

A Laravel/PHP wrapper for the Weather Underground API that lets you fetch current conditions and forecasts for a given location. Configure your API key and query weather data through a clean, simple interface in your applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Verdict up front: do not adopt as a dependency. This package is a Symfony2 bundle, not a Laravel package, and it wraps an upstream API that no longer has a public free tier. It is best treated as a ~200-line reference implementation to read once, not code to install. Its score (0.03), zero stars, and zero dependents confirm no production track record, no community validation, and no downstream bug surface to learn from.

Architecture fit — poor. The artifact is structurally a Symfony bundle: a *Bundle class, a DI extension in DependencyInjection/, service wiring under Resources/config/, and Symfony-specific conventions for configuration and container registration. Laravel has no concept of bundles, no bundle auto-registration, and a different container/config/cache model. Nothing here "just works" under composer require in a Laravel app — it would either be inert (never booted) or, at best, provide plain PHP classes you must instantiate manually. Framework mismatch, not a configuration gap.

Integration feasibility — technically easy, commercially pointless. The genuinely reusable surface is small: an HTTP call to Weather Underground plus JSON-to-value-object parsing. That is replaceable in roughly a day with Laravel's Http client and a handful of DTOs. The hard part is not the code, it's the dependency: Weather Underground's public developer API was retired (free keys sunset at the end of 2018, with the service folded into IBM/The Weather Company's paid offering). Any Laravel integration we build would authenticate against a contract we cannot obtain on the free tier and may not be able to obtain at all. Integration cost is low; the resulting feature would be non-functional without a separate, likely paid, data provider.

Technical risk — high, and dominated by one issue.

Risk Severity Notes
Upstream API defunct/unavailable Critical Blocks functionality regardless of code quality
Unmaintained (no releases, 0 stars, 0 dependents) High No security patches, no PHP 8.x compatibility work
Era-appropriate Symfony2 code Medium Likely PHP 5.x idioms, no strict types, possibly deprecated patterns
Unknown test coverage Medium No CI signal means parsing edge cases are unverified
Credential handling Medium Config may assume a global API key; review for leakage before any reuse
License Low MIT — forking and vendoring are legally unencumbered

Key questions to resolve before any further engineering time:

  1. Do we have, or can we obtain, a Weather Underground / The Weather Company API key? If no, stop here.
  2. Does the code contain any logic worth keeping beyond the HTTP call and JSON mapping — caching, unit conversion, geolocation, alert parsing?
  3. Which PHP version does composer.json require, and does the code run at all under PHP 8.2+?
  4. Are there tests, and do they use recorded fixtures (which would survive the API's death and still be useful as parsing references)?
  5. What is our fallback provider — Open-Meteo, OpenWeatherMap, Visual Crossing, NWS/weather.gov, or Tomorrow.io — and does our domain model depend on Weather Underground-specific field names?

Integration Approach

Stack fit — none out of the box. The correct framing is not "install this package in Laravel" but "harvest the domain logic and re-home it in Laravel-native constructs." Concretely:

Symfony2 construct Laravel equivalent we would write
Bundle class + DI extension WeatherServiceProvider with register()/boot()
Resources/config/services.yml $this->app->bind() / singleton() calls
Bundle config tree config/weather.php + mergeConfigFrom + publishable config
Service locator access Facade or constructor-injected interface
Symfony HTTP client Illuminate\Support\Facades\Http (Guzzle 7 under the hood)
Symfony cache Cache::remember() with TTL per endpoint

Migration path. Two viable routes, in order of preference:

  1. Reference-only rewrite (recommended). Read the package once, extract the request shape and response field mapping, then implement a ~1-day Laravel service behind a WeatherProvider interface. This gives us testability, provider swappability, and no inherited debt. No fork, no vendoring, no license file to track beyond an attribution note.
  2. Vendor-and-wrap (only if the parsing logic proves unexpectedly rich). Fork under our namespace, strip all Bundle/DI scaffolding, keep only the client and parser classes, add a Laravel service provider and config, and pin the fork to our own repo. Accept full ownership immediately — there is no upstream to sync from.

Compatibility. Target PHP 8.2/8.3 and the Laravel versions in our support matrix (10/11). Expect to remove PHP 5-era syntax, add return types, replace any @expectedException-style tests, and modernize array syntax. composer.json will need php, illuminate/support, and guzzlehttp/guzzle constraints rewritten from scratch. Budget for this even on the rewrite path — the reference code will not be copy-paste clean.

Sequencing.

  1. Gate (0.5 day): confirm API access and provider decision. This kills or greenlights everything downstream.
  2. Spike (1 day): prototype the call against the chosen provider with our two or three real use cases (current conditions, forecast, alerts).
  3. Contract first (0.5 day): define WeatherProvider interface and DTOs so the provider choice stays reversible.
  4. Implementation + tests (1–2 days): HTTP client wrapper, fixture-based tests, caching layer, rate-limit handling.
  5. Operationalize (0.5 day): config, env var for credentials, logging, alerting on upstream failures.

Total realistic effort is 3–5 days of engineering — comparable to or less than the effort of making this Symfony2 bundle behave inside Laravel, with a far better outcome.

Operational Impact

Maintenance. Under the recommended rewrite, we own ~300 lines and full control of the provider boundary; swapping data sources becomes a one-class change. Under the vendor-and-wrap path, we inherit an unmaintained codebase with zero upstream, meaning every future PHP or Laravel upgrade is our problem alone. Both paths mean we are the maintainer — the difference is how much surface area we signed up to maintain.

Support. There is no upstream to escalate to: no issues triage, no releases, no security advisories. Internal support burden depends entirely on our own documentation and tests. The absence of community usage also means no Stack Overflow corpus — the team cannot search its way out of a problem. Budget for a short internal README and a runbook rather than assuming discoverable answers.

Scaling. The package itself is stateless and adds negligible overhead; scaling is a function of the provider, not the code. Real constraints are provider rate limits, per-call latency, and cost per request at volume. Mitigations are Laravel-native: aggressive caching keyed on location plus TTL appropriate to the data (conditions ~5–10 min, forecast ~30–60 min), queued prefetch for high-traffic geographies, and a circuit breaker so a slow provider cannot exhaust PHP-FPM workers. None of this exists in the package; all of it must be built.

Failure modes to plan for.

  • Upstream gone or unauthorized: 401/403/404 from a retired endpoint, or DNS/host-level failure. Needs explicit detection and a degraded-mode response, not a swallowed exception.
  • Silent nulls: old-style parsers often return partial objects when fields are missing. Enforce strict DTO hydration and fail loudly.
  • Schema drift: provider field renames break parsing without an error. Pin expectations in fixture tests and alert on hydration failure rate.
  • Credential exposure: confirm the API key is read from env/config and never logged or committed; old bundles sometimes ship placeholder keys or dump request URLs (which contain the key) at debug level.
  • No timeouts/retries by default: wrap every outbound call with explicit connect/response timeouts and bounded retries with backoff.

Ramp-up. Deceptively low. The code volume is small and the domain is familiar, so an engineer will feel productive within half a day. The trap is that the code ramps quickly while the context does not: no docs, no tests, no API to test against, and Symfony2 conventions that a Laravel-only team will need to decode. Realistic estimate is 1 day to understand the package and 1–2 days to reach a confident, tested Laravel equivalent — versus the ~2 hours the star count and line count might suggest. Plan the work as a small greenfield service, not as an integration task, and the estimate will hold.

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.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator