mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore(files_trashbin): Migrate away from deprecated ILogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
f1fe3be31e
commit
ba27643d27
1 changed files with 5 additions and 5 deletions
|
|
@ -38,8 +38,8 @@ use OCP\AppFramework\App;
|
|||
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
||||
use OCP\ILogger;
|
||||
use OCP\IServerContainer;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Application extends App implements IBootstrap {
|
||||
public const APP_ID = 'files_trashbin';
|
||||
|
|
@ -77,7 +77,7 @@ class Application extends App implements IBootstrap {
|
|||
\OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook');
|
||||
}
|
||||
|
||||
public function registerTrashBackends(IServerContainer $serverContainer, ILogger $logger, IAppManager $appManager, ITrashManager $trashManager) {
|
||||
public function registerTrashBackends(ContainerInterface $serverContainer, LoggerInterface $logger, IAppManager $appManager, ITrashManager $trashManager): void {
|
||||
foreach ($appManager->getInstalledApps() as $app) {
|
||||
$appInfo = $appManager->getAppInfo($app);
|
||||
if (isset($appInfo['trash'])) {
|
||||
|
|
@ -87,10 +87,10 @@ class Application extends App implements IBootstrap {
|
|||
$for = $backend['@attributes']['for'];
|
||||
|
||||
try {
|
||||
$backendObject = $serverContainer->query($class);
|
||||
$backendObject = $serverContainer->get($class);
|
||||
$trashManager->registerBackend($for, $backendObject);
|
||||
} catch (\Exception $e) {
|
||||
$logger->logException($e);
|
||||
$logger->error($e->getMessage(), ['exception' => $e]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue