Uri Common tools
This package contains:
- interface to represent URI and components objects
- parsers to parse and build URI and Query strings that provide enhanced replacement for PHP’s
parse_urland PECL’shttp_build_urlfunctions via its UriString class. - tools to help in processing URIs (IPv4 Converter, IPv6 Converter and IDN converter) and their components in various ways.
System Requirements
You need PHP >= 8.1 but the latest stable version of PHP is recommended.
Handling of an IDN host requires the presence of the intl
extension or a polyfill for the intl IDN functions like the
symfony/polyfill-intl-idn otherwise an exception will be thrown
when attempting to validate or interact with such a host.
IPv4 conversion requires at least one of the following:
- the
GMPextension, - the
BCMatchextension or - a
64-bitsPHP version
otherwise an exception will be thrown when attempting to convert a host as an IPv4 address.
Install
$ composer require league/uri-interfaces:^7.0