Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-11-29 17:08:49 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-30 13:03:05 +0300
commitd4a10420549dc0e594f991f299cd4e5835056cad (patch)
treed6bba629d28a0868679394744bdda7e28cf3512f
parent26d99dcc1ce8168fc75e9598ac96c049bb6f2d95 (diff)
Bump sabre/dav to 4.2.0
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--composer.json2
-rw-r--r--composer.lock70
-rw-r--r--composer/autoload_classmap.php7
-rw-r--r--composer/autoload_static.php7
-rw-r--r--composer/installed.json84
-rw-r--r--composer/installed.php40
-rw-r--r--composer/package-versions-deprecated/src/PackageVersions/Versions.php14
-rw-r--r--sabre/dav/lib/CalDAV/Plugin.php2
-rw-r--r--sabre/dav/lib/CalDAV/Schedule/Plugin.php4
-rw-r--r--sabre/dav/lib/CalDAV/Subscriptions/Subscription.php2
-rw-r--r--sabre/dav/lib/DAV/Auth/Plugin.php4
-rw-r--r--sabre/dav/lib/DAV/Browser/Plugin.php2
-rw-r--r--sabre/dav/lib/DAV/Locks/Plugin.php4
-rw-r--r--sabre/dav/lib/DAV/Server.php3
-rw-r--r--sabre/dav/lib/DAV/Version.php2
-rw-r--r--sabre/dav/lib/DAV/Xml/Element/Response.php22
-rw-r--r--sabre/dav/lib/DAVACL/Plugin.php4
-rw-r--r--sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php2
-rw-r--r--sabre/dav/lib/DAVACL/Xml/Property/Principal.php2
-rw-r--r--sabre/event/composer.json2
-rw-r--r--sabre/event/lib/EventEmitter.php2
-rw-r--r--sabre/event/lib/Loop/Loop.php4
-rw-r--r--sabre/event/lib/Promise.php2
-rw-r--r--sabre/event/lib/Promise/functions.php2
-rw-r--r--sabre/event/lib/Version.php2
-rw-r--r--sabre/event/lib/WildcardEmitter.php4
-rw-r--r--sabre/http/CHANGELOG.md12
-rw-r--r--sabre/http/composer.json2
-rw-r--r--sabre/http/lib/Client.php7
-rw-r--r--sabre/http/lib/Message.php2
-rw-r--r--sabre/http/lib/Response.php2
-rw-r--r--sabre/http/lib/Sapi.php1
-rw-r--r--sabre/http/lib/Version.php2
-rw-r--r--sabre/http/lib/functions.php4
-rw-r--r--sabre/uri/composer.json2
-rw-r--r--sabre/uri/lib/Version.php2
-rw-r--r--sabre/uri/lib/functions.php6
-rw-r--r--sabre/vobject/README.md2
-rw-r--r--sabre/vobject/lib/Cli.php2
-rw-r--r--sabre/vobject/lib/Component.php1
-rw-r--r--sabre/vobject/lib/Component/VCard.php1
-rw-r--r--sabre/vobject/lib/ElementList.php2
-rw-r--r--sabre/vobject/lib/ITip/Broker.php24
-rw-r--r--sabre/vobject/lib/Node.php7
-rw-r--r--sabre/vobject/lib/Parameter.php2
-rw-r--r--sabre/vobject/lib/Parser/MimeDir.php2
-rw-r--r--sabre/vobject/lib/Property.php5
-rw-r--r--sabre/vobject/lib/Property/ICalendar/DateTime.php1
-rw-r--r--sabre/vobject/lib/Recur/EventIterator.php8
-rw-r--r--sabre/vobject/lib/TimeZoneUtil.php261
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php31
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneIdentifier.php71
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php78
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php33
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php119
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php10
-rw-r--r--sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php11
-rw-r--r--sabre/vobject/lib/Version.php2
-rw-r--r--sabre/xml/.gitignore8
-rw-r--r--sabre/xml/CHANGELOG.md287
-rw-r--r--sabre/xml/composer.json2
-rw-r--r--sabre/xml/lib/ContextStackTrait.php2
-rw-r--r--sabre/xml/lib/Element/Base.php4
-rw-r--r--sabre/xml/lib/Element/Cdata.php6
-rw-r--r--sabre/xml/lib/Element/Elements.php6
-rw-r--r--sabre/xml/lib/Element/KeyValue.php6
-rw-r--r--sabre/xml/lib/Element/Uri.php4
-rw-r--r--sabre/xml/lib/Element/XmlFragment.php6
-rw-r--r--sabre/xml/lib/LibXMLException.php2
-rw-r--r--sabre/xml/lib/ParseException.php3
-rw-r--r--sabre/xml/lib/Reader.php8
-rw-r--r--sabre/xml/lib/Reader.php.rej11
-rw-r--r--sabre/xml/lib/Service.php10
-rw-r--r--sabre/xml/lib/Version.php2
-rw-r--r--sabre/xml/lib/XmlSerializable.php2
75 files changed, 766 insertions, 613 deletions
diff --git a/composer.json b/composer.json
index 0097370b..3fb924ad 100644
--- a/composer.json
+++ b/composer.json
@@ -40,7 +40,7 @@
"psr/container": "^1.1.1",
"psr/event-dispatcher": "^1.0",
"punic/punic": "^1.6",
- "sabre/dav": "^4.1.3",
+ "sabre/dav": "^4.2.0",
"scssphp/scssphp": "^1.4.0",
"stecman/symfony-console-completion": "^0.11.0",
"swiftmailer/swiftmailer": "^6.0",
diff --git a/composer.lock b/composer.lock
index 7495b51a..3c3511e2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "43d6e33525e295446eba2d97a5078674",
+ "content-hash": "e658d04d636a02ca883c153c499d66da",
"packages": [
{
"name": "aws/aws-sdk-php",
@@ -3540,16 +3540,16 @@
},
{
"name": "sabre/dav",
- "version": "4.1.5",
+ "version": "4.2.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/dav.git",
- "reference": "c1afdc77a95efea6ee40c03c45f57c3c0c80ec22"
+ "reference": "af125a40abdac787c438a6fed6da3451bcaa0886"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/dav/zipball/c1afdc77a95efea6ee40c03c45f57c3c0c80ec22",
- "reference": "c1afdc77a95efea6ee40c03c45f57c3c0c80ec22",
+ "url": "https://api.github.com/repos/sabre-io/dav/zipball/af125a40abdac787c438a6fed6da3451bcaa0886",
+ "reference": "af125a40abdac787c438a6fed6da3451bcaa0886",
"shasum": ""
},
"require": {
@@ -3622,27 +3622,27 @@
"issues": "https://github.com/sabre-io/dav/issues",
"source": "https://github.com/fruux/sabre-dav"
},
- "time": "2021-02-12T07:54:23+00:00"
+ "time": "2021-11-17T04:45:57+00:00"
},
{
"name": "sabre/event",
- "version": "5.1.2",
+ "version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
- "reference": "c120bec57c17b6251a496efc82b732418b49d50a"
+ "reference": "d7da22897125d34d7eddf7977758191c06a74497"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
- "reference": "c120bec57c17b6251a496efc82b732418b49d50a",
+ "url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
+ "reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"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"
},
@@ -3688,20 +3688,20 @@
"issues": "https://github.com/sabre-io/event/issues",
"source": "https://github.com/fruux/sabre-event"
},
- "time": "2020-10-03T11:02:22+00:00"
+ "time": "2021-11-04T06:51:17+00:00"
},
{
"name": "sabre/http",
- "version": "5.1.1",
+ "version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/http.git",
- "reference": "d0aafede6961df6195ce7a8dad49296b0aaee22e"
+ "reference": "315f592adfcba8aeb73c2fd64285205747acbbd7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/http/zipball/d0aafede6961df6195ce7a8dad49296b0aaee22e",
- "reference": "d0aafede6961df6195ce7a8dad49296b0aaee22e",
+ "url": "https://api.github.com/repos/sabre-io/http/zipball/315f592adfcba8aeb73c2fd64285205747acbbd7",
+ "reference": "315f592adfcba8aeb73c2fd64285205747acbbd7",
"shasum": ""
},
"require": {
@@ -3713,7 +3713,7 @@
"sabre/uri": "^2.0"
},
"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"
},
@@ -3751,27 +3751,27 @@
"issues": "https://github.com/sabre-io/http/issues",
"source": "https://github.com/fruux/sabre-http"
},
- "time": "2020-10-03T11:27:32+00:00"
+ "time": "2021-11-04T07:02:36+00:00"
},
{
"name": "sabre/uri",
- "version": "2.2.1",
+ "version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/uri.git",
- "reference": "f502edffafea8d746825bd5f0b923a60fd2715ff"
+ "reference": "7cb0f489578afad5006e85cd60f18ff33f2d440d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/uri/zipball/f502edffafea8d746825bd5f0b923a60fd2715ff",
- "reference": "f502edffafea8d746825bd5f0b923a60fd2715ff",
+ "url": "https://api.github.com/repos/sabre-io/uri/zipball/7cb0f489578afad5006e85cd60f18ff33f2d440d",
+ "reference": "7cb0f489578afad5006e85cd60f18ff33f2d440d",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"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"
},
@@ -3808,20 +3808,20 @@
"issues": "https://github.com/sabre-io/uri/issues",
"source": "https://github.com/fruux/sabre-uri"
},
- "time": "2020-10-03T10:33:23+00:00"
+ "time": "2021-11-04T09:29:58+00:00"
},
{
"name": "sabre/vobject",
- "version": "4.3.5",
+ "version": "4.4.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/vobject.git",
- "reference": "d8a0a9ae215a8acfb51afc29101c7344670b9c83"
+ "reference": "0a2e27c797ec0934f376764e1a16567bbbcece0b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/vobject/zipball/d8a0a9ae215a8acfb51afc29101c7344670b9c83",
- "reference": "d8a0a9ae215a8acfb51afc29101c7344670b9c83",
+ "url": "https://api.github.com/repos/sabre-io/vobject/zipball/0a2e27c797ec0934f376764e1a16567bbbcece0b",
+ "reference": "0a2e27c797ec0934f376764e1a16567bbbcece0b",
"shasum": ""
},
"require": {
@@ -3912,20 +3912,20 @@
"issues": "https://github.com/sabre-io/vobject/issues",
"source": "https://github.com/fruux/sabre-vobject"
},
- "time": "2021-02-12T06:28:04+00:00"
+ "time": "2021-11-16T09:25:03+00:00"
},
{
"name": "sabre/xml",
- "version": "2.2.3",
+ "version": "2.2.5",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
- "reference": "c3b959f821c19b36952ec4a595edd695c216bfc6"
+ "reference": "a6af111850e7536d200d9637c34885cd3c77a86c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/xml/zipball/c3b959f821c19b36952ec4a595edd695c216bfc6",
- "reference": "c3b959f821c19b36952ec4a595edd695c216bfc6",
+ "url": "https://api.github.com/repos/sabre-io/xml/zipball/a6af111850e7536d200d9637c34885cd3c77a86c",
+ "reference": "a6af111850e7536d200d9637c34885cd3c77a86c",
"shasum": ""
},
"require": {
@@ -3937,7 +3937,7 @@
"sabre/uri": ">=1.0,<3.0.0"
},
"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"
},
@@ -3981,7 +3981,7 @@
"issues": "https://github.com/sabre-io/xml/issues",
"source": "https://github.com/fruux/sabre-xml"
},
- "time": "2020-10-03T10:08:14+00:00"
+ "time": "2021-11-04T06:37:27+00:00"
},
{
"name": "scssphp/scssphp",
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 636ba6b5..9d8d7604 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -2573,6 +2573,13 @@ return array(
'Sabre\\VObject\\Splitter\\VCard' => $vendorDir . '/sabre/vobject/lib/Splitter/VCard.php',
'Sabre\\VObject\\StringUtil' => $vendorDir . '/sabre/vobject/lib/StringUtil.php',
'Sabre\\VObject\\TimeZoneUtil' => $vendorDir . '/sabre/vobject/lib/TimeZoneUtil.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\FindFromOffset' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\FindFromTimezoneIdentifier' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneIdentifier.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\FindFromTimezoneMap' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\GuessFromLicEntry' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\GuessFromMsTzId' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\TimezoneFinder' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\TimezoneGuesser' => $vendorDir . '/sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php',
'Sabre\\VObject\\UUIDUtil' => $vendorDir . '/sabre/vobject/lib/UUIDUtil.php',
'Sabre\\VObject\\VCardConverter' => $vendorDir . '/sabre/vobject/lib/VCardConverter.php',
'Sabre\\VObject\\Version' => $vendorDir . '/sabre/vobject/lib/Version.php',
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 88f1b469..e4914e72 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -3204,6 +3204,13 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Sabre\\VObject\\Splitter\\VCard' => __DIR__ . '/..' . '/sabre/vobject/lib/Splitter/VCard.php',
'Sabre\\VObject\\StringUtil' => __DIR__ . '/..' . '/sabre/vobject/lib/StringUtil.php',
'Sabre\\VObject\\TimeZoneUtil' => __DIR__ . '/..' . '/sabre/vobject/lib/TimeZoneUtil.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\FindFromOffset' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\FindFromTimezoneIdentifier' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneIdentifier.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\FindFromTimezoneMap' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\GuessFromLicEntry' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\GuessFromMsTzId' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\TimezoneFinder' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php',
+ 'Sabre\\VObject\\TimezoneGuesser\\TimezoneGuesser' => __DIR__ . '/..' . '/sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php',
'Sabre\\VObject\\UUIDUtil' => __DIR__ . '/..' . '/sabre/vobject/lib/UUIDUtil.php',
'Sabre\\VObject\\VCardConverter' => __DIR__ . '/..' . '/sabre/vobject/lib/VCardConverter.php',
'Sabre\\VObject\\Version' => __DIR__ . '/..' . '/sabre/vobject/lib/Version.php',
diff --git a/composer/installed.json b/composer/installed.json
index 6fbadd47..e018f9bf 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -3696,17 +3696,17 @@
},
{
"name": "sabre/dav",
- "version": "4.1.5",
- "version_normalized": "4.1.5.0",
+ "version": "4.2.0",
+ "version_normalized": "4.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/dav.git",
- "reference": "c1afdc77a95efea6ee40c03c45f57c3c0c80ec22"
+ "reference": "af125a40abdac787c438a6fed6da3451bcaa0886"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/dav/zipball/c1afdc77a95efea6ee40c03c45f57c3c0c80ec22",
- "reference": "c1afdc77a95efea6ee40c03c45f57c3c0c80ec22",
+ "url": "https://api.github.com/repos/sabre-io/dav/zipball/af125a40abdac787c438a6fed6da3451bcaa0886",
+ "reference": "af125a40abdac787c438a6fed6da3451bcaa0886",
"shasum": ""
},
"require": {
@@ -3740,7 +3740,7 @@
"ext-imap": "*",
"ext-pdo": "*"
},
- "time": "2021-02-12T07:54:23+00:00",
+ "time": "2021-11-17T04:45:57+00:00",
"bin": [
"bin/sabredav",
"bin/naturalselection"
@@ -3785,28 +3785,28 @@
},
{
"name": "sabre/event",
- "version": "5.1.2",
- "version_normalized": "5.1.2.0",
+ "version": "5.1.4",
+ "version_normalized": "5.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
- "reference": "c120bec57c17b6251a496efc82b732418b49d50a"
+ "reference": "d7da22897125d34d7eddf7977758191c06a74497"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
- "reference": "c120bec57c17b6251a496efc82b732418b49d50a",
+ "url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
+ "reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"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"
},
- "time": "2020-10-03T11:02:22+00:00",
+ "time": "2021-11-04T06:51:17+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -3854,17 +3854,17 @@
},
{
"name": "sabre/http",
- "version": "5.1.1",
- "version_normalized": "5.1.1.0",
+ "version": "5.1.3",
+ "version_normalized": "5.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/http.git",
- "reference": "d0aafede6961df6195ce7a8dad49296b0aaee22e"
+ "reference": "315f592adfcba8aeb73c2fd64285205747acbbd7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/http/zipball/d0aafede6961df6195ce7a8dad49296b0aaee22e",
- "reference": "d0aafede6961df6195ce7a8dad49296b0aaee22e",
+ "url": "https://api.github.com/repos/sabre-io/http/zipball/315f592adfcba8aeb73c2fd64285205747acbbd7",
+ "reference": "315f592adfcba8aeb73c2fd64285205747acbbd7",
"shasum": ""
},
"require": {
@@ -3876,14 +3876,14 @@
"sabre/uri": "^2.0"
},
"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"
},
"suggest": {
"ext-curl": " to make http requests with the Client class"
},
- "time": "2020-10-03T11:27:32+00:00",
+ "time": "2021-11-04T07:02:36+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -3920,28 +3920,28 @@
},
{
"name": "sabre/uri",
- "version": "2.2.1",
- "version_normalized": "2.2.1.0",
+ "version": "2.2.2",
+ "version_normalized": "2.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/uri.git",
- "reference": "f502edffafea8d746825bd5f0b923a60fd2715ff"
+ "reference": "7cb0f489578afad5006e85cd60f18ff33f2d440d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/uri/zipball/f502edffafea8d746825bd5f0b923a60fd2715ff",
- "reference": "f502edffafea8d746825bd5f0b923a60fd2715ff",
+ "url": "https://api.github.com/repos/sabre-io/uri/zipball/7cb0f489578afad5006e85cd60f18ff33f2d440d",
+ "reference": "7cb0f489578afad5006e85cd60f18ff33f2d440d",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"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"
},
- "time": "2020-10-03T10:33:23+00:00",
+ "time": "2021-11-04T09:29:58+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -3980,17 +3980,17 @@
},
{
"name": "sabre/vobject",
- "version": "4.3.5",
- "version_normalized": "4.3.5.0",
+ "version": "4.4.0",
+ "version_normalized": "4.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/vobject.git",
- "reference": "d8a0a9ae215a8acfb51afc29101c7344670b9c83"
+ "reference": "0a2e27c797ec0934f376764e1a16567bbbcece0b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/vobject/zipball/d8a0a9ae215a8acfb51afc29101c7344670b9c83",
- "reference": "d8a0a9ae215a8acfb51afc29101c7344670b9c83",
+ "url": "https://api.github.com/repos/sabre-io/vobject/zipball/0a2e27c797ec0934f376764e1a16567bbbcece0b",
+ "reference": "0a2e27c797ec0934f376764e1a16567bbbcece0b",
"shasum": ""
},
"require": {
@@ -4007,7 +4007,7 @@
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
- "time": "2021-02-12T06:28:04+00:00",
+ "time": "2021-11-16T09:25:03+00:00",
"bin": [
"bin/vobject",
"bin/generate_vcards"
@@ -4087,17 +4087,17 @@
},
{
"name": "sabre/xml",
- "version": "2.2.3",
- "version_normalized": "2.2.3.0",
+ "version": "2.2.5",
+ "version_normalized": "2.2.5.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
- "reference": "c3b959f821c19b36952ec4a595edd695c216bfc6"
+ "reference": "a6af111850e7536d200d9637c34885cd3c77a86c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/xml/zipball/c3b959f821c19b36952ec4a595edd695c216bfc6",
- "reference": "c3b959f821c19b36952ec4a595edd695c216bfc6",
+ "url": "https://api.github.com/repos/sabre-io/xml/zipball/a6af111850e7536d200d9637c34885cd3c77a86c",
+ "reference": "a6af111850e7536d200d9637c34885cd3c77a86c",
"shasum": ""
},
"require": {
@@ -4109,16 +4109,14 @@
"sabre/uri": ">=1.0,<3.0.0"
},
"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"
},
- "time": "2020-10-03T10:08:14+00:00",
+ "time": "2021-11-04T06:37:27+00:00",
"type": "library",
"extra": {
- "patches_applied": {
- "Correct version check": ".patches/sabre-xml/correct-version-check.patch"
- }
+ "patches_applied": []
},
"installation-source": "dist",
"autoload": {
diff --git a/composer/installed.php b/composer/installed.php
index e05cc18a..5bde8f84 100644
--- a/composer/installed.php
+++ b/composer/installed.php
@@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
- 'reference' => 'a4ce933baff9c07e2bd9005cc101b791ea455682',
+ 'reference' => '6e181eb3fbf0e2213da1765a56f95d6e18302a3c',
'name' => 'nextcloud/3rdparty',
'dev' => false,
),
@@ -286,7 +286,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
- 'reference' => 'a4ce933baff9c07e2bd9005cc101b791ea455682',
+ 'reference' => '6e181eb3fbf0e2213da1765a56f95d6e18302a3c',
'dev_requirement' => false,
),
'nextcloud/lognormalizer' => array(
@@ -572,57 +572,57 @@
),
),
'sabre/dav' => array(
- 'pretty_version' => '4.1.5',
- 'version' => '4.1.5.0',
+ 'pretty_version' => '4.2.0',
+ 'version' => '4.2.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/dav',
'aliases' => array(),
- 'reference' => 'c1afdc77a95efea6ee40c03c45f57c3c0c80ec22',
+ 'reference' => 'af125a40abdac787c438a6fed6da3451bcaa0886',
'dev_requirement' => false,
),
'sabre/event' => array(
- 'pretty_version' => '5.1.2',
- 'version' => '5.1.2.0',
+ 'pretty_version' => '5.1.4',
+ 'version' => '5.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/event',
'aliases' => array(),
- 'reference' => 'c120bec57c17b6251a496efc82b732418b49d50a',
+ 'reference' => 'd7da22897125d34d7eddf7977758191c06a74497',
'dev_requirement' => false,
),
'sabre/http' => array(
- 'pretty_version' => '5.1.1',
- 'version' => '5.1.1.0',
+ 'pretty_version' => '5.1.3',
+ 'version' => '5.1.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/http',
'aliases' => array(),
- 'reference' => 'd0aafede6961df6195ce7a8dad49296b0aaee22e',
+ 'reference' => '315f592adfcba8aeb73c2fd64285205747acbbd7',
'dev_requirement' => false,
),
'sabre/uri' => array(
- 'pretty_version' => '2.2.1',
- 'version' => '2.2.1.0',
+ 'pretty_version' => '2.2.2',
+ 'version' => '2.2.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/uri',
'aliases' => array(),
- 'reference' => 'f502edffafea8d746825bd5f0b923a60fd2715ff',
+ 'reference' => '7cb0f489578afad5006e85cd60f18ff33f2d440d',
'dev_requirement' => false,
),
'sabre/vobject' => array(
- 'pretty_version' => '4.3.5',
- 'version' => '4.3.5.0',
+ 'pretty_version' => '4.4.0',
+ 'version' => '4.4.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/vobject',
'aliases' => array(),
- 'reference' => 'd8a0a9ae215a8acfb51afc29101c7344670b9c83',
+ 'reference' => '0a2e27c797ec0934f376764e1a16567bbbcece0b',
'dev_requirement' => false,
),
'sabre/xml' => array(
- 'pretty_version' => '2.2.3',
- 'version' => '2.2.3.0',
+ 'pretty_version' => '2.2.5',
+ 'version' => '2.2.5.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/xml',
'aliases' => array(),
- 'reference' => 'c3b959f821c19b36952ec4a595edd695c216bfc6',
+ 'reference' => 'a6af111850e7536d200d9637c34885cd3c77a86c',
'dev_requirement' => false,
),
'scssphp/scssphp' => array(
diff --git a/composer/package-versions-deprecated/src/PackageVersions/Versions.php b/composer/package-versions-deprecated/src/PackageVersions/Versions.php
index f9d551bd..961c7d50 100644
--- a/composer/package-versions-deprecated/src/PackageVersions/Versions.php
+++ b/composer/package-versions-deprecated/src/PackageVersions/Versions.php
@@ -87,12 +87,12 @@ final class Versions
'ralouphie/getallheaders' => '3.0.3@120b605dfeb996808c31b6477290a714d356e822',
'ramsey/collection' => '1.1.3@28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1',
'ramsey/uuid' => '4.1.1@cd4032040a750077205918c86049aa0f43d22947',
- 'sabre/dav' => '4.1.5@c1afdc77a95efea6ee40c03c45f57c3c0c80ec22',
- 'sabre/event' => '5.1.2@c120bec57c17b6251a496efc82b732418b49d50a',
- 'sabre/http' => '5.1.1@d0aafede6961df6195ce7a8dad49296b0aaee22e',
- 'sabre/uri' => '2.2.1@f502edffafea8d746825bd5f0b923a60fd2715ff',
- 'sabre/vobject' => '4.3.5@d8a0a9ae215a8acfb51afc29101c7344670b9c83',
- 'sabre/xml' => '2.2.3@c3b959f821c19b36952ec4a595edd695c216bfc6',
+ 'sabre/dav' => '4.2.0@af125a40abdac787c438a6fed6da3451bcaa0886',
+ 'sabre/event' => '5.1.4@d7da22897125d34d7eddf7977758191c06a74497',
+ 'sabre/http' => '5.1.3@315f592adfcba8aeb73c2fd64285205747acbbd7',
+ 'sabre/uri' => '2.2.2@7cb0f489578afad5006e85cd60f18ff33f2d440d',
+ 'sabre/vobject' => '4.4.0@0a2e27c797ec0934f376764e1a16567bbbcece0b',
+ 'sabre/xml' => '2.2.5@a6af111850e7536d200d9637c34885cd3c77a86c',
'scssphp/scssphp' => 'v1.4.1@ba86c963b94ec7ebd6e19d90cdab90d89667dbf7',
'spomky-labs/base64url' => 'v2.0.4@7752ce931ec285da4ed1f4c5aa27e45e097be61d',
'spomky-labs/cbor-php' => 'v2.0.1@9776578000be884cd7864eeb7c37a4ac92d8c995',
@@ -120,7 +120,7 @@ final class Versions
'web-auth/cose-lib' => 'v3.3.9@ed172d2dc1a6b87b5c644c07c118cd30c1b3819b',
'web-auth/metadata-service' => 'v3.3.9@8488d3a832a38cc81c670fce05de1e515c6e64b1',
'web-auth/webauthn-lib' => 'v3.3.9@04b98ee3d39cb79dad68a7c15c297c085bf66bfe',
- 'nextcloud/3rdparty' => 'dev-master@a4ce933baff9c07e2bd9005cc101b791ea455682',
+ 'nextcloud/3rdparty' => 'dev-master@6e181eb3fbf0e2213da1765a56f95d6e18302a3c',
);
private function __construct()
diff --git a/sabre/dav/lib/CalDAV/Plugin.php b/sabre/dav/lib/CalDAV/Plugin.php
index da172049..98f4f554 100644
--- a/sabre/dav/lib/CalDAV/Plugin.php
+++ b/sabre/dav/lib/CalDAV/Plugin.php
@@ -243,7 +243,7 @@ class Plugin extends DAV\ServerPlugin
* @param mixed $report
* @param mixed $path
*
- * @return bool
+ * @return bool|null
*/
public function report($reportName, $report, $path)
{
diff --git a/sabre/dav/lib/CalDAV/Schedule/Plugin.php b/sabre/dav/lib/CalDAV/Schedule/Plugin.php
index 38a7ca96..3cc360f1 100644
--- a/sabre/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/sabre/dav/lib/CalDAV/Schedule/Plugin.php
@@ -735,9 +735,7 @@ class Plugin extends ServerPlugin
/**
* This method is responsible for parsing a free-busy query request and
- * returning it's result.
- *
- * @return string
+ * returning its result in $response.
*/
protected function handleFreeBusyRequest(IOutbox $outbox, VObject\Component $vObject, RequestInterface $request, ResponseInterface $response)
{
diff --git a/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php b/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php
index 3be1b609..8d56e644 100644
--- a/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php
+++ b/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php
@@ -75,7 +75,7 @@ class Subscription extends Collection implements ISubscription, IACL
/**
* Returns the last modification time.
*
- * @return int
+ * @return int|null
*/
public function getLastModified()
{
diff --git a/sabre/dav/lib/DAV/Auth/Plugin.php b/sabre/dav/lib/DAV/Auth/Plugin.php
index 68adbede..eb4f27ca 100644
--- a/sabre/dav/lib/DAV/Auth/Plugin.php
+++ b/sabre/dav/lib/DAV/Auth/Plugin.php
@@ -113,8 +113,6 @@ class Plugin extends ServerPlugin
/**
* This method is called before any HTTP method and forces users to be authenticated.
- *
- * @return bool
*/
public function beforeMethod(RequestInterface $request, ResponseInterface $response)
{
@@ -204,8 +202,6 @@ class Plugin extends ServerPlugin
* This method will for example cause a HTTP Basic backend to set a
* WWW-Authorization header, indicating to the client that it should
* authenticate.
- *
- * @return array
*/
public function challenge(RequestInterface $request, ResponseInterface $response)
{
diff --git a/sabre/dav/lib/DAV/Browser/Plugin.php b/sabre/dav/lib/DAV/Browser/Plugin.php
index 2f155d9e..89495e5d 100644
--- a/sabre/dav/lib/DAV/Browser/Plugin.php
+++ b/sabre/dav/lib/DAV/Browser/Plugin.php
@@ -85,8 +85,6 @@ class Plugin extends DAV\ServerPlugin
/**
* This method intercepts GET requests that have ?sabreAction=info
* appended to the URL.
- *
- * @return bool
*/
public function httpGetEarly(RequestInterface $request, ResponseInterface $response)
{
diff --git a/sabre/dav/lib/DAV/Locks/Plugin.php b/sabre/dav/lib/DAV/Locks/Plugin.php
index 110bfce0..2443f204 100644
--- a/sabre/dav/lib/DAV/Locks/Plugin.php
+++ b/sabre/dav/lib/DAV/Locks/Plugin.php
@@ -295,6 +295,10 @@ class Plugin extends DAV\ServerPlugin
{
$locks = $this->getLocks($path, $includeChildren = true);
foreach ($locks as $lock) {
+ // don't delete a lock on a parent dir
+ if (0 !== strpos($lock->uri, $path)) {
+ continue;
+ }
$this->unlockNode($path, $lock);
}
}
diff --git a/sabre/dav/lib/DAV/Server.php b/sabre/dav/lib/DAV/Server.php
index de663d0c..1f8300d4 100644
--- a/sabre/dav/lib/DAV/Server.php
+++ b/sabre/dav/lib/DAV/Server.php
@@ -895,7 +895,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
}
$propertyNames = $propFind->getRequestedProperties();
- $propFindType = !empty($propertyNames) ? PropFind::NORMAL : PropFind::ALLPROPS;
+ $propFindType = !$propFind->isAllProps() ? PropFind::NORMAL : PropFind::ALLPROPS;
foreach ($this->tree->getChildren($path) as $childNode) {
if ('' !== $path) {
@@ -1237,6 +1237,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
$this->tree->markDirty($parentUri);
$this->emit('afterBind', [$uri]);
+ $this->emit('afterCreateCollection', [$uri]);
}
/**
diff --git a/sabre/dav/lib/DAV/Version.php b/sabre/dav/lib/DAV/Version.php
index b25d6c07..13c2b011 100644
--- a/sabre/dav/lib/DAV/Version.php
+++ b/sabre/dav/lib/DAV/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- public const VERSION = '4.1.5';
+ public const VERSION = '4.2.0';
}
diff --git a/sabre/dav/lib/DAV/Xml/Element/Response.php b/sabre/dav/lib/DAV/Xml/Element/Response.php
index 45c161fa..79f06a09 100644
--- a/sabre/dav/lib/DAV/Xml/Element/Response.php
+++ b/sabre/dav/lib/DAV/Xml/Element/Response.php
@@ -121,7 +121,7 @@ class Response implements Element
foreach ($this->getResponseProperties() as $status => $properties) {
// Skipping empty lists
- if (!$properties || (!ctype_digit($status) && !is_int($status))) {
+ if (!$properties || (!is_int($status) && !ctype_digit($status))) {
continue;
}
$empty = false;
@@ -186,8 +186,21 @@ class Response implements Element
return [];
}
+
+ if (!$reader->read()) {
+ $reader->next();
+
+ return [];
+ }
+
+ if (Reader::END_ELEMENT === $reader->nodeType) {
+ $reader->next();
+
+ return [];
+ }
+
$values = [];
- $reader->read();
+
do {
if (Reader::ELEMENT === $reader->nodeType) {
$clark = $reader->getClark();
@@ -199,9 +212,12 @@ class Response implements Element
$values[$clark] = $reader->parseCurrentElement()['value'];
}
} else {
- $reader->read();
+ if (!$reader->read()) {
+ break;
+ }
}
} while (Reader::END_ELEMENT !== $reader->nodeType);
+
$reader->read();
return $values;
diff --git a/sabre/dav/lib/DAVACL/Plugin.php b/sabre/dav/lib/DAVACL/Plugin.php
index 6f071927..46d680e1 100644
--- a/sabre/dav/lib/DAVACL/Plugin.php
+++ b/sabre/dav/lib/DAVACL/Plugin.php
@@ -927,8 +927,6 @@ class Plugin extends DAV\ServerPlugin
* Triggered before properties are looked up in specific nodes.
*
* @TODO really should be broken into multiple methods, or even a class.
- *
- * @return bool
*/
public function propFind(DAV\PropFind $propFind, DAV\INode $node)
{
@@ -1070,8 +1068,6 @@ class Plugin extends DAV\ServerPlugin
* @param string $reportName
* @param mixed $report
* @param mixed $path
- *
- * @return bool
*/
public function report($reportName, $report, $path)
{
diff --git a/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php b/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php
index 03a9c4ba..f61a0c95 100644
--- a/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php
+++ b/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php
@@ -33,7 +33,7 @@ abstract class AbstractBackend implements BackendInterface
* @param string $uri
* @param string $principalPrefix
*
- * @return string
+ * @return string|null
*/
public function findByUri($uri, $principalPrefix)
{
diff --git a/sabre/dav/lib/DAVACL/Xml/Property/Principal.php b/sabre/dav/lib/DAVACL/Xml/Property/Principal.php
index 24aeffad..52092128 100644
--- a/sabre/dav/lib/DAVACL/Xml/Property/Principal.php
+++ b/sabre/dav/lib/DAVACL/Xml/Property/Principal.php
@@ -142,6 +142,8 @@ class Principal extends DAV\Xml\Property\Href
case self::ALL:
return '<em>all</em>';
}
+
+ return '<em>unknown</em>';
}
/**
diff --git a/sabre/event/composer.json b/sabre/event/composer.json
index 181afe19..42fb4aa2 100644
--- a/sabre/event/composer.json
+++ b/sabre/event/composer.json
@@ -46,7 +46,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/sabre/event/lib/EventEmitter.php b/sabre/event/lib/EventEmitter.php
index 18971e3e..865c99b5 100644
--- a/sabre/event/lib/EventEmitter.php
+++ b/sabre/event/lib/EventEmitter.php
@@ -7,7 +7,7 @@ namespace Sabre\Event;
/**
* This is the old name for the Emitter class.
*
- * Instead of of using EventEmitter, please use Emitter. They are identical
+ * Instead of using EventEmitter, please use Emitter. They are identical
* otherwise.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
diff --git a/sabre/event/lib/Loop/Loop.php b/sabre/event/lib/Loop/Loop.php
index ec09be92..b85a7a44 100644
--- a/sabre/event/lib/Loop/Loop.php
+++ b/sabre/event/lib/Loop/Loop.php
@@ -273,7 +273,9 @@ class Loop
$read = $this->readStreams;
$write = $this->writeStreams;
$except = null;
- if (stream_select($read, $write, $except, (null === $timeout) ? null : 0, $timeout ? (int) ($timeout * 1000000) : 0)) {
+ // stream_select changes behavior in 8.1 to forbid passing non-null microseconds when the seconds are null.
+ // Older versions of php don't allow passing null to microseconds.
+ if (null !== $timeout ? stream_select($read, $write, $except, 0, (int) ($timeout * 1000000)) : stream_select($read, $write, $except, null)) {
// See PHP Bug https://bugs.php.net/bug.php?id=62452
// Fixed in PHP7
foreach ($read as $readStream) {
diff --git a/sabre/event/lib/Promise.php b/sabre/event/lib/Promise.php
index 1228561a..42969a55 100644
--- a/sabre/event/lib/Promise.php
+++ b/sabre/event/lib/Promise.php
@@ -144,7 +144,7 @@ class Promise
}
/**
- * Marks this promise as rejected, and set it's rejection reason.
+ * Marks this promise as rejected, and set its rejection reason.
*/
public function reject(Throwable $reason)
{
diff --git a/sabre/event/lib/Promise/functions.php b/sabre/event/lib/Promise/functions.php
index 986fe2b0..fbed6347 100644
--- a/sabre/event/lib/Promise/functions.php
+++ b/sabre/event/lib/Promise/functions.php
@@ -18,7 +18,7 @@ use Throwable;
/**
* This function takes an array of Promises, and returns a Promise that
- * resolves when all of the given arguments have resolved.
+ * resolves when all the given arguments have resolved.
*
* The returned Promise will resolve with a value that's an array of all the
* values the given promises have been resolved with.
diff --git a/sabre/event/lib/Version.php b/sabre/event/lib/Version.php
index 457aea9b..fe8f5c3b 100644
--- a/sabre/event/lib/Version.php
+++ b/sabre/event/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '5.1.2';
+ const VERSION = '5.1.4';
}
diff --git a/sabre/event/lib/WildcardEmitter.php b/sabre/event/lib/WildcardEmitter.php
index 1b7c248b..997709e8 100644
--- a/sabre/event/lib/WildcardEmitter.php
+++ b/sabre/event/lib/WildcardEmitter.php
@@ -22,9 +22,9 @@ namespace Sabre\Event;
* - Using ":" as a separator is optional, but it's highly recommended to use
* some kind of separator.
*
- * The WilcardEmitter is a bit slower than the regular Emitter. If you code
+ * The WildcardEmitter is a bit slower than the regular Emitter. If your code
* must be very high performance, it might be better to try to use the other
- * emitter. For must usage the difference is negligible though.
+ * emitter. For most usage the difference is negligible though.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
diff --git a/sabre/http/CHANGELOG.md b/sabre/http/CHANGELOG.md
index eb226f7a..4db8cc77 100644
--- a/sabre/http/CHANGELOG.md
+++ b/sabre/http/CHANGELOG.md
@@ -1,6 +1,18 @@
ChangeLog
=========
+5.1.3 (2021-11-04)
+------------------
+
+* #179 version bump that was missed in 5.1.2 (@phil-davis)
+
+5.1.2 (2021-11-04)
+-------------------------
+
+* #169 Ensure $_SERVER keys are read as strings (@fredrik-eriksson)
+* #170 Fix deprecated usages on PHP 8.1 (@cedric-anne)
+* #175 Add resource size to CURL options in client (from #172 ) (@Dartui)
+
5.1.1 (2020-10-03)
-------------------------
diff --git a/sabre/http/composer.json b/sabre/http/composer.json
index 7f54df6e..353646a2 100644
--- a/sabre/http/composer.json
+++ b/sabre/http/composer.json
@@ -13,7 +13,7 @@
"sabre/uri" : "^2.0"
},
"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/sabre/http/lib/Client.php b/sabre/http/lib/Client.php
index b79c564d..99ffcf8c 100644
--- a/sabre/http/lib/Client.php
+++ b/sabre/http/lib/Client.php
@@ -376,11 +376,16 @@ class Client extends EventEmitter
default:
$body = $request->getBody();
if (is_resource($body)) {
+ $bodyStat = fstat($body);
+
// This needs to be set to PUT, regardless of the actual
// method used. Without it, INFILE will be ignored for some
// reason.
$settings[CURLOPT_PUT] = true;
- $settings[CURLOPT_INFILE] = $request->getBody();
+ $settings[CURLOPT_INFILE] = $body;
+ if (false !== $bodyStat && array_key_exists('size', $bodyStat)) {
+ $settings[CURLOPT_INFILESIZE] = $bodyStat['size'];
+ }
} else {
// For security we cast this to a string. If somehow an array could
// be passed here, it would be possible for an attacker to use @ to
diff --git a/sabre/http/lib/Message.php b/sabre/http/lib/Message.php
index 90153fda..6474f38d 100644
--- a/sabre/http/lib/Message.php
+++ b/sabre/http/lib/Message.php
@@ -88,7 +88,7 @@ abstract class Message implements MessageInterface
* @var string|int|null
*/
$contentLength = $this->getHeader('Content-Length');
- if (is_int($contentLength) || ctype_digit($contentLength)) {
+ if (null !== $contentLength && (is_int($contentLength) || ctype_digit($contentLength))) {
return stream_get_contents($body, (int) $contentLength);
}
diff --git a/sabre/http/lib/Response.php b/sabre/http/lib/Response.php
index 64dfbc0b..2369bb41 100644
--- a/sabre/http/lib/Response.php
+++ b/sabre/http/lib/Response.php
@@ -149,7 +149,7 @@ class Response extends Message implements ResponseInterface
*/
public function setStatus($status)
{
- if (ctype_digit($status) || is_int($status)) {
+ if (is_int($status) || ctype_digit($status)) {
$statusCode = $status;
$statusText = self::$statusCodes[$status] ?? 'Unknown';
} else {
diff --git a/sabre/http/lib/Sapi.php b/sabre/http/lib/Sapi.php
index 73674a5a..823d5df2 100644
--- a/sabre/http/lib/Sapi.php
+++ b/sabre/http/lib/Sapi.php
@@ -154,6 +154,7 @@ class Sapi
$hostName = 'localhost';
foreach ($serverArray as $key => $value) {
+ $key = (string) $key;
switch ($key) {
case 'SERVER_PROTOCOL':
if ('HTTP/1.0' === $value) {
diff --git a/sabre/http/lib/Version.php b/sabre/http/lib/Version.php
index 624e2a78..f182979c 100644
--- a/sabre/http/lib/Version.php
+++ b/sabre/http/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '5.1.1';
+ const VERSION = '5.1.3';
}
diff --git a/sabre/http/lib/functions.php b/sabre/http/lib/functions.php
index a23840a1..97673da4 100644
--- a/sabre/http/lib/functions.php
+++ b/sabre/http/lib/functions.php
@@ -331,8 +331,8 @@ function parseMimeType(string $str): array
if (2 !== count($mimeType)) {
// Illegal value
var_dump($mimeType);
- die();
- throw new InvalidArgumentException('Not a valid mime-type: '.$str);
+ exit();
+ // throw new InvalidArgumentException('Not a valid mime-type: '.$str);
}
list($type, $subType) = $mimeType;
diff --git a/sabre/uri/composer.json b/sabre/uri/composer.json
index 4a68797a..d58fd51f 100644
--- a/sabre/uri/composer.json
+++ b/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/sabre/uri/lib/Version.php b/sabre/uri/lib/Version.php
index 4a6c5840..4527a0d8 100644
--- a/sabre/uri/lib/Version.php
+++ b/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/sabre/uri/lib/functions.php b/sabre/uri/lib/functions.php
index 0d64cead..18a32433 100644
--- a/sabre/uri/lib/functions.php
+++ b/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.
*
diff --git a/sabre/vobject/README.md b/sabre/vobject/README.md
index 5030cf27..659e3fa8 100644
--- a/sabre/vobject/README.md
+++ b/sabre/vobject/README.md
@@ -4,7 +4,7 @@ sabre/vobject
The VObject library allows you to easily parse and manipulate [iCalendar](https://tools.ietf.org/html/rfc5545)
and [vCard](https://tools.ietf.org/html/rfc6350) objects using PHP.
-The goal of the VObject library is to create a very complete library, with an easy to use API.
+The goal of the VObject library is to create a very complete library, with an easy-to-use API.
Installation
diff --git a/sabre/vobject/lib/Cli.php b/sabre/vobject/lib/Cli.php
index 4984ac9b..816e2cb3 100644
--- a/sabre/vobject/lib/Cli.php
+++ b/sabre/vobject/lib/Cli.php
@@ -453,8 +453,6 @@ HELP
* Colorizes a file.
*
* @param Component $vObj
- *
- * @return int
*/
protected function color($vObj)
{
diff --git a/sabre/vobject/lib/Component.php b/sabre/vobject/lib/Component.php
index 07f6a627..f33b628a 100644
--- a/sabre/vobject/lib/Component.php
+++ b/sabre/vobject/lib/Component.php
@@ -339,6 +339,7 @@ class Component extends Node
*
* @return array
*/
+ #[\ReturnTypeWillChange]
public function jsonSerialize()
{
$components = [];
diff --git a/sabre/vobject/lib/Component/VCard.php b/sabre/vobject/lib/Component/VCard.php
index 2430df62..eac78984 100644
--- a/sabre/vobject/lib/Component/VCard.php
+++ b/sabre/vobject/lib/Component/VCard.php
@@ -445,6 +445,7 @@ class VCard extends VObject\Document
*
* @return array
*/
+ #[\ReturnTypeWillChange]
public function jsonSerialize()
{
// A vcard does not have sub-components, so we're overriding this
diff --git a/sabre/vobject/lib/ElementList.php b/sabre/vobject/lib/ElementList.php
index 56058cbd..86051264 100644
--- a/sabre/vobject/lib/ElementList.php
+++ b/sabre/vobject/lib/ElementList.php
@@ -25,6 +25,7 @@ class ElementList extends ArrayIterator
* @param int $offset
* @param mixed $value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
throw new LogicException('You can not add new objects to an ElementList');
@@ -37,6 +38,7 @@ class ElementList extends ArrayIterator
*
* @param int $offset
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
throw new LogicException('You can not remove objects from an ElementList');
diff --git a/sabre/vobject/lib/ITip/Broker.php b/sabre/vobject/lib/ITip/Broker.php
index 4e0368e1..b66a59f5 100644
--- a/sabre/vobject/lib/ITip/Broker.php
+++ b/sabre/vobject/lib/ITip/Broker.php
@@ -547,9 +547,13 @@ class Broker
// properties changed in the event, or simply if there's a
// difference in instances that the attendee is invited to.
+ $oldAttendeeInstances = array_keys($attendee['oldInstances']);
+ $newAttendeeInstances = array_keys($attendee['newInstances']);
+
$message->significantChange =
'REQUEST' === $attendee['forceSend'] ||
- array_keys($attendee['oldInstances']) != array_keys($attendee['newInstances']) ||
+ count($oldAttendeeInstances) != count($newAttendeeInstances) ||
+ count(array_diff($oldAttendeeInstances, $newAttendeeInstances)) > 0 ||
$oldEventInfo['significantChangeHash'] !== $eventInfo['significantChangeHash'];
foreach ($attendee['newInstances'] as $instanceId => $instanceInfo) {
@@ -816,7 +820,10 @@ class Broker
$instances = [];
$exdate = [];
+ $significantChangeEventProperties = [];
+
foreach ($calendar->VEVENT as $vevent) {
+ $eventSignificantChangeHash = '';
$rrule = [];
if (is_null($uid)) {
@@ -930,19 +937,26 @@ class Broker
if (isset($vevent->$prop)) {
$propertyValues = $vevent->select($prop);
- $significantChangeHash .= $prop.':';
+ $eventSignificantChangeHash .= $prop.':';
if ('EXDATE' === $prop) {
- $significantChangeHash .= implode(',', $exdate).';';
+ $eventSignificantChangeHash .= implode(',', $exdate).';';
} elseif ('RRULE' === $prop) {
- $significantChangeHash .= implode(',', $rrule).';';
+ $eventSignificantChangeHash .= implode(',', $rrule).';';
} else {
foreach ($propertyValues as $val) {
- $significantChangeHash .= $val->getValue().';';
+ $eventSignificantChangeHash .= $val->getValue().';';
}
}
}
}
+ $significantChangeEventProperties[] = $eventSignificantChangeHash;
+ }
+
+ asort($significantChangeEventProperties);
+
+ foreach ($significantChangeEventProperties as $eventSignificantChangeHash) {
+ $significantChangeHash .= $eventSignificantChangeHash;
}
$significantChangeHash = md5($significantChangeHash);
diff --git a/sabre/vobject/lib/Node.php b/sabre/vobject/lib/Node.php
index 4c0c04f7..2041b2ac 100644
--- a/sabre/vobject/lib/Node.php
+++ b/sabre/vobject/lib/Node.php
@@ -73,6 +73,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
*
* @return array
*/
+ #[\ReturnTypeWillChange]
abstract public function jsonSerialize();
/**
@@ -102,6 +103,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
*
* @return ElementList
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
if (!is_null($this->iterator)) {
@@ -157,6 +159,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function count()
{
$it = $this->getIterator();
@@ -177,6 +180,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
$iterator = $this->getIterator();
@@ -193,6 +197,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
*
* @return mixed
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$iterator = $this->getIterator();
@@ -208,6 +213,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
* @param int $offset
* @param mixed $value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$iterator = $this->getIterator();
@@ -228,6 +234,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js
*
* @param int $offset
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$iterator = $this->getIterator();
diff --git a/sabre/vobject/lib/Parameter.php b/sabre/vobject/lib/Parameter.php
index 72f2ecbc..7e4d5574 100644
--- a/sabre/vobject/lib/Parameter.php
+++ b/sabre/vobject/lib/Parameter.php
@@ -321,6 +321,7 @@ class Parameter extends Node
*
* @return array
*/
+ #[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->value;
@@ -354,6 +355,7 @@ class Parameter extends Node
*
* @return ElementList
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
if (!is_null($this->iterator)) {
diff --git a/sabre/vobject/lib/Parser/MimeDir.php b/sabre/vobject/lib/Parser/MimeDir.php
index 385d340d..f6ffc37b 100644
--- a/sabre/vobject/lib/Parser/MimeDir.php
+++ b/sabre/vobject/lib/Parser/MimeDir.php
@@ -439,7 +439,7 @@ class MimeDir extends Parser
$propObj->add(null, $namelessParameter);
}
- if ('QUOTED-PRINTABLE' === strtoupper($propObj['ENCODING'])) {
+ if (isset($propObj['ENCODING']) && 'QUOTED-PRINTABLE' === strtoupper($propObj['ENCODING'])) {
$propObj->setQuotedPrintableValue($this->extractQuotedPrintableValue());
} else {
$charset = $this->charset;
diff --git a/sabre/vobject/lib/Property.php b/sabre/vobject/lib/Property.php
index f9cf8e38..6219c9b6 100644
--- a/sabre/vobject/lib/Property.php
+++ b/sabre/vobject/lib/Property.php
@@ -276,6 +276,7 @@ abstract class Property extends Node
*
* @return array
*/
+ #[\ReturnTypeWillChange]
public function jsonSerialize()
{
$parameters = [];
@@ -387,6 +388,7 @@ abstract class Property extends Node
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($name)
{
if (is_int($name)) {
@@ -413,6 +415,7 @@ abstract class Property extends Node
*
* @return Node
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($name)
{
if (is_int($name)) {
@@ -433,6 +436,7 @@ abstract class Property extends Node
* @param string $name
* @param mixed $value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($name, $value)
{
if (is_int($name)) {
@@ -453,6 +457,7 @@ abstract class Property extends Node
*
* @param string $name
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($name)
{
if (is_int($name)) {
diff --git a/sabre/vobject/lib/Property/ICalendar/DateTime.php b/sabre/vobject/lib/Property/ICalendar/DateTime.php
index d635e17a..ca71633b 100644
--- a/sabre/vobject/lib/Property/ICalendar/DateTime.php
+++ b/sabre/vobject/lib/Property/ICalendar/DateTime.php
@@ -300,6 +300,7 @@ class DateTime extends Property
* @param string $name
* @param mixed $value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($name, $value)
{
parent::offsetSet($name, $value);
diff --git a/sabre/vobject/lib/Recur/EventIterator.php b/sabre/vobject/lib/Recur/EventIterator.php
index e42ca136..310bebe4 100644
--- a/sabre/vobject/lib/Recur/EventIterator.php
+++ b/sabre/vobject/lib/Recur/EventIterator.php
@@ -229,9 +229,13 @@ class EventIterator implements \Iterator
if (!$this->valid()) {
return;
}
- $end = clone $this->currentDate;
+ if ($this->currentOverriddenEvent && $this->currentOverriddenEvent->DTEND) {
+ return $this->currentOverriddenEvent->DTEND->getDateTime($this->timeZone);
+ } else {
+ $end = clone $this->currentDate;
- return $end->modify('+'.$this->eventDuration.' seconds');
+ return $end->modify('+'.$this->eventDuration.' seconds');
+ }
}
/**
diff --git a/sabre/vobject/lib/TimeZoneUtil.php b/sabre/vobject/lib/TimeZoneUtil.php
index 2c407fee..6422c093 100644
--- a/sabre/vobject/lib/TimeZoneUtil.php
+++ b/sabre/vobject/lib/TimeZoneUtil.php
@@ -2,6 +2,16 @@
namespace Sabre\VObject;
+use DateTimeZone;
+use InvalidArgumentException;
+use Sabre\VObject\TimezoneGuesser\FindFromOffset;
+use Sabre\VObject\TimezoneGuesser\FindFromTimezoneIdentifier;
+use Sabre\VObject\TimezoneGuesser\FindFromTimezoneMap;
+use Sabre\VObject\TimezoneGuesser\GuessFromLicEntry;
+use Sabre\VObject\TimezoneGuesser\GuessFromMsTzId;
+use Sabre\VObject\TimezoneGuesser\TimezoneFinder;
+use Sabre\VObject\TimezoneGuesser\TimezoneGuesser;
+
/**
* Time zone name translation.
*
@@ -14,17 +24,136 @@ namespace Sabre\VObject;
*/
class TimeZoneUtil
{
+ /** @var self */
+ private static $instance = null;
+
+ /** @var TimezoneGuesser[] */
+ private $timezoneGuessers = [];
+
+ /** @var TimezoneFinder[] */
+ private $timezoneFinders = [];
+
+ private function __construct()
+ {
+ $this->addGuesser('lic', new GuessFromLicEntry());
+ $this->addGuesser('msTzId', new GuessFromMsTzId());
+ $this->addFinder('tzid', new FindFromTimezoneIdentifier());
+ $this->addFinder('tzmap', new FindFromTimezoneMap());
+ $this->addFinder('offset', new FindFromOffset());
+ }
+
+ private static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ private function addGuesser(string $key, TimezoneGuesser $guesser): void
+ {
+ $this->timezoneGuessers[$key] = $guesser;
+ }
+
+ private function addFinder(string $key, TimezoneFinder $finder): void
+ {
+ $this->timezoneFinders[$key] = $finder;
+ }
+
+ /**
+ * This method will try to find out the correct timezone for an iCalendar
+ * date-time value.
+ *
+ * You must pass the contents of the TZID parameter, as well as the full
+ * calendar.
+ *
+ * If the lookup fails, this method will return the default PHP timezone
+ * (as configured using date_default_timezone_set, or the date.timezone ini
+ * setting).
+ *
+ * Alternatively, if $failIfUncertain is set to true, it will throw an
+ * exception if we cannot accurately determine the timezone.
+ */
+ private function findTimeZone(string $tzid, Component $vcalendar = null, bool $failIfUncertain = false): DateTimeZone
+ {
+ foreach ($this->timezoneFinders as $timezoneFinder) {
+ $timezone = $timezoneFinder->find($tzid, $failIfUncertain);
+ if (!$timezone instanceof DateTimeZone) {
+ continue;
+ }
+
+ return $timezone;
+ }
+
+ if ($vcalendar) {
+ // If that didn't work, we will scan VTIMEZONE objects
+ foreach ($vcalendar->select('VTIMEZONE') as $vtimezone) {
+ if ((string) $vtimezone->TZID === $tzid) {
+ foreach ($this->timezoneGuessers as $timezoneGuesser) {
+ $timezone = $timezoneGuesser->guess($vtimezone, $failIfUncertain);
+ if (!$timezone instanceof DateTimeZone) {
+ continue;
+ }
+
+ return $timezone;
+ }
+ }
+ }
+ }
+
+ if ($failIfUncertain) {
+ throw new InvalidArgumentException('We were unable to determine the correct PHP timezone for tzid: '.$tzid);
+ }
+
+ // If we got all the way here, we default to whatever has been set as the PHP default timezone.
+ return new DateTimeZone(date_default_timezone_get());
+ }
+
+ public static function addTimezoneGuesser(string $key, TimezoneGuesser $guesser): void
+ {
+ self::getInstance()->addGuesser($key, $guesser);
+ }
+
+ public static function addTimezoneFinder(string $key, TimezoneFinder $finder): void
+ {
+ self::getInstance()->addFinder($key, $finder);
+ }
+
+ /**
+ * @param string $tzid
+ * @param false $failIfUncertain
+ *
+ * @return DateTimeZone
+ */
+ public static function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain = false)
+ {
+ return self::getInstance()->findTimeZone($tzid, $vcalendar, $failIfUncertain);
+ }
+
+ public static function clean(): void
+ {
+ self::$instance = null;
+ }
+
+ // Keeping things for backwards compatibility
+ /**
+ * @var array|null
+ *
+ * @deprecated
+ */
public static $map = null;
/**
* List of microsoft exchange timezone ids.
*
* Source: http://msdn.microsoft.com/en-us/library/aa563018(loband).aspx
+ *
+ * @deprecated
*/
public static $microsoftExchangeMap = [
0 => 'UTC',
31 => 'Africa/Casablanca',
-
// Insanely, id #2 is used for both Europe/Lisbon, and Europe/Sarajevo.
// I'm not even kidding.. We handle this special case in the
// getTimeZone method.
@@ -104,134 +233,10 @@ class TimeZoneUtil
];
/**
- * This method will try to find out the correct timezone for an iCalendar
- * date-time value.
- *
- * You must pass the contents of the TZID parameter, as well as the full
- * calendar.
- *
- * If the lookup fails, this method will return the default PHP timezone
- * (as configured using date_default_timezone_set, or the date.timezone ini
- * setting).
- *
- * Alternatively, if $failIfUncertain is set to true, it will throw an
- * exception if we cannot accurately determine the timezone.
- *
- * @param string $tzid
- * @param Sabre\VObject\Component $vcalendar
- *
- * @return \DateTimeZone
- */
- public static function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain = false)
- {
- // First we will just see if the tzid is a support timezone identifier.
- //
- // The only exception is if the timezone starts with (. This is to
- // handle cases where certain microsoft products generate timezone
- // identifiers that for instance look like:
- //
- // (GMT+01.00) Sarajevo/Warsaw/Zagreb
- //
- // Since PHP 5.5.10, the first bit will be used as the timezone and
- // this method will return just GMT+01:00. This is wrong, because it
- // doesn't take DST into account.
- if ('(' !== $tzid[0]) {
- // PHP has a bug that logs PHP warnings even it shouldn't:
- // https://bugs.php.net/bug.php?id=67881
- //
- // That's why we're checking if we'll be able to successfully instantiate
- // \DateTimeZone() before doing so. Otherwise we could simply instantiate
- // and catch the exception.
- $tzIdentifiers = \DateTimeZone::listIdentifiers();
-
- try {
- if (
- (in_array($tzid, $tzIdentifiers)) ||
- (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) ||
- (in_array($tzid, self::getIdentifiersBC()))
- ) {
- return new \DateTimeZone($tzid);
- }
- } catch (\Exception $e) {
- }
- }
-
- self::loadTzMaps();
-
- // Next, we check if the tzid is somewhere in our tzid map.
- if (isset(self::$map[$tzid])) {
- return new \DateTimeZone(self::$map[$tzid]);
- }
-
- // Some Microsoft products prefix the offset first, so let's strip that off
- // and see if it is our tzid map. We don't want to check for this first just
- // in case there are overrides in our tzid map.
- if (preg_match('/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/', $tzid, $matches)) {
- $tzidAlternate = $matches[3];
- if (isset(self::$map[$tzidAlternate])) {
- return new \DateTimeZone(self::$map[$tzidAlternate]);
- }
- }
-
- // Maybe the author was hyper-lazy and just included an offset. We
- // support it, but we aren't happy about it.
- if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) {
- // Note that the path in the source will never be taken from PHP 5.5.10
- // onwards. PHP 5.5.10 supports the "GMT+0100" style of format, so it
- // already gets returned early in this function. Once we drop support
- // for versions under PHP 5.5.10, this bit can be taken out of the
- // source.
- // @codeCoverageIgnoreStart
- return new \DateTimeZone('Etc/GMT'.$matches[1].ltrim(substr($matches[2], 0, 2), '0'));
- // @codeCoverageIgnoreEnd
- }
-
- if ($vcalendar) {
- // If that didn't work, we will scan VTIMEZONE objects
- foreach ($vcalendar->select('VTIMEZONE') as $vtimezone) {
- if ((string) $vtimezone->TZID === $tzid) {
- // Some clients add 'X-LIC-LOCATION' with the olson name.
- if (isset($vtimezone->{'X-LIC-LOCATION'})) {
- $lic = (string) $vtimezone->{'X-LIC-LOCATION'};
-
- // Libical generators may specify strings like
- // "SystemV/EST5EDT". For those we must remove the
- // SystemV part.
- if ('SystemV/' === substr($lic, 0, 8)) {
- $lic = substr($lic, 8);
- }
-
- return self::getTimeZone($lic, null, $failIfUncertain);
- }
- // Microsoft may add a magic number, which we also have an
- // answer for.
- if (isset($vtimezone->{'X-MICROSOFT-CDO-TZID'})) {
- $cdoId = (int) $vtimezone->{'X-MICROSOFT-CDO-TZID'}->getValue();
-
- // 2 can mean both Europe/Lisbon and Europe/Sarajevo.
- if (2 === $cdoId && false !== strpos((string) $vtimezone->TZID, 'Sarajevo')) {
- return new \DateTimeZone('Europe/Sarajevo');
- }
-
- if (isset(self::$microsoftExchangeMap[$cdoId])) {
- return new \DateTimeZone(self::$microsoftExchangeMap[$cdoId]);
- }
- }
- }
- }
- }
-
- if ($failIfUncertain) {
- throw new \InvalidArgumentException('We were unable to determine the correct PHP timezone for tzid: '.$tzid);
- }
-
- // If we got all the way here, we default to UTC.
- return new \DateTimeZone(date_default_timezone_get());
- }
-
- /**
* This method will load in all the tz mapping information, if it's not yet
* done.
+ *
+ * @deprecated
*/
public static function loadTzMaps()
{
@@ -257,6 +262,8 @@ class TimeZoneUtil
* (See timezonedata/php-bc.php and timezonedata php-workaround.php)
*
* @return array
+ *
+ * @deprecated
*/
public static function getIdentifiersBC()
{
diff --git a/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php b/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php
new file mode 100644
index 00000000..990ac969
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+
+/**
+ * Some clients add 'X-LIC-LOCATION' with the olson name.
+ */
+class FindFromOffset implements TimezoneFinder
+{
+ public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
+ {
+ // Maybe the author was hyper-lazy and just included an offset. We
+ // support it, but we aren't happy about it.
+ if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) {
+ // Note that the path in the source will never be taken from PHP 5.5.10
+ // onwards. PHP 5.5.10 supports the "GMT+0100" style of format, so it
+ // already gets returned early in this function. Once we drop support
+ // for versions under PHP 5.5.10, this bit can be taken out of the
+ // source.
+ // @codeCoverageIgnoreStart
+ return new DateTimeZone('Etc/GMT'.$matches[1].ltrim(substr($matches[2], 0, 2), '0'));
+ // @codeCoverageIgnoreEnd
+ }
+
+ return null;
+ }
+}
diff --git a/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneIdentifier.php b/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneIdentifier.php
new file mode 100644
index 00000000..d8c6d5d3
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneIdentifier.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+use Exception;
+
+/**
+ * Some clients add 'X-LIC-LOCATION' with the olson name.
+ */
+class FindFromTimezoneIdentifier implements TimezoneFinder
+{
+ public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
+ {
+ // First we will just see if the tzid is a support timezone identifier.
+ //
+ // The only exception is if the timezone starts with (. This is to
+ // handle cases where certain microsoft products generate timezone
+ // identifiers that for instance look like:
+ //
+ // (GMT+01.00) Sarajevo/Warsaw/Zagreb
+ //
+ // Since PHP 5.5.10, the first bit will be used as the timezone and
+ // this method will return just GMT+01:00. This is wrong, because it
+ // doesn't take DST into account
+ if (!isset($tzid[0])) {
+ return null;
+ }
+ if ('(' === $tzid[0]) {
+ return null;
+ }
+ // PHP has a bug that logs PHP warnings even it shouldn't:
+ // https://bugs.php.net/bug.php?id=67881
+ //
+ // That's why we're checking if we'll be able to successfully instantiate
+ // \DateTimeZone() before doing so. Otherwise we could simply instantiate
+ // and catch the exception.
+ $tzIdentifiers = DateTimeZone::listIdentifiers();
+
+ try {
+ if (
+ (in_array($tzid, $tzIdentifiers)) ||
+ (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) ||
+ (in_array($tzid, $this->getIdentifiersBC()))
+ ) {
+ return new DateTimeZone($tzid);
+ }
+ } catch (Exception $e) {
+ }
+
+ return null;
+ }
+
+ /**
+ * This method returns an array of timezone identifiers, that are supported
+ * by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().
+ *
+ * We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because:
+ * - It's not supported by some PHP versions as well as HHVM.
+ * - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions.
+ * (See timezonedata/php-bc.php and timezonedata php-workaround.php)
+ *
+ * @return array
+ */
+ private function getIdentifiersBC()
+ {
+ return include __DIR__.'/../timezonedata/php-bc.php';
+ }
+}
diff --git a/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php b/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php
new file mode 100644
index 00000000..b52ba6a1
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+
+/**
+ * Some clients add 'X-LIC-LOCATION' with the olson name.
+ */
+class FindFromTimezoneMap implements TimezoneFinder
+{
+ private $map = [];
+
+ private $patterns = [
+ '/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/',
+ '/^\((UTC|GMT)(\+|\-)[\d]{2}\.[\d]{2}\) (.*)/',
+ ];
+
+ public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
+ {
+ // Next, we check if the tzid is somewhere in our tzid map.
+ if ($this->hasTzInMap($tzid)) {
+ return new DateTimeZone($this->getTzFromMap($tzid));
+ }
+
+ // Some Microsoft products prefix the offset first, so let's strip that off
+ // and see if it is our tzid map. We don't want to check for this first just
+ // in case there are overrides in our tzid map.
+ foreach ($this->patterns as $pattern) {
+ if (!preg_match($pattern, $tzid, $matches)) {
+ continue;
+ }
+ $tzidAlternate = $matches[3];
+ if ($this->hasTzInMap($tzidAlternate)) {
+ return new DateTimeZone($this->getTzFromMap($tzidAlternate));
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This method returns an array of timezone identifiers, that are supported
+ * by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().
+ *
+ * We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because:
+ * - It's not supported by some PHP versions as well as HHVM.
+ * - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions.
+ * (See timezonedata/php-bc.php and timezonedata php-workaround.php)
+ *
+ * @return array
+ */
+ private function getTzMaps()
+ {
+ if ([] === $this->map) {
+ $this->map = array_merge(
+ include __DIR__.'/../timezonedata/windowszones.php',
+ include __DIR__.'/../timezonedata/lotuszones.php',
+ include __DIR__.'/../timezonedata/exchangezones.php',
+ include __DIR__.'/../timezonedata/php-workaround.php'
+ );
+ }
+
+ return $this->map;
+ }
+
+ private function getTzFromMap(string $tzid): string
+ {
+ return $this->getTzMaps()[$tzid];
+ }
+
+ private function hasTzInMap(string $tzid): bool
+ {
+ return isset($this->getTzMaps()[$tzid]);
+ }
+}
diff --git a/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php b/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php
new file mode 100644
index 00000000..f340a396
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+use Sabre\VObject\Component\VTimeZone;
+use Sabre\VObject\TimeZoneUtil;
+
+/**
+ * Some clients add 'X-LIC-LOCATION' with the olson name.
+ */
+class GuessFromLicEntry implements TimezoneGuesser
+{
+ public function guess(VTimeZone $vtimezone, bool $failIfUncertain = false): ?DateTimeZone
+ {
+ if (!isset($vtimezone->{'X-LIC-LOCATION'})) {
+ return null;
+ }
+
+ $lic = (string) $vtimezone->{'X-LIC-LOCATION'};
+
+ // Libical generators may specify strings like
+ // "SystemV/EST5EDT". For those we must remove the
+ // SystemV part.
+ if ('SystemV/' === substr($lic, 0, 8)) {
+ $lic = substr($lic, 8);
+ }
+
+ return TimeZoneUtil::getTimeZone($lic, null, $failIfUncertain);
+ }
+}
diff --git a/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php b/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php
new file mode 100644
index 00000000..b11ce183
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php
@@ -0,0 +1,119 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+use Sabre\VObject\Component\VTimeZone;
+
+class GuessFromMsTzId implements TimezoneGuesser
+{
+ /**
+ * List of microsoft exchange timezone ids.
+ *
+ * Source: http://msdn.microsoft.com/en-us/library/aa563018(loband).aspx
+ */
+ public static $microsoftExchangeMap = [
+ 0 => 'UTC',
+ 31 => 'Africa/Casablanca',
+
+ // Insanely, id #2 is used for both Europe/Lisbon, and Europe/Sarajevo.
+ // I'm not even kidding.. We handle this special case in the
+ // getTimeZone method.
+ 2 => 'Europe/Lisbon',
+ 1 => 'Europe/London',
+ 4 => 'Europe/Berlin',
+ 6 => 'Europe/Prague',
+ 3 => 'Europe/Paris',
+ 69 => 'Africa/Luanda', // This was a best guess
+ 7 => 'Europe/Athens',
+ 5 => 'Europe/Bucharest',
+ 49 => 'Africa/Cairo',
+ 50 => 'Africa/Harare',
+ 59 => 'Europe/Helsinki',
+ 27 => 'Asia/Jerusalem',
+ 26 => 'Asia/Baghdad',
+ 74 => 'Asia/Kuwait',
+ 51 => 'Europe/Moscow',
+ 56 => 'Africa/Nairobi',
+ 25 => 'Asia/Tehran',
+ 24 => 'Asia/Muscat', // Best guess
+ 54 => 'Asia/Baku',
+ 48 => 'Asia/Kabul',
+ 58 => 'Asia/Yekaterinburg',
+ 47 => 'Asia/Karachi',
+ 23 => 'Asia/Calcutta',
+ 62 => 'Asia/Kathmandu',
+ 46 => 'Asia/Almaty',
+ 71 => 'Asia/Dhaka',
+ 66 => 'Asia/Colombo',
+ 61 => 'Asia/Rangoon',
+ 22 => 'Asia/Bangkok',
+ 64 => 'Asia/Krasnoyarsk',
+ 45 => 'Asia/Shanghai',
+ 63 => 'Asia/Irkutsk',
+ 21 => 'Asia/Singapore',
+ 73 => 'Australia/Perth',
+ 75 => 'Asia/Taipei',
+ 20 => 'Asia/Tokyo',
+ 72 => 'Asia/Seoul',
+ 70 => 'Asia/Yakutsk',
+ 19 => 'Australia/Adelaide',
+ 44 => 'Australia/Darwin',
+ 18 => 'Australia/Brisbane',
+ 76 => 'Australia/Sydney',
+ 43 => 'Pacific/Guam',
+ 42 => 'Australia/Hobart',
+ 68 => 'Asia/Vladivostok',
+ 41 => 'Asia/Magadan',
+ 17 => 'Pacific/Auckland',
+ 40 => 'Pacific/Fiji',
+ 67 => 'Pacific/Tongatapu',
+ 29 => 'Atlantic/Azores',
+ 53 => 'Atlantic/Cape_Verde',
+ 30 => 'America/Noronha',
+ 8 => 'America/Sao_Paulo', // Best guess
+ 32 => 'America/Argentina/Buenos_Aires',
+ 60 => 'America/Godthab',
+ 28 => 'America/St_Johns',
+ 9 => 'America/Halifax',
+ 33 => 'America/Caracas',
+ 65 => 'America/Santiago',
+ 35 => 'America/Bogota',
+ 10 => 'America/New_York',
+ 34 => 'America/Indiana/Indianapolis',
+ 55 => 'America/Guatemala',
+ 11 => 'America/Chicago',
+ 37 => 'America/Mexico_City',
+ 36 => 'America/Edmonton',
+ 38 => 'America/Phoenix',
+ 12 => 'America/Denver', // Best guess
+ 13 => 'America/Los_Angeles', // Best guess
+ 14 => 'America/Anchorage',
+ 15 => 'Pacific/Honolulu',
+ 16 => 'Pacific/Midway',
+ 39 => 'Pacific/Kwajalein',
+ ];
+
+ public function guess(VTimeZone $vtimezone, bool $throwIfUnsure = false): ?DateTimeZone
+ {
+ // Microsoft may add a magic number, which we also have an
+ // answer for.
+ if (!isset($vtimezone->{'X-MICROSOFT-CDO-TZID'})) {
+ return null;
+ }
+ $cdoId = (int) $vtimezone->{'X-MICROSOFT-CDO-TZID'}->getValue();
+
+ // 2 can mean both Europe/Lisbon and Europe/Sarajevo.
+ if (2 === $cdoId && false !== strpos((string) $vtimezone->TZID, 'Sarajevo')) {
+ return new DateTimeZone('Europe/Sarajevo');
+ }
+
+ if (isset(self::$microsoftExchangeMap[$cdoId])) {
+ return new DateTimeZone(self::$microsoftExchangeMap[$cdoId]);
+ }
+
+ return null;
+ }
+}
diff --git a/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php b/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php
new file mode 100644
index 00000000..5aa880a1
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+
+interface TimezoneFinder
+{
+ public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone;
+}
diff --git a/sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php b/sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php
new file mode 100644
index 00000000..5e193bb5
--- /dev/null
+++ b/sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace Sabre\VObject\TimezoneGuesser;
+
+use DateTimeZone;
+use Sabre\VObject\Component\VTimeZone;
+
+interface TimezoneGuesser
+{
+ public function guess(VTimeZone $vtimezone, bool $failIfUncertain = false): ?DateTimeZone;
+}
diff --git a/sabre/vobject/lib/Version.php b/sabre/vobject/lib/Version.php
index 63452400..e8e73360 100644
--- a/sabre/vobject/lib/Version.php
+++ b/sabre/vobject/lib/Version.php
@@ -14,5 +14,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '4.3.5';
+ const VERSION = '4.4.0';
}
diff --git a/sabre/xml/.gitignore b/sabre/xml/.gitignore
deleted file mode 100644
index 9715e902..00000000
--- a/sabre/xml/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Composer
-vendor
-composer.lock
-
-# Tests
-tests/cov
-tests/.phpunit.result.cache
-.php_cs.cache
diff --git a/sabre/xml/CHANGELOG.md b/sabre/xml/CHANGELOG.md
deleted file mode 100644
index cdd21fe5..00000000
--- a/sabre/xml/CHANGELOG.md
+++ /dev/null
@@ -1,287 +0,0 @@
-ChangeLog
-=========
-
-2.2.3 (2020-10-03)
-------------------
-* #191: add changelog and version bump that was missed in 2.2.2
-
-2.2.2 (2020-10-03)
-------------------
-* #190: adjust libxml_disable_entity_loader calls ready for PHP 8.0 (@phil-davis)
-
-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)
-------------------
-
-* #171: Added Support for PHP 7.4, dropped Support for PHP 7.0 (@staabm, @phil-davis)
-* #174: Update testsuite to phpunit8 (@phil-davis)
-* Added phpstan coverage (@phil-davis)
-* #144: Added a new `functionCaller` deserializer function for executing a callable when reading a XML
-element (@vsouz4)
-
-
-2.1.3 (2019-08-14)
-------------------
-
-* #166: Throw exception when empty inputs found
-
-
-2.1.2 (2019-01-09)
-------------------
-
-* #161: Prevent infinite loop on empty xml elements
-
-
-2.1.1 (2018-10-09)
-------------------
-
-* #149: Properly detect xml parse errors in `parseCurrentElement()` edge-cases
-
-
-2.1.0 (2018-02-08)
-------------------
-
-* #112: Added a `mixedContent` deserializer function, which might be useful
- if you're parsing HTML-like documents with elements that contain both text
- and other elements as siblings. (@staabm).
-
-
-2.0.0 (2016-11-15)
-------------------
-
-* Now requires PHP 7.
-* Uses typehints everywhere.
-* Fixed some minor strict typing-related issues.
-* Removed workaround for PHP bug [64230](https://bugs.php.net/bug.php?id=64230).
-
-
-1.5.0 (2016-10-09)
-------------------
-
-* Now requires PHP 5.5.
-* Using `finally` to always roll back the context stack when serializing.
-* #94: Fixed an infinite loop condition when reading some invalid XML
- documents.
-
-
-1.4.2 (2016-05-19)
-------------------
-
-* The `contextStack` in the Reader object is now correctly rolled back in
- error conditions (@staabm).
-* repeatingElements deserializer now still parses if a bare element name
- without clark notation was given.
-* `$elementMap` in the Reader now also supports bare element names.
-* `Service::expect()` can now also work with bare element names.
-
-
-1.4.1 (2016-03-12)
------------------
-
-* Parsing clark-notation is now cached. This can speed up parsing large
- documents with lots of repeating elements a fair bit. (@icewind1991).
-
-
-1.4.0 (2016-02-14)
-------------------
-
-* Any array thrown into the serializer with numeric keys is now simply
- traversed and each individual item is serialized. This fixes an issue
- related to serializing value objects with array children.
-* When serializing value objects, properties that have a null value or an
- empty array are now skipped. We believe this to be the saner default, but
- does constitute a BC break for those depending on this.
-* Serializing array properties in value objects was broken.
-
-
-1.3.0 (2015-12-29)
-------------------
-
-* The `Service` class adds a new `mapValueObject` method which provides basic
- capabilities to map between ValueObjects and XML.
-* #61: You can now specify serializers for specific classes, allowing you
- separate the object you want to serialize from the serializer. This uses the
- `$classMap` property which is defined on both the `Service` and `Writer`.
-* It's now possible to pass an array of possible root elements to
- `Sabre\Xml\Service::expect()`.
-* Moved some parsing logic to `Reader::getDeserializerForElementName()`,
- so people with more advanced use-cases can implement their own logic there.
-* #63: When serializing elements using arrays, the `value` key in the array is
- now optional.
-* #62: Added a `keyValue` deserializer function. This can be used instead of
- the `Element\KeyValue` class and is a lot more flexible. (@staabm)
-* Also added an `enum` deserializer function to replace
- `Element\Elements`.
-* Using an empty string for a namespace prefix now has the same effect as
- `null`.
-
-
-1.2.0 (2015-08-30)
-------------------
-
-* #53: Added `parseGetElements`, a function like `parseInnerTree`, except
- that it always returns an array of elements, or an empty array.
-
-
-1.1.0 (2015-06-29)
-------------------
-
-* #44, #45: Catching broken and invalid XML better and throwing
- `Sabre\Xml\LibXMLException` whenever we encounter errors. (@stefanmajoor,
- @DaanBiesterbos)
-
-
-1.0.0 (2015-05-25)
-------------------
-
-* No functional changes since 0.4.3. Marking it as 1.0.0 as a promise for
- API stability.
-* Using php-cs-fixer for automated CS enforcement.
-
-
-0.4.3 (2015-04-01)
------------------
-
-* Minor tweaks for the public release.
-
-
-0.4.2 (2015-03-20)
-------------------
-
-* Removed `constants.php` again. They messed with PHPUnit and don't really
- provide a great benefit.
-* #41: Correctly handle self-closing xml elements.
-
-
-0.4.1 (2015-03-19)
-------------------
-
-* #40: An element with an empty namespace (xmlns="") is not allowed to have a
- prefix. This is now fixed.
-
-
-0.4.0 (2015-03-18)
-------------------
-
-* Added `Sabre\Xml\Service`. This is intended as a simple way to centrally
- configure xml applications and easily parse/write things from there. #35, #38.
-* Renamed 'baseUri' to 'contextUri' everywhere.
-* #36: Added a few convenience constants to `lib/constants.php`.
-* `Sabre\Xml\Util::parseClarkNotation` is now in the `Sabre\Xml\Service` class.
-
-
-0.3.1 (2015-02-08)
-------------------
-
-* Added `XmlDeserializable` to match `XmlSerializable`.
-
-
-0.3.0 (2015-02-06)
-------------------
-
-* Added `$elementMap` argument to parseInnerTree, for quickly overriding
- parsing rules within an element.
-
-
-0.2.2 (2015-02-05)
-------------------
-
-* Now depends on sabre/uri 1.0.
-
-
-0.2.1 (2014-12-17)
-------------------
-
-* LibXMLException now inherits from ParseException, so it's easy for users to
- catch any exception thrown by the parser.
-
-
-0.2.0 (2014-12-05)
-------------------
-
-* Major BC Break: method names for the Element interface have been renamed
- from `serializeXml` and `deserializeXml` to `xmlSerialize` and
- `xmlDeserialize`. This is so that it matches PHP's `JsonSerializable`
- interface.
-* #25: Added `XmlSerializable` to allow people to write serializers without
- having to implement a deserializer in the same class.
-* #26: Renamed the `Sabre\XML` namespace to `Sabre\Xml`. Due to composer magic
- and the fact that PHP namespace are case-insensitive, this should not affect
- anyone, unless you are doing exact string matches on class names.
-* #23: It's not possible to automatically extract or serialize Xml fragments
- from documents using `Sabre\Xml\Element\XmlFragment`.
-
-
-0.1.0 (2014-11-24)
-------------------
-
-* #16: Added ability to override `elementMap`, `namespaceMap` and `baseUri` for
- a fragment of a document during reading an writing using `pushContext` and
- `popContext`.
-* Removed: `Writer::$context` and `Reader::$context`.
-* #15: Added `Reader::$baseUri` to match `Writer::$baseUri`.
-* #20: Allow callbacks to be used instead of `Element` classes in the `Reader`.
-* #25: Added `readText` to quickly grab all text from a node and advance the
- reader to the next node.
-* #15: Added `Sabre\XML\Element\Uri`.
-
-
-0.0.6 (2014-09-26)
-------------------
-
-* Added: `CData` element.
-* #13: Better support for xml with no namespaces. (@kalmas)
-* Switched to PSR-4 directory structure.
-
-
-0.0.5 (2013-03-27)
-------------------
-
-* Added: baseUri property to the Writer class.
-* Added: The writeElement method can now write complex elements.
-* Added: Throwing exception when invalid objects are written.
-
-
-0.0.4 (2013-03-14)
-------------------
-
-* Fixed: The KeyValue parser was skipping over elements when there was no
- whitespace between them.
-* Fixed: Clearing libxml errors after parsing.
-* Added: Support for CDATA.
-* Added: Context properties.
-
-
-0.0.3 (2013-02-22)
-------------------
-
-* Changed: Reader::parse returns an array with 1 level less depth.
-* Added: A LibXMLException is now thrown if the XMLReader comes across an error.
-* Fixed: Both the Elements and KeyValue parsers had severe issues with
- nesting.
-* Fixed: The reader now detects when the end of the document is hit before it
- should (because we're still parsing an element).
-
-
-0.0.2 (2013-02-17)
-------------------
-
-* Added: Elements parser.
-* Added: KeyValue parser.
-* Change: Reader::parseSubTree is now named parseInnerTree, and returns either
- a string (in case of a text-node), or an array (in case there were child
- elements).
-* Added: Reader::parseCurrentElement is now public.
-
-
-0.0.1 (2013-02-07)
-------------------
-
-* First alpha release
-
-Project started: 2012-11-13. First experiments in June 2009.
diff --git a/sabre/xml/composer.json b/sabre/xml/composer.json
index b54cf195..4524cf59 100644
--- a/sabre/xml/composer.json
+++ b/sabre/xml/composer.json
@@ -44,7 +44,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/sabre/xml/lib/ContextStackTrait.php b/sabre/xml/lib/ContextStackTrait.php
index 75708884..4e15bd41 100644
--- a/sabre/xml/lib/ContextStackTrait.php
+++ b/sabre/xml/lib/ContextStackTrait.php
@@ -10,7 +10,7 @@ namespace Sabre\Xml;
* The Context maintains information about a document during either reading or
* writing.
*
- * During this process, it may be neccesary to override this context
+ * During this process, it may be necessary to override this context
* information.
*
* This trait allows easy access to the context, and allows the end-user to
diff --git a/sabre/xml/lib/Element/Base.php b/sabre/xml/lib/Element/Base.php
index a1ce7ea5..8a93191b 100644
--- a/sabre/xml/lib/Element/Base.php
+++ b/sabre/xml/lib/Element/Base.php
@@ -35,7 +35,7 @@ class Base implements Xml\Element
}
/**
- * The xmlSerialize metod is called during xml writing.
+ * The xmlSerialize method is called during xml writing.
*
* Use the $writer argument to write its own xml serialization.
*
@@ -58,7 +58,7 @@ class Base implements Xml\Element
/**
* The deserialize method is called during xml parsing.
*
- * This method is called statictly, this is because in theory this method
+ * This method is called statically, this is because in theory this method
* may be used as a type of constructor, or factory method.
*
* Often you want to return an instance of the current class, but you are
diff --git a/sabre/xml/lib/Element/Cdata.php b/sabre/xml/lib/Element/Cdata.php
index 61d3213f..1367343f 100644
--- a/sabre/xml/lib/Element/Cdata.php
+++ b/sabre/xml/lib/Element/Cdata.php
@@ -12,7 +12,7 @@ use Sabre\Xml;
* This element allows you to easily inject CDATA.
*
* Note that we strongly recommend avoiding CDATA nodes, unless you definitely
- * know what you're doing, or you're working with unchangable systems that
+ * know what you're doing, or you're working with unchangeable systems that
* require CDATA.
*
* @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/).
@@ -37,12 +37,12 @@ class Cdata implements Xml\XmlSerializable
}
/**
- * The xmlSerialize metod is called during xml writing.
+ * The xmlSerialize method is called during xml writing.
*
* Use the $writer argument to write its own xml serialization.
*
* An important note: do _not_ create a parent element. Any element
- * implementing XmlSerializble should only ever write what's considered
+ * implementing XmlSerializable should only ever write what's considered
* its 'inner xml'.
*
* The parent of the current element is responsible for writing a
diff --git a/sabre/xml/lib/Element/Elements.php b/sabre/xml/lib/Element/Elements.php
index e5117983..fecce4c7 100644
--- a/sabre/xml/lib/Element/Elements.php
+++ b/sabre/xml/lib/Element/Elements.php
@@ -53,12 +53,12 @@ class Elements implements Xml\Element
}
/**
- * The xmlSerialize metod is called during xml writing.
+ * The xmlSerialize method is called during xml writing.
*
* Use the $writer argument to write its own xml serialization.
*
* An important note: do _not_ create a parent element. Any element
- * implementing XmlSerializble should only ever write what's considered
+ * implementing XmlSerializable should only ever write what's considered
* its 'inner xml'.
*
* The parent of the current element is responsible for writing a
@@ -76,7 +76,7 @@ class Elements implements Xml\Element
/**
* The deserialize method is called during xml parsing.
*
- * This method is called statictly, this is because in theory this method
+ * This method is called statically, this is because in theory this method
* may be used as a type of constructor, or factory method.
*
* Often you want to return an instance of the current class, but you are
diff --git a/sabre/xml/lib/Element/KeyValue.php b/sabre/xml/lib/Element/KeyValue.php
index dacee000..17448880 100644
--- a/sabre/xml/lib/Element/KeyValue.php
+++ b/sabre/xml/lib/Element/KeyValue.php
@@ -53,12 +53,12 @@ class KeyValue implements Xml\Element
}
/**
- * The xmlSerialize metod is called during xml writing.
+ * The xmlSerialize method is called during xml writing.
*
* Use the $writer argument to write its own xml serialization.
*
* An important note: do _not_ create a parent element. Any element
- * implementing XmlSerializble should only ever write what's considered
+ * implementing XmlSerializable should only ever write what's considered
* its 'inner xml'.
*
* The parent of the current element is responsible for writing a
@@ -76,7 +76,7 @@ class KeyValue implements Xml\Element
/**
* The deserialize method is called during xml parsing.
*
- * This method is called staticly, this is because in theory this method
+ * This method is called statically, this is because in theory this method
* may be used as a type of constructor, or factory method.
*
* Often you want to return an instance of the current class, but you are
diff --git a/sabre/xml/lib/Element/Uri.php b/sabre/xml/lib/Element/Uri.php
index 2644fbcd..336212a5 100644
--- a/sabre/xml/lib/Element/Uri.php
+++ b/sabre/xml/lib/Element/Uri.php
@@ -42,12 +42,12 @@ class Uri implements Xml\Element
}
/**
- * The xmlSerialize metod is called during xml writing.
+ * The xmlSerialize method is called during xml writing.
*
* Use the $writer argument to write its own xml serialization.
*
* An important note: do _not_ create a parent element. Any element
- * implementing XmlSerializble should only ever write what's considered
+ * implementing XmlSerializable should only ever write what's considered
* its 'inner xml'.
*
* The parent of the current element is responsible for writing a
diff --git a/sabre/xml/lib/Element/XmlFragment.php b/sabre/xml/lib/Element/XmlFragment.php
index 12109e5c..bf110eae 100644
--- a/sabre/xml/lib/Element/XmlFragment.php
+++ b/sabre/xml/lib/Element/XmlFragment.php
@@ -48,12 +48,12 @@ class XmlFragment implements Element
}
/**
- * The xmlSerialize metod is called during xml writing.
+ * The xmlSerialize method is called during xml writing.
*
* Use the $writer argument to write its own xml serialization.
*
* An important note: do _not_ create a parent element. Any element
- * implementing XmlSerializble should only ever write what's considered
+ * implementing XmlSerializable should only ever write what's considered
* its 'inner xml'.
*
* The parent of the current element is responsible for writing a
@@ -121,7 +121,7 @@ XML;
/**
* The deserialize method is called during xml parsing.
*
- * This method is called statictly, this is because in theory this method
+ * This method is called statically, this is because in theory this method
* may be used as a type of constructor, or factory method.
*
* Often you want to return an instance of the current class, but you are
diff --git a/sabre/xml/lib/LibXMLException.php b/sabre/xml/lib/LibXMLException.php
index ae136f57..fb074f97 100644
--- a/sabre/xml/lib/LibXMLException.php
+++ b/sabre/xml/lib/LibXMLException.php
@@ -8,7 +8,7 @@ use LibXMLError;
use Throwable;
/**
- * This exception is thrown when the Readers runs into a parsing error.
+ * This exception is thrown when the Reader runs into a parsing error.
*
* This exception effectively wraps 1 or more LibXMLError objects.
*
diff --git a/sabre/xml/lib/ParseException.php b/sabre/xml/lib/ParseException.php
index 5980b5fc..e237b873 100644
--- a/sabre/xml/lib/ParseException.php
+++ b/sabre/xml/lib/ParseException.php
@@ -4,8 +4,7 @@ declare(strict_types=1);
namespace Sabre\Xml;
-use
- Exception;
+use Exception;
/**
* This is a base exception for any exception related to parsing xml files.
diff --git a/sabre/xml/lib/Reader.php b/sabre/xml/lib/Reader.php
index 1a27af7c..7871a74f 100644
--- a/sabre/xml/lib/Reader.php
+++ b/sabre/xml/lib/Reader.php
@@ -92,11 +92,11 @@ class Reader extends XMLReader
/**
* parseGetElements parses everything in the current sub-tree,
- * and returns a an array of elements.
+ * and returns an array of elements.
*
* Each element has a 'name', 'value' and 'attributes' key.
*
- * If the the element didn't contain sub-elements, an empty array is always
+ * If the element didn't contain sub-elements, an empty array is always
* returned. If there was any text inside the element, it will be
* discarded.
*
@@ -249,7 +249,7 @@ class Reader extends XMLReader
*
* If the attributes are part of the same namespace, they will simply be
* short keys. If they are defined on a different namespace, the attribute
- * name will be retured in clark-notation.
+ * name will be returned in clark-notation.
*/
public function parseAttributes(): array
{
@@ -275,7 +275,7 @@ class Reader extends XMLReader
/**
* Returns the function that should be used to parse the element identified
- * by it's clark-notation name.
+ * by its clark-notation name.
*/
public function getDeserializerForElementName(string $name): callable
{
diff --git a/sabre/xml/lib/Reader.php.rej b/sabre/xml/lib/Reader.php.rej
new file mode 100644
index 00000000..e3e56677
--- /dev/null
+++ b/sabre/xml/lib/Reader.php.rej
@@ -0,0 +1,11 @@
+--- lib/Reader.php
++++ lib/Reader.php
+@@ -56,7 +56,7 @@ public function getClark()
+ public function parse(): array
+ {
+ $previousEntityState = null;
+- $shouldCallLibxmlDisableEntityLoader = (\PHP_VERSION_ID < 80000);
++ $shouldCallLibxmlDisableEntityLoader = (\LIBXML_VERSION < 20900);
+ if ($shouldCallLibxmlDisableEntityLoader) {
+ $previousEntityState = libxml_disable_entity_loader(true);
+ }
diff --git a/sabre/xml/lib/Service.php b/sabre/xml/lib/Service.php
index 596c93cc..a8e34d25 100644
--- a/sabre/xml/lib/Service.php
+++ b/sabre/xml/lib/Service.php
@@ -7,7 +7,7 @@ namespace Sabre\Xml;
/**
* XML parsing and writing service.
*
- * You are encouraged to make a instance of this for your application and
+ * You are encouraged to make an instance of this for your application and
* potentially extend it, as a central API point for dealing with xml and
* configuring the reader and writer.
*
@@ -117,7 +117,7 @@ class Service
$input = (string) stream_get_contents($input);
}
- // If input is empty, then its safe to throw exception
+ // If input is empty, then it's safe to throw an exception
if (empty($input)) {
throw new ParseException('The input element to parse is empty. Do not attempt to parse');
}
@@ -161,7 +161,7 @@ class Service
$input = (string) stream_get_contents($input);
}
- // If input is empty, then its safe to throw exception
+ // If input is empty, then it's safe to throw an exception
if (empty($input)) {
throw new ParseException('The input element to parse is empty. Do not attempt to parse');
}
@@ -217,9 +217,9 @@ class Service
}
/**
- * Map an xml element to a PHP class.
+ * Map an XML element to a PHP class.
*
- * Calling this function will automatically setup the Reader and Writer
+ * Calling this function will automatically set up the Reader and Writer
* classes to turn a specific XML element to a PHP class.
*
* For example, given a class such as :
diff --git a/sabre/xml/lib/Version.php b/sabre/xml/lib/Version.php
index d4e465de..1144bf08 100644
--- a/sabre/xml/lib/Version.php
+++ b/sabre/xml/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '2.2.3';
+ const VERSION = '2.2.5';
}
diff --git a/sabre/xml/lib/XmlSerializable.php b/sabre/xml/lib/XmlSerializable.php
index b22f8d5e..2affc33f 100644
--- a/sabre/xml/lib/XmlSerializable.php
+++ b/sabre/xml/lib/XmlSerializable.php
@@ -20,7 +20,7 @@ interface XmlSerializable
* Use the $writer argument to write its own xml serialization.
*
* An important note: do _not_ create a parent element. Any element
- * implementing XmlSerializble should only ever write what's considered
+ * implementing XmlSerializable should only ever write what's considered
* its 'inner xml'.
*
* The parent of the current element is responsible for writing a