From 02dd275be4fc08623fce930bc598d874d4eee588 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 3 Nov 2025 11:54:50 +0200 Subject: [PATCH] Update composer.lock with new reference for utopia-php/database and modify Upsert action method to remove unused Authorization parameter and enhance document validation. This improves code clarity and maintainability. --- composer.lock | 8 ++++---- .../Http/Databases/Collections/Documents/Bulk/Upsert.php | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 8b06671dc1..6d7f1c307a 100644 --- a/composer.lock +++ b/composer.lock @@ -3844,12 +3844,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "22123ad30782be131ecad4e9298b843d8daf387b" + "reference": "61d06624a5b96b6e4665ef1de740e31428b868ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/22123ad30782be131ecad4e9298b843d8daf387b", - "reference": "22123ad30782be131ecad4e9298b843d8daf387b", + "url": "https://api.github.com/repos/utopia-php/database/zipball/61d06624a5b96b6e4665ef1de740e31428b868ec", + "reference": "61d06624a5b96b6e4665ef1de740e31428b868ec", "shasum": "" }, "require": { @@ -3925,7 +3925,7 @@ "source": "https://github.com/utopia-php/database/tree/feat-authorization-instance", "issues": "https://github.com/utopia-php/database/issues" }, - "time": "2025-10-27T08:34:29+00:00" + "time": "2025-11-03T09:42:43+00:00" }, { "name": "utopia-php/detector", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 80e53170da..6c869723a7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -19,7 +19,6 @@ use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Relationship as RelationshipException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; @@ -86,7 +85,7 @@ class Upsert extends Action ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, array $documents, ?string $transactionId, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks, array $plan, Authorization $authorization): void + public function action(string $databaseId, string $collectionId, array $documents, ?string $transactionId, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks, array $plan): void { $database = $dbForProject->getDocument('databases', $databaseId); if ($database->isEmpty()) {