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

Uri Query Parser Laravel Package

league/uri-query-parser

A standalone PHP library for parsing and building RFC 3986 query strings. It preserves key order and duplicate parameters, handles configurable separators and encoding, and provides the query-string parsing foundation used by league/uri.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Canonical URL & cache-key strategy. Deterministic query parsing/building lets you decide whether ?b=2&a=1 and ?a=1&b=2 are the same resource — a direct input to CDN cache hit rates, deduplication of inbound links, and SEO canonicalization.
  • Signed-request and webhook verification. Any HMAC/signature scheme (OAuth 1.0a base strings, Stripe/GitHub-style webhook signatures, presigned download URLs) requires re-serializing the query string exactly as received. A parser/builder pair that round-trips without silently re-encoding is the difference between "signature valid" and a class of unreproducible auth failures.
  • API client SDK and integration surface. Decides how your public API expresses filters, pagination, and repeated parameters (?tag=a&tag=b vs ?tag[]=a&tag[]=b vs ?tag=a,b). This is a long-lived, versioned contract — expensive to change after GA.
  • Redirect and deep-link safety. Parsing inbound query parameters to allowlist redirect targets, strip tracking junk, and reject unexpected keys before they reach a client app or a 302.
  • Build vs. buy for a commodity capability. Query-string handling looks trivial and is not (bracket notation, delimiter lists, encoding edge cases, + vs %20). This package is a cheap reference point for scoping either a 1-day internal utility or an adoption decision.
  • Observability and audit fidelity. Faithfully capturing raw inbound queries for analytics, fraud review, and debugging — including parameters your framework's default parser mangles.
  • Vendor/maintenance posture. With the package archived since 2019 and zero dependents, it also forces a legitimate deprecation decision: do we inherit this code, or replace it?

When to Consider This Package

Consider it when:

  • You need structured query semantics, not a flat map: repeated keys, delimiter-separated lists, bracket notation.
  • You need lossless round-trip parsing and rebuilding — canonicalization, signature verification, cache keys.
  • You want a small, framework-agnostic, MIT-licensed utility with no runtime dependencies, in a PHP 7.x-era codebase.
  • Your team is already in The League ecosystem and values consistent conventions.
  • You are evaluating it as a reference implementation to vendor rather than a live dependency.

Look elsewhere when:

  • Maintenance matters. It is archived: no CVE response, no PHP 8.x certification, no issue triage. Treat every adoption as "we now own this code."
  • You need full URI handling (parsing, resolution, IDN, normalization) — use league/uri, whose QueryString component supersedes this package.
  • You already ship Guzzle (Query::parse/Query::build), Symfony HttpFoundation, or PSR-7/PSR-17 infrastructure — you would be adding a dependency to duplicate an existing primitive.
  • You need streaming/very large query handling, or a security-hardened parser (parameter pollution, depth limits) as a first-class guarantee.
  • Procurement requires vendor support, indemnity, or an actively maintained release train.
  • Your stack is PHP 8.1+ only and you cannot accept an unverified transitive dependency for a capability you can implement in under 300 lines.

How to Pitch It (Stakeholders)

To executives: This is a tiny, free, MIT-licensed utility for reading and writing the ?a=1&b=2 part of a URL correctly — an unglamorous but load-bearing piece of plumbing behind cache hit rates, API contracts, and signature-based security. The cost is not money; it is ownership. The project was archived in 2019 and has no active maintainers, so adoption means we inherit it. Recommendation: use it as a design reference or a short-lived bridge, not a permanent dependency, and budget roughly one engineer-day to either vendor it or replace it with the equivalent already available in our framework or in league/uri. Low cost, low risk, and it de-risks a category of bugs that are painful to diagnose in production.

To engineering: It solves a real problem that parse_str does not — structured query values (repeated keys, comma/semicolon lists, bracket notation) with a builder that round-trips deterministically, which is exactly what you need for stable cache keys and signature base strings. The catch is that it is archived, so there are no upstream fixes and no PHP 8 certification. Proposal: a one-to-two day spike to (a) verify behavior against our real traffic samples, (b) confirm it runs clean on our target PHP version, and (c) compare against league/uri's QueryString and Guzzle's Query helpers. Exit with a build/buy/vendor recommendation rather than an open-ended dependency.

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.
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
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums