Skip to content

Commit 32f8ff2

Browse files
committed
fix: Remove uses of deprecated service string names
Use the class/interface name instead to avoid logging. This was breaking in some cases as logging would trigger a deprecation warning, resulting in an infinite loop. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 874ef1e commit 32f8ff2

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/private/Memcache/Redis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function compareSetTTL(string $key, mixed $value, int $ttl): bool {
210210

211211
#[\Override]
212212
public static function isAvailable(): bool {
213-
return Server::get('RedisFactory')->isAvailable();
213+
return Server::get(RedisFactory::class)->isAvailable();
214214
}
215215

216216
protected function evalLua(string $scriptName, array $keys, array $args) {

tests/lib/Lockdown/Filesystem/NoFSTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use OC\Files\Filesystem;
1212
use OC\Lockdown\Filesystem\NullStorage;
1313
use OCP\Authentication\Token\IToken;
14+
use OCP\Lockdown\ILockdownManager;
1415
use OCP\Server;
1516
use Test\Traits\UserTrait;
1617

@@ -24,7 +25,7 @@ protected function tearDown(): void {
2425
$token->setScope([
2526
IToken::SCOPE_FILESYSTEM => true
2627
]);
27-
Server::get('LockdownManager')->setToken($token);
28+
Server::get(ILockdownManager::class)->setToken($token);
2829
parent::tearDown();
2930
}
3031

@@ -36,7 +37,7 @@ protected function setUp(): void {
3637
IToken::SCOPE_FILESYSTEM => false
3738
]);
3839

39-
Server::get('LockdownManager')->setToken($token);
40+
Server::get(ILockdownManager::class)->setToken($token);
4041
$this->createUser('foo', 'var');
4142
}
4243

0 commit comments

Comments
 (0)