From 77face0f2d26b5ee9a68246995a355c3577d87ed Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 3 Dec 2025 18:27:56 +0200 Subject: [PATCH] Update utopia-php/storage to version 0.18.16 and clean up whitespace in realtime.php --- app/realtime.php | 10 +++++----- composer.lock | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/realtime.php b/app/realtime.php index f704019154..72a0e9ca58 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -583,7 +583,7 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, } $realtime->subscribe($project->getId(), $connection, $roles, $channels); - + $realtime->connections[$connection]['authorization'] = $authorization; $user = empty($user->getId()) ? null : $response->output($user, Response::MODEL_ACCOUNT); @@ -644,11 +644,11 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re try { $response = new Response(new SwooleResponse()); $projectId = $realtime->connections[$connection]['projectId'] ?? null; - + if (empty($projectId)) { throw new Exception(Exception::REALTIME_POLICY_VIOLATION, 'Missing project ID in connection'); } - + // Get authorization from connection (stored during onOpen) $authorization = $realtime->connections[$connection]['authorization'] ?? null; @@ -661,11 +661,11 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re if ($projectId !== 'console') { $project = $authorization->skip(fn () => $database->getDocument('projects', $projectId)); - + if ($project->isEmpty()) { throw new Exception(Exception::REALTIME_POLICY_VIOLATION, 'Project not found: ' . $projectId); } - + $database = getProjectDB($project); $database->setAuthorization($authorization); } else { diff --git a/composer.lock b/composer.lock index bfebc67918..7be57539af 100644 --- a/composer.lock +++ b/composer.lock @@ -4952,16 +4952,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.14", + "version": "0.18.16", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00" + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/4f14ec952c6f4006dd0613e55bbf7631814fbc00", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", "shasum": "" }, "require": { @@ -5004,9 +5004,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.14" + "source": "https://github.com/utopia-php/storage/tree/0.18.16" }, - "time": "2025-10-07T10:21:47+00:00" + "time": "2025-12-03T02:15:45+00:00" }, { "name": "utopia-php/swoole",