aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-09-21 15:12:31 +0200
committerGitHub <noreply@github.com>2023-09-21 15:12:31 +0200
commitff9de2efb6a1a755428bfb7b89d562c5fc46138d (patch)
tree17a3540a7eca420f91ea883dba0d50b012c4821f /apps/settings
parenta1a1b990e62c046d17fe0a2f7991f102a93361c0 (diff)
parent0a9371f99f05786068d6f6a72b9a717ec24690a8 (diff)
downloadnextcloud-server-ff9de2efb6a1a755428bfb7b89d562c5fc46138d.tar.gz
nextcloud-server-ff9de2efb6a1a755428bfb7b89d562c5fc46138d.zip
Merge pull request #40508 from nextcloud/fix/migrate-apps-away-from-ilogger
Migrate applications away from deprecated ILogger
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Controller/WebAuthnController.php29
-rw-r--r--apps/settings/tests/Controller/UsersControllerTest.php3
2 files changed, 8 insertions, 24 deletions
diff --git a/apps/settings/lib/Controller/WebAuthnController.php b/apps/settings/lib/Controller/WebAuthnController.php
index 468685816f5..59c4d2146b1 100644
--- a/apps/settings/lib/Controller/WebAuthnController.php
+++ b/apps/settings/lib/Controller/WebAuthnController.php
@@ -33,37 +33,24 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\JSONResponse;
-use OCP\ILogger;
use OCP\IRequest;
use OCP\ISession;
use OCP\IUserSession;
+use Psr\Log\LoggerInterface;
use Webauthn\PublicKeyCredentialCreationOptions;
#[IgnoreOpenAPI]
class WebAuthnController extends Controller {
private const WEBAUTHN_REGISTRATION = 'webauthn_registration';
- /** @var Manager */
- private $manager;
-
- /** @var IUserSession */
- private $userSession;
- /**
- * @var ISession
- */
- private $session;
- /**
- * @var ILogger
- */
- private $logger;
-
- public function __construct(IRequest $request, ILogger $logger, Manager $webAuthnManager, IUserSession $userSession, ISession $session) {
+ public function __construct(
+ IRequest $request,
+ private LoggerInterface $logger,
+ private Manager $manager,
+ private IUserSession $userSession,
+ private ISession $session,
+ ) {
parent::__construct(Application::APP_ID, $request);
-
- $this->manager = $webAuthnManager;
- $this->userSession = $userSession;
- $this->session = $session;
- $this->logger = $logger;
}
/**
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php
index 6f0bf012889..6243b85fb2f 100644
--- a/apps/settings/tests/Controller/UsersControllerTest.php
+++ b/apps/settings/tests/Controller/UsersControllerTest.php
@@ -50,7 +50,6 @@ use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IL10N;
-use OCP\ILogger;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserManager;
@@ -74,8 +73,6 @@ class UsersControllerTest extends \Test\TestCase {
private $userSession;
/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
- private $logger;
/** @var IMailer|\PHPUnit\Framework\MockObject\MockObject */
private $mailer;
/** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */