Releases: thephpleague/uri
Releases · thephpleague/uri
version 7.7.0
Added
Uri::isIpv4Hosttells whether the URI host is an IPv4 addressUri::isIpv6Hosttells whether the URI host is an IPv6 addressUri::isIpvFutureHosttells whether the URI host is an IPvFuture addressUri::isRegisteredNameHosttells whether the URI host is a registered nameUri::isDomainHosttells whether the URI host is a domain name
Fixed
- Query order not respected in
BaseUri::isSameDocumentmethod 165 - Fix Host resolution using the new
HostRecordclass, some registered name were wrongly throwing exceptions. - Fix
Uri::withPathimprove handling of path leading slash presence - Fix
UriTemplate::exapndToUrlandUriTemplate::expandToUrlOrFailadding the missing softErrors argument populated by reference.
Deprecated
- None
Removed
- None
version 7.6.0
Added
League\Uri\Urnobject to specifically work with URN as defined by RFC8141Http::tryNewreturns a newUriinstance on success or null on failure (ie: a Relax version ofHttp::new).Http::whenconditional method to ease component building logic.Uri::parsereturns a newUriinstance on success or null on failure (ie: a Relax version ofUri::fromBaseUriandUri::new) that mimics the behaviour of the upcoming native PHP URI parse method.Uri::tryNewreturns a newUriinstance on success or null on failure (ie: a Relax version ofUri::new).Uri::whenconditional method to ease component building logic.Uri::isOpaquetells whether the URI is opaque or not.Uri::isAbsolutetells whether the URI is absolute or not.Uri::isNetworkPathtells whether the URI is a network path.Uri::isAbsolutePathtells whether the URI is an absolute path.Uri::isRelativePathtells whether the URI is a relative path.Uri::isSameDocumenttells whether both URIs refer to the same document.Uri::equalstells whether both URIs refer to the same document (allows taking into account the fragment component)Uri::isLocalFiletells whether thefilescheme base URI represents a local file.Uri::isCrossOrigintells whether two URI do not share the same origin.Uri::isSameOrigintells whether two URI share the same origin.Uri::getOriginreturns the URI origin as described in the WHATWG URL Living standard specification.Uri::toDisplayStringreturns the human-readable string representation of the URI as an IRI.Uri::toRfc8089The method will return null if the URI scheme is not thefileschemeUri::resolvereturns a newUriinstance resolve against the current instance.Uri::normalizereturns a newUriinstance with a full “normalized-decoded” representation: The URI is normalized (when applicable), and components are percent-decoded. Normalization may contain destructive operation.Uri::withUsernamereturns a newUriinstance with the updated username component.Uri::withPasswordreturns a newUriinstance with the updated password component.Uri::toAsciiStringreturns the URI string representation as per RFC3986Uri::toAsciiStringreturns the URI string representation as per RFC3987 with the host in Unicode form if availableUri::getUnicodeHostreturns the host in Unicode form if available; fallback to its RFC3986 representation otherwiseUriTemplateimplements theStringableinterfaceUriTemplate::expandToUriandUriTemplate::expandToUriOrFailUriTemplate::expandToUrlandUriTemplate::expandToUrlOrFailUriTemplate::expandToPsr7UriandUriTemplate::expandToPsr7UriOrFailUriTemplate::expandandUriTemplate::expandOrFailtake a second optional parameter which represents a base URI to resolve the URI from.- Dependency to
psr/http-factorypackage which is required for the package. - Support for
Uri\Rfc3986\UriandUri\Whatwg\Url
Fixed
UserInfonow can be constructed and mutated even when theusercomponent is not present. It was silently ignored.UriandHttpnormalization normalized IP against RFC3986 rules and not WHATWG rules.Uri::getOriginnow follows WHATWG cross-origin definitionUrihost encoding compliance to RFC3986 is improved by supporting RFC3986 encoded URI properlyUriparsing with strings started or ended with empty string are no longer allowedUrispace are rawurlencoded.Urivalidatesurnas per RFC 8141Urivalidatesmailtoscheme as per RFC 6068Urivalidatesblobscheme as per Blob DefinitionUri::getPathno longer trim the leading slashes (theHttpclass which is a PSR-7 compliant class still do!)
Deprecated
BasUriuse theUriclass or the uri-componentModifierclass depending on your requirements.
Removed
- None
version 7.5.1
Full Changelog:
- Fix composer.json requirements: 7.5.0...7.5.1
version 7.5.0
Added
Uri::getUsernamereturns the encoded user component of the URI.Uri::getPasswordreturns the encoded password component of the URI.BaseUri::isOpaquetells whether a URI is opaque.- Using PHP8.4
Deprecatedattribute to signal deprecated public API methods and constants.
Fixed
- Improve PSR-7
Httpclass implementation. BaseUri::fromwill compress the IPv6 host to its compressed form if possible.
Deprecated
- Usage of PSR-7
UriFactoryInterfaceis deprecated inBaseUriclass
Removed
- None
version 7.4.1
Added
- None
Fixed
- Fix package to avoid PHP8.4 deprecation warnings
Deprecated
- None
Removed
- None
version 7.4.0
Added
Uri::fromDataUri::fromRfc8089BaseUri::unixPathBaseUri::windowsPathBaseUri::toRfc8089
Fixed
- None
Deprecated
- None
Removed
- None
version 7.3.0
Added
- None
Fixed
- URI Template incorrect when variable name only contains numbers #109 by GrahamCampbell
- Exception message typo fix #121 by GrahamCampbell
Deprecated
- None
Removed
- None
Full Changelog: 7.2.1...7.3.0
version 7.2.1
Fix composer.json