Releases: thephpleague/uri-components
Releases · thephpleague/uri-components
version 7.8.1
version 7.8.0
Added
- Added support for
BackedEnum Query::hasListQuery::getListQuery::withListQuery::appendListQuery::withoutListQuery::withoutListsQuery::onlyListsQuery::countDistinctKeysQuery::isNotEmptyQuery::mapQuery::filterQuery::indexOfValueQuery::valueAtQuery::keyAtQuery::pairURLSearchParams::countDistinctKeysURLSearchParams::tapDomain::isSubdomainOfDomain::hasSubdomainDomain::isSiblingOfDomain::parentHosDomain::commonAncestorWith- Added
transformmethod to Immutable classes
Fixed
QueryandModifiermethods can opt to switch to different query string extraction using the new$extractModeparameter.QueryandModifiermethods can opt to switch to different query string composition using the new$composeModeparameter.QueryandModifiermethods can opt to switch to different type coercion using the new$coercionModeparameter.
Deprecated
URLSearchParams::uniqueKeyCountuseURLSearchParams::countDistinctKeysinstead
Removed
- None
version 7.7.0
Added
Domain::firstreturns the first domain labelDomain::lastreturns the last domain labelDomain::containstells wether the label is present in the domainDomain::indexOfreturns the index of the first occurrence of the labelDomain::lastIndexOfreturns the index of the last occurrence of the labelDomain::isEmptytells whether the domain is empty or not (contains at least on label)HierarchicalPath::firstreturns the first segmentHierarchicalPath::lastreturns the last segmentHierarchicalPath::containstells whether the segment is present in the pathHierarchicalPath::indexOfreturns the index of the first occurrence of the segmentHierarchicalPath::lastIndexOfreturns the index of the last occurrence of the segmentHierarchicalPath::isEmptytells whether the path is empty or not (contains at least on segment)Query::firstreturns the first value for a given query key pairQuery::lastreturns the last value for a given query key pairQuery::isEmptytells whether the query is empty or notURLSearchParams::firstreturns the first value for a given query key pairURLSearchParams::lastreturns the last value for a given query key pairURLSearchParams::hasValuean alias of usingURLSearchParams::haswith 2 parametersURLSearchParams::deleteValuean alias of usingURLSearchParams::deletewith 2 parametersModifier::redactUserInforedacts the user info component if presentModifier::redactPathSegmentsredacts specific path segments if presentModifier::redactPathNextSegmentsredacts specific path next segments if presentModifier::redactPathSegmentsByOffsetredacts specific path segments by offset if presentModifier::redactQueryPairsredacts specific query pair if presentModifier::prependQueryprepend a query string to the URI query componentModifier::prependPathreplaceModifier::prependSegmentModifier::appendPathreplaceModifier::appendSegmentModifier::prependSegmentsModifier::appendSegments
Fixed
- Fix deprecation message for
Modifier::uri()method 166 by meyerbaptiste - Fix missing
SensitiveParameterusage onModifier::withUserInfomethod - Fix Host resolution using the new
HostRecordclass - Fix
Modifier::withPathimprove handling of path leading slash presence for PSR-7 implementing classes
Deprecated
Modifier::prependSegmentuseModifier::prependPathinsteadModifier::appendSegmentuseModifier::appendPathinstead
Removed
- None
version 7.6.0
Added
UriComponentInterface::equalsmethodFragmentDirectivessupportComponent::whenconditional method to ease component building logic.URLSearchParams::whenconditional method to ease component building logic.Modifier::prependQueryParametersreturns a modifier with prepended query parametersModifier::replaceQueryParameterreturns a modifier with part of its query string replacedModifier::replaceQueryPairreturns a modifier with part of its query string replacedModifier::whenconditional method to ease component building logic.Modifier::normalizeIpreturns the host normalized for IPv6 and IPv4 addressesModifier::normalizeHostreturns the host as normalized by the WHATWG algorithmModifier::with*method from the underlyingUriobject are proxy to improve DX.Modifier::wrapstatic method which wraps the underlying URI object used by the Modifier class.Modifier::unwrapmethod which returns the underlying URI object used by the Modifier class.Modifier::prefixQueryPairsandModifier::prefixQueryParametersto prefix Query using the pair key or the parameter namesModifier::toMarkdownAnchorreturns the Markdown string representation of the anchor tag with the current instance as its href attribute.Modifier::toHtmlAnchorreturns the HTML string representation of the anchor tag with the current instance as its href attribute.tryNewnamed constructor added to all classes to return a new instance on success ornullon failure.Query::decodedthe string representation of the component decoded.Query::normalizedQuery::fromPairsandQuery::fromVariabletakes a optional$prefixparameter to update the query pair keys or parameter namesQuery::indexOfandQuery::replaceQuery::mergeParametersQuery::replaceParameterQuery::replacePairQuery::prependURLSearchParams::decodedthe string representation of the component decoded.Path::nornalizedFragment::normalizedHierarchicalPath::normalizedDatapath::normalized- Support for
Uri\Rfc3986\Uri - Support for
Uri\WhatWg\Url Port::defaultSchemesPort::defaultSchemeScheme::isWhatWgSpecialScheme::defaultPortScheme::hasDefaultPort
Fixed
Modifierhost related method return host in IDN form or ASCII form depending on the URI input formatUserInfonow can be constructed and mutated even when theusercomponent is not present. It was throwing an exception before.
Deprecated
Modifier::getIdnUriStringuseModifier::toDisplayStringinsteadModifier::getUriStringuseModifier::toStringinsteadModifier::getUriuseModifier::uriinsteadModifier::fromuseModifier::wrapinstead
Removed
- None
version 7.5.1
Full Changelog:
- FIx composer.json: 7.5.0...7.5.1
version 7.5.0
Added
UrlSearchParams::uniqueKeyCountModifier::getIdnUriStringModifier::hostToIpv6CompressedModifier::hostToIpv6ExpandedScheme::isHttpScheme::isWebsocketScheme::isSslScheme::isSpecial- Using PHP8.4
Deprecatedattribute to signal deprecated public API methods and constants.
Fixed
- Remove Usage of PSR-7
UriInterfaceinUrlSearchParamsclass - Normalizes
fromUrito return the same value for the component if the URI object has the same string representation.
Deprecated
- Usage of PSR-7
UriFactoryInterfaceis deprecated inModifierclass
Removed
- None
version 7.4.1
Added
- None
Fixed
- Fix package to avoid PHP8.4 deprecation warnings
- Bug Fix
removeEmptyPairs#133
Deprecated
- None
Removed
- None
version 7.4.0
Added
Query::fromVariableUrlSearchParams::fromVariable
Fixed
- None
Deprecated
Query::fromParametersuseQuery::fromVariableinsteadUrlSearchParams::fromParametersuseUrlSearchParams::fromVariableinstead
Removed
- None
version 7.3.0
Added
League\Uri\Modifier::removeQueryPairsByKeyLeague\Uri\Modifier::removeQueryPairsByValueLeague\Uri\Modifier::removeQueryPairsByKeyValueLeague\Uri\Components\Query::hasPairLeague\Uri\Components\Query::withoutPairByKeyLeague\Uri\Components\Query::withoutPairByValueLeague\Uri\Components\Query::withoutPairByKeyValueLeague\Uri\Components\Query::fromFormDataLeague\Uri\Components\Query::toFormDataLeague\Uri\Components\URLSearchParams
Fixed
League\Uri\Components\Query::sortto improve WHATWG compliance.League\Uri\QueryString::buildFromPairsshould throwSyntaxErrorinstead ofTypeErrorLeague\Uri\Components\Queryuses internallyLeague\Uri\KeyValuePair\ConverterLeague\Uri\Components\Query::toRFC3986is no longer deprecatedLeague\Uri\Components\Query::jsonSerualizeusestoFormDatainstead oftoRFC1738League\Uri\Components\Queryfix float handling.- Exception message typo fix #121 by GrahamCampbell
Deprecated
League\Uri\Modifier::removeQueryPairsuseLeague\Uri\Modifier::removeQueryPairsByKeyinstead.League\Uri\Components\Query::withoutPairuseLeague\Uri\Components\Query::withoutPairByKeyinstead.
Removed
- None
version 7.2.1
Fix composer.json