PHPackages                             league/uri-components - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. league/uri-components

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

league/uri-components
=====================

URI components manipulation library

7.8.1(2mo ago)31932.3M—4.2%520MITPHPPHP ^8.1

Since Oct 17Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/thephpleague/uri-components)[ Packagist](https://packagist.org/packages/league/uri-components)[ Docs](http://uri.thephpleague.com)[ GitHub Sponsors](https://github.com/nyamsprod)[ RSS](/packages/league-uri-components/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (52)Used By (20)

Uri Components
==============

[](#uri-components)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Latest Version](https://camo.githubusercontent.com/26d5f88741a90eae54ea3d5e6bf70d29b917d49bdb60566466ccbd645385c9ba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f7572692d636f6d706f6e656e74732e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/uri-components/releases)[![Total Downloads](https://camo.githubusercontent.com/1b095143867dee9b54eff2c4264abeabd04983a154ea9728c7b0705fd70b33ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f7572692d636f6d706f6e656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/uri-components)

This package contains concrete URI components instances represented as immutable value objects.

> ⚠️ this is a sub-split, for development, pull requests and issues, visit:

System Requirements
-------------------

[](#system-requirements)

You require **PHP &gt;= 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 `GMP` extension,
- the `BCMatch` extension or
- a `64-bits` PHP version

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

Dependencies
------------

[](#dependencies)

- [League URI](https://github.com/thephpleague/uri)
- [League URI Interfaces](https://github.com/thephpleague/uri-interfaces)
- [PSR-7](http://www.php-fig.org/psr/psr-7/)

Installation
------------

[](#installation)

```
$ composer require league/uri-components

```

Documentation
-------------

[](#documentation)

Full documentation can be found at [uri.thephpleague.com](http://uri.thephpleague.com).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

73

—

ExcellentBetter than 100% of packages

Maintenance87

Actively maintained with recent releases

Popularity67

Solid adoption and visibility

Community40

Growing community involvement

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 94.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~116 days

Total

51

Last Release

64d ago

Major Versions

0.5.0 → 1.0.0-RC12017-01-09

1.8.2 → 2.0.02019-10-18

2.4.1 → 7.0.0-beta.12023-06-26

2.4.2 → 7.1.02023-08-21

2.4.x-dev → 7.4.12024-03-23

PHP version history (7 changes)0.1.0PHP &gt;=5.6.0

1.0.0-RC1PHP &gt;=7.0

2.0.0PHP ^7.1.3

2.0.1PHP ^7.2

2.3.0PHP ^7.3 || ^8.0

2.4.1PHP ^7.4 || ^8.0

7.0.0-beta.1PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/534693?v=4)[Frank de Jonge](/maintainers/frankdejonge)[@frankdejonge](https://github.com/frankdejonge)

![](https://avatars.githubusercontent.com/u/51073?v=4)[Ignace Nyamagana Butera](/maintainers/nyamsprod)[@nyamsprod](https://github.com/nyamsprod)

---

Top Contributors

[![nyamsprod](https://avatars.githubusercontent.com/u/51073?v=4)](https://github.com/nyamsprod "nyamsprod (1523 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (24 commits)")[![Fleshgrinder](https://avatars.githubusercontent.com/u/1059453?v=4)](https://github.com/Fleshgrinder "Fleshgrinder (15 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (7 commits)")[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (5 commits)")[![rbayliss](https://avatars.githubusercontent.com/u/654407?v=4)](https://github.com/rbayliss "rbayliss (4 commits)")[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (3 commits)")[![Evan-R](https://avatars.githubusercontent.com/u/2487675?v=4)](https://github.com/Evan-R "Evan-R (2 commits)")[![EvaLok](https://avatars.githubusercontent.com/u/12283250?v=4)](https://github.com/EvaLok "EvaLok (2 commits)")[![makasim](https://avatars.githubusercontent.com/u/143206?v=4)](https://github.com/makasim "makasim (2 commits)")[![marijnvdwerf](https://avatars.githubusercontent.com/u/737603?v=4)](https://github.com/marijnvdwerf "marijnvdwerf (2 commits)")[![pawelkg](https://avatars.githubusercontent.com/u/1854055?v=4)](https://github.com/pawelkg "pawelkg (2 commits)")[![strayobject](https://avatars.githubusercontent.com/u/2257473?v=4)](https://github.com/strayobject "strayobject (1 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")[![teohhanhui](https://avatars.githubusercontent.com/u/548843?v=4)](https://github.com/teohhanhui "teohhanhui (1 commits)")[![baileylo](https://avatars.githubusercontent.com/u/145345?v=4)](https://github.com/baileylo "baileylo (1 commits)")[![Zeichen32](https://avatars.githubusercontent.com/u/1432899?v=4)](https://github.com/Zeichen32 "Zeichen32 (1 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (1 commits)")[![chrismou](https://avatars.githubusercontent.com/u/319883?v=4)](https://github.com/chrismou "chrismou (1 commits)")[![FractalizeR](https://avatars.githubusercontent.com/u/318489?v=4)](https://github.com/FractalizeR "FractalizeR (1 commits)")

---

Tags

phpphp7querystringquerystringsuriuri-componentsuri-fragmentsuri-hosturi-pathuri-queryurlurlurirfc3986middlewarecomponentspathquerymodifierhostportfragmentauthorityschemeuserinfo

### Embed Badge

![Health badge](/badges/league-uri-components/health.svg)

```
[![Health](https://phpackages.com/badges/league-uri-components/health.svg)](https://phpackages.com/packages/league-uri-components)
```

###  Alternatives

[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[sabre/uri

Functions for making sense out of URIs.

29335.2M40](/packages/sabre-uri)[cybercog/laravel-optimus

An Optimus bridge for Laravel. Id obfuscation based on Knuth's multiplicative hashing method.

192564.1k](/packages/cybercog-laravel-optimus)[opis/uri

Build, parse and validate URIs and URI-templates

1920.8M6](/packages/opis-uri)[crwlr/url

Swiss Army knife for URLs.

11073.3k3](/packages/crwlr-url)[ml/iri

IRI handling for PHP

276.4M6](/packages/ml-iri)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
