diff --git a/composer.lock b/composer.lock index 28fd0c5ab..ba6e86a62 100644 --- a/composer.lock +++ b/composer.lock @@ -437,12 +437,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "d42bd36d0413b881b7459b220e1328bc57e48b38" + "reference": "49c6a005583b5268dcb57cf4abf6da939882e400" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/d42bd36d0413b881b7459b220e1328bc57e48b38", - "reference": "d42bd36d0413b881b7459b220e1328bc57e48b38", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/49c6a005583b5268dcb57cf4abf6da939882e400", + "reference": "49c6a005583b5268dcb57cf4abf6da939882e400", "shasum": "" }, "require": { @@ -478,7 +478,7 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2025-12-11T00:55:32+00:00" + "time": "2026-01-14T00:59:13+00:00" }, { "name": "nikic/php-parser", @@ -3210,5 +3210,5 @@ "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/lib/Service/FilesAppService.php b/lib/Service/FilesAppService.php index 38f3cf373..dda58be0f 100644 --- a/lib/Service/FilesAppService.php +++ b/lib/Service/FilesAppService.php @@ -312,7 +312,7 @@ public function markAsDeleted(Attachment $attachment) { */ private function getShareForAttachment(Attachment $attachment): IShare { try { - $share = $this->shareProvider->getShareById($attachment->getId()); + $share = $this->shareProvider->getShareById((string)$attachment->getId()); } catch (ShareNotFound $e) { throw new NoPermissionException('No permission to access the attachment from the card'); } diff --git a/lib/Sharing/DeckShareProvider.php b/lib/Sharing/DeckShareProvider.php index ca0dbc5e7..1eb3dd23f 100644 --- a/lib/Sharing/DeckShareProvider.php +++ b/lib/Sharing/DeckShareProvider.php @@ -33,6 +33,7 @@ use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; use OCP\Share\IShare; +use Override; /** Taken from the talk shareapicontroller helper */ interface IShareProviderBackend { @@ -419,7 +420,7 @@ public function restore(IShare $share, string $recipient): IShare { $qb->executeStatement(); - return $this->getShareById((int)$share->getId(), $recipient); + return $this->getShareById($share->getId(), $recipient); } /** @@ -567,11 +568,8 @@ public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offs return $shares; } - /** - * @inheritDoc - * @throws ShareNotFound - */ - public function getShareById($id, $recipientId = null) { + #[Override] + public function getShareById($id, $recipientId = null): IShare { $qb = $this->dbConnection->getQueryBuilder(); $qb->select('s.*', 'f.fileid', 'f.path', 'f.permissions AS f_permissions', 'f.storage', 'f.path_hash',