Skip to content

Commit bbcaa92

Browse files
committed
Improve composer definition
1 parent 949eeab commit bbcaa92

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ composer require jeremykendall/php-domain-parser:^6.0
3636

3737
You need:
3838

39-
- **PHP >= 7.4** but the latest stable version of PHP is recommended
40-
- the `intl` extension
39+
- **PHP >= 8.1** but the latest stable version of PHP is recommended
4140
- a copy of the [Public Suffix List](https://publicsuffix.org/) data and/or a copy of the [IANA Top Level Domain List](https://www.iana.org/domains/root/files). Please refer to the [Managing external data source section](#managing-the-package-external-resources) for more information when using this package in production.
4241

42+
Handling of an IDN host requires the presence of the `intl` extension or
43+
a polyfill for the `intl` IDN functions like the `symfony/polyfill-intl-idn`
44+
otherwise an exception will be thrown when attempting to validate or interact
45+
with such a host.
46+
4347
## Usage
4448

4549
> [!WARNING]

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
],
4242
"require": {
4343
"php": "^8.1",
44-
"ext-filter": "*",
45-
"ext-intl": "*"
44+
"ext-filter": "*"
4645
},
4746
"require-dev": {
4847
"friendsofphp/php-cs-fixer": "^3.65.0",
@@ -61,7 +60,9 @@
6160
"psr/http-client-implementation": "To use the storage functionality which depends on PSR-18",
6261
"psr/http-factory-implementation": "To use the storage functionality which depends on PSR-17",
6362
"psr/simple-cache-implementation": "To use the storage functionality which depends on PSR-16",
64-
"league/uri": "To parse URL and validate host"
63+
"league/uri": "To parse and extract the host from an URL using a RFC3986/RFC3987 URI parser",
64+
"rowbot/url": "To parse and extract the host from an URL using a WHATWG URL parser",
65+
"symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
6566
},
6667
"autoload": {
6768
"psr-4": {

0 commit comments

Comments
 (0)