aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/uri
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
commitccd826f63a7a4c7e442fab8a70d9c4c84808b417 (patch)
treefbbde69114acba764cf6b735433c53e099fd19c5 /vendor/sabre/uri
parent5e5f0aa955d86743a14531bed98501b59140ab1f (diff)
downloadvolse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.gz
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.bz2
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.zip
Revert "update composer libs"
This reverts commit 5e5f0aa955d86743a14531bed98501b59140ab1f.
Diffstat (limited to 'vendor/sabre/uri')
-rw-r--r--vendor/sabre/uri/.gitattributes4
-rw-r--r--vendor/sabre/uri/.github/workflows/ci.yml63
-rw-r--r--vendor/sabre/uri/.gitignore8
-rw-r--r--vendor/sabre/uri/.php_cs.dist (renamed from vendor/sabre/uri/.php-cs-fixer.dist.php)7
-rw-r--r--vendor/sabre/uri/composer.json8
-rw-r--r--vendor/sabre/uri/lib/Version.php2
-rw-r--r--vendor/sabre/uri/lib/functions.php37
-rw-r--r--vendor/sabre/uri/phpstan.neon2
8 files changed, 94 insertions, 37 deletions
diff --git a/vendor/sabre/uri/.gitattributes b/vendor/sabre/uri/.gitattributes
new file mode 100644
index 000000000..d1618f3a1
--- /dev/null
+++ b/vendor/sabre/uri/.gitattributes
@@ -0,0 +1,4 @@
+/tests export-ignore
+/.travis.yml export-ignore
+/CHANGELOG.md export-ignore
+/README.md export-ignore
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/.gitignore b/vendor/sabre/uri/.gitignore
new file mode 100644
index 000000000..a6c2b5a25
--- /dev/null
+++ b/vendor/sabre/uri/.gitignore
@@ -0,0 +1,8 @@
+# Composer
+vendor/
+composer.lock
+
+# Tests
+tests/cov/
+tests/.phpunit.result.cache
+.php_cs.cache
diff --git a/vendor/sabre/uri/.php-cs-fixer.dist.php b/vendor/sabre/uri/.php_cs.dist
index 87337520b..c5c78a971 100644
--- a/vendor/sabre/uri/.php-cs-fixer.dist.php
+++ b/vendor/sabre/uri/.php_cs.dist
@@ -1,13 +1,12 @@
<?php
-$finder = PhpCsFixer\Finder::create()
+$config = PhpCsFixer\Config::create();
+$config->getFinder()
->exclude('vendor')
->in(__DIR__);
-
-$config = new PhpCsFixer\Config();
$config->setRules([
'@PSR1' => true,
'@Symfony' => true
]);
-$config->setFinder($finder);
+
return $config; \ No newline at end of file
diff --git a/vendor/sabre/uri/composer.json b/vendor/sabre/uri/composer.json
index 0e0cf2d36..d58fd51f7 100644
--- a/vendor/sabre/uri/composer.json
+++ b/vendor/sabre/uri/composer.json
@@ -9,7 +9,7 @@
"homepage": "http://sabre.io/uri/",
"license": "BSD-3-Clause",
"require": {
- "php": "^7.4 || ^8.0"
+ "php": "^7.1 || ^8.0"
},
"authors": [
{
@@ -37,9 +37,9 @@
}
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "^3.9",
- "phpstan/phpstan": "^1.8",
- "phpunit/phpunit" : "^9.0"
+ "friendsofphp/php-cs-fixer": "~2.17.1",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
"scripts": {
"phpstan": [
diff --git a/vendor/sabre/uri/lib/Version.php b/vendor/sabre/uri/lib/Version.php
index e4f289e90..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.
*/
- public const VERSION = '2.3.2';
+ const VERSION = '2.2.2';
}
diff --git a/vendor/sabre/uri/lib/functions.php b/vendor/sabre/uri/lib/functions.php
index 64e64027f..18a324337 100644
--- a/vendor/sabre/uri/lib/functions.php
+++ b/vendor/sabre/uri/lib/functions.php
@@ -54,8 +54,8 @@ function resolve(string $basePath, string $newPath): string
$path = $delta['path'];
} else {
// Removing last component from base path.
- $path = (string) $base['path'];
- $length = strrpos($path, '/');
+ $path = $base['path'];
+ $length = strrpos((string) $path, '/');
if (false !== $length) {
$path = substr($path, 0, $length);
}
@@ -69,7 +69,7 @@ function resolve(string $basePath, string $newPath): string
$newPathParts = [];
foreach ($pathParts as $pathPart) {
switch ($pathPart) {
- // case '' :
+ //case '' :
case '.':
break;
case '..':
@@ -174,16 +174,13 @@ function normalize(string $uri): string
* Unlike PHP's parse_url, it will also convert any non-ascii characters to
* percent-encoded strings. PHP's parse_url corrupts these characters on OS X.
*
- * In the return array, key "port" is an int value. Other keys have a string value.
- * "Unused" keys have value null.
- *
- * @return array{scheme: string|null, host: string|null, path: string|null, port: positive-int|null, user: string|null, query: string|null, fragment: string|null}
+ * @return array<string, string>
*
* @throws InvalidUriException
*/
function parse(string $uri): array
{
- // Normally a URI must be ASCII. However, often it's not and
+ // Normally a URI must be ASCII, however. However, often it's not and
// parse_url might corrupt these strings.
//
// For that reason we take any non-ascii characters from the uri and
@@ -196,25 +193,11 @@ function parse(string $uri): array
$uri
);
- if (null === $uri) {
- throw new InvalidUriException('Invalid, or could not parse URI');
- }
-
$result = parse_url($uri);
if (!$result) {
$result = _parse_fallback($uri);
}
- /*
- * phpstan is not able to process all the things that happen while this function
- * constructs the result array. It only understands the $result is
- * non-empty-array<string, mixed>
- *
- * But the detail of the returned array is correctly specified in the PHPdoc
- * above the function call.
- *
- * @phpstan-ignore-next-line
- */
return
$result + [
'scheme' => null,
@@ -326,10 +309,6 @@ function _parse_fallback(string $uri): array
$uri
);
- if (null === $uri) {
- throw new InvalidUriException('Invalid, or could not parse URI');
- }
-
$result = [
'scheme' => null,
'host' => null,
@@ -362,13 +341,15 @@ function _parse_fallback(string $uri): array
$result['host'] = '';
} elseif ('//' === substr($uri, 0, 2)) {
// Uris that have an authority part.
- $regex = '%^
+ $regex = '
+ %^
//
(?: (?<user> [^:@]+) (: (?<pass> [^@]+)) @)?
(?<host> ( [^:/]* | \[ [^\]]+ \] ))
(?: : (?<port> [0-9]+))?
(?<path> / .*)?
- $%x';
+ $%x
+ ';
if (!preg_match($regex, $uri, $matches)) {
throw new InvalidUriException('Invalid, or could not parse URI');
}
diff --git a/vendor/sabre/uri/phpstan.neon b/vendor/sabre/uri/phpstan.neon
new file mode 100644
index 000000000..91375db8b
--- /dev/null
+++ b/vendor/sabre/uri/phpstan.neon
@@ -0,0 +1,2 @@
+parameters:
+ level: 7