aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/tests/Service/StoragesServiceTest.php4
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheWrapper.php3
-rw-r--r--lib/private/Files/Storage/Common.php3
3 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php
index 8c38954dee6..1ea2176ac90 100644
--- a/apps/files_external/tests/Service/StoragesServiceTest.php
+++ b/apps/files_external/tests/Service/StoragesServiceTest.php
@@ -46,6 +46,7 @@ use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IStorage;
use OCP\IDBConnection;
use OCP\IUser;
+use OCP\Server;
class CleaningDBConfig extends DBConfigService {
private $mountIds = [];
@@ -67,7 +68,6 @@ class CleaningDBConfig extends DBConfigService {
* @group DB
*/
abstract class StoragesServiceTest extends \Test\TestCase {
-
/**
* @var StoragesService
*/
@@ -316,7 +316,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
// manually trigger storage entry because normally it happens on first
// access, which isn't possible within this test
- $storageCache = new \OC\Files\Cache\Storage($rustyStorageId, true, \OC::$server->get(IDBConnection::class));
+ $storageCache = new \OC\Files\Cache\Storage($rustyStorageId, true, Server::get(IDBConnection::class));
/** @var IUserMountCache $mountCache */
$mountCache = \OC::$server->get(IUserMountCache::class);
diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
index a8b1d34c956..31410eea798 100644
--- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php
+++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
@@ -35,6 +35,7 @@ use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchQuery;
+use OCP\Server;
class CacheWrapper extends Cache {
/**
@@ -50,7 +51,7 @@ class CacheWrapper extends Cache {
$this->querySearchHelper = $cache->querySearchHelper;
} else {
if (!$dependencies) {
- $dependencies = \OC::$server->get(CacheDependencies::class);
+ $dependencies = Server::get(CacheDependencies::class);
}
$this->mimetypeLoader = $dependencies->getMimeTypeLoader();
$this->connection = $dependencies->getConnection();
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 6802ef66017..65c2580e61c 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -64,6 +64,7 @@ use OCP\Files\Storage\IStorage;
use OCP\Files\Storage\IWriteStreamStorage;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
+use OCP\Server;
use Psr\Log\LoggerInterface;
/**
@@ -342,7 +343,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
protected function getCacheDependencies(): CacheDependencies {
static $dependencies = null;
if (!$dependencies) {
- $dependencies = \OC::$server->get(CacheDependencies::class);
+ $dependencies = Server::get(CacheDependencies::class);
}
return $dependencies;
}