Skip to content

Commit

Permalink
Merge pull request #222 from owncloud/sabre-3.0-dev
Browse files Browse the repository at this point in the history
Update to sabre dav 3.0.x-dev
  • Loading branch information
DeepDiver1975 committed Nov 25, 2015
2 parents 3215390 + 9fc92f0 commit e5d7aad
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 106 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"deepdiver1975/TarStreamer": "v0.1-beta3",
"patchwork/jsqueeze": "^2.0",
"kriswallsmith/assetic": "1.3.1",
"sabre/dav": "^3.0"
"sabre/dav": "3.0.x-dev"
}
}
17 changes: 9 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
$baseDir = $vendorDir;

return array(
$vendorDir . '/sabre/uri/lib/functions.php',
$vendorDir . '/react/promise/src/functions_include.php',
$vendorDir . '/nikic/php-parser/lib/bootstrap.php',
$vendorDir . '/sabre/http/lib/functions.php',
$vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
$vendorDir . '/ircmaxell/password-compat/lib/password.php',
$vendorDir . '/kriswallsmith/assetic/src/functions.php',
'651f6769966572fcfbc44ed112b4490e' => $vendorDir . '/sabre/uri/lib/functions.php',
'3ad337fb1e17055256ca59753bdfe795' => $vendorDir . '/react/promise/src/functions_include.php',
'742cc5b936ec765a3455c0a976796f29' => $vendorDir . '/nikic/php-parser/lib/bootstrap.php',
'a7f9cd98d7a35ae00ec75fb6117e0593' => $vendorDir . '/sabre/http/lib/functions.php',
'01b872096dad055849387e42d41a176d' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'05669301f06448944ce5eb260126f84e' => $vendorDir . '/ircmaxell/password-compat/lib/password.php',
'f0cfed1a23b444183024a3c7df93aafa' => $vendorDir . '/kriswallsmith/assetic/src/functions.php',
);
12 changes: 8 additions & 4 deletions composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ public static function getLoader()
$loader->register(true);

$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
composerRequire2f23f73bc0cc116b4b1eee1521aa8652($file);
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire2f23f73bc0cc116b4b1eee1521aa8652($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequire2f23f73bc0cc116b4b1eee1521aa8652($file)
function composerRequire2f23f73bc0cc116b4b1eee1521aa8652($fileIdentifier, $file)
{
require $file;
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
166 changes: 83 additions & 83 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2613,89 +2613,6 @@
"vCard"
]
},
{
"name": "sabre/dav",
"version": "3.0.5",
"version_normalized": "3.0.5.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-dav.git",
"reference": "69c1b5c9c19e52e2da15dc8920fce9ea9df9abcc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-dav/zipball/69c1b5c9c19e52e2da15dc8920fce9ea9df9abcc",
"reference": "69c1b5c9c19e52e2da15dc8920fce9ea9df9abcc",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-date": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-simplexml": "*",
"ext-spl": "*",
"php": ">=5.4.1",
"sabre/event": "~2.0",
"sabre/http": "~4.0",
"sabre/uri": "~1.0",
"sabre/vobject": ">=3.3.4,<4",
"sabre/xml": "~1.0"
},
"require-dev": {
"evert/phpdoc-md": "~0.1.0",
"phpunit/phpunit": "~4.2",
"sabre/cs": "~0.0.2"
},
"suggest": {
"ext-curl": "*",
"ext-pdo": "*"
},
"time": "2015-09-15 19:24:48",
"bin": [
"bin/sabredav",
"bin/naturalselection"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.0-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\DAV\\": "lib/DAV/",
"Sabre\\DAVACL\\": "lib/DAVACL/",
"Sabre\\CalDAV\\": "lib/CalDAV/",
"Sabre\\CardDAV\\": "lib/CardDAV/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "WebDAV Framework for PHP",
"homepage": "http://sabre.io/",
"keywords": [
"CalDAV",
"CardDAV",
"WebDAV",
"framework",
"iCalendar"
]
},
{
"name": "symfony/routing",
"version": "v2.7.6",
Expand Down Expand Up @@ -2880,5 +2797,88 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com"
},
{
"name": "sabre/dav",
"version": "3.0.x-dev",
"version_normalized": "3.0.9999999.9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-dav.git",
"reference": "4d83ffbdb31f399aa023edd91cb008c06512990c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-dav/zipball/4d83ffbdb31f399aa023edd91cb008c06512990c",
"reference": "4d83ffbdb31f399aa023edd91cb008c06512990c",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-date": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-simplexml": "*",
"ext-spl": "*",
"php": ">=5.4.1",
"sabre/event": "~2.0",
"sabre/http": "~4.0",
"sabre/uri": "~1.0",
"sabre/vobject": ">=3.3.4,<4",
"sabre/xml": "~1.0"
},
"require-dev": {
"evert/phpdoc-md": "~0.1.0",
"phpunit/phpunit": "~4.2",
"sabre/cs": "~0.0.2"
},
"suggest": {
"ext-curl": "*",
"ext-pdo": "*"
},
"time": "2015-11-25 17:51:25",
"bin": [
"bin/sabredav",
"bin/naturalselection"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.0-dev"
}
},
"installation-source": "source",
"autoload": {
"psr-4": {
"Sabre\\DAV\\": "lib/DAV/",
"Sabre\\DAVACL\\": "lib/DAVACL/",
"Sabre\\CalDAV\\": "lib/CalDAV/",
"Sabre\\CardDAV\\": "lib/CardDAV/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "WebDAV Framework for PHP",
"homepage": "http://sabre.io/",
"keywords": [
"CalDAV",
"CardDAV",
"WebDAV",
"framework",
"iCalendar"
]
}
]
10 changes: 10 additions & 0 deletions sabre/dav/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
ChangeLog
=========

3.0.6 (2015-??-??)
------------------

* #730: Switched all mysql tables to `utf8mb4` character set, allowing you to
use emoji in some tables where you couldn't before.
* #729: Not all calls to `Sabre\DAV\Tree::getChildren()` were properly cached.
* #734: Return `418 I'm a Teapot` when generating a multistatus response that
has resources with no returned properties.


3.0.5 (2015-09-15)
------------------

Expand Down
4 changes: 3 additions & 1 deletion sabre/dav/lib/DAV/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ function getChildren($path) {

$node = $this->getNodeForPath($path);
$children = $node->getChildren();
$basePath = trim($path, '/') . '/';
$basePath = trim($path, '/');
if ($basePath !== '') $basePath .= '/';

foreach ($children as $child) {

$this->cache[$basePath . $child->getName()] = $child;
Expand Down
2 changes: 1 addition & 1 deletion sabre/dav/lib/DAV/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Version {
/**
* Full version number
*/
const VERSION = '3.0.5';
const VERSION = '3.0.6';

}
21 changes: 20 additions & 1 deletion sabre/dav/lib/DAV/Xml/Element/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,37 @@ function xmlSerialize(Writer $writer) {
$writer->writeElement('{DAV:}status', 'HTTP/1.1 ' . $status . ' ' . \Sabre\HTTP\Response::$statusCodes[$status]);
}
$writer->writeElement('{DAV:}href', $writer->contextUri . \Sabre\HTTP\encodePath($this->getHref()));

$empty = true;

foreach ($this->getResponseProperties() as $status => $properties) {

// Skipping empty lists
if (!$properties || (!ctype_digit($status) && !is_int($status))) {
continue;
}
$empty = false;
$writer->startElement('{DAV:}propstat');
$writer->writeElement('{DAV:}prop', $properties);
$writer->writeElement('{DAV:}status', 'HTTP/1.1 ' . $status . ' ' . \Sabre\HTTP\Response::$statusCodes[$status]);
$writer->endElement(); // {DAV:}propstat

}
if ($empty) {
/*
* The WebDAV spec _requires_ at least one DAV:propstat to appear for
* every DAV:response. There are circumstances however, there are no
* properties to encode.
*
* In those cases we MUST specify at least one DAV:propstat anyway, with
* no properties.
*/
$writer->writeElement('{DAV:}propstat', [
'{DAV:}prop' => [],
'{DAV:}status' => 'HTTP/1.1 418 ' . \Sabre\HTTP\Response::$statusCodes[418]
]);

}

}

Expand Down Expand Up @@ -217,7 +236,7 @@ static function xmlDeserialize(Reader $reader) {
$status = $elem['value']['{DAV:}status'];
list(, $status, ) = explode(' ', $status, 3);
$properties = isset($elem['value']['{DAV:}prop']) ? $elem['value']['{DAV:}prop'] : [];
$propertyLists[$status] = $properties;
if ($properties) $propertyLists[$status] = $properties;
break;
case '{DAV:}status' :
list(, $statusCode, ) = explode(' ', $elem['value'], 3);
Expand Down

0 comments on commit e5d7aad

Please sign in to comment.