Update utopia-php/storage to version 0.18.16 and clean up whitespace in realtime.php

This commit is contained in:
shimon
2025-12-03 18:27:56 +02:00
parent 13f886f07f
commit 77face0f2d
2 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -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 {
Generated
+6 -6
View File
@@ -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",