From 10dd8746a34e3abdda14c8170f4837efc3be94a3 Mon Sep 17 00:00:00 2001 From: vttran Date: Fri, 28 Aug 2026 14:51:53 +0700 Subject: [PATCH 1/3] Upgrade sabre/vobject to the 5.0 development branch --- composer.json | 4 ++-- lib/CalDAV/NullableUri.php | 4 ++-- lib/CalDAV/Schedule/ITipPlugin.php | 2 +- lib/CalDAV/Schedule/Plugin.php | 2 +- tests/CalDAV/ImportPluginTest.php | 2 +- tests/CalDAV/Schedule/SchedulePluginTest.php | 7 ++++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 38d36de7..82bcfa13 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "repositories": [ { "type": "vcs", - "url": "https://github.com/linagora/sabre-vobject.git", + "url": "https://github.com/vttranlina/sabre-vobject.git", "no-api": true } ], @@ -28,7 +28,7 @@ "php-amqplib/php-amqplib": "^3.3", "php": ">=8.4", "sabre/dav": "4.7.1", - "sabre/vobject": "dev-linagora-waiting-merges-4.5#df65b241c18c4c08cca31fb4dc71b82d231dfc06 as 4.5.7", + "sabre/vobject": "dev-tobemerged-5.0.0#fa94b941baf2e7758f3f1b03521d4005530f75cb", "mongodb/mongodb": "^2.2", "monolog/monolog": "^2.9", "firebase/php-jwt": "^7.0" diff --git a/lib/CalDAV/NullableUri.php b/lib/CalDAV/NullableUri.php index c79b4d38..61d3990d 100644 --- a/lib/CalDAV/NullableUri.php +++ b/lib/CalDAV/NullableUri.php @@ -8,7 +8,7 @@ class NullableUri extends Uri { #[\ReturnTypeWillChange] - public function offsetSet($name, $value) + public function offsetSet($name, $value): void { if (!$this->isNullableProperty() && strtoupper((string)$name) === 'VALUE' @@ -20,7 +20,7 @@ public function offsetSet($name, $value) parent::offsetSet($name, $value); } - public function setJsonValue(array $value) + public function setJsonValue(array $value): void { parent::setJsonValue($this->isNullableProperty() && [null] === $value ? [''] : $value); } diff --git a/lib/CalDAV/Schedule/ITipPlugin.php b/lib/CalDAV/Schedule/ITipPlugin.php index 68c8b495..658fdb14 100644 --- a/lib/CalDAV/Schedule/ITipPlugin.php +++ b/lib/CalDAV/Schedule/ITipPlugin.php @@ -70,7 +70,7 @@ function iTip($request) $message->component = 'VEVENT'; $message->uid = $payload->uid; $message->method = $issetdef('method', 'REQUEST'); - $message->sequence = $issetdef('sequence', '0'); + $message->sequence = (int) $issetdef('sequence', 0); $message->message = VObject\Reader::read($payload->ical); // Events coming from an external system carry the video conference link in the // OpenPaaS property only: expose it to the recipient's clients as well. diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php index 24dcfa32..0921ffb6 100644 --- a/lib/CalDAV/Schedule/Plugin.php +++ b/lib/CalDAV/Schedule/Plugin.php @@ -78,7 +78,7 @@ function deliver(ITip\Message $iTipMessage) { $iTipMessage->message->VEVENT->SEQUENCE =0; } - if (!is_string($iTipMessage->recipient)) { + if (!isset($iTipMessage->recipient)) { $iTipMessage->recipient = ''; } diff --git a/tests/CalDAV/ImportPluginTest.php b/tests/CalDAV/ImportPluginTest.php index 3e90892d..a67bfb6c 100644 --- a/tests/CalDAV/ImportPluginTest.php +++ b/tests/CalDAV/ImportPluginTest.php @@ -91,7 +91,7 @@ private function newItipMessage($sequence) { $message->component = 'VEVENT'; $message->uid = 'UID'; - $message->sequence = $sequence; + $message->sequence = (int) $sequence; $message->method = 'REQUEST'; $message->sender = 'mailto:a@a.com'; $message->recipient = 'mailto:b@b.com'; diff --git a/tests/CalDAV/Schedule/SchedulePluginTest.php b/tests/CalDAV/Schedule/SchedulePluginTest.php index 664be5c5..9371a891 100644 --- a/tests/CalDAV/Schedule/SchedulePluginTest.php +++ b/tests/CalDAV/Schedule/SchedulePluginTest.php @@ -146,9 +146,9 @@ function testShouldPreservePublicAgendaMetadataOnOutgoingMinimalMessage() { $this->assertStringContainsString('X-OPENPAAS-BOOKING-LINK:booking-link-id', $serializedMessage); } - function testDeliverShouldNotCrashWhenRecipientIsNull() { + function testDeliverShouldNotCrashWhenRecipientIsMissing() { $message = $this->newItipMessage('1'); - $message->recipient = null; + unset($message->recipient); $this->plugin->deliver($message); @@ -1019,7 +1019,7 @@ private function newItipMessage($sequence) { $message->component = 'VEVENT'; $message->uid = 'UID'; - $message->sequence = $sequence; + $message->sequence = $sequence === '' ? null : (int) $sequence; $message->method = 'REQUEST'; $message->sender = 'mailto:a@a.com'; $message->recipient = 'mailto:b@b.com'; @@ -1508,6 +1508,7 @@ private function initializePluginForTeamCalendarDelivery(array $teamCalendarPriv private function newReplyMessage(string $uid, string $recipient): Message { $message = new Message(); + $message->component = 'VEVENT'; $message->method = 'REPLY'; $message->uid = $uid; $message->recipient = $recipient; From f8f167cfbd59c7195944493cf8d4d8f9ba5a4021 Mon Sep 17 00:00:00 2001 From: vttran Date: Thu, 3 Sep 2026 15:06:58 +0700 Subject: [PATCH 2/3] fixup! Upgrade sabre/vobject to the 5.0 development branch --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 82bcfa13..4d3a74b9 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "repositories": [ { "type": "vcs", - "url": "https://github.com/vttranlina/sabre-vobject.git", + "url": "https://github.com/linagora/sabre-vobject.git", "no-api": true } ], @@ -28,7 +28,7 @@ "php-amqplib/php-amqplib": "^3.3", "php": ">=8.4", "sabre/dav": "4.7.1", - "sabre/vobject": "dev-tobemerged-5.0.0#fa94b941baf2e7758f3f1b03521d4005530f75cb", + "sabre/vobject": "dev-linagora-waiting-merges-5.0.0#5b725565a9aeff4d9072f80e57392c70919642e9", "mongodb/mongodb": "^2.2", "monolog/monolog": "^2.9", "firebase/php-jwt": "^7.0" From 5450b5ad2244a701975c62d32bd176e65e3ac36d Mon Sep 17 00:00:00 2001 From: vttran Date: Thu, 3 Sep 2026 15:21:25 +0700 Subject: [PATCH 3/3] fixup! fixup! Upgrade sabre/vobject to the 5.0 development branch --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4d3a74b9..7d98483f 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "php-amqplib/php-amqplib": "^3.3", "php": ">=8.4", "sabre/dav": "4.7.1", - "sabre/vobject": "dev-linagora-waiting-merges-5.0.0#5b725565a9aeff4d9072f80e57392c70919642e9", + "sabre/vobject": "dev-linagora-waiting-merges-5.0.0#2ada121c9c5e76cabbf16724dda640ccbe87593d", "mongodb/mongodb": "^2.2", "monolog/monolog": "^2.9", "firebase/php-jwt": "^7.0"