All Notable changes to League\Uri
will be documented in this file
Next - TBD
Http::when
conditional method to ease component building logic.Uri::when
conditional method to ease component building logic.BaseUri::when
conditional method to ease component building logic.
- None
- None
- None
7.5.0 - 2024-12-08
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.
- Improve PSR-7
Http
class implementation. BaseUri::from
will compress the IPv6 host to its compressed form if possible.
- Usage of PSR-7
UriFactoryInterface
is deprecated inBaseUri
class
- None
7.4.1 - 2024-02-23
- None
- Fix package to avoid PHP8.4 deprecation warnings
- None
- None
7.4.0 - 2023-12-01
Uri::fromData
Uri::fromRfc8089
BaseUri::unixPath
BaseUri::windowsPath
BaseUri::toRfc8089
- None
- None
- None
7.3.0 - 2023-09-09
- None
- URI Template incorrect when variable name only contains numbers #109 by GrahamCampbell
- Exception message typo fix #121 by GrahamCampbell
- None
- None
7.2.1 - 2023-08-30
- None
composer.json
constraints
- None
- None
7.2.0 - 2023-08-30
BasUri::hasIDN
- None
- None
- None
7.1.0 - 2023-08-21
- None
- Using the
Encoder
class to normalize encoding and decoding in all packages
- None
- None
7.0.0 - 2023-08-10
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
League\Uri\UriInfo
uri input now supportsStringable
andstring
type.League\Uri\UriTemplate\VariableBag
implements theIteratorAggregate
interfaceLeague\Uri\UriTemplate\Operator
to improve internal representation when using UriTemplate features.
League\Uri\UriResolver
useLeague\Uri\BaseUri
insteadLeague\Uri\Uri::createFromString
useLeague\Uri\Uri::new
League\Uri\Uri::createFromUri
useLeague\Uri\Uri::new
League\Uri\Uri::createFromComponents
useLeague\Uri\Uri::fromComponents
League\Uri\Uri::createFromBaseUri
useLeague\Uri\Uri::fromBaseUri
League\Uri\Uri::createFromServer
useLeague\Uri\Uri::fromServer
League\Uri\Uri::createFromWindowsPath
useLeague\Uri\Uri::fromWindowsPath
League\Uri\Uri::createFromUnixPath
useLeague\Uri\Uri::fromUnixPath
League\Uri\Uri::createFromDataPath
useLeague\Uri\Uri::fromFileContents
League\Uri\Http::createFromString
useLeague\Uri\Http::new
League\Uri\Http::createFromUri
useLeague\Uri\Http::new
League\Uri\Http::createFromComponents
useLeague\Uri\Http::fromComponents
League\Uri\Http::createFromBaseUri
useLeague\Uri\Http::fromBaseUri
League\Uri\Http::createFromServer
useLeague\Uri\Http::fromServer
League\Uri\UriTemplate\Template::createFromString
useLeague\Uri\UriTemplate\Template::new
- Support for
__set_state
- Support for
__debugInfo
League\Uri\UriTemplate\VariableBag::all
League\Uri\Exceptions\TemplateCanNotBeExpanded
useLeague\Uri\UriTemplate\TemplateCanNotBeExpanded
insteadLeague\Uri\UriString
class. Class moved to theuri-interfaces
package.
6.8.0 - 2022-09-13
- Added PHP8.2+
SensitiveParameter
attributes to user information component
- Optimize URI performance for server intensive usage 206 by @kelunik
- Improve
Template
resolution - Added PHPBench to benchmark the package main functionnalities.
- Normalize
UriInterface::getPath
value in the context of multiple leading slash characters.
- None
- Support for PHP7.4 and PHP8.0
6.7.2 - 2022-09-13
- None
Http::getPath
andUri::getPath
methods returned values are normalized to prevent potential XSS and open redirect vectors.
- None
- None
6.7.1 - 2022-06-29
- None
UriInfo::isCrossOrigin
method is fix to make it work with any PSR-7 compliant object 205
- None
- None
6.7.0 - 2022-06-28
UriInfo::isCrossOrigin
method
- None
- None
- None
6.6.0 - 2022-05-28
- None
- Some errors are moved from
TypeError
toInvalidArgumentException
to align with otherUriInterface
PSR-7 implementations. - Improved documentation by @GwendolenLynch
- Added PSR7 compliance tests from the PHP-HTTP group
- None
- Support for PHP7.3
Uri::toString
as a clean method to return URI string representation.IDNA
conversion in now normalize using theUri-Interface
package classes
- conversion host component from ASCII to unicode no longer throw
- None
- Support for PHP7.2
HttpFactory
a class that implements PSR-17 UriFactoryInterface. The package needs to be present for the class to work.
- Nothing
- None
UriInfo::getOrigin
to returns the URI origin as described in the WHATWG URL Living standard specificationUriTemplate\Template
,UriTemplate\Expression
,UriTemplate\VarSpecifier
,UriTemplate\VariableBag
to improveUriTemplate
implementation.- Added early support for PHP8
UriTemplate
complete rewrite by reducing deep nested array usage.- Exception misleading message see issue #167
Uri::withScheme
Uri validation failed to catch the empty string as an invalid scheme. #171
- Nothing
- None
- None
- Bugfix
UriTemplate::expand
to comply with expansion rules for undefined variables #161 thanks Gabe Sullice - Improve package testing settings and environment.
- Nothing
- None
- None
- None
- Nothing
- Hard dependencies on the
ext-mbstring
and theext-fileinfo
PHP extensions #154 thanks Nicolas Grekas
- Nothing
League\Uri\UriTemplate
variables validation and normalization improved
- Nothing
- Nothing
League\Uri\UriTemplate
a class to handle uri template expansion as described in RFC7560 see PR #153
- Nothing
- Nothing
- Nothing
Uri
should not depend onintl
extension if the host is in its ascii form #141
- Nothing
- Nothing
League\Uri\UriInfo
: to get RFC3986 information from an URI objectLeague\Uri\UriResolver
: to resolve or relativize an URI objectLeague\Uri\UriString
: to parse or build an URL into or from its componentsLeague\Uri\Uri::createFromBaseUri
named constructorLeague\Uri\Uri::createFromDataPath
named constructorLeague\Uri\Uri::createFromPsr7
named constructorLeague\Uri\Uri::createFromUnixPath
named constructorLeague\Uri\Uri::createFromWindowsPath
named constructorLeague\Uri\Http::createFromBaseUri
named constructor
- Improve parsing and building URI
- All URI object are now finals and supports parameter type widening
League\Uri\Uri
implements theJsonSerializable
interfaceLeague\Uri\Http
implements theJsonSerializable
interface
- None
- support for PHP7.1 and PHP7.0
create
function defined in theLeague\Uri
namespace replaced byLeague\Uri\Uri::createFromBaseUri
League\Uri\Factory
replaced byLeague\Uri\Uri
League\Uri\Data
replaced byLeague\Uri\Uri
League\Uri\File
replaced byLeague\Uri\Uri
League\Uri\Ftp
replaced byLeague\Uri\Uri
League\Uri\Ws
replaced byLeague\Uri\Uri
League\Uri\UriException
replaced byLeague\Uri\Contract\UriException
League\Uri\AbstractUri
internal, replaced byLeague\Uri\Uri
League\Uri\Schemes
namespace and all classes insideLeague\Uri\Uri
no longer implementsLeague\Uri\UriInterface
See packages release notes for more informations
- IPvFuture support
- Adding PHPStan
- Improve RFC3986 compliance
- Improve performance
- remove
mbstring
extension requirement
- URI Parser
- URI Hostname parser
- URI Manipulations 1.3.0 Changelog
- URI Components 1.5.0 Changelog
- URI Schemes 1.1.1 Changelog
- Support for PHP7.2
- Support for PHP7.2
- Update library dependencies
- Nothing
- Nothing
The library is now a metapackage, you can read the migration guide for upgrading or the complete documentation for the new version.
- PHP5 support
- Nothing
- issue #91 Path modifier must be RFC3986 compliant
- issue #94 Improve Query parser encoder
Formatter::__invoke
path must be RFC3986 compliant
- Nothing
- Nothing
- Nothing
- issue #84
- Nothing
- Nothing
Component::getContent
returns the raw encoded representation of a componentComponent::withContent
to create a new instance from a given raw encoded contentgetDecoded
method to access the decoded content for the following classes:User
Pass
Fragment
- Support for PHP's magic methods
__debugInfo
and__set_state
to improve debugging Modifiers\Relativize
Modifiers\DecodeUnreservedCharacters
Path::createFromSegments
Path::getSegments
Host::createFromLabels
Host::getLabels
Query::createFromPairs
Query::getPairs
Modifiers\uri_reference
function to return URI reference state.
- Components encoding/decoding to be more RFC3986 compliant
Host::getRegisterableDomain
must always return a string as per the host interface expected return typeHost::getSubdomain
must always return a string as per the host interface expected return typeHost::isPublicSuffixValid
when nopublicSuffix
information is foundHost::isPublicSuffixValid
must always return a string as per the host interface expected return type- On instantiation, query and fragment delimiter are preserved
createFromComponents
failing withparse_url
result when no path is defined- On URI transformation
InvalidArgumentException
exceptions are emitted instead ofRuntimeException
ones to normalize exception to PSR-7 Modifiers\Normalize
class removes dot segments only on URI with absolute path.Modifiers\Normalize
class decode all unreserved characters.Ftp
andWs
objects now accept relative reference URI without the scheme.
Component::modify
useComponent::withContent
insteadHost::getLiteral
Port::toInt
usePort::getContent
insteadHierarchicalPath::createFromArray
useHierarchicalPath::createFromSegments
insteadHierarchicalPath::toArray
useHierarchicalPath::getSegments
insteadHost::createFromArray
useHost::createFromLabels
insteadHost::toArray
useHost::getLabels
insteadQuery::createFromArray
useQuery::createFromPairs
insteadQuery::toArray
useQuery::getPairs
insteadUriPart::sameValueAs
- Nothing
- Nothing
- Bug fix path encoding issue #38
- Nothing
- Nothing
Formatter::preserveQuery
to improve query inclusion in URI string representationFormatter::preserveFragment
to improve fragment inclusion in URI string representationFormatter::__invoke
as an alias ofFormatter::format
UriParser::__invoke
as an alias ofUriParser::parse
- Improve Uri Component modification issue #29
- Improve Path encoding/decoding issue #28
- Improve lowercase transformation in hostname issue #27
- Fix empty string evaluation issue #31
Formatter::getHostEncoding
Formatter::getQueryEncoding
Formatter::getQuerySeparator
Modifiers\Filters\Flag::withFlags
Modifiers\Filters\ForCallbable::withCallable
Modifiers\Filters\ForCallbable::withCallable
Modifiers\Filters\Keys::withKeys
Modifiers\Filters\Label::withLabel
Modifiers\Filters\Offset::withOffset
Modifiers\Filters\QueryString::withQuery
Modifiers\Filters\Segment::withSegment
Modifiers\Filters\Uri::withUri
Modifiers\DataUriParameters\withParameters
Modifiers\Extension\withExtension
Modifiers\KsortQuery\withAlgorithm
Modifiers\Typecode\withType
- Nothing
- Nothing
User
andPass
encodingHttp::createFromServer
handling userinfo when not usingmod_php
with$_SERVER['HTTP_AUTHORIZATION']
UriParser
handling URI strings with invalid schemeQueryParser
handling numeric index issue #25DataPath
mimetype syntax validation issue #21DataPath::withParameters
the;base64
binary code now always throw anInvalidArgumentException
- Nothing
- Nothing
Intl
extension is now required to use the libraryFileInfo
extension is now required to use the library- Domain parsing capabilities to
Host
usingjeremykendall/php-domain-parser
package UriParser
to parse an URI according to RFC3986 rulesQueryParser
to parse and build a query string according to RFC3986 rules.League\Uri\Schemes\Generic\AbstractUri
to enable better URI extension- URI Modifiers classes to modify URI objects in an uniform way for interoperability
- A
Data
class to specifically manipulatedata
schemed URI - A
Http
class to specifically manipulatehttp
,https
schemed URI - A
Ftp
class to specifically manipulateftp
schemed URI - A
Ws
class to specifically manipulatews
,wss
schemed URI - A
DataPath
component class to manipulate Data-uri path component - A
HierarchicalPath
to manipulate Hierarchical-like path component - Support for IP host
- Move namespace from
League\Url
toLeague\Uri
to avoid dependency hell - Uri components classes are fixed to comply to
RFC3986
- Uri components classes are now all immutable value objects
- Nothing
- Support for
PHP 5.4
andPHP 5.3
- Dependency on PHP
parse_url
,parse_str
andhttp_build_query
functions - Dependency on the
True/php-punycode
library League\Url\Url
,League\Url\UrlImmutable
,League\Url\UrlConstants
classes- Most of the public API is removed