Overview

Author Source Code Latest Stable Version Software License
Build Total Downloads

This package contains features and capabilities to ease manipulating URIs.

It allows simple URI manipulation via the context aware wrapper BaseUri. But also expose a complete API around URI creation using the UriTemplate and the URI class which represents a generic RFC3986 compliant URI object.

For interoperability, we also provide PSR-7 and PSR-17 compliant implementation around URI access and creation.

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:

otherwise an exception will be thrown when attempting to convert a host as an IPv4 address.

In order to create Data URI from the content of a file you are required to also install the fileinfo extension otherwise an exception will be thrown.

Installation

$ composer require league/uri:^7.0

Dependencies