aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/uri
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/uri')
-rw-r--r--vendor/sabre/uri/.github/workflows/ci.yml63
-rw-r--r--vendor/sabre/uri/composer.json2
-rw-r--r--vendor/sabre/uri/lib/Version.php2
-rw-r--r--vendor/sabre/uri/lib/functions.php6
4 files changed, 68 insertions, 5 deletions
diff --git a/vendor/sabre/uri/.github/workflows/ci.yml b/vendor/sabre/uri/.github/workflows/ci.yml
new file mode 100644
index 000000000..3473cd2de
--- /dev/null
+++ b/vendor/sabre/uri/.github/workflows/ci.yml
@@ -0,0 +1,63 @@
+name: continuous-integration
+on:
+ push:
+ branches:
+ - master
+ - release/*
+ pull_request:
+jobs:
+ unit-testing:
+ name: PHPUnit (PHP ${{ matrix.php-versions }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
+ coverage: ['pcov']
+ code-analysis: ['no']
+ include:
+ - php-versions: '7.1'
+ coverage: 'none'
+ code-analysis: 'yes'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
+ with:
+ php-version: ${{ matrix.php-versions }}
+ extensions: mbstring, dom, fileinfo, mysql, redis, opcache
+ coverage: ${{ matrix.coverage }}
+ tools: composer
+
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+
+ - name: Cache composer dependencies
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ # Use composer.json for key, if composer.lock is not committed.
+ # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+
+ - name: Install composer dependencies
+ run: composer install --no-progress --prefer-dist --optimize-autoloader
+
+ - name: Code Analysis (PHP CS-Fixer)
+ if: matrix.code-analysis == 'yes'
+ run: php vendor/bin/php-cs-fixer fix --dry-run --diff
+
+ - name: Code Analysis (PHPStan)
+ if: matrix.code-analysis == 'yes'
+ run: composer phpstan
+
+ - name: Test with phpunit
+ run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
+
+ - name: Code Coverage
+ uses: codecov/codecov-action@v2
+ if: matrix.coverage != 'none'
diff --git a/vendor/sabre/uri/composer.json b/vendor/sabre/uri/composer.json
index 4a68797a5..d58fd51f7 100644
--- a/vendor/sabre/uri/composer.json
+++ b/vendor/sabre/uri/composer.json
@@ -37,7 +37,7 @@
}
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "~2.16.1",
+ "friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
diff --git a/vendor/sabre/uri/lib/Version.php b/vendor/sabre/uri/lib/Version.php
index 4a6c58405..4527a0d8a 100644
--- a/vendor/sabre/uri/lib/Version.php
+++ b/vendor/sabre/uri/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '2.2.1';
+ const VERSION = '2.2.2';
}
diff --git a/vendor/sabre/uri/lib/functions.php b/vendor/sabre/uri/lib/functions.php
index 0d64cead0..18a324337 100644
--- a/vendor/sabre/uri/lib/functions.php
+++ b/vendor/sabre/uri/lib/functions.php
@@ -84,7 +84,7 @@ function resolve(string $basePath, string $newPath): string
$path = implode('/', $newPathParts);
// If the source url ended with a /, we want to preserve that.
- $newParts['path'] = $path;
+ $newParts['path'] = 0 === strpos($path, '/') ? $path : '/'.$path;
if ($delta['query']) {
$newParts['query'] = $delta['query'];
} elseif (!empty($base['query']) && empty($delta['host']) && empty($delta['path'])) {
@@ -214,7 +214,7 @@ function parse(string $uri): array
* This function takes the components returned from PHP's parse_url, and uses
* it to generate a new uri.
*
- * @param array<string, int|string> $parts
+ * @param array<string, int|string|null> $parts
*/
function build(array $parts): string
{
@@ -261,7 +261,7 @@ function build(array $parts): string
* is used) and we need a method that just operates on UTF-8 characters.
*
* In addition basename and dirname are platform aware, and will treat
- * backslash (\) as a directory separator on windows.
+ * backslash (\) as a directory separator on Windows.
*
* This method returns the 2 components as an array.
*