From 4e01703f2d0dc0cf3f177dd89831ecc4dfad2999 Mon Sep 17 00:00:00 2001 From: Ignace Nyamagana Butera Date: Mon, 25 Sep 2017 12:35:12 +0200 Subject: [PATCH] Prepare 1.1.0 release --- .travis.yml | 11 ++++++++--- CHANGELOG.md | 2 +- src/Exception.php | 2 +- src/Parser.php | 6 +++--- tests/ParserTest.php | 1 + 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9e608a..4880d55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,13 @@ sudo: false matrix: include: - php: 7.0 - env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true + env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false - php: 7.1 - env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=false + env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false + - php: master + env: COLLECT_COVERAGE=false VALIDATE_CODING_STYLE=false IGNORE_PLATFORMS=true + allow_failures: + - php: master fast_finish: true cache: @@ -18,7 +22,8 @@ before_install: - travis_retry composer self-update install: - - travis_retry composer update --no-interaction --prefer-source + - if [ "$IGNORE_PLATFORMS" == "true" ]; then travis_retry composer update --no-interaction --prefer-source --ignore-platform-reqs; fi + - if [ "$IGNORE_PLATFORMS" == "false" ]; then travis_retry composer update --no-interaction --prefer-source; fi script: - composer phpunit diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c88570..a5a35db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All Notable changes to `league-uri-parser` will be documented in this file -## 1.1.0 - TBD +## 1.1.0 - 2017-09-25 ### Added diff --git a/src/Exception.php b/src/Exception.php index 073cf3b..58fc563 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -6,7 +6,7 @@ * @subpackage League\Uri * @author Ignace Nyamagana Butera * @license https://github.com/thephpleague/uri-parser/blob/master/LICENSE (MIT License) - * @version 1.0.5 + * @version 1.1.0 * @link https://github.com/thephpleague/uri-parser/ * * For the full copyright and license information, please view the LICENSE diff --git a/src/Parser.php b/src/Parser.php index 0ceed53..2e26d57 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -6,7 +6,7 @@ * @subpackage League\Uri * @author Ignace Nyamagana Butera * @license https://github.com/thephpleague/uri-parser/blob/master/LICENSE (MIT License) - * @version 1.0.5 + * @version 1.1.0 * @link https://github.com/thephpleague/uri-parser/ * * For the full copyright and license information, please view the LICENSE @@ -174,8 +174,8 @@ protected function parseSchemeSpecificPart(string $uri): array list($remaining_uri, $components['fragment']) = explode('#', $remaining_uri, 2) + [null, null]; list($remaining_uri, $components['query']) = explode('?', $remaining_uri, 2) + [null, null]; if (false !== ($pos = strpos($remaining_uri, '/'))) { - $components['path'] = substr($remaining_uri, $pos); - $remaining_uri = substr($remaining_uri, 0, $pos); + list($remaining_uri, $components['path']) = explode('/', $remaining_uri, 2) + [null, null]; + $components['path'] = '/'.$components['path']; } //2 - The $remaining_uri represents the authority part diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 75135a9..fa1b22e 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -2,6 +2,7 @@ namespace LeagueTest\Uri; +use League\Uri; use League\Uri\Exception; use League\Uri\Parser; use PHPUnit\Framework\TestCase;