Skip to content

Releases: thephpleague/uri-components

version 7.8.1

15 Mar 20:36

Choose a tag to compare

Added

  • None

Fixed

  • Update requirement to use uri 7.8.1

Deprecated

  • None

Removed

  • None

version 7.8.0

16 Jan 09:26

Choose a tag to compare

Added

  • Added support for BackedEnum
  • Query::hasList
  • Query::getList
  • Query::withList
  • Query::appendList
  • Query::withoutList
  • Query::withoutLists
  • Query::onlyLists
  • Query::countDistinctKeys
  • Query::isNotEmpty
  • Query::map
  • Query::filter
  • Query::indexOfValue
  • Query::valueAt
  • Query::keyAt
  • Query::pair
  • URLSearchParams::countDistinctKeys
  • URLSearchParams::tap
  • Domain::isSubdomainOf
  • Domain::hasSubdomain
  • Domain::isSiblingOf
  • Domain::parentHos
  • Domain::commonAncestorWith
  • Added transform method to Immutable classes

Fixed

  • Query and Modifier methods can opt to switch to different query string extraction using the new $extractMode parameter.
  • Query and Modifier methods can opt to switch to different query string composition using the new $composeMode parameter.
  • Query and Modifier methods can opt to switch to different type coercion using the new $coercionMode parameter.

Deprecated

  • URLSearchParams::uniqueKeyCount use URLSearchParams::countDistinctKeys instead

Removed

  • None

version 7.7.0

08 Dec 15:28

Choose a tag to compare

Added

  • Domain::first returns the first domain label
  • Domain::last returns the last domain label
  • Domain::contains tells wether the label is present in the domain
  • Domain::indexOf returns the index of the first occurrence of the label
  • Domain::lastIndexOf returns the index of the last occurrence of the label
  • Domain::isEmpty tells whether the domain is empty or not (contains at least on label)
  • HierarchicalPath::first returns the first segment
  • HierarchicalPath::last returns the last segment
  • HierarchicalPath::contains tells whether the segment is present in the path
  • HierarchicalPath::indexOf returns the index of the first occurrence of the segment
  • HierarchicalPath::lastIndexOf returns the index of the last occurrence of the segment
  • HierarchicalPath::isEmpty tells whether the path is empty or not (contains at least on segment)
  • Query::first returns the first value for a given query key pair
  • Query::last returns the last value for a given query key pair
  • Query::isEmpty tells whether the query is empty or not
  • URLSearchParams::first returns the first value for a given query key pair
  • URLSearchParams::last returns the last value for a given query key pair
  • URLSearchParams::hasValue an alias of using URLSearchParams::has with 2 parameters
  • URLSearchParams::deleteValue an alias of using URLSearchParams::delete with 2 parameters
  • Modifier::redactUserInfo redacts the user info component if present
  • Modifier::redactPathSegments redacts specific path segments if present
  • Modifier::redactPathNextSegments redacts specific path next segments if present
  • Modifier::redactPathSegmentsByOffset redacts specific path segments by offset if present
  • Modifier::redactQueryPairs redacts specific query pair if present
  • Modifier::prependQuery prepend a query string to the URI query component
  • Modifier::prependPath replace Modifier::prependSegment
  • Modifier::appendPath replace Modifier::appendSegment
  • Modifier::prependSegments
  • Modifier::appendSegments

Fixed

  • Fix deprecation message for Modifier::uri() method 166 by meyerbaptiste
  • Fix missing SensitiveParameter usage on Modifier::withUserInfo method
  • Fix Host resolution using the new HostRecord class
  • Fix Modifier::withPath improve handling of path leading slash presence for PSR-7 implementing classes

Deprecated

  • Modifier::prependSegment use Modifier::prependPath instead
  • Modifier::appendSegment use Modifier::appendPath instead

Removed

  • None

version 7.6.0

18 Nov 12:27

Choose a tag to compare

Added

  • UriComponentInterface::equals method
  • FragmentDirectives support
  • Component::when conditional method to ease component building logic.
  • URLSearchParams::when conditional method to ease component building logic.
  • Modifier::prependQueryParameters returns a modifier with prepended query parameters
  • Modifier::replaceQueryParameter returns a modifier with part of its query string replaced
  • Modifier::replaceQueryPair returns a modifier with part of its query string replaced
  • Modifier::when conditional method to ease component building logic.
  • Modifier::normalizeIp returns the host normalized for IPv6 and IPv4 addresses
  • Modifier::normalizeHost returns the host as normalized by the WHATWG algorithm
  • Modifier::with* method from the underlying Uri object are proxy to improve DX.
  • Modifier::wrap static method which wraps the underlying URI object used by the Modifier class.
  • Modifier::unwrap method which returns the underlying URI object used by the Modifier class.
  • Modifier::prefixQueryPairs and Modifier::prefixQueryParameters to prefix Query using the pair key or the parameter names
  • Modifier::toMarkdownAnchor returns the Markdown string representation of the anchor tag with the current instance as its href attribute.
  • Modifier::toHtmlAnchor returns the HTML string representation of the anchor tag with the current instance as its href attribute.
  • tryNew named constructor added to all classes to return a new instance on success or null on failure.
  • Query::decoded the string representation of the component decoded.
  • Query::normalized
  • Query::fromPairs and Query::fromVariable takes a optional $prefix parameter to update the query pair keys or parameter names
  • Query::indexOf and Query::replace
  • Query::mergeParameters
  • Query::replaceParameter
  • Query::replacePair
  • Query::prepend
  • URLSearchParams::decoded the string representation of the component decoded.
  • Path::nornalized
  • Fragment::normalized
  • HierarchicalPath::normalized
  • Datapath::normalized
  • Support for Uri\Rfc3986\Uri
  • Support for Uri\WhatWg\Url
  • Port::defaultSchemes
  • Port::defaultScheme
  • Scheme::isWhatWgSpecial
  • Scheme::defaultPort
  • Scheme::hasDefaultPort

Fixed

  • Modifier host related method return host in IDN form or ASCII form depending on the URI input format
  • UserInfo now can be constructed and mutated even when the user component is not present. It was throwing an exception before.

Deprecated

  • Modifier::getIdnUriString use Modifier::toDisplayString instead
  • Modifier::getUriString use Modifier::toString instead
  • Modifier::getUri use Modifier::uri instead
  • Modifier::from use Modifier::wrap instead

Removed

  • None

version 7.5.1

08 Dec 08:50

Choose a tag to compare

Full Changelog:

version 7.5.0

08 Dec 08:33

Choose a tag to compare

Added

  • UrlSearchParams::uniqueKeyCount
  • Modifier::getIdnUriString
  • Modifier::hostToIpv6Compressed
  • Modifier::hostToIpv6Expanded
  • Scheme::isHttp
  • Scheme::isWebsocket
  • Scheme::isSsl
  • Scheme::isSpecial
  • Using PHP8.4 Deprecated attribute to signal deprecated public API methods and constants.

Fixed

  • Remove Usage of PSR-7 UriInterface in UrlSearchParams class
  • Normalizes fromUri to return the same value for the component if the URI object has the same string representation.

Deprecated

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

Removed

  • None

version 7.4.1

23 Mar 07:50

Choose a tag to compare

Added

  • None

Fixed

  • Fix package to avoid PHP8.4 deprecation warnings
  • Bug Fix removeEmptyPairs #133

Deprecated

  • None

Removed

  • None

version 7.4.0

01 Dec 06:30

Choose a tag to compare

Added

  • Query::fromVariable
  • UrlSearchParams::fromVariable

Fixed

  • None

Deprecated

  • Query::fromParameters use Query::fromVariable instead
  • UrlSearchParams::fromParameters use UrlSearchParams::fromVariable instead

Removed

  • None

version 7.3.0

09 Sep 20:05

Choose a tag to compare

Added

  • League\Uri\Modifier::removeQueryPairsByKey
  • League\Uri\Modifier::removeQueryPairsByValue
  • League\Uri\Modifier::removeQueryPairsByKeyValue
  • League\Uri\Components\Query::hasPair
  • League\Uri\Components\Query::withoutPairByKey
  • League\Uri\Components\Query::withoutPairByValue
  • League\Uri\Components\Query::withoutPairByKeyValue
  • League\Uri\Components\Query::fromFormData
  • League\Uri\Components\Query::toFormData
  • League\Uri\Components\URLSearchParams

Fixed

  • League\Uri\Components\Query::sort to improve WHATWG compliance.
  • League\Uri\QueryString::buildFromPairs should throw SyntaxError instead of TypeError
  • League\Uri\Components\Query uses internally League\Uri\KeyValuePair\Converter
  • League\Uri\Components\Query::toRFC3986 is no longer deprecated
  • League\Uri\Components\Query::jsonSerualize uses toFormData instead of toRFC1738
  • League\Uri\Components\Query fix float handling.
  • Exception message typo fix #121 by GrahamCampbell

Deprecated

  • League\Uri\Modifier::removeQueryPairs use League\Uri\Modifier::removeQueryPairsByKey instead.
  • League\Uri\Components\Query::withoutPair use League\Uri\Components\Query::withoutPairByKey instead.

Removed

  • None

version 7.2.1

30 Aug 22:07

Choose a tag to compare

Fix composer.json