NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #90 most downloaded on Packagist
URI manipulation library
Last release 6 months ago
15 Mar 2026
Release timing varies
gaps range from 8 days to 12 months
Nearly every release is documented
notes for 38 of 39 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
41 releases · first in 2015
Update requirement to use uri-interfaces 7.8.1
uri-interfaces 7.8.1VariableBag implementationuri-interfaces 7.8.1VariableBag implementationOne column per quarter.
Fix regression in deprecated Uri::frombaseUri method 175
Builder classBackedEnumtransform method to Uri and UrnUri::frombaseUri method 175Uri::isIpv4Host tells whether the URI host is an IPv4 address
Uri::isIpv4Host tells whether the URI host is an IPv4 addressUri::isIpv6Host tells whether the URI host is an IPv6 addressUri::isIpvFutureHost tells whether the URI host is an IPvFuture addressUri::isRegisteredNameHost tells whether the URI host is a registered nameUri::isDomainHost tells whether the URI host is a domain nameBaseUri::isSameDocument method 165HostRecord class, some registered name were wrongly throwing exceptions.Uri::withPath improve handling of path leading slash presenceUriTemplate::exapndToUrl and UriTemplate::expandToUrlOrFail adding the missing softErrors argument populated by reference.League\Uri\Urn object to specifically work with URN as defined by RFC8141
League\Uri\Urn object to specifically work with URN as defined by RFC8141Http::tryNew returns a new Uri instance on success or null on failure (ie: a Relax version of Http::new).Http::when conditional method to ease component building logic.Uri::parse returns a new Uri instance on success or null on failure (ie: a Relax version of Uri::fromBaseUri and Uri::new) that mimics the behaviour of the upcoming native PHP URI parse method.Uri::tryNew returns a new Uri instance on success or null on failure (ie: a Relax version of Uri::new).Uri::when conditional method to ease component building logic.Uri::isOpaque tells whether the URI is opaque or not.Uri::isAbsolute tells whether the URI is absolute or not.Uri::isNetworkPath tells whether the URI is a network path.Uri::isAbsolutePath tells whether the URI is an absolute path.Uri::isRelativePath tells whether the URI is a relative path.Uri::isSameDocument tells whether both URIs refer to the same document.Uri::equals tells whether both URIs refer to the same document (allows taking into account the fragment component)Uri::isLocalFile tells whether the file scheme base URI represents a local file.Uri::isCrossOrigin tells whether two URI do not share the same origin.Uri::isSameOrigin tells whether two URI share the same origin.Uri::getOrigin returns the URI origin as described in the WHATWG URL Living standard specification.Uri::toDisplayString returns the human-readable string representation of the URI as an IRI.Uri::toRfc8089 The method will return null if the URI scheme is not the file schemeUri::resolve returns a new Uri instance resolve against the current instance.Uri::normalize returns a new Uri instance with a full “normalized-decoded” representation: The URI is normalized (when applicable), and components are percent-decoded. Normalization may contain destructive operation.Uri::withUsername returns a new Uri instance with the updated username component.Uri::withPassword returns a new Uri instance with the updated password component.Uri::toAsciiString returns the URI string representation as per RFC3986Uri::toAsciiString returns the URI string representation as per RFC3987 with the host in Unicode form if availableUri::getUnicodeHost returns the host in Unicode form if available; fallback to its RFC3986 representation otherwiseUriTemplate implements the Stringable interfaceUriTemplate::expandToUri and UriTemplate::expandToUriOrFailUriTemplate::expandToUrl and UriTemplate::expandToUrlOrFailUriTemplate::expandToPsr7Uri and UriTemplate::expandToPsr7UriOrFailUriTemplate::expand and UriTemplate::expandOrFail take a second optional parameter which represents a base URI to resolve the URI from.psr/http-factory package which is required for the package.Uri\Rfc3986\Uri and Uri\Whatwg\UrlUserInfo now can be constructed and mutated even when the user component is not present. It was silently ignored.Uri and Http normalization normalized IP against RFC3986 rules and not WHATWG rules.Uri::getOrigin now follows WHATWG cross-origin definitionUri host encoding compliance to RFC3986 is improved by supporting RFC3986 encoded URI properlyUri parsing with strings started or ended with empty string are no longer allowedUri space are rawurlencoded.Uri validates urn as per RFC 8141Uri validates mailto scheme as per RFC 6068Uri validates blob scheme as per Blob DefinitionUri::getPath no longer trim the leading slashes (the Http class which is a PSR-7 compliant class still do!)BasUri use the Uri class or the uri-component Modifier class depending on your requirements.Fix composer.json requirements: 7.5.0...7.5.1
Full Changelog:
Using PHP8.4 Deprecated attribute to signal deprecated public API methods and constants.
Uri::getUsername returns the encoded user component of the URI.Uri::getPassword returns the encoded password component of the URI.BaseUri::isOpaque tells whether a URI is opaque.Deprecated attribute to signal deprecated public API methods and constants.Http class implementation.BaseUri::from will compress the IPv6 host to its compressed form if possible.UriFactoryInterface is deprecated in BaseUri classFix package to avoid PHP8.4 deprecation warnings
Added Uri::fromData Uri::fromRfc8089 BaseUri::unixPath BaseUri::windowsPath BaseUri::toRfc8089 Fixed None Deprecated None Removed None
Uri::fromDataUri::fromRfc8089BaseUri::unixPathBaseUri::windowsPathBaseUri::toRfc8089URI Template incorrect when variable name only contains numbers #109 by GrahamCampbell
Full Changelog: 7.2.1...7.3.0
### Added - None ### Fixed - composer.json constraints ### Deprecated - None ### Removed - None
composer.json constraints### Added - BasUri::hasIDN ### Fixed - None ### Deprecated - None ### Removed - None
BasUri::hasIDNUsing the Encoder class to normalize encoding and decoding in all packages
Encoder class to normalize encoding and decoding in all packagesLeague\Uri\Uri::fromWindowsPath
League\Uri\Uri::newLeague\Uri\Uri::fromComponentsLeague\Uri\Uri::fromServerLeague\Uri\Uri::fromWindowsPathLeague\Uri\Uri::fromUnixPathLeague\Uri\Uri::fromFileContentsLeague\Uri\Uri::fromClientLeague\Uri\Uri::fromTemplateLeague\Uri\Http::newLeague\Uri\Http::fromComponentsLeague\Uri\Http::fromBaseUriLeague\Uri\Http::fromServerLeague\Uri\Http::fromTemplateLeague\Uri\UriTemplate::expandOrFailLeague\Uri\UriTemplate\Template::expandOrFailLeague\Uri\UriTemplate\TemplateCanNotBeExpandedLeague\Uri\UriString::parseAuthorityLeague\Uri\UriString::buildAuthorityLeague\Uri\BaseUriLeague\Uri\UriInfo uri input now supports Stringable and string type.League\Uri\UriTemplate\VariableBag implements the IteratorAggregate interfaceLeague\Uri\UriTemplate\Operator to improve internal representation when using UriTemplate features.League\Uri\UriResolver use League\Uri\BaseUri insteadLeague\Uri\Uri::createFromString use League\Uri\Uri::newLeague\Uri\Uri::createFromUri use League\Uri\Uri::newLeague\Uri\Uri::createFromComponents use League\Uri\Uri::fromComponentsLeague\Uri\Uri::createFromBaseUri use League\Uri\Uri::fromBaseUriLeague\Uri\Uri::createFromServer use League\Uri\Uri::fromServerLeague\Uri\Uri::createFromWindowsPath use League\Uri\Uri::fromWindowsPathLeague\Uri\Uri::createFromUnixPath use League\Uri\Uri::fromUnixPathLeague\Uri\Uri::createFromDataPath use League\Uri\Uri::fromFileContentsLeague\Uri\Http::createFromString use League\Uri\Http::newLeague\Uri\Http::createFromUri use League\Uri\Http::newLeague\Uri\Http::createFromComponents use League\Uri\Http::fromComponentsLeague\Uri\Http::createFromBaseUri use League\Uri\Http::fromBaseUriLeague\Uri\Http::createFromServer use League\Uri\Http::fromServerLeague\Uri\UriTemplate\Template::createFromString use League\Uri\UriTemplate\Template::new__set_state__debugInfoLeague\Uri\UriTemplate\VariableBag::allLeague\Uri\Exceptions\TemplateCanNotBeExpanded use League\Uri\UriTemplate\TemplateCanNotBeExpanded insteadLeague\Uri\UriString class. Class moved to the uri-interfaces package.Nothing published for this version
Nothing published for this version
Added PHP8.2+ SensitiveParameter attributes to user information component
SensitiveParameter attributes to user information componentTemplate resolutionUriInterface::getPath value in the context of multiple leading slash characters.Http::getPath and Uri::getPath methods returned values are normalized to prevent potential XSS and open redirect vectors.
Http::getPath and Uri::getPath methods returned values are normalized to prevent potential XSS and open redirect vectors.UriInfo::isCrossOrigin method is fix to make it work with any PSR-7 compliant object 205
UriInfo::isCrossOrigin method is fix to make it work with any PSR-7 compliant object 205### Added - UriInfo::isCrossOrigin method ### Fixed - None ### Deprecated - None ### Remove - None
UriInfo::isCrossOrigin methodSome errors are moved from TypeError to InvalidArgumentException to align with other UriInterface PSR-7 implementations.
TypeError to InvalidArgumentException to align with other UriInterface PSR-7 implementations.Uri::toString as a clean method to return URI string representation.
Uri::toString as a clean method to return URI string representation.IDNA conversion in now normalize using the Uri-Interface package classesHttpFactory a class that implements PSR-17 UriFactoryInterface. The package needs to be present for the class to work.
UriInfo::getOrigin to returns the URI origin as described in the WHATWG URL Living standard specification
UriInfo::getOrigin to returns the URI origin as described in the WHATWG URL Living standard specificationUriTemplate\Template, UriTemplate\Expression, UriTemplate\VarSpecifier, UriTemplate\VariableBag to
improve UriTemplate implementation.UriTemplate complete rewrite by reducing deep nested array usage.Uri::withScheme Uri validation failed to catch the empty string as an invalid scheme. #171Bugfix UriTemplate::expand to comply with expansion rules for undefined variables #161 thanks Gabe Sullice
UriTemplate::expand to comply with expansion rules for undefined variables #161 thanks Gabe SulliceHard dependencies on the ext-mbstring and the ext-fileinfo PHP extensions #154 thanks Nicolas Grekas
ext-mbstring and the ext-fileinfo PHP extensions #154 thanks Nicolas GrekasLeague\Uri\UriTemplate variables validation and normalization improved
League\Uri\UriTemplate variables validation and normalization improvedLeague\Uri\UriTemplate a class to handle uri template expansion as described in RFC7560 see PR #153
Uri should not depend on intl extension if the host is in its ascii form #141
Uri should not depend on intl extension if the host is in its ascii form #141League\Uri\UriInfo: to get RFC3986 information from an URI object
League\Uri\UriInfo: to get RFC3986 information from an URI objectLeague\Uri\UriResolver: to resolve or relativize an URI objectLeague\Uri\UriString: to parse or build an URL into or from its componentsLeague\Uri\Uri::createFromBaseUri named constructorLeague\Uri\Uri::createFromDataPath named constructorLeague\Uri\Uri::createFromPsr7 named constructorLeague\Uri\Uri::createFromUnixPath named constructorLeague\Uri\Uri::createFromWindowsPath named constructorLeague\Uri\Http::createFromBaseUri named constructorLeague\Uri\Uri implements the JsonSerializable interfaceLeague\Uri\Http implements the JsonSerializable interfacecreate function defined in the League\Uri namespace replaced by League\Uri\Uri::createFromBaseUriLeague\Uri\Factory replaced by League\Uri\UriLeague\Uri\Data replaced by League\Uri\UriLeague\Uri\File replaced by League\Uri\UriLeague\Uri\Ftp replaced by League\Uri\UriLeague\Uri\Ws replaced by League\Uri\UriLeague\Uri\UriException replaced by League\Uri\Contract\UriExceptionLeague\Uri\AbstractUri internal, replaced by League\Uri\UriLeague\Uri\Schemes namespace and all classes insideLeague\Uri\Uri no longer implements League\Uri\UriInterfaceSee packages release notes for more informations
See packages release notes for more informations
mbstring extension requirementURI Manipulations 1.3.0 Changelog
### Added - Support for PHP7.2 ### Fixed - Update library dependencies ### Deprecated - Nothing ### Remove - Nothing
The library is now a metapackage, you can read the migration guide for upgrading or the complete documentation for the new version.
The library is now a metapackage, you can read the migration guide for upgrading or the complete documentation for the new version.
Nothing published for this version
issue #91 Path modifier must be RFC3986 compliant
### Added - Nothing ### Fixed - issue #84 ### Deprecated - Nothing ### Remove - Nothing
Component::getContent returns the raw encoded representation of a component
Component::getContent returns the raw encoded representation of a componentComponent::withContent to create a new instance from a given raw encoded contentgetDecoded method to access the decoded content for the following classes:
UserPassFragment__debugInfo and __set_state to improve debuggingModifiers\RelativizeModifiers\DecodeUnreservedCharactersPath::createFromSegmentsPath::getSegmentsHost::createFromLabelsHost::getLabelsQuery::createFromPairsQuery::getPairsModifiers\uri_reference function to return URI reference state.Host::getRegisterableDomain must always return a string as per the host interface expected return typeHost::getSubdomain must always return a string as per the host interface expected return typeHost::isPublicSuffixValid when no publicSuffix information is foundHost::isPublicSuffixValid must always return a string as per the host interface expected return typecreateFromComponents failing with parse_url result when no path is definedInvalidArgumentException exceptions are emitted instead of RuntimeException ones to normalize exception to PSR-7Modifiers\Normalize class removes dot segments only on URI with absolute path.Modifiers\Normalize class decode all unreserved characters.Ftp and Ws objects now accept relative reference URI without the scheme.Component::modify use Component::withContent insteadHost::getLiteralPort::toInt use Port::getContent insteadHierarchicalPath::createFromArray use HierarchicalPath::createFromSegments insteadHierarchicalPath::toArray use HierarchicalPath::getSegments insteadHost::createFromArray use Host::createFromLabels insteadHost::toArray use Host::getLabels insteadQuery::createFromArray use Query::createFromPairs insteadQuery::toArray use Query::getPairs insteadUriPart::sameValueAsBug fix path encoding issue #38
Formatter::preserveQuery to improve query inclusion in URI string representation
Formatter::preserveQuery to improve query inclusion in URI string representationFormatter::preserveFragment to improve fragment inclusion in URI string representationFormatter::__invoke as an alias of Formatter::formatUriParser::__invoke as an alias of UriParser::parseFormatter::getHostEncodingFormatter::getQueryEncodingFormatter::getQuerySeparatorModifiers\Filters\Flag::withFlagsModifiers\Filters\ForCallbable::withCallableModifiers\Filters\ForCallbable::withCallableModifiers\Filters\Keys::withKeysModifiers\Filters\Label::withLabelModifiers\Filters\Offset::withOffsetModifiers\Filters\QueryString::withQueryModifiers\Filters\Segment::withSegmentModifiers\Filters\Uri::withUriModifiers\DataUriParameters\withParametersModifiers\Extension\withExtensionModifiers\KsortQuery\withAlgorithmModifiers\Typecode\withTypeHttp::createFromServer handling userinfo when not using mod_php with $_SERVER['HTTP_AUTHORIZATION']
User and Pass encodingHttp::createFromServer handling userinfo when not using mod_php with $_SERVER['HTTP_AUTHORIZATION']UriParser handling URI strings with invalid schemeQueryParser handling numeric index issue #25DataPath mimetype syntax validation issue #21DataPath::withParameters the ;base64 binary code now always throw an InvalidArgumentExceptionIntl extension is now required to use the library
Intl extension is now required to use the libraryFileInfo extension is now required to use the libraryHost using jeremykendall/php-domain-parser packageUriParser to parse an URI according to RFC3986 rulesQueryParser to parse and build a query string according to RFC3986 rules.League\Uri\Schemes\Generic\AbstractUri to enable better URI extensionData class to specifically manipulate data schemed URIHttp class to specifically manipulate http,https schemed URIFtp class to specifically manipulate ftp schemed URIWs class to specifically manipulate ws, wss schemed URIDataPath component class to manipulate Data-uri path componentHierarchicalPath to manipulate Hierarchical-like path componentLeague\Url to League\Uri to avoid dependency hellRFC3986PHP 5.4 and PHP 5.3parse_url, parse_str and http_build_query functionsTrue/php-punycode libraryLeague\Url\Url, League\Url\UrlImmutable, League\Url\UrlConstants classesYour coding agent can read these notes before it upgrades. Set up the MCP server →