league/url
League\Url is a PHP library for parsing, inspecting, and manipulating URLs. It provides an object-oriented API for working with schemes, hosts, paths, ports, and query strings, making URL generation and modification safer and more predictable in PHP applications.
league/uri (same vendor, actively maintained), Laravel's native Illuminate\Support\Uri facade (Laravel 11+, itself built on league/uri), or symfony/http-foundation if you're already in that ecosystem. Do not build a parser in-house; do not build on this.@ confusion, scheme-relative URLs, IPv6 literals) that attackers have exploited since the PHP 5/7 era. This remains the single decision where the package materially matters — whether to tolerate parser drift in a security-adjacent path.Consider it only in the narrow case where you are maintaining an existing application that already imports it and the code path is non-security-critical (e.g., cosmetic URL formatting in an internal admin tool), and a migration would cost more than the residual risk. Even then, pin it (to 3.3.5 or your verified equivalent), document the decision, and schedule removal. The 3.3.5 release does not widen this window — a patch does not create a maintenance guarantee, and you should not read it as a signal to defer migration indefinitely.
Look elsewhere in every other circumstance:
league/uri — same maintainer organization, PSR-7/PSR-17 aligned, actively released with a real roadmap.Uri class; it wraps league/uri and gives you first-class support with no independent dependency to track.To executives (30 seconds): We found a dormant PHP URL-parsing library in our dependency scan. It has been without a roadmap or maintainer commitment for roughly a decade; its only recent change is a single volunteer bug fix to relative-path handling, with no security process behind it. URL parsing is the layer that decides whether a redirect goes where we intend, so a stale parser is a security and reliability liability we're carrying for no benefit. There is a maintained successor from the same organization, and modern Laravel has equivalent functionality built in. Recommendation: do not adopt; approve a scoped migration off it. Cost is low because almost nothing else in the ecosystem depends on it — the work is confined to our own call sites. Do not let the recent patch read as a reason to wait.
To engineering (the practical version): league/url remains deprecated in all but name. 3.3.5 is a one-line-class bug fix to relative-path get(), not a revival — no new features, no deprecation reversal, no supported-PHP restatement. Its API is broadly reproducible with league/uri or, on Laravel 11+, Illuminate\Support\Uri — but treat it as a rewrite of call sites, not a version bump: constructor semantics, immutability, and query-parameter handling differ, and league/uri is stricter about validation (which is the point). If you must stay temporarily, pin to 3.3.5 and re-run any test that asserts on resolved paths, since the patch changes relative-path output. Suggested path: (1) inventory call sites and classify each as cosmetic vs. security-adjacent; (2) migrate security-adjacent paths first — redirects, host validation, anything touching user input; (3) add a dependency-policy check to CI so a package with no release in N years, or no stated support window, fails the build. Ask for the inventory as the first deliverable, not an estimate — we don't yet know the blast radius, and given zero dependents it's likely small.
To security/architecture, if they push back: the honest counterargument is that the library is small, MIT, vendorable, and evidently still receives occasional patches — we could fork and patch. Reject that. Forking means we own URL-parsing edge cases forever, and a volunteer bug fix to path resolution is not the same as an owner accountable for parser hardening. That is a worse trade than a half-day migration to a maintained package that already does it.
How can I help you explore Laravel packages today?