aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre')
-rw-r--r--vendor/sabre/dav/CHANGELOG.md6
-rw-r--r--vendor/sabre/dav/composer.json2
-rw-r--r--vendor/sabre/dav/lib/DAV/Locks/Plugin.php2
-rw-r--r--vendor/sabre/dav/lib/DAV/Server.php6
-rw-r--r--vendor/sabre/dav/lib/DAV/Tree.php2
-rw-r--r--vendor/sabre/dav/lib/DAV/Version.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/AbstractServer.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php26
-rw-r--r--vendor/sabre/vobject/.gitignore15
-rw-r--r--vendor/sabre/vobject/.travis.yml29
-rw-r--r--vendor/sabre/vobject/CHANGELOG.md8
-rw-r--r--vendor/sabre/vobject/composer.json20
-rw-r--r--vendor/sabre/vobject/lib/Component.php2
-rw-r--r--vendor/sabre/vobject/lib/Version.php2
-rw-r--r--vendor/sabre/vobject/tests/phpunit.xml5
-rw-r--r--vendor/sabre/xml/.gitignore14
-rw-r--r--vendor/sabre/xml/.travis.yml22
-rw-r--r--vendor/sabre/xml/CHANGELOG.md6
-rw-r--r--vendor/sabre/xml/composer.json20
-rw-r--r--vendor/sabre/xml/lib/Service.php18
-rw-r--r--vendor/sabre/xml/lib/Version.php2
21 files changed, 134 insertions, 77 deletions
diff --git a/vendor/sabre/dav/CHANGELOG.md b/vendor/sabre/dav/CHANGELOG.md
index 932827a72..c84a4f5e4 100644
--- a/vendor/sabre/dav/CHANGELOG.md
+++ b/vendor/sabre/dav/CHANGELOG.md
@@ -1,6 +1,12 @@
ChangeLog
=========
+4.1.1 (2020-07-13)
+-------------------------
+* Fix PHPdoc of Tree:move method
+* Allow using custom SAPI implementations
+* Include baseUri in lock responses
+
4.1.0 (2020-03-20)
-------------------------
* Support PHP 7.4
diff --git a/vendor/sabre/dav/composer.json b/vendor/sabre/dav/composer.json
index f0fbf7af7..d4190ae5d 100644
--- a/vendor/sabre/dav/composer.json
+++ b/vendor/sabre/dav/composer.json
@@ -33,7 +33,7 @@
"ext-json": "*"
},
"require-dev" : {
- "friendsofphp/php-cs-fixer": "~2.16.1",
+ "friendsofphp/php-cs-fixer": "^2.16.3",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
"evert/phpdoc-md" : "~0.1.0",
diff --git a/vendor/sabre/dav/lib/DAV/Locks/Plugin.php b/vendor/sabre/dav/lib/DAV/Locks/Plugin.php
index 1e9b6839e..110bfce06 100644
--- a/vendor/sabre/dav/lib/DAV/Locks/Plugin.php
+++ b/vendor/sabre/dav/lib/DAV/Locks/Plugin.php
@@ -371,7 +371,7 @@ class Plugin extends DAV\ServerPlugin
{
return $this->server->xml->write('{DAV:}prop', [
'{DAV:}lockdiscovery' => new DAV\Xml\Property\LockDiscovery([$lockInfo]),
- ]);
+ ], $this->server->getBaseUri());
}
/**
diff --git a/vendor/sabre/dav/lib/DAV/Server.php b/vendor/sabre/dav/lib/DAV/Server.php
index 3c237500a..37bf282e8 100644
--- a/vendor/sabre/dav/lib/DAV/Server.php
+++ b/vendor/sabre/dav/lib/DAV/Server.php
@@ -208,8 +208,10 @@ class Server implements LoggerAwareInterface, EmitterInterface
* the nodes in the array as top-level children.
*
* @param Tree|INode|array|null $treeOrNode The tree object
+ *
+ * @throws Exception
*/
- public function __construct($treeOrNode = null)
+ public function __construct($treeOrNode = null, HTTP\Sapi $sapi = null)
{
if ($treeOrNode instanceof Tree) {
$this->tree = $treeOrNode;
@@ -226,7 +228,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
}
$this->xml = new Xml\Service();
- $this->sapi = new HTTP\Sapi();
+ $this->sapi = $sapi ?? new HTTP\Sapi();
$this->httpResponse = new HTTP\Response();
$this->httpRequest = $this->sapi->getRequest();
$this->addPlugin(new CorePlugin());
diff --git a/vendor/sabre/dav/lib/DAV/Tree.php b/vendor/sabre/dav/lib/DAV/Tree.php
index 72e14d522..aedc0155d 100644
--- a/vendor/sabre/dav/lib/DAV/Tree.php
+++ b/vendor/sabre/dav/lib/DAV/Tree.php
@@ -141,8 +141,6 @@ class Tree
*
* @param string $sourcePath The path to the file which should be moved
* @param string $destinationPath The full destination path, so not just the destination parent node
- *
- * @return int
*/
public function move($sourcePath, $destinationPath)
{
diff --git a/vendor/sabre/dav/lib/DAV/Version.php b/vendor/sabre/dav/lib/DAV/Version.php
index d2c4afb56..a7f5269bf 100644
--- a/vendor/sabre/dav/lib/DAV/Version.php
+++ b/vendor/sabre/dav/lib/DAV/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- public const VERSION = '4.1.0';
+ public const VERSION = '4.1.1';
}
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/AbstractServer.php b/vendor/sabre/dav/tests/Sabre/DAV/AbstractServer.php
index 807b66382..49fedf062 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/AbstractServer.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/AbstractServer.php
@@ -14,7 +14,7 @@ abstract class AbstractServer extends \PHPUnit\Framework\TestCase
protected $response;
protected $request;
/**
- * @var Sabre\DAV\Server
+ * @var \Sabre\DAV\Server
*/
protected $server;
protected $tempDir = SABRE_TEMPDIR;
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php
index 96e3939d0..9279afb5a 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php
@@ -110,6 +110,32 @@ class PluginTest extends DAV\AbstractServer
$this->assertEquals($this->response->getHeader('Lock-Token'), '<'.(string) $token[0].'>', 'Token in response body didn\'t match token in response header.');
}
+ public function testLockWithContext()
+ {
+ $request = new HTTP\Request('LOCK', '/baseuri/test.txt');
+ $request->setBody('<?xml version="1.0"?>
+<D:lockinfo xmlns:D="DAV:">
+ <D:lockscope><D:exclusive/></D:lockscope>
+ <D:locktype><D:write/></D:locktype>
+ <D:owner>
+ <D:href>http://example.org/~ejw/contact.html</D:href>
+ </D:owner>
+</D:lockinfo>');
+
+ $this->server->setBaseUri('baseuri');
+ $this->server->httpRequest = $request;
+ $this->server->exec();
+
+ $this->assertEquals(200, $this->response->status, 'Got an incorrect status back. Response body: '.$this->response->getBodyAsString());
+
+ $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", 'xmlns\\1="urn:DAV"', $this->response->getBodyAsString());
+ $xml = simplexml_load_string($body);
+ $xml->registerXPathNamespace('d', 'urn:DAV');
+
+ $lockRoot = $xml->xpath('/d:prop/d:lockdiscovery/d:activelock/d:lockroot/d:href');
+ $this->assertEquals('baseuri/test.txt', (string) $lockRoot[0]);
+ }
+
/**
* @depends testLock
*/
diff --git a/vendor/sabre/vobject/.gitignore b/vendor/sabre/vobject/.gitignore
index e9b0ed32f..82b7dad3f 100644
--- a/vendor/sabre/vobject/.gitignore
+++ b/vendor/sabre/vobject/.gitignore
@@ -5,20 +5,5 @@ tests/cov/
tests/temp
tests/.phpunit.result.cache
-#vim
-.*.swp
-
-#binaries
-bin/phpunit
-bin/php-cs-fixer
-bin/phpstan
-bin/phpstan.phar
-bin/hoa
-
# Development stuff
-testdata/
.php_cs.cache
-.idea
-
-# OS X
-.DS_Store
diff --git a/vendor/sabre/vobject/.travis.yml b/vendor/sabre/vobject/.travis.yml
index 511119bbb..d1feb60de 100644
--- a/vendor/sabre/vobject/.travis.yml
+++ b/vendor/sabre/vobject/.travis.yml
@@ -5,22 +5,33 @@ php:
- 7.3
- 7.4
+env:
+ global:
+ - MEMCACHED_SERVER=127.0.0.1
+ - RUN_PHPSTAN="FALSE"
+ matrix:
+ - PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
+ - PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""
+
matrix:
+ include:
+ - name: 'PHPStan'
+ php: 7.4
+ env:
+ - RUN_PHPSTAN="TRUE"
+ - REPORT_COVERAGE="FALSE"
fast_finish: true
-install:
- - composer require --dev phpstan/phpstan:^0.12
-
before_script:
- - composer install
+ - composer update $PREFER_LOWEST
script:
- - ./bin/php-cs-fixer fix lib/ --dry-run --diff
- - php ./bin/phpstan.phar analyse -c phpstan.neon lib tests
- - ./bin/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.xml
-
+ - if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
+ - if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
+ - if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi
+
after_success:
- - bash <(curl -s https://codecov.io/bash)
+ - if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi
cache:
directories:
diff --git a/vendor/sabre/vobject/CHANGELOG.md b/vendor/sabre/vobject/CHANGELOG.md
index 5126e04f9..69e14154b 100644
--- a/vendor/sabre/vobject/CHANGELOG.md
+++ b/vendor/sabre/vobject/CHANGELOG.md
@@ -1,6 +1,14 @@
ChangeLog
=========
+4.3.1 (2020-07-13)
+------------------
+
+* #510: Fix an incomplete phpdoc type annotation (@mstilkerich)
+* #505: Refactor unit test code for phpunit9 (@phil-davis)
+* #500: Standardize CI (@phil-davis)
+* #496: CI tooling changes (@JeroenVanOort)
+
4.3.0 (2020-01-31)
------------------
diff --git a/vendor/sabre/vobject/composer.json b/vendor/sabre/vobject/composer.json
index 9e522f8a4..d4fa56a31 100644
--- a/vendor/sabre/vobject/composer.json
+++ b/vendor/sabre/vobject/composer.json
@@ -38,7 +38,8 @@
},
"require-dev" : {
"friendsofphp/php-cs-fixer": "~2.16.1",
- "phpunit/phpunit" : "^7 || ^8"
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
+ "phpstan/phpstan": "^0.12"
},
"suggest" : {
"hoa/bench" : "If you would like to run the benchmark scripts"
@@ -86,7 +87,20 @@
"dev-master" : "4.0.x-dev"
}
},
- "config" : {
- "bin-dir" : "bin"
+ "scripts": {
+ "phpstan": [
+ "phpstan analyse lib tests"
+ ],
+ "cs-fixer": [
+ "php-cs-fixer fix"
+ ],
+ "phpunit": [
+ "phpunit --configuration tests/phpunit.xml"
+ ],
+ "test": [
+ "composer phpstan",
+ "composer cs-fixer",
+ "composer phpunit"
+ ]
}
}
diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php
index 58594aec1..da45eb29f 100644
--- a/vendor/sabre/vobject/lib/Component.php
+++ b/vendor/sabre/vobject/lib/Component.php
@@ -431,7 +431,7 @@ class Component extends Node
*
* @param string $name
*
- * @return Property
+ * @return Property|null
*/
public function __get($name)
{
diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php
index 883d20289..e5ab9af38 100644
--- a/vendor/sabre/vobject/lib/Version.php
+++ b/vendor/sabre/vobject/lib/Version.php
@@ -14,5 +14,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '4.3.0';
+ const VERSION = '4.3.1';
}
diff --git a/vendor/sabre/vobject/tests/phpunit.xml b/vendor/sabre/vobject/tests/phpunit.xml
index c9abae412..c0588d460 100644
--- a/vendor/sabre/vobject/tests/phpunit.xml
+++ b/vendor/sabre/vobject/tests/phpunit.xml
@@ -9,16 +9,13 @@
>
<testsuites>
<testsuite name="Sabre\VObject">
- <directory>VObject/</directory>
+ <directory>.</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../lib/</directory>
- <exclude>
- <file>../lib/Sabre/VObject/includes.php</file>
- </exclude>
</whitelist>
</filter>
</phpunit>
diff --git a/vendor/sabre/xml/.gitignore b/vendor/sabre/xml/.gitignore
index a85591183..9715e9028 100644
--- a/vendor/sabre/xml/.gitignore
+++ b/vendor/sabre/xml/.gitignore
@@ -5,18 +5,4 @@ composer.lock
# Tests
tests/cov
tests/.phpunit.result.cache
-.*.swp
-
-# Composer binaries
-bin/phpunit
-bin/php-cs-fixer
-bin/phpstan
-bin/phpstan.phar
-
-# Vim
-.*.swp
-
-# IDEs
-/.idea
-
.php_cs.cache
diff --git a/vendor/sabre/xml/.travis.yml b/vendor/sabre/xml/.travis.yml
index 953c2a60b..ebca5e837 100644
--- a/vendor/sabre/xml/.travis.yml
+++ b/vendor/sabre/xml/.travis.yml
@@ -9,28 +9,30 @@ php:
env:
global:
- RUN_PHPSTAN="FALSE"
+ matrix:
+ - PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
+ - PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""
matrix:
include:
- name: 'PHPStan'
- php: 7.2
- env: RUN_PHPSTAN="TRUE"
+ php: 7.4
+ env:
+ - RUN_PHPSTAN="TRUE"
+ - REPORT_COVERAGE="FALSE"
fast_finish: true
cache:
directories:
- $HOME/.composer/cache
-install:
- - if [ $RUN_PHPSTAN == "TRUE" ]; then composer require --dev phpstan/phpstan:^0.12; fi
-
before_script:
- - composer install
+ - composer update $PREFER_LOWEST
script:
- - if [ $RUN_PHPSTAN == "FALSE" ]; then ./bin/php-cs-fixer fix --dry-run --diff; fi
- - if [ $RUN_PHPSTAN == "FALSE" ]; then ./bin/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.xml; fi
- - if [ $RUN_PHPSTAN == "TRUE" ]; then php ./bin/phpstan analyse -c phpstan.neon lib; fi
+ - if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
+ - if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
+ - if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi
after_success:
- - bash <(curl -s https://codecov.io/bash)
+ - if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi
diff --git a/vendor/sabre/xml/CHANGELOG.md b/vendor/sabre/xml/CHANGELOG.md
index bbfc8ddec..9d70609f8 100644
--- a/vendor/sabre/xml/CHANGELOG.md
+++ b/vendor/sabre/xml/CHANGELOG.md
@@ -1,6 +1,12 @@
ChangeLog
=========
+2.2.1 (2020-05-11)
+------------------
+
+* #183: fixed warning 'xml cannot be empty while reading', which might lead to a infinite-loop (@mrow4a)
+* #179, #178, #177 #176: several build/continous integration related improvements (@phil-davis)
+
2.2.0 (2020-01-31)
------------------
diff --git a/vendor/sabre/xml/composer.json b/vendor/sabre/xml/composer.json
index 2af0dd458..40abe149b 100644
--- a/vendor/sabre/xml/composer.json
+++ b/vendor/sabre/xml/composer.json
@@ -45,9 +45,23 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1",
- "phpunit/phpunit" : "^7 || ^8"
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
- "config" : {
- "bin-dir" : "bin/"
+ "scripts": {
+ "phpstan": [
+ "phpstan analyse lib tests"
+ ],
+ "cs-fixer": [
+ "php-cs-fixer fix"
+ ],
+ "phpunit": [
+ "phpunit --configuration tests/phpunit.xml"
+ ],
+ "test": [
+ "composer phpstan",
+ "composer cs-fixer",
+ "composer phpunit"
+ ]
}
}
diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php
index 9a2c47794..596c93cc4 100644
--- a/vendor/sabre/xml/lib/Service.php
+++ b/vendor/sabre/xml/lib/Service.php
@@ -115,12 +115,13 @@ class Service
// Unfortunately the XMLReader doesn't support streams. When it
// does, we can optimize this.
$input = (string) stream_get_contents($input);
+ }
- // If input is an empty string, then its safe to throw exception
- if ('' === $input) {
- throw new ParseException('The input element to parse is empty. Do not attempt to parse');
- }
+ // If input is empty, then its safe to throw exception
+ if (empty($input)) {
+ throw new ParseException('The input element to parse is empty. Do not attempt to parse');
}
+
$r = $this->getReader();
$r->contextUri = $contextUri;
$r->XML($input, null, $this->options);
@@ -158,12 +159,13 @@ class Service
// Unfortunately the XMLReader doesn't support streams. When it
// does, we can optimize this.
$input = (string) stream_get_contents($input);
+ }
- // If input is empty string, then its safe to throw exception
- if ('' === $input) {
- throw new ParseException('The input element to parse is empty. Do not attempt to parse');
- }
+ // If input is empty, then its safe to throw exception
+ if (empty($input)) {
+ throw new ParseException('The input element to parse is empty. Do not attempt to parse');
}
+
$r = $this->getReader();
$r->contextUri = $contextUri;
$r->XML($input, null, $this->options);
diff --git a/vendor/sabre/xml/lib/Version.php b/vendor/sabre/xml/lib/Version.php
index cf2810c2a..56c5c5285 100644
--- a/vendor/sabre/xml/lib/Version.php
+++ b/vendor/sabre/xml/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '2.2.0';
+ const VERSION = '2.2.1';
}