From f68d4f7300af493d52c85a36561551ca6d6e63de Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 21 Sep 2023 17:25:52 +0200 Subject: Remove deprecated methods Util::writeLog and DIContainer::log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Controller/SetupController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index 69c3b2f2a23..c6da7ca26f7 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -32,13 +32,14 @@ namespace OC\Core\Controller; use OC\Setup; -use OCP\ILogger; +use Psr\Log\LoggerInterface; class SetupController { private string $autoConfigFile; public function __construct( protected Setup $setupHelper, + protected LoggerInterface $logger, ) { $this->autoConfigFile = \OC::$configDir.'autoconfig.php'; } @@ -78,7 +79,7 @@ class SetupController { } } - private function displaySetupForbidden() { + private function displaySetupForbidden(): void { \OC_Template::printGuestPage('', 'installation_forbidden'); } @@ -98,7 +99,7 @@ class SetupController { \OC_Template::printGuestPage('', 'installation', $parameters); } - private function finishSetup() { + private function finishSetup(): void { if (file_exists($this->autoConfigFile)) { unlink($this->autoConfigFile); } @@ -114,7 +115,7 @@ class SetupController { public function loadAutoConfig(array $post): array { if (file_exists($this->autoConfigFile)) { - \OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO); + $this->logger->info('Autoconfig file found, setting up Nextcloud…'); $AUTOCONFIG = []; include $this->autoConfigFile; $post = array_merge($post, $AUTOCONFIG); -- cgit v1.2.3