Skip to content
This repository was archived by the owner on Mar 6, 2021. It is now read-only.

Commit c475caa

Browse files
committed
release 1.0.4
1 parent 77048a7 commit c475caa

File tree

13 files changed

+40
-15
lines changed

13 files changed

+40
-15
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All Notable changes to `League Uri Nostname parser` will be documented in this file
44

5+
## 1.0.4 - 2017-11-30
6+
7+
### Added
8+
9+
- None
10+
11+
### Fixed
12+
13+
- Domain class with invalid domain names
14+
15+
### Deprecated
16+
17+
- None
18+
19+
### Removed
20+
21+
- None
22+
523
## 1.0.3 - 2017-11-30
624

725
### Added

src/Installer/ICANNSection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/CacheException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/CurlHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/Domain.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE
@@ -128,15 +128,21 @@ private function hasRegistrableDomain(): bool
128128
*
129129
* @param string $domain
130130
*
131-
* @return string
131+
* @return string|null
132132
*/
133-
private function normalize(string $domain): string
133+
private function normalize(string $domain)
134134
{
135+
$func = 'idn_to_utf8';
135136
if (strpos($domain, 'xn--') !== false) {
136-
return strtolower(idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46));
137+
$func = 'idn_to_ascii';
138+
}
139+
140+
$domain = $func($domain, 0, INTL_IDNA_VARIANT_UTS46);
141+
if (false === $domain) {
142+
return null;
137143
}
138144

139-
return idn_to_utf8($domain, 0, INTL_IDNA_VARIANT_UTS46);
145+
return strtolower($domain);
140146
}
141147

142148
/**

src/PublicSuffix/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/HttpClientException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

src/PublicSuffix/ICANNSectionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage League\Uri\PublicSuffix
77
* @author Ignace Nyamagana Butera <nyamsprod@gmail.com>
88
* @license https://github.com/thephpleague/uri-hostname-parser/blob/master/LICENSE (MIT License)
9-
* @version 1.0.3
9+
* @version 1.0.4
1010
* @link https://github.com/thephpleague/uri-hostname-parser
1111
*
1212
* For the full copyright and license information, please view the LICENSE

0 commit comments

Comments
 (0)