Update composer dependencies and refactor tenant handling in database connections

- Updated the version of "utopia-php/database" to 5.3.15 in composer.json and composer.lock.
- Removed the repository entry for "utopia-php/database" from composer.json.
- Refactored tenant handling in multiple files to cast project sequence to an integer for consistency.
This commit is contained in:
ArnabChatterjee20k
2026-03-18 18:36:47 +05:30
parent 12d274a72c
commit ea9fb5ff36
7 changed files with 31 additions and 76 deletions
+4 -4
View File
@@ -167,7 +167,7 @@ $setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $c
if (\in_array($dsn->getHost(), $sharedTables)) {
$database
->setSharedTables(true)
->setTenant($project->getSequence())
->setTenant((int) $project->getSequence())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
@@ -188,7 +188,7 @@ $setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $c
if (\in_array($dsn->getHost(), $sharedTables)) {
$database
->setSharedTables(true)
->setTenant($project->getSequence())
->setTenant((int) $project->getSequence())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
@@ -212,7 +212,7 @@ $setResource('getLogsDB', function (Group $pools, Cache $cache, Authorization $a
return function (?Document $project = null) use ($pools, $cache, $database, $authorization) {
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
$database->setTenant($project->getSequence());
$database->setTenant((int) $project->getSequence());
return $database;
}
@@ -229,7 +229,7 @@ $setResource('getLogsDB', function (Group $pools, Cache $cache, Authorization $a
// set tenant
if ($project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
$database->setTenant($project->getSequence());
$database->setTenant((int) $project->getSequence());
}
return $database;