league/uri-interfaces
Common tools for parsing and resolving RFC3987/RFC3986 URI
7.8.1
262M downloads/mo
#91 most downloaded on composer
thephpleague/uri-interfaces
What this package is like to depend on
Last release 5 months ago
08 Mar 2026
Release timing varies
gaps range from 8 days to 12 months
Nearly every release is documented
notes for 22 of 23 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
25 releases · first in 2016
4 releases in the last 12 months
see the full history below
Release timeline
24 releases · Oct 2016 to Mar 2026Releases
latest 25-
7.8.108 Mar 2026Release notes
Open source →Added
- None
Fixed
Host::isIpis fixed to be more strict.UriString::resolveregression from previous minor version fixed see issue #184
Deprecated
- None
Removed
- None
Release notes
Open source →Added
- None
Fixed
Host::isIpis fixed to be more strict.UriString::resolveregression from previous minor version fixed see issue #184
Deprecated
- None
Removed
- None
-
7.8.015 Jan 2026Release notes
Open source →Added
QueryString::composeandQueryString::composeFromValuea userland improvedhttp_build_querymethod.QueryExtractModeandQueryComposeModeEnum to improve query parsing and building.StringCoercionModeto normalize type coercion- Added support for
BackedEnum FragmentDirective::toFragmentValueDomainHostInteraface::isSubdomainOfDomainHostInteraface::hasSubdomainDomainHostInteraface::isSiblingOfDomainHostInteraface::parentHostDomainHostInteraface::commonAncestorWith- Added the
Transformableinterface
Fixed
- Fix issue #177 improved userInfo encoding.
- Fix
UriString::resolvemethod. - Fix Type coercion when using the QueryString
Deprecated
- None
Removed
- None
Release notes
Open source →Added
QueryString::composeandQueryString::composeFromValuea userland improvedhttp_build_querymethod.QueryExtractModeandQueryComposeModeEnum to improve query parsing and building.StringCoercionModeto normalize type coercion- Added support for
BackedEnum FragmentDirective::toFragmentValueDomainHostInteraface::isSubdomainOfDomainHostInteraface::hasSubdomainDomainHostInteraface::isSiblingOfDomainHostInteraface::parentHostDomainHostInteraface::commonAncestorWith- Added the
Transformableinterface
Fixed
- Fix issue #177 improved userInfo encoding.
- Fix
UriString::resolvemethod. - Fix Type coercion when using the QueryString
Deprecated
- None
Removed
- None
-
7.7.007 Dec 2025Release notes
Open source →Added
HostRecordclass to normalize parsing and caching Host resolutionHostTypeHost type enumeration list as defined by RFC3986HostFormatHost format enumaration list as defined by RFC3986/RFC3987
Fixed
UriString::buildAuthorityshould fail if an optional component is present when the host is missing.UriString::buildshould fail if an optional component is present when the host is missing.
Deprecated
UriString::isValidHostuseHostRecord::isValidmethod instead
Removed
- None
Release notes
Open source →Added
HostRecordclass to normalize parsing and caching Host resolutionHostTypeHost type enumeration list as defined by RFC3986HostFormatHost format enumaration list as defined by RFC3986/RFC3987
Fixed
UriString::buildAuthorityshould fail if an optional component is present when the host is missing.UriString::buildshould fail if an optional component is present when the host is missing.
Deprecated
UriString::isValidHostuseHostRecord::isValidmethod instead
Removed
- None
-
7.6.018 Nov 2025Release notes
Open source →Added
UriComponentInterface::equalsContidionableinterfaceUriInterface::resolveUriInterface::relativizeUriInterface::equalsUriInterface::toNormalizedStringUriInterface::withUsernameUriInterface::withPasswordIPv6\Converter::isIpv6IPv6\Converter::normalizeUriString::resolveUriString::removeDotSegmentsUriString::normalizeUriString::normalizeAuthorityUriString::containsRfc3986CharsUriString::containsRfc3987CharsUriString::isValidSchemeUriString::isValidHostFeatureDetection::supportsDomEncoder::decodeNecessaryEncoder::decodePathEncoder::decodeQueryEncoder::decodeFragmentEncoder::isUserEncodedEncoder::isPasswordEncodedEncoder::isUserInfoEncodedEncoder::isPathEncodedEncoder::isQueryEncodedEncoder::isFragmentEncodedEncoder::normalizeUserEncoder::normalizePasswordEncoder::normalizeUserInfoEncoder::normalizePathEncoder::normalizeQueryEncoder::normalizeFragmentEncoder::normalizeHost
Fixed
UriString::parsewill fail if the URI contains whitespace.UriString::buildUriallows all arguments to benullincluding thepath.UriString::buildAuthorityallows the$userargument to benulland still generate a user info component.
Deprecated
Encoder::decodePartialreplaced byEncoder::decodeNecessary
Removed
- Dependency to
psr/http-factorypackage which is never required in the package.
Release notes
Open source →Added
UriComponentInterface::equalsContidionableinterfaceUriInterface::resolveUriInterface::relativizeUriInterface::equalsUriInterface::toNormalizedStringUriInterface::withUsernameUriInterface::withPasswordIPv6\Converter::isIpv6IPv6\Converter::normalizeUriString::resolveUriString::removeDotSegmentsUriString::normalizeUriString::normalizeAuthorityUriString::containsRfc3986CharsUriString::containsRfc3987CharsUriString::isValidSchemeUriString::isValidHostFeatureDetection::supportsDomEncoder::decodeNecessaryEncoder::decodePathEncoder::decodeQueryEncoder::decodeFragmentEncoder::isUserEncodedEncoder::isPasswordEncodedEncoder::isUserInfoEncodedEncoder::isPathEncodedEncoder::isQueryEncodedEncoder::isFragmentEncodedEncoder::normalizeUserEncoder::normalizePasswordEncoder::normalizeUserInfoEncoder::normalizePathEncoder::normalizeQueryEncoder::normalizeFragmentEncoder::normalizeHost
Fixed
UriString::parsewill fail if the URI contains whitespace.UriString::buildUriallows all arguments to benullincluding thepath.UriString::buildAuthorityallows the$userargument to benulland still generate a user info component.
Deprecated
Encoder::decodePartialreplaced byEncoder::decodeNecessary
Removed
- Dependency to
psr/http-factorypackage which is never required in the package.
-
7.5.008 Dec 2024Release notes
Open source →Added
UriInterface::toComponentsreturns an associative array containing all URI components values.UriInterface::getUsernamereturns the encoded user component of the URI.UriInterface::getPasswordreturns the encoded scheme-specific information about how to gain authorization to access the resource.Uri\IPv6\Converterallows expanding and compressing IPv6.Uri\IPv4\Converter::toIPv6Using6to4allows converting an IPv4 into an IPv6 host using the 6to4 notation.Uri\IPv4\Converter::toIPv6UsingMappingallows mapping an IPv4 address into an IPv6 one.- Using PHP8.4
Deprecatedattribute to signal deprecated public API methods and constants.
Fixed
- Adding Host resolution caching to speed up URI parsing in
UriString Uri\UriString::parseAuthorityacceptsStringableobject as valid inputUri\IPv4\Converter::toDecimalalso handles 6to4 and IPv4 mapped address algorithm.Uri\QueryString::extractandQueryString::convertstop parsing too early issue #146
Deprecated
UriInterface::getComponentsuseUriInterface::toComponents
Removed
- None
Release notes
Open source →Added
UriInterface::toComponentsreturns an associative array containing all URI components values.UriInterface::getUsernamereturns the encoded user component of the URI.UriInterface::getPasswordreturns the encoded scheme-specific information about how to gain authorization to access the resource.Uri\IPv6\Converterallows expanding and compressing IPv6.Uri\IPv4\Converter::toIPv6Using6to4allows converting an IPv4 into an IPv6 host using the 6to4 notation.Uri\IPv4\Converter::toIPv6UsingMappingallows mapping an IPv4 address into an IPv6 one.- Using PHP8.4
Deprecatedattribute to signal deprecated public API methods and constants. HostInterface::encodedmethod to RFC3986 URL encode the host
Fixed
- Adding Host resolution caching to speed up URI parsing in
UriString Uri\UriString::parseAuthorityacceptsStringableobject as valid inputUri\IPv4\Converter::toDecimalalso handles 6to4 and IPv4 mapped address algorithm.Uri\QueryString::extractandQueryString::convertstop parsing too early issue #146
Deprecated
UriInterface::getComponentsuseUriInterface::toComponents
Removed
- None
-
7.4.123 Mar 2024Release notes
Open source →Added
- None
Fixed
- Fix package to avoid PHP8.4 deprecation warnings
Deprecated
- None
Removed
- None
-
7.4.024 Nov 2023Nothing published for this version
-
7.3.009 Sep 2023Release notes
Open source →Added
League\Uri\Contracts\QueryInterface::withoutPairByKeyLeague\Uri\Contracts\QueryInterface::withoutPairByValueLeague\Uri\Contracts\QueryInterface::withoutPairByKeyValueLeague\Uri\Contracts\QueryInterface::toFormDataLeague\Uri\Contracts\QueryInterface::withoutPairByKeyValueLeague\Uri\KeyValuePair\Converter::fromFormDataLeague\Uri\KeyValuePair\Converter::separatormethodLeague\Uri\KeyValuePair\Converter::encondingMapmethod
Fixed
League\Uri\KeyValuePair\Converterfix encoding when the value is a float or the booleanfalse- Exception message typo fix #121 by GrahamCampbell
Deprecated
Contracts\QueryInterface\QueryInterface::withoutPairuseContracts\QueryInterface\QueryInterface::withoutPairByKeyinstead.
Removed
- None
Release notes
Open source →Added
League\Uri\Contracts\QueryInterface::withoutPairByKeyLeague\Uri\Contracts\QueryInterface::withoutPairByValueLeague\Uri\Contracts\QueryInterface::withoutPairByKeyValueLeague\Uri\Contracts\QueryInterface::toFormDataLeague\Uri\Contracts\QueryInterface::withoutPairByKeyValueLeague\Uri\KeyValuePair\Converter::fromFormDataLeague\Uri\KeyValuePair\Converter::separatormethodLeague\Uri\KeyValuePair\Converter::encondingMapmethod
Fixed
League\Uri\KeyValuePair\Converterfix encoding when the value is a float or the booleanfalse- Exception message typo fix #121 by GrahamCampbell
Deprecated
Contracts\QueryInterface\QueryInterface::withoutPairuseContracts\QueryInterface\QueryInterface::withoutPairByKeyinstead.
Removed
- None
-
7.2.030 Aug 2023Release notes
Open source →Added
League\Uri\Idna\Converter::isIdnLeague\Uri\Ipv4\Converter::isIpv4
Fixed
- Add support for
Stringablehost object inLeague\Uri\Idna\Converterfeature. - Add support for
Stringablehost object inLeague\Uri\Exceptions\ConversionFailedfeature.
Deprecated
- None
Removed
- None
Release notes
Open source →Added
League\Uri\Idna\Converter::isIdnLeague\Uri\Ipv4\Converter::isIpv4
Fixed
- Add support for
Stringablehost object inLeague\Uri\Idna\Converterfeature. - Add support for
Stringablehost object inLeague\Uri\Exceptions\ConversionFailedfeature.
Deprecated
- None
Removed
- None
-
7.1.021 Aug 2023Release notes
Open source →Added
League\Uri\Encoderto normalize encoding URI and URI components.League\Uri\KeyValuePair\Converterto parse and build key/value pair string.
Fixed
- Rewrite
QueryStringclasses and fix query encoding for basic RFC3986. #109
Deprecated
- None
Removed
- None
Full Changelog: 7.0.0...7.1.0
Release notes
Open source →Added
League\Uri\Encoderto normalize encoding URI and URI components.League\Uri\KeyValuePair\Converterto parse and build key/value pair string.
Fixed
- Rewrite
QueryStringclasses and fix query encoding for basic RFC3986. #109
Deprecated
- None
Removed
- None
-
7.0.010 Aug 2023Release notes
Open source →Added
- New method to
UriComponentInterface::value - New method to
UriComponentInterface::toString - New method to
UserInfoInterface::withUser - New method to
UserInfoInterface::withPass - New method to
UriInterface::toString - New method to
UriInterface::getComponents League\Uri\IPv4toolsLeague\Uri\IdnatoolsLeague\Uri\UriStringparserLeague\Uri\QueryStringparser
Fixed
- None
Deprecated
- None
Removed
- Support for PHP7
- Support for
__set_state UriComponentInterface::getContentis removed in favor ofUriComponentInterface::valueUriComponentInterface::withContentis removed with no replacement use other means to change the value of the component.UserInfoInterface::withUserInfois removed in favor ofUserInfoInterface::withUserandUserInfoInterface::withPass.HostInfoInterface::labelsis removed with no replacement use theIteratorAggregate::getIteratormethod instead.SegmentedPathInterface::segmentsis removed with no replacement use theIteratorAggregate::getIteratormethod instead.League\Uri\Idna\IdnauseLeague\Uri\Idna\ConverterinsteadLeague\Uri\Idna\IdnaInfouseLeague\Uri\Idna\ResultinsteadLeague\Uri\Exception\IdnSupportMissinguseLeague\Uri\Exception\MissingFeatureinstead
- New method to
-
7.0.0-beta.217 Jun 2023 pre-releaseNothing published for this version
-
7.0.0-beta.1no date pre-releaseNothing published for this version
-
2.3.028 Jun 2021Release notes
Open source →Added
- IDNA processing classes
Fixed
- None
Deprecated
- None
Removed
- Support for PHP7.1
-
2.2.031 Oct 2020Release notes
Open source → -
2.1.008 Feb 2020Release notes
Open source →Added
League\Uri\Exceptions\FileinfoSupportMissingbased on the work of Nicolas Grekas
Fixed
- Improved docblock.
Deprecated
- None
Removed
- None
-
2.0.117 Dec 2019Release notes
Open source →Added
- Nothing
Fixed
- Remove useless docblock from
League\Uri\Contract\IpHostInterface::withoutZoneIdentifier
Deprecated
- None
Removed
- None
-
2.0.017 Oct 2019Release notes
Open source →Added
League\Uri\Contract\AuthorityInterfaceLeague\Uri\Contract\DataPathInterfaceLeague\Uri\Contract\DomainHostInterfaceLeague\Uri\Contract\FragmentInterfaceLeague\Uri\Contract\HostInterfaceLeague\Uri\Contract\IpHostInterfaceLeague\Uri\Contract\PathInterfaceLeague\Uri\Contract\PortInterfaceLeague\Uri\Contract\QueryInterfaceLeague\Uri\Contract\SegmentedPathInterfaceLeague\Uri\Contract\UriComponentInterfaceLeague\Uri\Contract\UriExceptionLeague\Uri\Contract\UriInterfaceLeague\Uri\Contract\UserInfoInterfaceLeague\Uri\Exception\EncodingNotFoundLeague\Uri\Exception\IdnSupportMissingLeague\Uri\Exception\SyntaxError
Fixed
- None
Deprecated
- None
Removed
League\Uri\InterfacesnamespaceLeague\Uri\UriInterface- support for
PHP7.0
-
1.1.105 Nov 2018Release notes
Open source →Added
- None
Fixed
- Make
League\Uri\Interfaces\UriimplementsLeague\Uri\UriInterface
Deprecated
- None
Removed
- None
-
1.1.022 May 2018Release notes
Open source →Added
League\Uri\UriInterface.
Fixed
- None
Deprecated
League\Uri\Interfaces\UriuseLeague\Uri\UriInterfaceinstead.
Removed
- None
-
1.0.004 Jan 2017Release notes
Open source →Added
- None
Fixed
- None
Deprecated
- None
Removed
League\Uri\Interfaces\Component. The interface is moved to the League URI Components package.
-
0.4.009 Dec 2016Release notes
Open source →Added
League\Uri\Interfaces\PathreplacesLeague\Uri\Interfaces\PathComponentLeague\Uri\Interfaces\Path::isEmpty
Fixed
- None
Deprecated
- None
Removed
League\Uri\Interfaces\CollectionComponentLeague\Uri\Interfaces\PathComponent
-
0.3.001 Dec 2016Release notes
Open source →Added
League\Uri\Interfaces\Component::NO_ENCODINGto remove any specific encodingLeague\Uri\Interfaces\Component::RFC3986_ENCODINGto specify encoding according to RFC3986 rulesLeague\Uri\Interfaces\Component::RFC3987_ENCODINGto specify encoding according to RFC3987 rules
Fixed
- Update
Component::getContentoptional parameter default.
Deprecated
- None
Removed
League\Uri\Interfaces\Component::RFC3986League\Uri\Interfaces\Component::RFC3987
-
0.2.029 Nov 2016Release notes
Open source →Added
League\Uri\Interfaces\Component::RFC3986to specify encoding according to RFC3986 rulesLeague\Uri\Interfaces\Component::RFC3987to specify encoding according to RFC3987 rules
Fixed
League\Uri\Interfaces\Component::getContentnow takes an optional$enc_typeparameter to specify the returned content encoding rules.League\Uri\Interfaces\Uridocblocks simplified around Exception thrown
Deprecated
- None
Removed
- None
-
0.1.017 Oct 2016Release notes
Open source →Added
League\Uri\Interfaces\Component::getContentLeague\Uri\Interfaces\Component::withContentLeague\Uri\Interfaces\Component::isDefined
Fixed
- Renamed
League\Uri\Interfaces\CollectiontoLeague\Uri\Interfaces\CollectionComponent - Renamed
League\Uri\Interfaces\PathtoLeague\Uri\Interfaces\PathComponent
Deprecated
- None
Removed
League\Uri\Interfaces\UriPartLeague\Uri\Interfaces\HierarchicalComponentLeague\Uri\Interfaces\SchemeLeague\Uri\Interfaces\UserLeague\Uri\Interfaces\PassLeague\Uri\Interfaces\UserInfoLeague\Uri\Interfaces\HostLeague\Uri\Interfaces\PortLeague\Uri\Interfaces\Path::withoutEmptySegmentsLeague\Uri\Interfaces\Path::hasTrailingSlashLeague\Uri\Interfaces\Path::withTrailingSlashLeague\Uri\Interfaces\Path::withoutTrailingSlashLeague\Uri\Interfaces\Path::getTypecodeLeague\Uri\Interfaces\Path::withTypecodeLeague\Uri\Interfaces\Path::FTP_TYPE_ASCIILeague\Uri\Interfaces\Path::FTP_TYPE_BINARYLeague\Uri\Interfaces\Path::FTP_TYPE_DIRECTORYLeague\Uri\Interfaces\Path::FTP_TYPE_EMPTYLeague\Uri\Interfaces\HierarchicalPathLeague\Uri\Interfaces\DataPathLeague\Uri\Interfaces\QueryLeague\Uri\Interfaces\Fragment