From d603d7fa1c655475b84a92fc807ae04a50edcc1b Mon Sep 17 00:00:00 2001
From: Thomas Kiehne <tkiehne@gmx.us>
Date: Mon, 24 Apr 2023 14:49:03 -0700
Subject: [PATCH] Issue #3305875 by tkiehne: Canvas service fails to initialize
 when logger channel factory is overridden

---
 src/CanvasApiService.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/CanvasApiService.php b/src/CanvasApiService.php
index 08696fb..2bef126 100644
--- a/src/CanvasApiService.php
+++ b/src/CanvasApiService.php
@@ -6,7 +6,7 @@ use Drupal\Component\Serialization\Json;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Http\ClientFactory;
-use Drupal\Core\Logger\LoggerChannelFactory;
+use Drupal\Core\Logger\LoggerChannelFactoryInterface;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\key\KeyRepository;
 use Drupal\key\KeyRepositoryInterface;
@@ -38,7 +38,7 @@ class CanvasApiService {
     ClientFactory $clientFactory,
     ConfigFactoryInterface $config,
     KeyRepositoryInterface $keyRepository,
-    LoggerChannelFactory $loggerChannelFactory
+    LoggerChannelFactoryInterface $loggerChannelFactory
   ){
     $this->logger = $loggerChannelFactory->get('canvas_api');
     $this->lms = $config->get('canvas_lms.settings');
-- 
GitLab