Skip to content

Commit

Permalink
Improve IPv4Converter implementation and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jul 30, 2023
1 parent 23dc7e7 commit 037b0c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BaseUri.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ private static function formatHost(Psr7UriInterface|UriInterface $uri): Psr7UriI
{
$host = $uri->getHost();
try {
$converted = IPv4Converter::fromEnvironment()->normalize($host);
$converted = IPv4Converter::fromEnvironment()($host);
} catch (MissingIPv4Calculator) {
$converted = null;
}
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"php": "^8.1",
"ext-json": "*",
"league/uri-interfaces": "7.x-dev",
"psr/http-message": "^1.1.0 || ^2.0"
"psr/http-message": "^1.1.0 || ^2.0",
"psr/http-factory": "^1"
},
"autoload": {
"psr-4": {
Expand All @@ -61,8 +62,7 @@
"ext-intl" : "Needed to improve host validation",
"ext-fileinfo": "Needed to create Data URI from a filepath",
"league/uri-components" : "Needed to easily manipulate URI objects",
"psr/http-factory": "Needed to use the URI factory",
"symfony/polyfill-intl-idn": "to use the IDNA feature via Symfony Polyfill"
"symfony/polyfill-intl-idn": "Needed to improve host validation"
},
"extra": {
"branch-alias": {
Expand Down

0 comments on commit 037b0c0

Please sign in to comment.