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

Commit

Permalink
prepare 1.1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Dec 1, 2017
1 parent ffb93d4 commit fd24486
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 23 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

All Notable changes to `League\Uri\Schemes` will be documented in this file

## 1.1.1 - 2017-12-01

### Added

- None

### Fixed

- improve host normalization. now convert urlencoded label into punycode
- update Uri\Parser dependency requirement
- update PHP7.0.13 minimal version because of PHP bugs in earlier version

### Deprecated

- None

### Remove

- None

## 1.1.0 - 2017-11-02

### Added
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"issues": "https://github.com/thephpleague/uri/issues"
},
"require": {
"php": ">=7.0",
"php": ">=7.0.13",
"ext-mbstring" : "*",
"ext-intl" : "*",
"ext-fileinfo": "*",
"psr/http-message": "^1.0",
"league/uri-parser": "^1.2",
"league/uri-parser": "^1.3.0",
"league/uri-interfaces": "^1.0"
},
"require-dev": {
Expand Down
6 changes: 5 additions & 1 deletion src/AbstractUri.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down Expand Up @@ -371,6 +371,10 @@ protected function formatHost($host)
$component = '';
$valid_ascii_label_characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-';
foreach (explode('.', mb_strtolower($host, 'UTF-8')) as $label) {
if (false !== strpos($label, '%')) {
$label = rawurldecode($label);
}

if (strlen($label) !== strspn($label, $valid_ascii_label_characters)) {
$label = (string) idn_to_ascii($label, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2017 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/AbstractUri.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/Ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/UriException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/Ws.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Http
class_alias(LeagueUri\Uri::class, Uri::class);
if (!class_exists(Uri::class)) {
/**
* @deprecated use instead {@link LeagueUri\Ws}
* @deprecated use instead {@link LeagueUri\Uri}
*/
class Uri
{
Expand Down
2 changes: 1 addition & 1 deletion src/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/UriException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-parser/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-parser/
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Ws.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @subpackage League\Uri\Schemes
* @author Ignace Nyamagana Butera <[email protected]>
* @license https://github.com/thephpleague/uri-components/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-components
*
* For the full copyright and license information, please view the LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2017 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.1.0
* @version 1.1.1
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
4 changes: 2 additions & 2 deletions tests/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ protected function tearDown()
*/
public function testAutomaticUrlNormalization()
{
$raw = 'HtTpS://MaStEr.eXaMpLe.CoM:/%7ejohndoe/%a1/in+dex.php?fào.%bar=v%61lue#fragment';
$normalized = 'https://master.example.com/%7ejohndoe/%a1/in+dex.php?f%C3%A0o.%bar=v%61lue#fragment';
$raw = 'HtTpS://MaStEr.B%c3%A9b%c3%a9.eXaMpLe.CoM:/%7ejohndoe/%a1/in+dex.php?fào.%bar=v%61lue#fragment';
$normalized = 'https://master.xn--bb-bjab.example.com/%7ejohndoe/%a1/in+dex.php?f%C3%A0o.%bar=v%61lue#fragment';
$this->assertSame($normalized, (string) Uri::createFromString($raw));
}

Expand Down

0 comments on commit fd24486

Please sign in to comment.