league/uri-schemes
A PHP library for working with URI schemes, offering dedicated classes to parse, validate, and manipulate HTTP, FTP, WebSocket, and other scheme-specific URIs. Built on league/uri components for consistent, standards-compliant URI handling.
webcal://), OAuth/SSO redirect allowlists, mobile deep links (myapp://), and canonical URLs for SEO — benefits from a real URI parser instead of regexes and filter_var string checks. This package is the scheme-aware layer of that capability: it models schemes like mailto:, tel:, urn:, ftp:, ssh:, and git: as structured objects, so you can read out the address, subject, phone number, or path components rather than string-slicing.league/uri family should be planned as a platform-level dependency decision (one owner, one upgrade path), not a per-team choice. A team pulling in this package in 2024+ is a signal that the org lacks a sanctioned URI/URL-parsing standard — worth fixing centrally.mailto: and https: links with different rules).mailto, tel), feed readers and RSS/Atom link extraction, ActivityPub/IndieWeb identities (acct:, web+* schemes), payment and messaging links (bitcoin:, upi:, sms:), and calendar deep links.Consider it only as a legacy-compatibility move, when all of the following hold:
league/uri below v6 (verify the exact constraint in composer.json before planning anything).Mailto, Tel, Urn, Ftp, etc.) as distinct classes, and you need them today, without a refactor.Look elsewhere — this is the default for anything new — when:
league/uri v6/v7, which absorbed the scheme components into the main package. Same API lineage, maintained, PHP 8-ready. The migration cost is measured in hours, and it removes the archived-dependency question entirely.url validation rule, Str::isUrl(), URL::isValidUrl(), and filter_var($x, FILTER_VALIDATE_URL) handle the large majority of "is this a URL" checks. Only escalate to a parser when you genuinely need scheme-specific components.egulias/email-validator for mailto: address parts, a phone-number library for tel:, or symfony/http-foundation/psr/http-message URI implementations if you already depend on them.league/uri family, not as an adoption candidate. Nothing is testing this on your behalf.Decision summary: approve the capability, reject this artifact. Fund a small migration to league/uri v7 (or rely on framework primitives) rather than adding league/uri-schemes to composer.json.
To executives (one paragraph): We evaluated a small, free, MIT-licensed library for parsing links — the kind of code behind "paste your website," webhook setup, calendar subscriptions, and redirect allowlists. The capability is worth having; hand-written link parsing is a recurring source of bugs and quiet security gaps. However, this specific package has been archived since 2018 with no releases, no maintainer, and no downstream users, so we do not recommend adopting it. The good news is the maintained successor is from the same authors and costs the same (free): roughly one engineer-day, no new vendor, no license spend, and it eliminates an unmaintained dependency from our stack before it becomes an audit finding. Recommendation: adopt the maintained successor, decline this package, and standardize link parsing org-wide so individual teams stop making this call.
To engineering (the actual ask):
league/uri-schemes to composer.json. It is archived, PHP 5.6/7.x-era, unpatched, and has zero dependents — no one is finding its bugs for us.league/uri ^7 (or ^6 if constraints require) for scheme components — same API lineage, maintained, PHP 8.x compatible, security fixes flowing.url rule, Str::isUrl(), or URL::isValidUrl(). If it is, this is a zero-line change.mailto: addresses/subjects, tel: numbers, urn: namespaces), wrap the parser behind a single internal service (e.g., LinkParser) so the vendor is an implementation detail and a future swap is one file, not fifty call sites.Risk framing to use in the review: the cost of the maintained path is ~1 day; the cost of the archived path is an unbounded tail of unpatched parsing behavior in user-facing and potentially security-adjacent code, with no upstream to call. That trade is not close.
How can I help you explore Laravel packages today?