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

Url Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. league/url is a small, single-purpose value-object library: it wraps parse_url() with Url, Query, and component classes that let you read and mutate scheme, host, port, path, query, and fragment, then serialize back to a string. It is framework-agnostic and has no Laravel service provider, facade, config, or container binding. It fits Laravel only as a plain Composer dependency called directly from application code — there is no "Laravel integration" to evaluate. The idiomatic in-app alternatives remain league/uri (the maintained successor), guzzlehttp/psr7's Uri, or Illuminate\Support\Uri (Laravel 11.x+). Architecturally compatible, functionally redundant — and 3.3.5 does nothing to change that, since it adds no API surface and no framework glue.

Integration feasibility. Install and removal remain trivial. What changed is the abandonment picture. The previous assessment asserted a July 2015 last release and an archived repository; the existence of 3.3.5 with a merged PR (#81) contradicts at least the "no releases" half of that claim, so that statement must be corrected rather than carried forward. What we can and cannot conclude from the note alone:

  • Can conclude: someone merged a change and cut a release. The 3.3.x line has moved past the point the prior assessment assumed.
  • Cannot conclude (data not supplied): the release date, whether the repo is still archived, who holds maintainership, whether the published changelog between 3.3.0 and 3.3.5 includes PHP 8 compatibility work, or whether CI runs a modern PHP matrix.

Until those are answered, the runtime risk is unchanged, not improved. A path-parsing bug fix is not evidence that curly-brace string offsets and dynamic-property deprecations were cleaned up. Composer will still resolve the package on PHP 8.x regardless, so "install succeeds, runtime fails" remains the trap.

Technical risk. Ranked, with revisions:

  • Runtime/version risk (high, unverified): still no confirmed PHP 8.2+ support. Must be checked directly against the 3.3.5 tag's composer.json constraint and source, not inferred from a changelog line.
  • Behavioral risk (medium, now demonstrated): 3.3.5 changes relative-path resolution. This is precisely the quiet class of change that can break signature validation, redirect resolution, or cache keys. The fact that the fix landed without a minor-version bump means a ^3.3 constraint silently picks it up.
  • Governance/continuity risk (high, reclassified): previously "abandoned — definitive." Now better described as low-velocity and opaque. A one-line patch after long dormancy is the weakest possible maintenance signal: it may indicate a genuine revival, a single drive-by contributor, or a new owner with different intentions. None of these is a reason to adopt; all of them are reasons to pin.
  • Security risk (low-to-medium): unchanged. No evidence of a security response process or CVE channel. URL parsing remains a classic SSRF/open-redirect surface.
  • Supply-chain risk (low, marginally raised): a change of maintainership or an un-archived repo under new control is a supply-chain event worth a five-minute look — confirm the 3.3.5 tag is signed/attributable to a known committer before upgrading.

Key questions for the team.

  1. Is league/url already in composer.lock transitively, or is this a new-adoption request? A new adoption is still rejected outright — 3.3.5 does not change this.
  2. What is the release date of 3.3.5, is the repository still archived, and who is the named maintainer? Was there a transfer of ownership?
  3. Does the 3.3.5 tag declare and test PHP 8.1/8.2/8.3? Is there a CI matrix we can read?
  4. Are we on ^3.3 and therefore auto-eligible for this fix? Do we resolve relative paths anywhere that signing, redirect allowlists, or cache keys depend on?
  5. Which concrete call sites use it, and do they need parse-only or mutation and re-serialization?
  6. Do we require IDN/IRI support, strict RFC 3986 normalization, or PSR-7 UriInterface interoperability?
  7. Are we willing to fork and own a patched version, and who is the named owner?

Integration Approach

Stack fit. Unchanged: poor as a new dependency, tolerable only as a legacy one. Form requests and validation should use Laravel's url/active_url rules; HTTP client construction should use the client's own URI handling; outbound link and redirect generation should use url() and Illuminate\Support\Uri. With no service-provider wiring, "integration" is a static-analysis and call-site migration exercise.

Migration path. Still a removal project, not an onboarding project. One step is added at the front:

  • Pin first. Set an exact constraint (3.3.4 or 3.3.5, whichever the golden-file corpus validates against) and treat any further 3.3.x release as a reviewed change, not a bot merge. Given the opaque maintenance posture, "trust the patch line" is not available to us.
  • Target state: league/uri where rich RFC 3986/IDN parsing and component mutation are needed; Illuminate\Support\Uri or guzzlehttp/psr7\Uri for simple cases.
  • Shim strategy: a thin internal adapter (App\Support\UrlFactory) exposing only the methods actually used (getScheme, getHost, getPath, getQuery, setQuery, __toString). Migrate call sites to the adapter, then swap the implementation behind it.
  • Behavioral parity testing: capture a golden-file corpus of real-world URLs from production logs and assert old-vs-new output on every getter and on round-trip serialization — explicitly including relative-path resolution and base-URL joining, which is the surface 3.3.5 touched. Encoding and default-port differences surface here, not in hand-written unit tests.

Compatibility. Determine whether the dependency is direct or transitive; if transitive, upgrade the parent rather than pinning this. Then run the full suite against 3.3.5 on the highest PHP in the support matrix — that single run separates "upgrade" from "migration" from incident. Do not assume the patch improves PHP 8 behavior.

Sequencing.

  1. Inventory: composer why league/url, grep for League\Url, and grep for string-based URL manipulation mirroring its API.
  2. Triage 3.3.5: read the actual diff for PR #81, confirm the maintainer, confirm PHP constraints, decide pin vs. upgrade.
  3. Classify call sites: parse-only vs. mutate-and-reserialize; simple vs. IDN/RFC-edge-case dependent; relative-path dependent or not.
  4. Freeze: CI guard or composer.json comment blocking new usages.
  5. Introduce the adapter and migrate call sites mechanically.
  6. Swap the adapter implementation to the target library behind golden-file tests.
  7. Remove the dependency and the adapter if it has no remaining value.
  8. If a call site genuinely cannot move, vendor a patched fork under our namespace with a named owner and a documented sunset date.

Operational Impact

Maintenance. The prior "effectively zero ongoing maintenance from upstream — definitive, not a pause" must be softened to "near-zero and unpredictable." 3.3.5 shows the project is not inert, but one bug fix is not a maintenance cadence. Planning assumption stays the same: any fix we need, we write. The difference is that the codebase can now change underneath us without us acting, which is a strictly worse operational property than a frozen dependency — a frozen dependency is at least stable. Pinning is mandatory.

Support. No confirmed maintainer, triage process, or CVE channel. If a URL-parsing bypass is published, we learn through our own review or a scanner and fix it ourselves. For anything touching auth redirects or outbound request targets, that posture remains unacceptable for a long-lived service. The 3.3.5 release does not establish a security response capability.

Scaling. CPU-trivial and stateless; never a performance bottleneck. The scaling concern is organizational and, if anything, sharpened: relative-path handling is the part of URL semantics most people get wrong, and a library whose only recent activity is a relative-path fix invites exactly the kind of subtle divergence that costs hours in review. New hires will reach for league/uri or Illuminate\Support\Uri regardless, producing two idioms in one repo.

Failure modes.

  • Loud: fatal error on PHP 8 from removed syntax — caught at deploy; mitigated by running CI on the full PHP matrix.
  • Quiet — behavioral drift (raised): an auto-upgraded 3.3.5 changes relative-path output. Relative URL resolution sits directly upstream of signature validation, redirect target construction, and cache-key derivation. These do not throw; they page someone at 2 a.m., or in the security case, do not page anyone at all. This is now a demonstrated risk, not a theoretical one.
  • Quiet — supply chain (raised): an un-archived repo or changed maintainer means new commits arrive with no prior trust relationship. Review the diff or pin; do not let a bot do it.
  • Composer noise: security audits and dependency-bot PRs flagging an unmaintained package with no available fix — recurring triage with a known non-answer.

Ramp-up. Near-zero for any PHP developer; the API is a thin, guessable wrapper over parse_url(). That remains the argument for replacing rather than defending it: migration is cheap because the abstraction is shallow. Estimated effort for a typical Laravel service with a handful of call sites: one to three engineer-days, dominated by golden-file parity work — add roughly half a day for relative-path cases now that 3.3.5 has moved that behavior.

Recommendation. Do not adopt. If present, pin to an exact version, triage the 3.3.5 diff and maintainer before upgrading, and schedule removal within the current quarter behind an adapter and parity tests; target league/uri for rich parsing and Illuminate\Support\Uri or the PSR-7 URI of the HTTP client in use for everything else. The prior assessment overstated the package's dormancy — a patch release exists and that sentence needs correcting in our records — but the conclusion is unchanged and in one respect strengthened: a dependency that is neither actively maintained nor reliably frozen is the worst of both operating modes, and this one still has no offsetting benefit.

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.
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
equipc/laravel-email-database-log
adedsec/nova-translated-labels