From 43204a87cd13d0c646e5aa5e8b2e1bf6444ed344 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 18 Mar 2025 22:20:56 +1300 Subject: [PATCH] Use adapter instead of connection --- app/init/resources.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index c7d33ae177..488ec7018c 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -27,6 +27,7 @@ use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\Console; use Utopia\Config\Config; +use Utopia\Database\Adapter; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; @@ -375,9 +376,7 @@ App::setResource('useProjectDB', function (Group $pools, Database $dbForPlatform return $pools ->get($dsn->getHost()) - ->use(function (Connection $connection) use ($callback, $cache, $project, $dsn) { - $adapter = $connection->getResource(); - + ->use(function (Adapter $adapter) use ($callback, $cache, $project, $dsn) { $database = new Database($adapter, $cache); $database