league/uri-components
Immutable value-object URI components for PHP. Build, validate, normalize and convert parts like scheme, authority, host, path, query and fragment with PSR-7 compatibility. Supports IDN hosts (intl/polyfill) and IPv4 conversion.
Feature Development:
Roadmap Prioritization:
BackedEnum support).Use Cases:
Adopt When:
nyholm/psr7) or WHATWG URL standards is critical.Look Elsewhere If:
parse_url() or filter_var() suffice).symfony/validator or respect/validation).intl, GMP, or BCMath for IPv4/IPv6 handling)."This package lets us handle URLs like a Swiss Army knife—safely, scalably, and without reinventing the wheel. For example:
"Why use this over custom code or other libraries?
nyholm/psr7, guzzlehttp/psr7, or Symfony’s HTTP components.Query::filter(), Modifier::redactPathSegments(), or Domain::isSubdomainOf() handle edge cases we’d otherwise write 50+ lines of code for.BackedEnum support.Trade-offs:
intl for full IDN/IPv6 support.parse_url() for devs unfamiliar with immutable objects.Proposal:
symfony/uri are heavier; this is leaner and more focused on components."*Key Selling Points:
How can I help you explore Laravel packages today?