All Notable changes to League\Uri\Components
will be documented in this file
Next - TBD
Component::when
conditional method to ease component building logic.URLSearchParams::when
conditional method to ease component building logic.Modifier::prependQueryParameters
returns a modifier with prepend query paramtersModifier::when
conditional method to ease component building logic.Modifier::with*
method from the underlyingUri
object are proxy to improve DX.Query::decoded
the string representation of the component decoded.URLSearchParams::decoded
the string representation of the component decoded.tryNew
named constructor added to all components class to returns a new instance on success ornull
on failure.
- None
Modifier::getIdnUriString
useModifier::displayUriString
instead
- None
7.5.0 - 2024-12-08
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.
- Remove Usage of PSR-7
UriInterface
inUrlSearchParams
class - Normalizes
fromUri
to return the same value for the component if the URI object has the same string representation.
- Usage of PSR-7
UriFactoryInterface
is deprecated inModifier
class
- None
7.4.1 - 2024-02-23
- None
- Fix package to avoid PHP8.4 deprecation warnings
- Bug Fix
removeEmptyPairs
#133
- None
- None
7.4.0 - 2023-12-01
Query::fromVariable
UrlSearchParams::fromVariable
- None
Query::fromParameters
useQuery::fromVariable
insteadUrlSearchParams::fromParameters
useUrlSearchParams::fromVariable
instead
- None
7.3.0 - 2023-09-09
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
League\Uri\Components\Query::sort
to improve WHATWG compliance.League\Uri\QueryString::buildFromPairs
should throwSyntaxError
instead ofTypeError
League\Uri\Components\Query
uses internallyLeague\Uri\KeyValuePair\Converter
League\Uri\Components\Query::toRFC3986
is no longer deprecatedLeague\Uri\Components\Query::jsonSerualize
usestoFormData
instead oftoRFC1738
League\Uri\Components\Query
fix float handling.- Exception message typo fix #121 by GrahamCampbell
League\Uri\Modifier::removeQueryPairs
useLeague\Uri\Modifier::removeQueryPairsByKey
instead.League\Uri\Components\Query::withoutPair
useLeague\Uri\Components\Query::withoutPairByKey
instead.
- None
7.2.1 - 2023-08-30
- None
composer.json
constraints
- None
- None
7.2.0 - 2023-08-30
Modifier::appendQueryPairs
Modifier::mergeQueryPairs
Modifier::removeQueryPairs
Modifier::removeEmptyQueryPairs
Modifier::appendQueryParameters
Modifier::mergeQueryParameters
Modifier::removeQueryParameters
Modifier::removeQueryParametersIndices
- None
Modifier::removeParams
useModifier::removeQueryParameters
insteadModifier::removePairs
useModifier::removeQueryPairs
insteadModifier::removeEmptyPairs
useModifier::removeEmptyQueryPairs
instead
- None
7.1.0 - 2023-08-21
Modifier::encodeQuery
- Using the
Encoder
class to normalize encoding and decoding in all packages
- None
- None
7.0.0 - 2023-08-10
value
method to replace the removedgetContent
method.- requires
League\Uri
package. League\Uri\Components\Scheme::new
named constructorLeague\Uri\Components\UserInfo::new
named constructorLeague\Uri\Components\Host::new
named constructorLeague\Uri\Components\Domain::new
named constructorLeague\Uri\Components\Fragment::new
named constructorLeague\Uri\Components\Query::new
named constructorLeague\Uri\Components\Path::new
named constructorLeague\Uri\Components\DataPath::new
named constructorLeague\Uri\Components\UserInfo::withUser
modifier methodLeague\Uri\Components\UserInfo::withPass
modifier methodLeague\Uri\Components\Port::fromNumber
modifier methodLeague\Uri\Components\Query::parameters
accessing methodLeague\Uri\Components\Query::parameter
accessing methodLeague\Uri\Components\Query::hasParameter
accessing methodLeague\Uri\IPv4Calculators\MissingIPv4Calculator
exceptionLeague\Uri\Components\OffsetOutOfBounds
exception addedLeague\Uri\Modifier
to replace deprecatedLeague\Uri\Modifier
- converts Value Objects properties to being
private readonly
where possible. - All components class constructors (except for the
UserInfo
and theAuthority
classes) are made private use the available named constructors instead - Named constructors default value are removed, you need to explicitly add an argument value or use the
::new()
named constructor instead. UserInfo
class makes a distinction betweennull
and the empty string.Query::has
accessing method accept a variadic parameters to check multiple keys at the same time.Domain
value can benull
or a non-empty string previously it would trigger an exceptionDomain::append
andDomain::prepend
respects the root status of the instance.
- All
createFromString
named constructors are replaced by thenew
named constructor. - All
createFromNull
named constructors are replaced by thenew
named constructor. - All remaining named constructors which starts with
createFrom*
replaced by the same method starting withfrom*
. For exampleAuthority::createFromUri
is deprecated in favor ofAuthority::fromUri
Query::params
is replaced byQuery::parameters
andQuery::parameter
HierarchicalPath::segments
useHierarchicalPath::getIterator
insteadDomain::labels
useDomain::getIterator
insteadLeague\Uri\UriModifier
useLeague\Uri\Modifier
League\Uri\IPv4Normalizer
useLeague\Uri\Modifier
instead
- PHP7 and PHP8.0 support
withContent
andgetContent
methods- Support for
__set_state
- Support for
float
type as possible argument for components - Support for
int
type as possible argument for components UserInfo::withUserInfo
modifier method useUserInfo::withUser
and/orUserInfo::withPass
instead- Remove the
Exceptions
namespace League\Uri\Exceptions\IPv4CalculatorMissing
useLeague\Uri\IPv4Calculators\MissingIPv4Calculator
insteadLeague\Uri\Exceptions\OffsetOutOfBounds
useLeague\Uri\Components\OffsetOutOfBounds
insteadLeague\Uri\QueryString
class. Class moved to theuri-interfaces
package.
2.4.1 - 2022-05-26
- None
- conversion query component for non ASCII characters see #202
- None
- None
Component::toString
IDNA
conversion in now normalize using theUri-Interface
package classes
- conversion host component from ASCII to unicode no longer throw
- None
- None
Authority::createFromNull
Authority::createFromString
Authority::createFromComponents
DataPath::createFromFilePath
DataPath::createFromString
Domain::createFromString
Domain::createFromHost
HierarchicalPath::createFromPath
HierarchicalPath::createFromString
Path::createFromString
- Support for
PHP8.0
- Fix RFC1738 encoding in
QueryString::build
- Improve
UriModifier
using the newly added named constructors.
Authority::__construct
replaced byAuthority
named constructorsDataPath::createFromPath
replaced byDataPath::createFromFilePath
Domain::__construct
replaced byDomain
named constructorsHierarchicalPath::__construct
replaced byHierarchicalPath
named constructors
- Support for
PHP7.2
- None
- back port improvement made to
DataUri
by #154 thanks to Nicolas Grekas
- None
- None
- None
- None
- Hard dependencies on the
ext-fileinfo
PHP extensions see #154 thanks Nicolas Grekas
League\Uri\UriModifier::removeEmptyPairs
- to remove empty pairs from the URL object.
- Improve UserInfo decoding issue #28
- Improve processing URI object with
League\Uri\UriModifier
with a better distinction between empty and undefined URI component.
- None
- None
- None
- Improved Domain name detection according to RFC1132 see issue #27
- Normalized exception message formatting.
- None
- None
League\Uri\IPv4HostNormalizer
to ease IPV4 host string normalization.League\Uri\UriModifier
to ease manipulatingLeague\Uri\UriInterface
andPsr\Http\Message\UriInterface
implementing objects.League\Uri\QueryString
to parse, extract and build query string and parameters- All components classes implement the
League\Uri\Contracts\ComponentInterface
- All components classes expose the
createFromUri
named constructor to instantiate a component object from a URI object League\Uri\Components\Authority
to represent the URI authority componentLeague\Uri\Components\Fragment::decoded
to return the safely decoded fragment contentLeague\Uri\Components\UserInfo::decoded
to return the safely decoded user info contentLeague\Uri\Components\Port::toInt
to return the int representation of the Port or nullLeague\Uri\Components\Domain
to better process domain hostLeague\Uri\Components\HierarchicalPath::createAbsoluteFromSegments
League\Uri\Components\HierarchicalPath::createRelativeFromSegments
League\Uri\Components\HierarchicalPath::segments
to return the component segmentsLeague\Uri\Components\HierarchicalPath::get
to return a specific segmentLeague\Uri\Components\Query
follows more closely the URLSearchParams specifications from the WHATWG groupLeague\Uri\Components\Query::createFromRFC3986
to return a new object from a RFC3986 query stringLeague\Uri\Components\Query::createFromRFC1738
to return a new object from a RFC1738 query stringLeague\Uri\Components\Query::toRFC3986
to return a RFC3986 query stringLeague\Uri\Components\Query::toRFC1738
to return a RFC1738 query string
- Components classes are made
final
getContent
no-longer takes any parameterHost
objects throwsLeague\Uri\Exception\IdnSupportMissing
on mis-configured or absent Intl extension presence.UserInfo::__construct
expects two arguments the user and the pass instead of one.Query::__construct
is now private- Query parsing/building is fixed so that a round between parsing and building returns the original input.
- None
- support for
PHP7.0
- support for
PHP7.1
- support for Public Suffix List resolution
isEmpty
andisNull
methods are removedLeague\Uri\parse_query
League\Uri\build_query
League\Uri\extract_query
League\Uri\pairs_to_params
League\Uri\QueryBuilder
League\Uri\QueryParser
League\Uri\Components\ComponentInterface
League\Uri\Components\HierarchicalPath::createFromSegments
League\Uri\Components\HierarchicalPath::getSegments
League\Uri\Components\HierarchicalPath::getSegment
League\Uri\Components\HierarchicalPath::IS_ABSOLUTE
League\Uri\Components\HierarchicalPath::IS_RELATIVE
- The following methods are transferred to the new
League\Uri\Components\Domain
class League\Uri\Components\Host::isAbsolute
League\Uri\Components\Host::getLabels
League\Uri\Components\Host::getLabel
League\Uri\Components\Host::keys
League\Uri\Components\Host::count
League\Uri\Components\Host::getIterator
League\Uri\Components\Host::append
League\Uri\Components\Host::prepend
League\Uri\Components\Host::replaceLabel
League\Uri\Components\Host::withoutLabels
League\Uri\Components\Host::withRootLabel
League\Uri\Components\Host::withoutRootLabel
League\Uri\Components\Query::ksort
League\Uri\Components\Query::getParams
League\Uri\Components\Query::getParam
League\Uri\Components\Query::getPairs
League\Uri\Components\Query::getPair
League\Uri\Components\Query::hasPair
- None
- None
- None
- None
- Issue #21 namespace collision
with exception usage in
Uri\QueryParser
and QUri\QueryBuilder
- None
- None
- IPvFuture support
- Using PHPStan
- Using the new scrutinizr engine for PHP
- Bug fix Port class to conform to RFC3986 now allow any port number greater or equals to
0
. - Improve Host parsing
- None
mbstring
extension requirement
- None
- The
Host
resolver and its usage is lazyloaded so thatHost
only requires and used them if needed - Bug fix issue with:
Host::withPublicSuffix
Host::withRegistrableDomain
Host::withSubDomain
methods that were leaving the currentHost
object corrupted in some cases.
- None
- None
- Adding the possibility to use your own domain resolver object.
Host::__construct
can take an optionalRules
object as the domain resolverHost::createFromIp
can take an optionalRules
object as the domain resolverHost::createFromLabels
can take an optionalRules
object as the domain resolverHost::withDomainResolver
to enable switching to current domain resolver object
-
The domain resolver as a Rules object is now injecting into the Host domain so that its data can be cached independently of the filecache. If not domain resolver is provided the Host will fallback to using the filecache with the data being kept for 7 days in a
vendor
subdirectory. -
Decoupled the
QueryBuilder
and theQueryParser
fromComponentTrait
- None
- None
Host::withPublicSuffix
to complete registered name manipulation methods
- registered name infos loading
- None
- None
Uri\QueryParser
class to parse any string into key/pair value or extract PHP valuesUri\QueryBuilder
class to build a valid query string from a collection of Key/pair valuesUri\pairs_to_params
alias forQueryParser::convert
- URI Host parsing to respect RFC3986
- improve internal code
Query::parse
replaced byQueryParser::parse
Query::extract
replaced byQueryParser::extract
Query::build
replaced byQueryBuilder::build
Host::getRegisterableDomain
replaced byHost::getRegistrableDomain
Host::withRegisterableDomain
replaced byHost::withRegistrableDomain
- internal traits
QueryParserTrait
,HostInfoTrait
- None
- URI Hostname parser local cache update
- None
- None
- Dependencies to League URI Hostname parser
- Issue #109 Dependencie on a unstable package
- None
- Dependencies to PHP Domaine parser
Query::getSeparator
,Query::withSeparator
to allow modifying query string separator.Query::__construct
takes a second argument, the query separator which default to&
.Query::__debugInfo
nows adds query separator informations.Query::withoutParams
to complementQuery::withoutPairs
method.Query::createFromParams
to complementQuery::createFromPairs
named constructor.Query::withoutNumericIndices
to normalized the query string by removing extra numeric indices added by the use ofhttp_build_query
.Query::withoutEmptyPairs
to normalized the query string #7 and #8
Query::merge
andQuery::append
normalized the query string to remove empty pairs see #7 and #8Query::build
andUri\build
now accept any iterable structure.
- None
- None
League\Uri\build_query
as an alias ofQuery::build
- function docblocks
- None
- None
League\Uri\parse_query
as an alias ofQuery::parse
League\Uri\extract_query
as an alias ofQuery::extract
League\Uri\parse_query
returned value was the wrong one
- None
- None
League\Uri\parse_query
as an alias ofQuery::extract
- Internal call in PHP7.2 with incompatible definitions
- update PHP Domain Parser to be compatible with PHP7.2 deprecation notice
- remove restriction to constructor characters for
Path
,Query
andUserInfo
.
- None
- None
- None
- Bug fix label conversion depending on locale issue #102
- None
- None
- None
- Bug fix negative offset issue #5
- None
- None
- None
- Improve registered name validation issue #5
- None
- None
- None
- Update idn to ascii algorithm from INTL_IDNA_VARIANT_2003 to INTL_IDNA_VARIANT_UTS46
- None
- None
- None
- Improve validation check for
Query::build
- Remove `func_* function usage
- Improve
HierarchicalPath::createFromSegments
- Internal code simplification
- None
- None
ComponentInterface
EncodingInterface
HierarchicalPath::withDirname
HierarchicalPath::withBasename
HierarchicalPath::withoutSegments
HierarchicalPath::replaceSegment
Host::withRegisterableDomain
Host::withSubdomain
Host::withRootLabel
Host::withoutRootLabel
Host::withoutLabels
Host::replaceLabel
Query::getParams
Query::getParam
Query::append
Query::hasPair
Query::withoutPairs
- ComponentInterface::getContent supports RFC1738
- The methods that accept integer offset supports negative offset
HierarchicalPath::getSegment
HierarchicalPath::replaceSegment
HierarchicalPath::withoutSegments
Host::getLabel
Host::replaceLabel
Host::withoutLabels
Query::merge
only accepts string
- None
- PHP5 support
- Implementing
League\Uri\Interfaces\Component
Query::hasKey
Query::without
Query::filter
Host::hasKey
Host::without
Host::filter
Host::replace
HierarchicalPath::hasKey
HierarchicalPath::without
HierarchicalPath::filter
HierarchicalPath::replace
League\Uri\Components\PathInterface
- None
-
Remove
League\Uri\Interfaces\CollectionComponent
interface dependencies from:League\Uri\Components\Host
League\Uri\Components\HierarchicalPath
-
Bug fix
League\Uri\Components\Query::build
-
Update dependencies on
League\Uri\Interfaces
- None
- None
- None
League\Uri\Components\Host::getContent
now support correctly RFC3987League\Uri\Components\Host::__toString
only returns RFC3986 representationLeague\Uri\Components\UserInfo::getUser
to use the$enc_type
parameterLeague\Uri\Components\UserInfo::getPass
to use the$enc_type
parameter
- None
League\Uri\Components\Host::isIdn
League\Uri\Components\Port::getDecoded
League\Uri\Components\Scheme::getDecoded
League\Uri\Components\Exception
as the base exception for the libraryLeague\Uri\Components\DataPath::getDecoded
returns the non-encoded pathLeague\Uri\Components\HierarchicalPath::getDecoded
returns the non-encoded pathLeague\Uri\Components\Path::getDecoded
returns the non-encoded pathLeague\Uri\Components\Fragment::getDecoded
returns the non-encoded fragmentLeague\Uri\Components\Port::getDecoded
returns the non-encoded portLeague\Uri\Components\Scheme::getDecoded
returns the non-encoded schemeLeague\Uri\Components\Query::extract
public static method returns a hash similar toparse_str
without the mangling from the query string
getContent
is updated to support RFC3987
- None
Query::parsed
useQuery::extract
insteadQuery::parsedValue
useQuery::extract
instead
- None
- issue #84. Query string is not well encoded.
- None
- None
Query::parsed
returns an array similar toparse_str
result with a second options with unmangled key.Query::getParsedValue
returns single value from the parse and unmangled PHP variables.Host::createFromIp
a name constructor to create a host from a IPHost::getIp
returns the IP part from the host if present otherwise returnsnull
Host::__construct
no longers takes a IPv6 without delimiter as a valid argument.
- None
- None
- improve dependencies - broken
- None
League\Uri\QueryParser
is now a traitLeague\Uri\Components\Traits\QueryParser
used byLeague\Uri\Components\Query
League\Uri\Components\UserInfo
now only accepts string and null as constructor parameters.
- None
League\Uri\Components\User
League\Uri\Components\Pass
League\Uri\QueryParser