league/uri-manipulations
League URI Manipulations provides immutable, PSR-7-friendly tools for modifying URIs in PHP. Add, remove, update, or conditionally alter query parameters, paths, and other components through a clean, composable API.
league/uri-manipulations is a pure-PHP value/utility library — no service provider, facade, config, or Laravel bindings. It sits in a service or HTTP-client layer, not framework plumbing. Its purpose (fluent mutation of URI components: query, path, fragment, host) is already covered by Laravel’s native Illuminate\Support\Uri helpers and by GuzzleHttp\Psr7\Uri / league/uri v7. There is no architectural gap in a modern Laravel stack that this package uniquely fills.league/uri v4/v5 dependency line and PHP versions of that period. Modern Laravel (10/11/12, PHP 8.1+) will almost certainly hit dependency-resolution conflicts and deprecation notices. Because the repo is archived, there is no path to a compatibility update short of forking.league/uri v7 (withQuery, withPath, withFragment) or Laravel’s Uri?league/uri v4/v5, and what would upgrading cost?league/uri v7 (which absorbed the manipulation capabilities) or Laravel’s built-in Uri/url() helpers. Reserve this package only for preserving behavior in a legacy codebase that already depends on it.league/uri v7 with* methods or, for query-string specifics, League\Uri\UriString / QueryString equivalents. Introduce a thin adapter (e.g., App\Support\UriMutator) that exposes the same call signatures, swap the implementation behind the adapter, then remove the old package. Treat this as a strangler-fig migration rather than a rewrite.league/uri version requirement against your Laravel/PHP baseline before anything else; a composer why league/uri audit will surface conflicts early. Expect to either pin older framework versions (unacceptable long-term) or drop the package. Also check transitive dependencies inherited from the 2018 league/uri line, since those are the real compatibility risk.composer why, static analysis, grep for the namespace).league/uri v7 / Laravel Uri with a small proof-of-concept against real inputs.league/uri v6+.league/uri v7 or Laravel’s Uri and document the decision so future contributors do not reintroduce this package.How can I help you explore Laravel packages today?