From d989866ed6de1c5bc3ce0eb24f0f962779f6fe16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:13:42 +0000 Subject: [PATCH 1/3] build(deps): bump sabre/dav from 4.7.0 to 4.7.1 Bumps [sabre/dav](https://github.com/sabre-io/dav) from 4.7.0 to 4.7.1. - [Release notes](https://github.com/sabre-io/dav/releases) - [Changelog](https://github.com/sabre-io/dav/blob/master/CHANGELOG.md) - [Commits](https://github.com/sabre-io/dav/compare/4.7.0...4.7.1) --- updated-dependencies: - dependency-name: sabre/dav dependency-version: 4.7.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index ba9ff9453..23f588559 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "psr/http-client": "^1.0.3", "psr/log": "^3.0.2", "punic/punic": "^3.8", - "sabre/dav": "^4.7.0", + "sabre/dav": "^4.7.1", "stecman/symfony-console-completion": "^0.15.0", "symfony/console": "^7.4.15", "symfony/event-dispatcher": "^7.4.15", diff --git a/composer.lock b/composer.lock index b7f2d4bd9..326629318 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": "6bdc7bba417a037a299d4e3c3527bf31", + "content-hash": "f8d40cffa5153f4971898e3faf2b38aa", "packages": [ { "name": "aws/aws-crt-php", @@ -3702,16 +3702,16 @@ }, { "name": "sabre/dav", - "version": "4.7.0", + "version": "4.7.1", "source": { "type": "git", "url": "https://github.com/sabre-io/dav.git", - "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a" + "reference": "f36f002dce082e1d425c4a0dc8c71a6b176c3b07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/dav/zipball/074373bcd689a30bcf5aaa6bbb20a3395964ce7a", - "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a", + "url": "https://api.github.com/repos/sabre-io/dav/zipball/f36f002dce082e1d425c4a0dc8c71a6b176c3b07", + "reference": "f36f002dce082e1d425c4a0dc8c71a6b176c3b07", "shasum": "" }, "require": { @@ -3781,7 +3781,7 @@ "issues": "https://github.com/sabre-io/dav/issues", "source": "https://github.com/fruux/sabre-dav" }, - "time": "2024-10-29T11:46:02+00:00" + "time": "2026-07-07T08:39:09+00:00" }, { "name": "sabre/event", @@ -6582,5 +6582,5 @@ "platform-overrides": { "php": "8.3.0" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From f68a251b818a66a77d8d214f1599371a5a7f1a40 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 7 Aug 2026 17:26:53 +0200 Subject: [PATCH 2/3] chore: drop patch merged in upstream Signed-off-by: Ferdinand Thiessen --- ...nstanceof-INode-instead-of-Node-1595.patch | 26 ------------------- composer.patches.json | 3 --- 2 files changed, 29 deletions(-) delete mode 100644 .patches/check-for-instanceof-INode-instead-of-Node-1595.patch diff --git a/.patches/check-for-instanceof-INode-instead-of-Node-1595.patch b/.patches/check-for-instanceof-INode-instead-of-Node-1595.patch deleted file mode 100644 index 7c5516664..000000000 --- a/.patches/check-for-instanceof-INode-instead-of-Node-1595.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5d7501ddcf23f98da84af06e23a2413f4fc9b03f Mon Sep 17 00:00:00 2001 -From: Carl Schwan -Date: Fri, 12 Sep 2025 00:03:26 +0200 -Subject: [PATCH 1/2] feat: Check for instanceof INode instead of Node (#1595) - -Signed-off-by: Carl Schwan ---- - lib/DAV/Tree.php | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/DAV/Tree.php b/lib/DAV/Tree.php -index 1483e1bc..f8a996b5 100644 ---- a/lib/DAV/Tree.php -+++ b/lib/DAV/Tree.php -@@ -84,7 +84,7 @@ class Tree implements INodeByPath - - if ($node instanceof INodeByPath) { - $targetNode = $node->getNodeForPath(implode('/', $parts)); -- if ($targetNode instanceof Node) { -+ if ($targetNode instanceof INode) { - $node = $targetNode; - break; - } --- -2.52.0 - diff --git a/composer.patches.json b/composer.patches.json index 366d01a7d..a9fa2cfea 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -4,9 +4,6 @@ "Break frame parsing on invalid frame": ".patches/mp3info-break-frame-parsing.patch", "fix incorrect lookup for mpeg header": ".patches/mp3info-fix-incorrect-lookup-for-mpeg-header.patch" }, - "sabre/dav": { - "Check for instanceof INode instead of Node": ".patches/check-for-instanceof-INode-instead-of-Node-1595.patch" - }, "sabre/vobject": { "fix use RDATE in time range check and use all instances": ".patches/sabre-vobject-rdate.patch", "fix send participation reply on fresh event": ".patches/sabre-vobject-iTipBroker-replies.patch" From 4ea34695e7b317bd8679a83ab07c79f52884442e Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Fri, 7 Aug 2026 13:43:18 +0000 Subject: [PATCH 3/3] chore(autoloader): Dump autoloader Signed-off-by: nextcloud-command --- composer/autoload_classmap.php | 41 +++++++++++++ composer/autoload_static.php | 41 +++++++++++++ composer/include_paths.php | 4 +- composer/installed.json | 17 ++---- composer/installed.php | 6 +- sabre/dav/PATCHES.txt | 7 --- sabre/dav/lib/CalDAV/Backend/PDO.php | 60 ++++++++++++------- sabre/dav/lib/CalDAV/Notifications/Plugin.php | 2 +- sabre/dav/lib/CalDAV/Plugin.php | 24 ++++---- sabre/dav/lib/CalDAV/Schedule/Plugin.php | 4 +- sabre/dav/lib/CalDAV/SharingPlugin.php | 4 +- sabre/dav/lib/CalDAV/Subscriptions/Plugin.php | 4 +- .../Xml/Request/CalendarMultiGetReport.php | 4 +- .../Xml/Request/CalendarQueryReport.php | 12 ++-- .../dav/lib/CalDAV/Xml/Request/MkCalendar.php | 4 +- sabre/dav/lib/CalDAV/Xml/Request/Share.php | 4 +- sabre/dav/lib/CardDAV/Backend/PDO.php | 41 ++++++------- sabre/dav/lib/CardDAV/Plugin.php | 10 ++-- .../Xml/Request/AddressBookMultiGetReport.php | 4 +- .../Xml/Request/AddressBookQueryReport.php | 8 +-- sabre/dav/lib/DAV/Browser/Plugin.php | 4 +- sabre/dav/lib/DAV/CorePlugin.php | 13 ++-- sabre/dav/lib/DAV/FSExt/Directory.php | 4 -- sabre/dav/lib/DAV/FSExt/File.php | 4 +- sabre/dav/lib/DAV/ICopyTarget.php | 5 +- sabre/dav/lib/DAV/Locks/Plugin.php | 3 +- sabre/dav/lib/DAV/Server.php | 28 +++++++-- sabre/dav/lib/DAV/Sharing/Plugin.php | 2 +- sabre/dav/lib/DAV/Sync/Plugin.php | 2 +- sabre/dav/lib/DAV/Tree.php | 37 ++++++++---- sabre/dav/lib/DAV/Version.php | 2 +- sabre/dav/lib/DAV/Xml/Element/Prop.php | 2 +- sabre/dav/lib/DAV/Xml/Element/Response.php | 2 +- sabre/dav/lib/DAV/Xml/Element/Sharee.php | 2 +- sabre/dav/lib/DAV/Xml/Request/Lock.php | 2 +- sabre/dav/lib/DAV/Xml/Request/MkCol.php | 6 +- sabre/dav/lib/DAV/Xml/Request/PropFind.php | 2 +- sabre/dav/lib/DAV/Xml/Request/PropPatch.php | 6 +- .../dav/lib/DAV/Xml/Request/ShareResource.php | 4 +- .../DAV/Xml/Request/SyncCollectionReport.php | 2 +- .../dav/lib/DAV/Xml/Response/MultiStatus.php | 2 +- sabre/dav/lib/DAV/Xml/Service.php | 12 ++-- sabre/dav/lib/DAVACL/Plugin.php | 16 ++--- sabre/dav/lib/DAVACL/Xml/Property/Acl.php | 6 +- .../Xml/Property/CurrentUserPrivilegeSet.php | 2 +- .../Request/PrincipalPropertySearchReport.php | 4 +- 46 files changed, 299 insertions(+), 176 deletions(-) delete mode 100644 sabre/dav/PATCHES.txt diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 2d0b3124c..007302708 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -1622,6 +1622,15 @@ 'Pimple\\Psr11\\ServiceLocator' => $vendorDir . '/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php', 'Pimple\\ServiceIterator' => $vendorDir . '/pimple/pimple/src/Pimple/ServiceIterator.php', 'Pimple\\ServiceProviderInterface' => $vendorDir . '/pimple/pimple/src/Pimple/ServiceProviderInterface.php', + 'Pimple\\Tests\\Fixtures\\Invokable' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php', + 'Pimple\\Tests\\Fixtures\\NonInvokable' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php', + 'Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php', + 'Pimple\\Tests\\Fixtures\\Service' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php', + 'Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php', + 'Pimple\\Tests\\PimpleTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/PimpleTest.php', + 'Pimple\\Tests\\Psr11\\ContainerTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php', + 'Pimple\\Tests\\Psr11\\ServiceLocatorTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php', + 'Pimple\\Tests\\ServiceIteratorTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php', 'Predis\\Autoloader' => $vendorDir . '/predis/predis/src/Autoloader.php', 'Predis\\Client' => $vendorDir . '/predis/predis/src/Client.php', 'Predis\\ClientConfiguration' => $vendorDir . '/predis/predis/src/ClientConfiguration.php', @@ -3194,6 +3203,13 @@ 'Symfony\\Component\\DomCrawler\\FormFieldRegistry' => $vendorDir . '/symfony/dom-crawler/FormFieldRegistry.php', 'Symfony\\Component\\DomCrawler\\Image' => $vendorDir . '/symfony/dom-crawler/Image.php', 'Symfony\\Component\\DomCrawler\\Link' => $vendorDir . '/symfony/dom-crawler/Link.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerAnySelectorTextContains' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerAnySelectorTextContains.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerAnySelectorTextSame' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerAnySelectorTextSame.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorAttributeValueSame' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorCount' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorCount.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorExists' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorExists.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorTextContains' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextContains.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorTextSame' => $vendorDir . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextSame.php', 'Symfony\\Component\\DomCrawler\\UriResolver' => $vendorDir . '/symfony/dom-crawler/UriResolver.php', 'Symfony\\Component\\EventDispatcher\\Attribute\\AsEventListener' => $vendorDir . '/symfony/event-dispatcher/Attribute/AsEventListener.php', 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', @@ -3315,6 +3331,17 @@ 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', 'Symfony\\Component\\HttpFoundation\\StreamedJsonResponse' => $vendorDir . '/symfony/http-foundation/StreamedJsonResponse.php', 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseFormatSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderLocationSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHeaderLocationSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsUnprocessable' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', 'Symfony\\Component\\HttpFoundation\\UriSigner' => $vendorDir . '/symfony/http-foundation/UriSigner.php', 'Symfony\\Component\\HttpFoundation\\UrlHelper' => $vendorDir . '/symfony/http-foundation/UrlHelper.php', 'Symfony\\Component\\Mailer\\Command\\MailerTestCommand' => $vendorDir . '/symfony/mailer/Command/MailerTestCommand.php', @@ -3350,6 +3377,11 @@ 'Symfony\\Component\\Mailer\\Messenger\\MessageHandler' => $vendorDir . '/symfony/mailer/Messenger/MessageHandler.php', 'Symfony\\Component\\Mailer\\Messenger\\SendEmailMessage' => $vendorDir . '/symfony/mailer/Messenger/SendEmailMessage.php', 'Symfony\\Component\\Mailer\\SentMessage' => $vendorDir . '/symfony/mailer/SentMessage.php', + 'Symfony\\Component\\Mailer\\Test\\AbstractTransportFactoryTestCase' => $vendorDir . '/symfony/mailer/Test/AbstractTransportFactoryTestCase.php', + 'Symfony\\Component\\Mailer\\Test\\Constraint\\EmailCount' => $vendorDir . '/symfony/mailer/Test/Constraint/EmailCount.php', + 'Symfony\\Component\\Mailer\\Test\\Constraint\\EmailIsQueued' => $vendorDir . '/symfony/mailer/Test/Constraint/EmailIsQueued.php', + 'Symfony\\Component\\Mailer\\Test\\IncompleteDsnTestTrait' => $vendorDir . '/symfony/mailer/Test/IncompleteDsnTestTrait.php', + 'Symfony\\Component\\Mailer\\Test\\TransportFactoryTestCase' => $vendorDir . '/symfony/mailer/Test/TransportFactoryTestCase.php', 'Symfony\\Component\\Mailer\\Transport' => $vendorDir . '/symfony/mailer/Transport.php', 'Symfony\\Component\\Mailer\\Transport\\AbstractApiTransport' => $vendorDir . '/symfony/mailer/Transport/AbstractApiTransport.php', 'Symfony\\Component\\Mailer\\Transport\\AbstractHttpTransport' => $vendorDir . '/symfony/mailer/Transport/AbstractHttpTransport.php', @@ -3440,6 +3472,13 @@ 'Symfony\\Component\\Mime\\Part\\SMimePart' => $vendorDir . '/symfony/mime/Part/SMimePart.php', 'Symfony\\Component\\Mime\\Part\\TextPart' => $vendorDir . '/symfony/mime/Part/TextPart.php', 'Symfony\\Component\\Mime\\RawMessage' => $vendorDir . '/symfony/mime/RawMessage.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailAddressContains' => $vendorDir . '/symfony/mime/Test/Constraint/EmailAddressContains.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailAttachmentCount' => $vendorDir . '/symfony/mime/Test/Constraint/EmailAttachmentCount.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailHasHeader' => $vendorDir . '/symfony/mime/Test/Constraint/EmailHasHeader.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailHeaderSame' => $vendorDir . '/symfony/mime/Test/Constraint/EmailHeaderSame.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailHtmlBodyContains' => $vendorDir . '/symfony/mime/Test/Constraint/EmailHtmlBodyContains.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailSubjectContains' => $vendorDir . '/symfony/mime/Test/Constraint/EmailSubjectContains.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailTextBodyContains' => $vendorDir . '/symfony/mime/Test/Constraint/EmailTextBodyContains.php', 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Exception/ExceptionInterface.php', 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/process/Exception/InvalidArgumentException.php', 'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php', @@ -3635,6 +3674,8 @@ 'Symfony\\Component\\Translation\\PseudoLocalizationTranslator' => $vendorDir . '/symfony/translation/PseudoLocalizationTranslator.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReader' => $vendorDir . '/symfony/translation/Reader/TranslationReader.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' => $vendorDir . '/symfony/translation/Reader/TranslationReaderInterface.php', + 'Symfony\\Component\\Translation\\Test\\ProviderFactoryTestCase' => $vendorDir . '/symfony/translation/Test/ProviderFactoryTestCase.php', + 'Symfony\\Component\\Translation\\Test\\ProviderTestCase' => $vendorDir . '/symfony/translation/Test/ProviderTestCase.php', 'Symfony\\Component\\Translation\\TranslatableMessage' => $vendorDir . '/symfony/translation/TranslatableMessage.php', 'Symfony\\Component\\Translation\\Translator' => $vendorDir . '/symfony/translation/Translator.php', 'Symfony\\Component\\Translation\\TranslatorBag' => $vendorDir . '/symfony/translation/TranslatorBag.php', diff --git a/composer/autoload_static.php b/composer/autoload_static.php index a75415bdf..86591b947 100644 --- a/composer/autoload_static.php +++ b/composer/autoload_static.php @@ -2177,6 +2177,15 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Pimple\\Psr11\\ServiceLocator' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php', 'Pimple\\ServiceIterator' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/ServiceIterator.php', 'Pimple\\ServiceProviderInterface' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/ServiceProviderInterface.php', + 'Pimple\\Tests\\Fixtures\\Invokable' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php', + 'Pimple\\Tests\\Fixtures\\NonInvokable' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php', + 'Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php', + 'Pimple\\Tests\\Fixtures\\Service' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php', + 'Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php', + 'Pimple\\Tests\\PimpleTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/PimpleTest.php', + 'Pimple\\Tests\\Psr11\\ContainerTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php', + 'Pimple\\Tests\\Psr11\\ServiceLocatorTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php', + 'Pimple\\Tests\\ServiceIteratorTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php', 'Predis\\Autoloader' => __DIR__ . '/..' . '/predis/predis/src/Autoloader.php', 'Predis\\Client' => __DIR__ . '/..' . '/predis/predis/src/Client.php', 'Predis\\ClientConfiguration' => __DIR__ . '/..' . '/predis/predis/src/ClientConfiguration.php', @@ -3749,6 +3758,13 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Symfony\\Component\\DomCrawler\\FormFieldRegistry' => __DIR__ . '/..' . '/symfony/dom-crawler/FormFieldRegistry.php', 'Symfony\\Component\\DomCrawler\\Image' => __DIR__ . '/..' . '/symfony/dom-crawler/Image.php', 'Symfony\\Component\\DomCrawler\\Link' => __DIR__ . '/..' . '/symfony/dom-crawler/Link.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerAnySelectorTextContains' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerAnySelectorTextContains.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerAnySelectorTextSame' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerAnySelectorTextSame.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorAttributeValueSame' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorCount' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorCount.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorExists' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorExists.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorTextContains' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextContains.php', + 'Symfony\\Component\\DomCrawler\\Test\\Constraint\\CrawlerSelectorTextSame' => __DIR__ . '/..' . '/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextSame.php', 'Symfony\\Component\\DomCrawler\\UriResolver' => __DIR__ . '/..' . '/symfony/dom-crawler/UriResolver.php', 'Symfony\\Component\\EventDispatcher\\Attribute\\AsEventListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Attribute/AsEventListener.php', 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', @@ -3870,6 +3886,17 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', 'Symfony\\Component\\HttpFoundation\\StreamedJsonResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedJsonResponse.php', 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseFormatSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderLocationSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHeaderLocationSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsUnprocessable' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', 'Symfony\\Component\\HttpFoundation\\UriSigner' => __DIR__ . '/..' . '/symfony/http-foundation/UriSigner.php', 'Symfony\\Component\\HttpFoundation\\UrlHelper' => __DIR__ . '/..' . '/symfony/http-foundation/UrlHelper.php', 'Symfony\\Component\\Mailer\\Command\\MailerTestCommand' => __DIR__ . '/..' . '/symfony/mailer/Command/MailerTestCommand.php', @@ -3905,6 +3932,11 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Symfony\\Component\\Mailer\\Messenger\\MessageHandler' => __DIR__ . '/..' . '/symfony/mailer/Messenger/MessageHandler.php', 'Symfony\\Component\\Mailer\\Messenger\\SendEmailMessage' => __DIR__ . '/..' . '/symfony/mailer/Messenger/SendEmailMessage.php', 'Symfony\\Component\\Mailer\\SentMessage' => __DIR__ . '/..' . '/symfony/mailer/SentMessage.php', + 'Symfony\\Component\\Mailer\\Test\\AbstractTransportFactoryTestCase' => __DIR__ . '/..' . '/symfony/mailer/Test/AbstractTransportFactoryTestCase.php', + 'Symfony\\Component\\Mailer\\Test\\Constraint\\EmailCount' => __DIR__ . '/..' . '/symfony/mailer/Test/Constraint/EmailCount.php', + 'Symfony\\Component\\Mailer\\Test\\Constraint\\EmailIsQueued' => __DIR__ . '/..' . '/symfony/mailer/Test/Constraint/EmailIsQueued.php', + 'Symfony\\Component\\Mailer\\Test\\IncompleteDsnTestTrait' => __DIR__ . '/..' . '/symfony/mailer/Test/IncompleteDsnTestTrait.php', + 'Symfony\\Component\\Mailer\\Test\\TransportFactoryTestCase' => __DIR__ . '/..' . '/symfony/mailer/Test/TransportFactoryTestCase.php', 'Symfony\\Component\\Mailer\\Transport' => __DIR__ . '/..' . '/symfony/mailer/Transport.php', 'Symfony\\Component\\Mailer\\Transport\\AbstractApiTransport' => __DIR__ . '/..' . '/symfony/mailer/Transport/AbstractApiTransport.php', 'Symfony\\Component\\Mailer\\Transport\\AbstractHttpTransport' => __DIR__ . '/..' . '/symfony/mailer/Transport/AbstractHttpTransport.php', @@ -3995,6 +4027,13 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Symfony\\Component\\Mime\\Part\\SMimePart' => __DIR__ . '/..' . '/symfony/mime/Part/SMimePart.php', 'Symfony\\Component\\Mime\\Part\\TextPart' => __DIR__ . '/..' . '/symfony/mime/Part/TextPart.php', 'Symfony\\Component\\Mime\\RawMessage' => __DIR__ . '/..' . '/symfony/mime/RawMessage.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailAddressContains' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailAddressContains.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailAttachmentCount' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailAttachmentCount.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailHasHeader' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailHasHeader.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailHeaderSame' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailHeaderSame.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailHtmlBodyContains' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailHtmlBodyContains.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailSubjectContains' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailSubjectContains.php', + 'Symfony\\Component\\Mime\\Test\\Constraint\\EmailTextBodyContains' => __DIR__ . '/..' . '/symfony/mime/Test/Constraint/EmailTextBodyContains.php', 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/process/Exception/ExceptionInterface.php', 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/process/Exception/InvalidArgumentException.php', 'Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php', @@ -4190,6 +4229,8 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Symfony\\Component\\Translation\\PseudoLocalizationTranslator' => __DIR__ . '/..' . '/symfony/translation/PseudoLocalizationTranslator.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReader' => __DIR__ . '/..' . '/symfony/translation/Reader/TranslationReader.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' => __DIR__ . '/..' . '/symfony/translation/Reader/TranslationReaderInterface.php', + 'Symfony\\Component\\Translation\\Test\\ProviderFactoryTestCase' => __DIR__ . '/..' . '/symfony/translation/Test/ProviderFactoryTestCase.php', + 'Symfony\\Component\\Translation\\Test\\ProviderTestCase' => __DIR__ . '/..' . '/symfony/translation/Test/ProviderTestCase.php', 'Symfony\\Component\\Translation\\TranslatableMessage' => __DIR__ . '/..' . '/symfony/translation/TranslatableMessage.php', 'Symfony\\Component\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/translation/Translator.php', 'Symfony\\Component\\Translation\\TranslatorBag' => __DIR__ . '/..' . '/symfony/translation/TranslatorBag.php', diff --git a/composer/include_paths.php b/composer/include_paths.php index 8c87e2c20..4214c2b44 100644 --- a/composer/include_paths.php +++ b/composer/include_paths.php @@ -6,8 +6,8 @@ $baseDir = $vendorDir; return array( - $vendorDir . '/pear/archive_tar', + $vendorDir . '/pear/pear_exception', $vendorDir . '/pear/console_getopt', $vendorDir . '/pear/pear-core-minimal/src', - $vendorDir . '/pear/pear_exception', + $vendorDir . '/pear/archive_tar', ); diff --git a/composer/installed.json b/composer/installed.json index 2583f5e1e..bfec2ee90 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -3867,17 +3867,17 @@ }, { "name": "sabre/dav", - "version": "4.7.0", - "version_normalized": "4.7.0.0", + "version": "4.7.1", + "version_normalized": "4.7.1.0", "source": { "type": "git", "url": "https://github.com/sabre-io/dav.git", - "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a" + "reference": "f36f002dce082e1d425c4a0dc8c71a6b176c3b07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/dav/zipball/074373bcd689a30bcf5aaa6bbb20a3395964ce7a", - "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a", + "url": "https://api.github.com/repos/sabre-io/dav/zipball/f36f002dce082e1d425c4a0dc8c71a6b176c3b07", + "reference": "f36f002dce082e1d425c4a0dc8c71a6b176c3b07", "shasum": "" }, "require": { @@ -3911,17 +3911,12 @@ "ext-imap": "*", "ext-pdo": "*" }, - "time": "2024-10-29T11:46:02+00:00", + "time": "2026-07-07T08:39:09+00:00", "bin": [ "bin/sabredav", "bin/naturalselection" ], "type": "library", - "extra": { - "patches_applied": { - "Check for instanceof INode instead of Node": ".patches/check-for-instanceof-INode-instead-of-Node-1595.patch" - } - }, "installation-source": "dist", "autoload": { "psr-4": { diff --git a/composer/installed.php b/composer/installed.php index 27309b2fc..4c246d7b6 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -605,9 +605,9 @@ ), ), 'sabre/dav' => array( - 'pretty_version' => '4.7.0', - 'version' => '4.7.0.0', - 'reference' => '074373bcd689a30bcf5aaa6bbb20a3395964ce7a', + 'pretty_version' => '4.7.1', + 'version' => '4.7.1.0', + 'reference' => 'f36f002dce082e1d425c4a0dc8c71a6b176c3b07', 'type' => 'library', 'install_path' => __DIR__ . '/../sabre/dav', 'aliases' => array(), diff --git a/sabre/dav/PATCHES.txt b/sabre/dav/PATCHES.txt deleted file mode 100644 index 61140f3cf..000000000 --- a/sabre/dav/PATCHES.txt +++ /dev/null @@ -1,7 +0,0 @@ -This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches) -Patches applied to this directory: - -Check for instanceof INode instead of Node -Source: .patches/check-for-instanceof-INode-instead-of-Node-1595.patch - - diff --git a/sabre/dav/lib/CalDAV/Backend/PDO.php b/sabre/dav/lib/CalDAV/Backend/PDO.php index 634b9828c..528fba347 100644 --- a/sabre/dav/lib/CalDAV/Backend/PDO.php +++ b/sabre/dav/lib/CalDAV/Backend/PDO.php @@ -182,8 +182,8 @@ public function getCalendarsForUser($principalUri) 'id' => [(int) $row['calendarid'], (int) $row['id']], 'uri' => $row['uri'], 'principaluri' => $row['principaluri'], - '{'.CalDAV\Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), - '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', + '{'.CalDAV\Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ?: '0'), + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', '{'.CalDAV\Plugin::NS_CALDAV.'}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet($components), '{'.CalDAV\Plugin::NS_CALDAV.'}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), 'share-resource-uri' => '/ns/share/'.$row['calendarid'], @@ -306,7 +306,7 @@ public function updateCalendar($calendarId, PropPatch $propPatch) switch ($propertyName) { case '{'.CalDAV\Plugin::NS_CALDAV.'}schedule-calendar-transp': $fieldName = 'transparent'; - $newValues[$fieldName] = 'transparent' === $propertyValue->getValue(); + $newValues[$fieldName] = 'transparent' === $propertyValue->getValue() ? 1 : 0; break; default: $fieldName = $this->propertyMap[$propertyName]; @@ -544,19 +544,19 @@ public function createCalendarObject($calendarId, $objectUri, $calendarData) $extraData = $this->getDenormalizedData($calendarData); - $stmt = $this->pdo->prepare('INSERT INTO '.$this->calendarObjectTableName.' (calendarid, uri, calendardata, lastmodified, etag, size, componenttype, firstoccurence, lastoccurence, uid) VALUES (?,?,?,?,?,?,?,?,?,?)'); - $stmt->execute([ - $calendarId, - $objectUri, - $calendarData, - time(), - $extraData['etag'], - $extraData['size'], - $extraData['componentType'], - $extraData['firstOccurence'], - $extraData['lastOccurence'], - $extraData['uid'], - ]); + $stmt = $this->pdo->prepare('INSERT INTO '.$this->calendarObjectTableName.' (calendarid, uri, calendardata, lastmodified, etag, size, componenttype, firstoccurence, lastoccurence, uid) VALUES (:calendarid, :uri, :calendardata, :lastmodified, :etag, :size, :componenttype, :firstoccurence, :lastoccurence, :uid)'); + $lastmodified = time(); + $stmt->bindParam('calendarid', $calendarId, \PDO::PARAM_INT); + $stmt->bindParam('uri', $objectUri, \PDO::PARAM_STR); + $stmt->bindParam('calendardata', $calendarData, \PDO::PARAM_LOB); + $stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT); + $stmt->bindParam('etag', $extraData['etag'], \PDO::PARAM_STR); + $stmt->bindParam('size', $extraData['size'], \PDO::PARAM_INT); + $stmt->bindParam('componenttype', $extraData['componentType'], \PDO::PARAM_STR); + $stmt->bindParam('firstoccurence', $extraData['firstOccurence'], \PDO::PARAM_INT); + $stmt->bindParam('lastoccurence', $extraData['lastOccurence'], \PDO::PARAM_INT); + $stmt->bindParam('uid', $extraData['uid'], \PDO::PARAM_STR); + $stmt->execute(); $this->addChange($calendarId, $objectUri, 1); return '"'.$extraData['etag'].'"'; @@ -590,8 +590,19 @@ public function updateCalendarObject($calendarId, $objectUri, $calendarData) $extraData = $this->getDenormalizedData($calendarData); - $stmt = $this->pdo->prepare('UPDATE '.$this->calendarObjectTableName.' SET calendardata = ?, lastmodified = ?, etag = ?, size = ?, componenttype = ?, firstoccurence = ?, lastoccurence = ?, uid = ? WHERE calendarid = ? AND uri = ?'); - $stmt->execute([$calendarData, time(), $extraData['etag'], $extraData['size'], $extraData['componentType'], $extraData['firstOccurence'], $extraData['lastOccurence'], $extraData['uid'], $calendarId, $objectUri]); + $stmt = $this->pdo->prepare('UPDATE '.$this->calendarObjectTableName.' SET calendardata = :calendardata, lastmodified = :lastmodified, etag = :etag, size = :size, componenttype = :componenttype, firstoccurence = :firstoccurence, lastoccurence = :lastoccurence, uid = :uid WHERE calendarid = :calendarid AND uri = :uri'); + $lastmodified = time(); + $stmt->bindParam('calendardata', $calendarData, \PDO::PARAM_LOB); + $stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT); + $stmt->bindParam('etag', $extraData['etag'], \PDO::PARAM_STR); + $stmt->bindParam('size', $extraData['size'], \PDO::PARAM_INT); + $stmt->bindParam('componenttype', $extraData['componentType'], \PDO::PARAM_STR); + $stmt->bindParam('firstoccurence', $extraData['firstOccurence'], \PDO::PARAM_INT); + $stmt->bindParam('lastoccurence', $extraData['lastOccurence'], \PDO::PARAM_INT); + $stmt->bindParam('uid', $extraData['uid'], \PDO::PARAM_STR); + $stmt->bindParam('calendarid', $calendarId, \PDO::PARAM_INT); + $stmt->bindParam('uri', $objectUri, \PDO::PARAM_STR); + $stmt->execute(); $this->addChange($calendarId, $objectUri, 2); @@ -1311,13 +1322,22 @@ public function deleteSchedulingObject($principalUri, $objectUri) */ public function createSchedulingObject($principalUri, $objectUri, $objectData) { - $stmt = $this->pdo->prepare('INSERT INTO '.$this->schedulingObjectTableName.' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (?, ?, ?, ?, ?, ?)'); + $stmt = $this->pdo->prepare('INSERT INTO '.$this->schedulingObjectTableName.' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (:principaluri, :calendardata, :uri, :lastmodified, :etag, :size)'); if (is_resource($objectData)) { $objectData = stream_get_contents($objectData); } - $stmt->execute([$principalUri, $objectData, $objectUri, time(), md5($objectData), strlen($objectData)]); + $lastmodified = time(); + $etag = md5($objectData); + $size = strlen($objectData); + $stmt->bindParam('principaluri', $principalUri, \PDO::PARAM_STR); + $stmt->bindParam('calendardata', $objectData, \PDO::PARAM_LOB); + $stmt->bindParam('uri', $objectUri, \PDO::PARAM_STR); + $stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT); + $stmt->bindParam('etag', $etag, \PDO::PARAM_STR); + $stmt->bindParam('size', $size, \PDO::PARAM_INT); + $stmt->execute(); } /** diff --git a/sabre/dav/lib/CalDAV/Notifications/Plugin.php b/sabre/dav/lib/CalDAV/Notifications/Plugin.php index 56b2fe938..e6949101f 100644 --- a/sabre/dav/lib/CalDAV/Notifications/Plugin.php +++ b/sabre/dav/lib/CalDAV/Notifications/Plugin.php @@ -68,7 +68,7 @@ public function initialize(Server $server) $server->on('propFind', [$this, 'propFind']); $server->xml->namespaceMap[self::NS_CALENDARSERVER] = 'cs'; - $server->resourceTypeMapping['\\Sabre\\CalDAV\\Notifications\\ICollection'] = '{'.self::NS_CALENDARSERVER.'}notification'; + $server->resourceTypeMapping[\Sabre\CalDAV\Notifications\ICollection::class] = '{'.self::NS_CALENDARSERVER.'}notification'; array_push($server->protectedProperties, '{'.self::NS_CALENDARSERVER.'}notification-URL', diff --git a/sabre/dav/lib/CalDAV/Plugin.php b/sabre/dav/lib/CalDAV/Plugin.php index ccb722f85..167025e67 100644 --- a/sabre/dav/lib/CalDAV/Plugin.php +++ b/sabre/dav/lib/CalDAV/Plugin.php @@ -200,18 +200,18 @@ public function initialize(DAV\Server $server) $server->xml->namespaceMap[self::NS_CALDAV] = 'cal'; $server->xml->namespaceMap[self::NS_CALENDARSERVER] = 'cs'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-query'] = 'Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-multiget'] = 'Sabre\\CalDAV\\Xml\\Request\\CalendarMultiGetReport'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}free-busy-query'] = 'Sabre\\CalDAV\\Xml\\Request\\FreeBusyQueryReport'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}mkcalendar'] = 'Sabre\\CalDAV\\Xml\\Request\\MkCalendar'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}schedule-calendar-transp'] = 'Sabre\\CalDAV\\Xml\\Property\\ScheduleCalendarTransp'; - $server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet'; - - $server->resourceTypeMapping['\\Sabre\\CalDAV\\ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar'; - - $server->resourceTypeMapping['\\Sabre\\CalDAV\\Principal\\IProxyRead'] = '{http://calendarserver.org/ns/}calendar-proxy-read'; - $server->resourceTypeMapping['\\Sabre\\CalDAV\\Principal\\IProxyWrite'] = '{http://calendarserver.org/ns/}calendar-proxy-write'; + $server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = \Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet::class; + $server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-query'] = \Sabre\CalDAV\Xml\Request\CalendarQueryReport::class; + $server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-multiget'] = \Sabre\CalDAV\Xml\Request\CalendarMultiGetReport::class; + $server->xml->elementMap['{'.self::NS_CALDAV.'}free-busy-query'] = \Sabre\CalDAV\Xml\Request\FreeBusyQueryReport::class; + $server->xml->elementMap['{'.self::NS_CALDAV.'}mkcalendar'] = \Sabre\CalDAV\Xml\Request\MkCalendar::class; + $server->xml->elementMap['{'.self::NS_CALDAV.'}schedule-calendar-transp'] = \Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp::class; + $server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = \Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet::class; + + $server->resourceTypeMapping[\Sabre\CalDAV\ICalendar::class] = '{urn:ietf:params:xml:ns:caldav}calendar'; + + $server->resourceTypeMapping[\Sabre\CalDAV\Principal\IProxyRead::class] = '{http://calendarserver.org/ns/}calendar-proxy-read'; + $server->resourceTypeMapping[\Sabre\CalDAV\Principal\IProxyWrite::class] = '{http://calendarserver.org/ns/}calendar-proxy-write'; array_push($server->protectedProperties, '{'.self::NS_CALDAV.'}supported-calendar-component-set', diff --git a/sabre/dav/lib/CalDAV/Schedule/Plugin.php b/sabre/dav/lib/CalDAV/Schedule/Plugin.php index 5bca56d47..8577ae9f7 100644 --- a/sabre/dav/lib/CalDAV/Schedule/Plugin.php +++ b/sabre/dav/lib/CalDAV/Schedule/Plugin.php @@ -113,8 +113,8 @@ public function initialize(Server $server) * This information ensures that the {DAV:}resourcetype property has * the correct values. */ - $server->resourceTypeMapping['\\Sabre\\CalDAV\\Schedule\\IOutbox'] = $ns.'schedule-outbox'; - $server->resourceTypeMapping['\\Sabre\\CalDAV\\Schedule\\IInbox'] = $ns.'schedule-inbox'; + $server->resourceTypeMapping[\Sabre\CalDAV\Schedule\IOutbox::class] = $ns.'schedule-outbox'; + $server->resourceTypeMapping[\Sabre\CalDAV\Schedule\IInbox::class] = $ns.'schedule-inbox'; /* * Properties we protect are made read-only by the server. diff --git a/sabre/dav/lib/CalDAV/SharingPlugin.php b/sabre/dav/lib/CalDAV/SharingPlugin.php index bacfe0441..56962fc14 100644 --- a/sabre/dav/lib/CalDAV/SharingPlugin.php +++ b/sabre/dav/lib/CalDAV/SharingPlugin.php @@ -83,8 +83,8 @@ public function initialize(DAV\Server $server) '{'.Plugin::NS_CALENDARSERVER.'}shared-url' ); - $this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}share'] = 'Sabre\\CalDAV\\Xml\\Request\\Share'; - $this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}invite-reply'] = 'Sabre\\CalDAV\\Xml\\Request\\InviteReply'; + $this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}share'] = \Sabre\CalDAV\Xml\Request\Share::class; + $this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}invite-reply'] = \Sabre\CalDAV\Xml\Request\InviteReply::class; $this->server->on('propFind', [$this, 'propFindEarly']); $this->server->on('propFind', [$this, 'propFindLate'], 150); diff --git a/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php b/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php index 6cfcc1a7b..f9b4ae74c 100644 --- a/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php +++ b/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php @@ -31,11 +31,11 @@ class Plugin extends ServerPlugin */ public function initialize(Server $server) { - $server->resourceTypeMapping['Sabre\\CalDAV\\Subscriptions\\ISubscription'] = + $server->resourceTypeMapping[\Sabre\CalDAV\Subscriptions\ISubscription::class] = '{http://calendarserver.org/ns/}subscribed'; $server->xml->elementMap['{http://calendarserver.org/ns/}source'] = - 'Sabre\\DAV\\Xml\\Property\\Href'; + \Sabre\DAV\Xml\Property\Href::class; $server->on('propFind', [$this, 'propFind'], 150); } diff --git a/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php b/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php index 4771a2070..228210de3 100644 --- a/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php +++ b/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php @@ -86,8 +86,8 @@ class CalendarMultiGetReport implements XmlDeserializable public static function xmlDeserialize(Reader $reader) { $elems = $reader->parseInnerTree([ - '{urn:ietf:params:xml:ns:caldav}calendar-data' => 'Sabre\\CalDAV\\Xml\\Filter\\CalendarData', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', + '{urn:ietf:params:xml:ns:caldav}calendar-data' => \Sabre\CalDAV\Xml\Filter\CalendarData::class, + '{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class, ]); $newProps = [ diff --git a/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php b/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php index 5a4df4674..d68fc3f4f 100644 --- a/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php +++ b/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php @@ -15,7 +15,7 @@ * This class parses the {urn:ietf:params:xml:ns:caldav}calendar-query * REPORT, as defined in: * - * https://tools.ietf.org/html/rfc4791#section-7.9 + * https://tools.ietf.org/html/rfc4791#section-7.8 * * @copyright Copyright (C) fruux GmbH (https://fruux.com/) * @author Evert Pot (http://www.rooftopsolutions.nl/) @@ -86,11 +86,11 @@ class CalendarQueryReport implements XmlDeserializable public static function xmlDeserialize(Reader $reader) { $elems = $reader->parseInnerTree([ - '{urn:ietf:params:xml:ns:caldav}comp-filter' => 'Sabre\\CalDAV\\Xml\\Filter\\CompFilter', - '{urn:ietf:params:xml:ns:caldav}prop-filter' => 'Sabre\\CalDAV\\Xml\\Filter\\PropFilter', - '{urn:ietf:params:xml:ns:caldav}param-filter' => 'Sabre\\CalDAV\\Xml\\Filter\\ParamFilter', - '{urn:ietf:params:xml:ns:caldav}calendar-data' => 'Sabre\\CalDAV\\Xml\\Filter\\CalendarData', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', + '{urn:ietf:params:xml:ns:caldav}comp-filter' => \Sabre\CalDAV\Xml\Filter\CompFilter::class, + '{urn:ietf:params:xml:ns:caldav}prop-filter' => \Sabre\CalDAV\Xml\Filter\PropFilter::class, + '{urn:ietf:params:xml:ns:caldav}param-filter' => \Sabre\CalDAV\Xml\Filter\ParamFilter::class, + '{urn:ietf:params:xml:ns:caldav}calendar-data' => \Sabre\CalDAV\Xml\Filter\CalendarData::class, + '{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class, ]); $newProps = [ diff --git a/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php b/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php index b5701e2ea..58017d8c2 100644 --- a/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php +++ b/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php @@ -62,8 +62,8 @@ public static function xmlDeserialize(Reader $reader) $self = new self(); $elementMap = $reader->elementMap; - $elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop'; - $elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue'; + $elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class; + $elementMap['{DAV:}set'] = \Sabre\Xml\Element\KeyValue::class; $elems = $reader->parseInnerTree($elementMap); foreach ($elems as $elem) { diff --git a/sabre/dav/lib/CalDAV/Xml/Request/Share.php b/sabre/dav/lib/CalDAV/Xml/Request/Share.php index d597b76f1..c3ef0f4e3 100644 --- a/sabre/dav/lib/CalDAV/Xml/Request/Share.php +++ b/sabre/dav/lib/CalDAV/Xml/Request/Share.php @@ -62,8 +62,8 @@ public function __construct(array $sharees) public static function xmlDeserialize(Reader $reader) { $elems = $reader->parseGetElements([ - '{'.Plugin::NS_CALENDARSERVER.'}set' => 'Sabre\\Xml\\Element\\KeyValue', - '{'.Plugin::NS_CALENDARSERVER.'}remove' => 'Sabre\\Xml\\Element\\KeyValue', + '{'.Plugin::NS_CALENDARSERVER.'}set' => \Sabre\Xml\Element\KeyValue::class, + '{'.Plugin::NS_CALENDARSERVER.'}remove' => \Sabre\Xml\Element\KeyValue::class, ]); $sharees = []; diff --git a/sabre/dav/lib/CardDAV/Backend/PDO.php b/sabre/dav/lib/CardDAV/Backend/PDO.php index 7b935a4ae..bf5103fb1 100644 --- a/sabre/dav/lib/CardDAV/Backend/PDO.php +++ b/sabre/dav/lib/CardDAV/Backend/PDO.php @@ -73,7 +73,7 @@ public function getAddressBooksForUser($principalUri) '{DAV:}displayname' => $row['displayname'], '{'.CardDAV\Plugin::NS_CARDDAV.'}addressbook-description' => $row['description'], '{http://calendarserver.org/ns/}getctag' => $row['synctoken'], - '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', ]; } @@ -316,18 +316,18 @@ public function getMultipleCards($addressBookId, array $uris) */ public function createCard($addressBookId, $cardUri, $cardData) { - $stmt = $this->pdo->prepare('INSERT INTO '.$this->cardsTableName.' (carddata, uri, lastmodified, addressbookid, size, etag) VALUES (?, ?, ?, ?, ?, ?)'); + $stmt = $this->pdo->prepare('INSERT INTO '.$this->cardsTableName.' (carddata, uri, lastmodified, addressbookid, size, etag) VALUES (:carddata, :uri, :lastmodified, :addressbookid, :size, :etag)'); $etag = md5($cardData); - - $stmt->execute([ - $cardData, - $cardUri, - time(), - $addressBookId, - strlen($cardData), - $etag, - ]); + $lastmodified = time(); + $size = strlen($cardData); + $stmt->bindParam('carddata', $cardData, \PDO::PARAM_LOB); + $stmt->bindParam('uri', $cardUri, \PDO::PARAM_STR); + $stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT); + $stmt->bindParam('addressbookid', $addressBookId, \PDO::PARAM_INT); + $stmt->bindParam('size', $size, \PDO::PARAM_INT); + $stmt->bindParam('etag', $etag, \PDO::PARAM_STR); + $stmt->execute(); $this->addChange($addressBookId, $cardUri, 1); @@ -362,17 +362,18 @@ public function createCard($addressBookId, $cardUri, $cardData) */ public function updateCard($addressBookId, $cardUri, $cardData) { - $stmt = $this->pdo->prepare('UPDATE '.$this->cardsTableName.' SET carddata = ?, lastmodified = ?, size = ?, etag = ? WHERE uri = ? AND addressbookid =?'); + $stmt = $this->pdo->prepare('UPDATE '.$this->cardsTableName.' SET carddata = :carddata, lastmodified = :lastmodified, size = :size, etag = :etag WHERE uri = :uri AND addressbookid = :addressbookid'); $etag = md5($cardData); - $stmt->execute([ - $cardData, - time(), - strlen($cardData), - $etag, - $cardUri, - $addressBookId, - ]); + $lastmodified = time(); + $size = strlen($cardData); + $stmt->bindParam('carddata', $cardData, \PDO::PARAM_LOB); + $stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT); + $stmt->bindParam('size', $size, \PDO::PARAM_INT); + $stmt->bindParam('etag', $etag, \PDO::PARAM_STR); + $stmt->bindParam('uri', $cardUri, \PDO::PARAM_STR); + $stmt->bindParam('addressbookid', $addressBookId, \PDO::PARAM_INT); + $stmt->execute(); $this->addChange($addressBookId, $cardUri, 2); diff --git a/sabre/dav/lib/CardDAV/Plugin.php b/sabre/dav/lib/CardDAV/Plugin.php index 810ae3a1a..663c561c0 100644 --- a/sabre/dav/lib/CardDAV/Plugin.php +++ b/sabre/dav/lib/CardDAV/Plugin.php @@ -73,12 +73,12 @@ public function initialize(DAV\Server $server) $server->xml->namespaceMap[self::NS_CARDDAV] = 'card'; - $server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-query'] = 'Sabre\\CardDAV\\Xml\\Request\\AddressBookQueryReport'; - $server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-multiget'] = 'Sabre\\CardDAV\\Xml\\Request\\AddressBookMultiGetReport'; + $server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-query'] = \Sabre\CardDAV\Xml\Request\AddressBookQueryReport::class; + $server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-multiget'] = \Sabre\CardDAV\Xml\Request\AddressBookMultiGetReport::class; /* Mapping Interfaces to {DAV:}resourcetype values */ - $server->resourceTypeMapping['Sabre\\CardDAV\\IAddressBook'] = '{'.self::NS_CARDDAV.'}addressbook'; - $server->resourceTypeMapping['Sabre\\CardDAV\\IDirectory'] = '{'.self::NS_CARDDAV.'}directory'; + $server->resourceTypeMapping[\Sabre\CardDAV\IAddressBook::class] = '{'.self::NS_CARDDAV.'}addressbook'; + $server->resourceTypeMapping[\Sabre\CardDAV\IDirectory::class] = '{'.self::NS_CARDDAV.'}directory'; /* Adding properties that may never be changed */ $server->protectedProperties[] = '{'.self::NS_CARDDAV.'}supported-address-data'; @@ -86,7 +86,7 @@ public function initialize(DAV\Server $server) $server->protectedProperties[] = '{'.self::NS_CARDDAV.'}addressbook-home-set'; $server->protectedProperties[] = '{'.self::NS_CARDDAV.'}supported-collation-set'; - $server->xml->elementMap['{http://calendarserver.org/ns/}me-card'] = 'Sabre\\DAV\\Xml\\Property\\Href'; + $server->xml->elementMap['{http://calendarserver.org/ns/}me-card'] = \Sabre\DAV\Xml\Property\Href::class; $this->server = $server; } diff --git a/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php b/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php index 491f96908..2a6728248 100644 --- a/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php +++ b/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php @@ -83,8 +83,8 @@ class AddressBookMultiGetReport implements XmlDeserializable public static function xmlDeserialize(Reader $reader) { $elems = $reader->parseInnerTree([ - '{urn:ietf:params:xml:ns:carddav}address-data' => 'Sabre\\CardDAV\\Xml\\Filter\\AddressData', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', + '{urn:ietf:params:xml:ns:carddav}address-data' => \Sabre\CardDAV\Xml\Filter\AddressData::class, + '{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class, ]); $newProps = [ diff --git a/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php b/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php index 02402f6c7..241fd3a84 100644 --- a/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php +++ b/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php @@ -120,10 +120,10 @@ class AddressBookQueryReport implements XmlDeserializable public static function xmlDeserialize(Reader $reader) { $elems = (array) $reader->parseInnerTree([ - '{urn:ietf:params:xml:ns:carddav}prop-filter' => 'Sabre\\CardDAV\\Xml\\Filter\\PropFilter', - '{urn:ietf:params:xml:ns:carddav}param-filter' => 'Sabre\\CardDAV\\Xml\\Filter\\ParamFilter', - '{urn:ietf:params:xml:ns:carddav}address-data' => 'Sabre\\CardDAV\\Xml\\Filter\\AddressData', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', + '{urn:ietf:params:xml:ns:carddav}prop-filter' => \Sabre\CardDAV\Xml\Filter\PropFilter::class, + '{urn:ietf:params:xml:ns:carddav}param-filter' => \Sabre\CardDAV\Xml\Filter\ParamFilter::class, + '{urn:ietf:params:xml:ns:carddav}address-data' => \Sabre\CardDAV\Xml\Filter\AddressData::class, + '{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class, ]); $newProps = [ diff --git a/sabre/dav/lib/DAV/Browser/Plugin.php b/sabre/dav/lib/DAV/Browser/Plugin.php index a8a6f430e..5b453ac75 100644 --- a/sabre/dav/lib/DAV/Browser/Plugin.php +++ b/sabre/dav/lib/DAV/Browser/Plugin.php @@ -258,7 +258,7 @@ public function escapeHTML($value) */ public function generateDirectoryIndex($path) { - $html = $this->generateHeader($path ? $path : '/', $path); + $html = $this->generateHeader($path ?: '/', $path); $node = $this->server->tree->getNodeForPath($path); if ($node instanceof DAV\ICollection) { @@ -499,7 +499,7 @@ public function htmlActionsPanel(DAV\INode $node, &$output, $path) // We also know fairly certain that if an object is a non-extended // SimpleCollection, we won't need to show the panel either. - if ('Sabre\\DAV\\SimpleCollection' === get_class($node)) { + if (\Sabre\DAV\SimpleCollection::class === get_class($node)) { return; } diff --git a/sabre/dav/lib/DAV/CorePlugin.php b/sabre/dav/lib/DAV/CorePlugin.php index dbd8976b1..ce1e01ba9 100644 --- a/sabre/dav/lib/DAV/CorePlugin.php +++ b/sabre/dav/lib/DAV/CorePlugin.php @@ -154,7 +154,7 @@ public function httpGet(RequestInterface $request, ResponseInterface $response) // Determining the exact byte offsets if (!is_null($range[0])) { $start = $range[0]; - $end = $range[1] ? $range[1] : $nodeSize - 1; + $end = $range[1] ?: $nodeSize - 1; if ($start >= $nodeSize) { throw new Exception\RequestedRangeNotSatisfiable('The start offset ('.$range[0].') exceeded the size of the entity ('.$nodeSize.')'); } @@ -589,6 +589,11 @@ public function httpMove(RequestInterface $request, ResponseInterface $response) $moveInfo = $this->server->getCopyAndMoveInfo($request); + // MOVE does only allow "infinity" every other header value is considered invalid + if (Server::DEPTH_INFINITY !== $moveInfo['depth']) { + throw new BadRequest('The HTTP Depth header must only contain "infinity" for MOVE'); + } + if ($moveInfo['destinationExists']) { if (!$this->server->emit('beforeUnbind', [$moveInfo['destination']])) { return false; @@ -645,7 +650,7 @@ public function httpCopy(RequestInterface $request, ResponseInterface $response) if (!$this->server->emit('beforeBind', [$copyInfo['destination']])) { return false; } - if (!$this->server->emit('beforeCopy', [$path, $copyInfo['destination']])) { + if (!$this->server->emit('beforeCopy', [$path, $copyInfo['destination'], $copyInfo['depth']])) { return false; } @@ -656,8 +661,8 @@ public function httpCopy(RequestInterface $request, ResponseInterface $response) $this->server->tree->delete($copyInfo['destination']); } - $this->server->tree->copy($path, $copyInfo['destination']); - $this->server->emit('afterCopy', [$path, $copyInfo['destination']]); + $this->server->tree->copy($path, $copyInfo['destination'], $copyInfo['depth']); + $this->server->emit('afterCopy', [$path, $copyInfo['destination'], $copyInfo['depth']]); $this->server->emit('afterBind', [$copyInfo['destination']]); // If a resource was overwritten we should send a 204, otherwise a 201 diff --git a/sabre/dav/lib/DAV/FSExt/Directory.php b/sabre/dav/lib/DAV/FSExt/Directory.php index d6aea0094..d07c9ed54 100644 --- a/sabre/dav/lib/DAV/FSExt/Directory.php +++ b/sabre/dav/lib/DAV/FSExt/Directory.php @@ -143,8 +143,6 @@ public function getChildren() /** * Deletes all files in this directory, and then itself. - * - * @return bool */ public function delete() { @@ -155,8 +153,6 @@ public function delete() // Removing the directory itself rmdir($this->path); - - return true; } /** diff --git a/sabre/dav/lib/DAV/FSExt/File.php b/sabre/dav/lib/DAV/FSExt/File.php index 74849b564..c1c406881 100644 --- a/sabre/dav/lib/DAV/FSExt/File.php +++ b/sabre/dav/lib/DAV/FSExt/File.php @@ -102,12 +102,10 @@ public function get() /** * Delete the current file. - * - * @return bool */ public function delete() { - return unlink($this->path); + unlink($this->path); } /** diff --git a/sabre/dav/lib/DAV/ICopyTarget.php b/sabre/dav/lib/DAV/ICopyTarget.php index 47227138a..57d79a038 100644 --- a/sabre/dav/lib/DAV/ICopyTarget.php +++ b/sabre/dav/lib/DAV/ICopyTarget.php @@ -31,8 +31,11 @@ interface ICopyTarget extends ICollection * @param string $targetName new local file/collection name * @param string $sourcePath Full path to source node * @param INode $sourceNode Source node itself + * @param int $depth How many level of children to copy. + * The value can be 'infinity' (Sabre\DAV\Server::DEPTH_INFINITY) or a positive number including zero. + * Zero means to only copy a shallow collection with props but without children. * * @return bool */ - public function copyInto($targetName, $sourcePath, INode $sourceNode); + public function copyInto($targetName, $sourcePath, INode $sourceNode, int $depth); } diff --git a/sabre/dav/lib/DAV/Locks/Plugin.php b/sabre/dav/lib/DAV/Locks/Plugin.php index 2443f204c..57ca719b1 100644 --- a/sabre/dav/lib/DAV/Locks/Plugin.php +++ b/sabre/dav/lib/DAV/Locks/Plugin.php @@ -55,7 +55,7 @@ public function initialize(DAV\Server $server) { $this->server = $server; - $this->server->xml->elementMap['{DAV:}lockinfo'] = 'Sabre\\DAV\\Xml\\Request\\Lock'; + $this->server->xml->elementMap['{DAV:}lockinfo'] = \Sabre\DAV\Xml\Request\Lock::class; $server->on('method:LOCK', [$this, 'httpLock']); $server->on('method:UNLOCK', [$this, 'httpUnlock']); @@ -179,7 +179,6 @@ public function httpLock(RequestInterface $request, ResponseInterface $response) } } else { // Gonna check if this was a lock refresh. - $existingLocks = $this->getLocks($uri); $conditions = $this->server->getIfConditions($request); $found = null; diff --git a/sabre/dav/lib/DAV/Server.php b/sabre/dav/lib/DAV/Server.php index 3133e54ad..e122b2447 100644 --- a/sabre/dav/lib/DAV/Server.php +++ b/sabre/dav/lib/DAV/Server.php @@ -152,7 +152,7 @@ class Server implements LoggerAwareInterface, EmitterInterface * @var array */ public $resourceTypeMapping = [ - 'Sabre\\DAV\\ICollection' => '{DAV:}collection', + \Sabre\DAV\ICollection::class => '{DAV:}collection', ]; /** @@ -580,9 +580,10 @@ public function calculateUri($uri) /** * Returns the HTTP depth header. * - * This method returns the contents of the HTTP depth request header. If the depth header was 'infinity' it will return the Sabre\DAV\Server::DEPTH_INFINITY object + * This method returns the contents of the HTTP depth request header. If the depth header was 'infinity' it will return the Sabre\DAV\Server::DEPTH_INFINITY constant. * It is possible to supply a default depth value, which is used when the depth header has invalid content, or is completely non-existent * + * @param mixed $default default value to use if no header is set or has invalid value * @param mixed $default * * @return int @@ -624,11 +625,17 @@ public function getHTTPDepth($default = self::DEPTH_INFINITY) */ public function getHTTPRange() { - $range = $this->httpRequest->getHeader('range'); + $range = $this->httpRequest->getHeader('Range'); if (is_null($range)) { return null; } + // MUST ignore Range on non-GET requests (RFC 7233 ยง3.1) + $method = $this->httpRequest->getHeader('X-Sabre-Original-Method') ?: $this->httpRequest->getMethod(); + if ('GET' !== strtoupper($method)) { + return null; + } + // Matching "Range: bytes=1234-5678: both numbers are optional if (!preg_match('/^bytes=([0-9]*)-([0-9]*)$/i', $range, $matches)) { @@ -725,10 +732,18 @@ public function getCopyAndMoveInfo(RequestInterface $request) throw new Exception\BadRequest('The destination header was not supplied'); } $destination = $this->calculateUri($request->getHeader('Destination')); - $overwrite = $request->getHeader('Overwrite'); - if (!$overwrite) { - $overwrite = 'T'; + + // Depth of infinity is valid for MOVE and COPY. If it is not set the RFC requires to act like it was 'infinity'. + $depth = $request->getHeader('Depth') ?? 'infinity'; + if ('infinity' === strtolower($depth)) { + $depth = self::DEPTH_INFINITY; + } elseif (!ctype_digit($depth) || ((int) $depth) < 0) { + throw new Exception\BadRequest('The HTTP Depth header may only be "infinity", 0 or a positive integer'); + } else { + $depth = (int) $depth; } + + $overwrite = $request->getHeader('Overwrite') ?? 'T'; if ('T' == strtoupper($overwrite)) { $overwrite = true; } elseif ('F' == strtoupper($overwrite)) { @@ -773,6 +788,7 @@ public function getCopyAndMoveInfo(RequestInterface $request) // These are the three relevant properties we need to return return [ + 'depth' => $depth, 'destination' => $destination, 'destinationExists' => (bool) $destinationNode, 'destinationNode' => $destinationNode, diff --git a/sabre/dav/lib/DAV/Sharing/Plugin.php b/sabre/dav/lib/DAV/Sharing/Plugin.php index d766ae0de..ea79f4436 100644 --- a/sabre/dav/lib/DAV/Sharing/Plugin.php +++ b/sabre/dav/lib/DAV/Sharing/Plugin.php @@ -84,7 +84,7 @@ public function initialize(Server $server) { $this->server = $server; - $server->xml->elementMap['{DAV:}share-resource'] = 'Sabre\\DAV\\Xml\\Request\\ShareResource'; + $server->xml->elementMap['{DAV:}share-resource'] = \Sabre\DAV\Xml\Request\ShareResource::class; array_push( $server->protectedProperties, diff --git a/sabre/dav/lib/DAV/Sync/Plugin.php b/sabre/dav/lib/DAV/Sync/Plugin.php index 8609f759e..adce62b80 100644 --- a/sabre/dav/lib/DAV/Sync/Plugin.php +++ b/sabre/dav/lib/DAV/Sync/Plugin.php @@ -52,7 +52,7 @@ public function getPluginName() public function initialize(DAV\Server $server) { $this->server = $server; - $server->xml->elementMap['{DAV:}sync-collection'] = 'Sabre\\DAV\\Xml\\Request\\SyncCollectionReport'; + $server->xml->elementMap['{DAV:}sync-collection'] = \Sabre\DAV\Xml\Request\SyncCollectionReport::class; $self = $this; diff --git a/sabre/dav/lib/DAV/Tree.php b/sabre/dav/lib/DAV/Tree.php index f8a996b5a..46ddc6bb0 100644 --- a/sabre/dav/lib/DAV/Tree.php +++ b/sabre/dav/lib/DAV/Tree.php @@ -137,8 +137,11 @@ public function nodeExists($path) * * @param string $sourcePath The source location * @param string $destinationPath The full destination path + * @param int $depth How many levels of children to copy. + * The value can be 'infinity' (\Sabre\DAV\Server::DEPTH_INFINITY) or a positive integer, including zero. + * Zero means only copy the collection without children but with its properties. */ - public function copy($sourcePath, $destinationPath) + public function copy($sourcePath, $destinationPath, int $depth = Server::DEPTH_INFINITY) { $sourceNode = $this->getNodeForPath($sourcePath); @@ -147,8 +150,8 @@ public function copy($sourcePath, $destinationPath) $destinationParent = $this->getNodeForPath($destinationDir); // Check if the target can handle the copy itself. If not, we do it ourselves. - if (!$destinationParent instanceof ICopyTarget || !$destinationParent->copyInto($destinationName, $sourcePath, $sourceNode)) { - $this->copyNode($sourceNode, $destinationParent, $destinationName); + if (!$destinationParent instanceof ICopyTarget || !$destinationParent->copyInto($destinationName, $sourcePath, $sourceNode, $depth)) { + $this->copyNode($sourceNode, $destinationParent, $destinationName, $depth); } $this->markDirty($destinationDir); @@ -178,7 +181,8 @@ public function move($sourcePath, $destinationPath) $moveSuccess = $newParentNode->moveInto($destinationName, $sourcePath, $sourceNode); } if (!$moveSuccess) { - $this->copy($sourcePath, $destinationPath); + // Move is a copy with depth = infinity and deleting the source afterwards + $this->copy($sourcePath, $destinationPath, Server::DEPTH_INFINITY); $this->getNodeForPath($sourcePath)->delete(); } } @@ -215,9 +219,13 @@ public function getChildren($path) $basePath .= '/'; } - foreach ($node->getChildren() as $child) { - $this->cache[$basePath.$child->getName()] = $child; - yield $child; + if ($node instanceof ICollection) { + foreach ($node->getChildren() as $child) { + $this->cache[$basePath.$child->getName()] = $child; + yield $child; + } + } else { + yield from []; } } @@ -303,8 +311,9 @@ public function getMultipleNodes($paths) * copyNode. * * @param string $destinationName + * @param int $depth How many children of the node to copy */ - protected function copyNode(INode $source, ICollection $destinationParent, $destinationName = null) + protected function copyNode(INode $source, ICollection $destinationParent, ?string $destinationName = null, int $depth = Server::DEPTH_INFINITY) { if ('' === (string) $destinationName) { $destinationName = $source->getName(); @@ -326,10 +335,16 @@ protected function copyNode(INode $source, ICollection $destinationParent, $dest $destination = $destinationParent->getChild($destinationName); } elseif ($source instanceof ICollection) { $destinationParent->createDirectory($destinationName); - $destination = $destinationParent->getChild($destinationName); - foreach ($source->getChildren() as $child) { - $this->copyNode($child, $destination); + + // Copy children if depth is not zero + if (0 !== $depth) { + // Adjust next depth for children (keep 'infinity' or decrease) + $depth = Server::DEPTH_INFINITY === $depth ? Server::DEPTH_INFINITY : $depth - 1; + $destination = $destinationParent->getChild($destinationName); + foreach ($source->getChildren() as $child) { + $this->copyNode($child, $destination, null, $depth); + } } } if ($source instanceof IProperties && $destination instanceof IProperties) { diff --git a/sabre/dav/lib/DAV/Version.php b/sabre/dav/lib/DAV/Version.php index e6aee097c..3171aa18b 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.7.0'; + public const VERSION = '4.7.1'; } diff --git a/sabre/dav/lib/DAV/Xml/Element/Prop.php b/sabre/dav/lib/DAV/Xml/Element/Prop.php index 9c214792f..0ea47d669 100644 --- a/sabre/dav/lib/DAV/Xml/Element/Prop.php +++ b/sabre/dav/lib/DAV/Xml/Element/Prop.php @@ -85,7 +85,7 @@ private static function parseCurrentElement(Reader $reader) if (array_key_exists($name, $reader->elementMap)) { $deserializer = $reader->elementMap[$name]; - if (is_subclass_of($deserializer, 'Sabre\\Xml\\XmlDeserializable')) { + if (is_subclass_of($deserializer, \Sabre\Xml\XmlDeserializable::class)) { $value = call_user_func([$deserializer, 'xmlDeserialize'], $reader); } elseif (is_callable($deserializer)) { $value = call_user_func($deserializer, $reader); diff --git a/sabre/dav/lib/DAV/Xml/Element/Response.php b/sabre/dav/lib/DAV/Xml/Element/Response.php index df9291465..53467fd2c 100644 --- a/sabre/dav/lib/DAV/Xml/Element/Response.php +++ b/sabre/dav/lib/DAV/Xml/Element/Response.php @@ -184,7 +184,7 @@ public static function xmlDeserialize(Reader $reader) { $reader->pushContext(); - $reader->elementMap['{DAV:}propstat'] = 'Sabre\\Xml\\Element\\KeyValue'; + $reader->elementMap['{DAV:}propstat'] = \Sabre\Xml\Element\KeyValue::class; // We are overriding the parser for {DAV:}prop. This deserializer is // almost identical to the one for Sabre\Xml\Element\KeyValue. diff --git a/sabre/dav/lib/DAV/Xml/Element/Sharee.php b/sabre/dav/lib/DAV/Xml/Element/Sharee.php index 33564d8f2..e42358748 100644 --- a/sabre/dav/lib/DAV/Xml/Element/Sharee.php +++ b/sabre/dav/lib/DAV/Xml/Element/Sharee.php @@ -159,7 +159,7 @@ public static function xmlDeserialize(Reader $reader) { // Temporarily override configuration $reader->pushContext(); - $reader->elementMap['{DAV:}share-access'] = 'Sabre\DAV\Xml\Property\ShareAccess'; + $reader->elementMap['{DAV:}share-access'] = \Sabre\DAV\Xml\Property\ShareAccess::class; $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Deserializer\keyValue'; $elems = Deserializer\keyValue($reader, 'DAV:'); diff --git a/sabre/dav/lib/DAV/Xml/Request/Lock.php b/sabre/dav/lib/DAV/Xml/Request/Lock.php index 57d12ef93..70fa46d63 100644 --- a/sabre/dav/lib/DAV/Xml/Request/Lock.php +++ b/sabre/dav/lib/DAV/Xml/Request/Lock.php @@ -61,7 +61,7 @@ class Lock implements XmlDeserializable public static function xmlDeserialize(Reader $reader) { $reader->pushContext(); - $reader->elementMap['{DAV:}owner'] = 'Sabre\\Xml\\Element\\XmlFragment'; + $reader->elementMap['{DAV:}owner'] = \Sabre\Xml\Element\XmlFragment::class; $values = KeyValue::xmlDeserialize($reader); diff --git a/sabre/dav/lib/DAV/Xml/Request/MkCol.php b/sabre/dav/lib/DAV/Xml/Request/MkCol.php index e0d7e90a2..6504aebc0 100644 --- a/sabre/dav/lib/DAV/Xml/Request/MkCol.php +++ b/sabre/dav/lib/DAV/Xml/Request/MkCol.php @@ -63,9 +63,9 @@ public static function xmlDeserialize(Reader $reader) $self = new self(); $elementMap = $reader->elementMap; - $elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop'; - $elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue'; - $elementMap['{DAV:}remove'] = 'Sabre\Xml\Element\KeyValue'; + $elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class; + $elementMap['{DAV:}set'] = \Sabre\Xml\Element\KeyValue::class; + $elementMap['{DAV:}remove'] = \Sabre\Xml\Element\KeyValue::class; $elems = $reader->parseInnerTree($elementMap); diff --git a/sabre/dav/lib/DAV/Xml/Request/PropFind.php b/sabre/dav/lib/DAV/Xml/Request/PropFind.php index 505e7c79c..e01dd62f5 100644 --- a/sabre/dav/lib/DAV/Xml/Request/PropFind.php +++ b/sabre/dav/lib/DAV/Xml/Request/PropFind.php @@ -60,7 +60,7 @@ public static function xmlDeserialize(Reader $reader) $self = new self(); $reader->pushContext(); - $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Element\Elements'; + $reader->elementMap['{DAV:}prop'] = \Sabre\Xml\Element\Elements::class; foreach (KeyValue::xmlDeserialize($reader) as $k => $v) { switch ($k) { diff --git a/sabre/dav/lib/DAV/Xml/Request/PropPatch.php b/sabre/dav/lib/DAV/Xml/Request/PropPatch.php index 4a2709502..44c4f3fec 100644 --- a/sabre/dav/lib/DAV/Xml/Request/PropPatch.php +++ b/sabre/dav/lib/DAV/Xml/Request/PropPatch.php @@ -86,9 +86,9 @@ public static function xmlDeserialize(Reader $reader) $self = new self(); $elementMap = $reader->elementMap; - $elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop'; - $elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue'; - $elementMap['{DAV:}remove'] = 'Sabre\Xml\Element\KeyValue'; + $elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class; + $elementMap['{DAV:}set'] = \Sabre\Xml\Element\KeyValue::class; + $elementMap['{DAV:}remove'] = \Sabre\Xml\Element\KeyValue::class; $elems = $reader->parseInnerTree($elementMap); diff --git a/sabre/dav/lib/DAV/Xml/Request/ShareResource.php b/sabre/dav/lib/DAV/Xml/Request/ShareResource.php index 79d7dc826..20614a536 100644 --- a/sabre/dav/lib/DAV/Xml/Request/ShareResource.php +++ b/sabre/dav/lib/DAV/Xml/Request/ShareResource.php @@ -61,8 +61,8 @@ public function __construct(array $sharees) public static function xmlDeserialize(Reader $reader) { $elems = $reader->parseInnerTree([ - '{DAV:}sharee' => 'Sabre\DAV\Xml\Element\Sharee', - '{DAV:}share-access' => 'Sabre\DAV\Xml\Property\ShareAccess', + '{DAV:}sharee' => \Sabre\DAV\Xml\Element\Sharee::class, + '{DAV:}share-access' => \Sabre\DAV\Xml\Property\ShareAccess::class, '{DAV:}prop' => 'Sabre\Xml\Deserializer\keyValue', ]); diff --git a/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php b/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php index 8dd95765b..4db06b9ef 100644 --- a/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php +++ b/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php @@ -76,7 +76,7 @@ public static function xmlDeserialize(Reader $reader) $reader->pushContext(); - $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Element\Elements'; + $reader->elementMap['{DAV:}prop'] = \Sabre\Xml\Element\Elements::class; $elems = KeyValue::xmlDeserialize($reader); $reader->popContext(); diff --git a/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php b/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php index e824cda42..bbb454324 100644 --- a/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php +++ b/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php @@ -114,7 +114,7 @@ public function xmlSerialize(Writer $writer) public static function xmlDeserialize(Reader $reader) { $elementMap = $reader->elementMap; - $elementMap['{DAV:}prop'] = 'Sabre\\DAV\\Xml\\Element\\Prop'; + $elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class; $elements = $reader->parseInnerTree($elementMap); $responses = []; diff --git a/sabre/dav/lib/DAV/Xml/Service.php b/sabre/dav/lib/DAV/Xml/Service.php index 4406b022d..33ff7f9a2 100644 --- a/sabre/dav/lib/DAV/Xml/Service.php +++ b/sabre/dav/lib/DAV/Xml/Service.php @@ -20,16 +20,16 @@ class Service extends \Sabre\Xml\Service * be mapped to Sabre\DAV\Xml\Request\PropFind */ public $elementMap = [ - '{DAV:}multistatus' => 'Sabre\\DAV\\Xml\\Response\\MultiStatus', - '{DAV:}response' => 'Sabre\\DAV\\Xml\\Element\\Response', + '{DAV:}multistatus' => \Sabre\DAV\Xml\Response\MultiStatus::class, + '{DAV:}response' => \Sabre\DAV\Xml\Element\Response::class, // Requests - '{DAV:}propfind' => 'Sabre\\DAV\\Xml\\Request\\PropFind', - '{DAV:}propertyupdate' => 'Sabre\\DAV\\Xml\\Request\\PropPatch', - '{DAV:}mkcol' => 'Sabre\\DAV\\Xml\\Request\\MkCol', + '{DAV:}propfind' => \Sabre\DAV\Xml\Request\PropFind::class, + '{DAV:}propertyupdate' => \Sabre\DAV\Xml\Request\PropPatch::class, + '{DAV:}mkcol' => \Sabre\DAV\Xml\Request\MkCol::class, // Properties - '{DAV:}resourcetype' => 'Sabre\\DAV\\Xml\\Property\\ResourceType', + '{DAV:}resourcetype' => \Sabre\DAV\Xml\Property\ResourceType::class, ]; /** diff --git a/sabre/dav/lib/DAVACL/Plugin.php b/sabre/dav/lib/DAVACL/Plugin.php index f0497844d..03068451e 100644 --- a/sabre/dav/lib/DAVACL/Plugin.php +++ b/sabre/dav/lib/DAVACL/Plugin.php @@ -808,17 +808,17 @@ public function initialize(DAV\Server $server) // Automatically mapping nodes implementing IPrincipal to the // {DAV:}principal resourcetype. - $server->resourceTypeMapping['Sabre\\DAVACL\\IPrincipal'] = '{DAV:}principal'; + $server->resourceTypeMapping[\Sabre\DAVACL\IPrincipal::class] = '{DAV:}principal'; // Mapping the group-member-set property to the HrefList property // class. - $server->xml->elementMap['{DAV:}group-member-set'] = 'Sabre\\DAV\\Xml\\Property\\Href'; - $server->xml->elementMap['{DAV:}acl'] = 'Sabre\\DAVACL\\Xml\\Property\\Acl'; - $server->xml->elementMap['{DAV:}acl-principal-prop-set'] = 'Sabre\\DAVACL\\Xml\\Request\\AclPrincipalPropSetReport'; - $server->xml->elementMap['{DAV:}expand-property'] = 'Sabre\\DAVACL\\Xml\\Request\\ExpandPropertyReport'; - $server->xml->elementMap['{DAV:}principal-property-search'] = 'Sabre\\DAVACL\\Xml\\Request\\PrincipalPropertySearchReport'; - $server->xml->elementMap['{DAV:}principal-search-property-set'] = 'Sabre\\DAVACL\\Xml\\Request\\PrincipalSearchPropertySetReport'; - $server->xml->elementMap['{DAV:}principal-match'] = 'Sabre\\DAVACL\\Xml\\Request\\PrincipalMatchReport'; + $server->xml->elementMap['{DAV:}group-member-set'] = \Sabre\DAV\Xml\Property\Href::class; + $server->xml->elementMap['{DAV:}acl'] = \Sabre\DAVACL\Xml\Property\Acl::class; + $server->xml->elementMap['{DAV:}acl-principal-prop-set'] = \Sabre\DAVACL\Xml\Request\AclPrincipalPropSetReport::class; + $server->xml->elementMap['{DAV:}expand-property'] = \Sabre\DAVACL\Xml\Request\ExpandPropertyReport::class; + $server->xml->elementMap['{DAV:}principal-property-search'] = \Sabre\DAVACL\Xml\Request\PrincipalPropertySearchReport::class; + $server->xml->elementMap['{DAV:}principal-search-property-set'] = \Sabre\DAVACL\Xml\Request\PrincipalSearchPropertySetReport::class; + $server->xml->elementMap['{DAV:}principal-match'] = \Sabre\DAVACL\Xml\Request\PrincipalMatchReport::class; } /* {{{ Event handlers */ diff --git a/sabre/dav/lib/DAVACL/Xml/Property/Acl.php b/sabre/dav/lib/DAVACL/Xml/Property/Acl.php index c6e236dc5..be645bf42 100644 --- a/sabre/dav/lib/DAVACL/Xml/Property/Acl.php +++ b/sabre/dav/lib/DAVACL/Xml/Property/Acl.php @@ -161,9 +161,9 @@ public function toHtml(HtmlOutputHelper $html) public static function xmlDeserialize(Reader $reader) { $elementMap = [ - '{DAV:}ace' => 'Sabre\Xml\Element\KeyValue', - '{DAV:}privilege' => 'Sabre\Xml\Element\Elements', - '{DAV:}principal' => 'Sabre\DAVACL\Xml\Property\Principal', + '{DAV:}ace' => \Sabre\Xml\Element\KeyValue::class, + '{DAV:}privilege' => \Sabre\Xml\Element\Elements::class, + '{DAV:}principal' => \Sabre\DAVACL\Xml\Property\Principal::class, ]; $privileges = []; diff --git a/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php b/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php index e38a45c61..28ef54f2e 100644 --- a/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php +++ b/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php @@ -111,7 +111,7 @@ public static function xmlDeserialize(Reader $reader) { $result = []; - $tree = $reader->parseInnerTree(['{DAV:}privilege' => 'Sabre\\Xml\\Element\\Elements']); + $tree = $reader->parseInnerTree(['{DAV:}privilege' => \Sabre\Xml\Element\Elements::class]); foreach ($tree as $element) { if ('{DAV:}privilege' !== $element['name']) { continue; diff --git a/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php b/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php index bddceca8d..1283be102 100644 --- a/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php +++ b/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php @@ -86,8 +86,8 @@ public static function xmlDeserialize(Reader $reader) } $elemMap = [ - '{DAV:}property-search' => 'Sabre\\Xml\\Element\\KeyValue', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', + '{DAV:}property-search' => \Sabre\Xml\Element\KeyValue::class, + '{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class, ]; foreach ($reader->parseInnerTree($elemMap) as $elem) {