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.
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:
composer.json require, and does the code run at all under PHP 8.2+?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:
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.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.
WeatherProvider interface and DTOs so the provider choice stays reversible.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.
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.
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.
How can I help you explore Laravel packages today?