Skip to content

Releases: thephpleague/uri

version 7.6.0

18 Nov 12:26

Choose a tag to compare

Added

  • League\Uri\Urn object to specifically work with URN as defined by RFC8141
  • Http::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 scheme
  • Uri::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 RFC3986
  • Uri::toAsciiString returns the URI string representation as per RFC3987 with the host in Unicode form if available
  • Uri::getUnicodeHost returns the host in Unicode form if available; fallback to its RFC3986 representation otherwise
  • UriTemplate implements the Stringable interface
  • UriTemplate::expandToUri and UriTemplate::expandToUriOrFail
  • UriTemplate::expandToUrl and UriTemplate::expandToUrlOrFail
  • UriTemplate::expandToPsr7Uri and UriTemplate::expandToPsr7UriOrFail
  • UriTemplate::expand and UriTemplate::expandOrFail take a second optional parameter which represents a base URI to resolve the URI from.
  • Dependency to psr/http-factory package which is required for the package.
  • Support for Uri\Rfc3986\Uri and Uri\Whatwg\Url

Fixed

  • UserInfo 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 definition
  • Uri host encoding compliance to RFC3986 is improved by supporting RFC3986 encoded URI properly
  • Uri parsing with strings started or ended with empty string are no longer allowed
  • Uri space are rawurlencoded.
  • Uri validates urn as per RFC 8141
  • Uri validates mailto scheme as per RFC 6068
  • Uri validates blob scheme as per Blob Definition
  • Uri::getPath no longer trim the leading slashes (the Http class which is a PSR-7 compliant class still do!)

Deprecated

  • BasUri use the Uri class or the uri-component Modifier class depending on your requirements.

Removed

  • None

version 7.5.1

08 Dec 08:49

Choose a tag to compare

Full Changelog:

version 7.5.0

08 Dec 08:32

Choose a tag to compare

Added

  • 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.
  • Using PHP8.4 Deprecated attribute to signal deprecated public API methods and constants.

Fixed

  • Improve PSR-7 Http class implementation.
  • BaseUri::from will compress the IPv6 host to its compressed form if possible.

Deprecated

  • Usage of PSR-7 UriFactoryInterface is deprecated in BaseUri class

Removed

  • None

version 7.4.1

23 Mar 07:49

Choose a tag to compare

Added

  • None

Fixed

  • Fix package to avoid PHP8.4 deprecation warnings

Deprecated

  • None

Removed

  • None

version 7.4.0

01 Dec 06:28

Choose a tag to compare

Added

  • Uri::fromData
  • Uri::fromRfc8089
  • BaseUri::unixPath
  • BaseUri::windowsPath
  • BaseUri::toRfc8089

Fixed

  • None

Deprecated

  • None

Removed

  • None

version 7.3.0

09 Sep 20:04

Choose a tag to compare

Added

  • None

Fixed

Deprecated

  • None

Removed

  • None

Full Changelog: 7.2.1...7.3.0

version 7.2.1

30 Aug 21:25

Choose a tag to compare

Fix composer.json

version 7.2.0

30 Aug 21:24

Choose a tag to compare

Added

  • BasUri::hasIDN

Fixed

  • None

Deprecated

  • None

Removed

  • None

Full Changelog: 7.1.0...7.2.0

version 7.1.0

21 Aug 20:36

Choose a tag to compare

Added

  • None

Fixed

  • Using the Encoder class to normalize encoding and decoding in all packages

Deprecated

  • None

Removed

  • None

Full Changelog: 7.0.0...7.1.0

version 7.0.0

10 Aug 14:42

Choose a tag to compare

Added

  • League\Uri\Uri::new
  • League\Uri\Uri::fromComponents
  • League\Uri\Uri::fromServer
  • League\Uri\Uri::fromWindowsPath
  • League\Uri\Uri::fromUnixPath
  • League\Uri\Uri::fromFileContents
  • League\Uri\Uri::fromClient
  • League\Uri\Uri::fromTemplate
  • League\Uri\Http::new
  • League\Uri\Http::fromComponents
  • League\Uri\Http::fromBaseUri
  • League\Uri\Http::fromServer
  • League\Uri\Http::fromTemplate
  • League\Uri\UriTemplate::expandOrFail
  • League\Uri\UriTemplate\Template::expandOrFail
  • League\Uri\UriTemplate\TemplateCanNotBeExpanded
  • League\Uri\UriString::parseAuthority
  • League\Uri\UriString::buildAuthority
  • League\Uri\BaseUri

Fixed

  • League\Uri\UriInfo uri input now supports Stringable and string type.
  • League\Uri\UriTemplate\VariableBag implements the IteratorAggregate interface
  • League\Uri\UriTemplate\Operator to improve internal representation when using UriTemplate features.

Deprecated

  • League\Uri\UriResolver use League\Uri\BaseUri instead
  • League\Uri\Uri::createFromString use League\Uri\Uri::new
  • League\Uri\Uri::createFromUri use League\Uri\Uri::new
  • League\Uri\Uri::createFromComponents use League\Uri\Uri::fromComponents
  • League\Uri\Uri::createFromBaseUri use League\Uri\Uri::fromBaseUri
  • League\Uri\Uri::createFromServer use League\Uri\Uri::fromServer
  • League\Uri\Uri::createFromWindowsPath use League\Uri\Uri::fromWindowsPath
  • League\Uri\Uri::createFromUnixPath use League\Uri\Uri::fromUnixPath
  • League\Uri\Uri::createFromDataPath use League\Uri\Uri::fromFileContents
  • League\Uri\Http::createFromString use League\Uri\Http::new
  • League\Uri\Http::createFromUri use League\Uri\Http::new
  • League\Uri\Http::createFromComponents use League\Uri\Http::fromComponents
  • League\Uri\Http::createFromBaseUri use League\Uri\Http::fromBaseUri
  • League\Uri\Http::createFromServer use League\Uri\Http::fromServer
  • League\Uri\UriTemplate\Template::createFromString use League\Uri\UriTemplate\Template::new

Remove

  • Support for __set_state
  • Support for __debugInfo
  • League\Uri\UriTemplate\VariableBag::all
  • League\Uri\Exceptions\TemplateCanNotBeExpanded use League\Uri\UriTemplate\TemplateCanNotBeExpanded instead
  • League\Uri\UriString class. Class moved to the uri-interfaces package.

Full Changelog: 7.0.0-beta.2...7.0.0