From b164537df2187540d2b1e0baa6327e214b759b30 Mon Sep 17 00:00:00 2001 From: Christian Lorang Date: Fri, 30 Oct 2026 08:38:57 +0100 Subject: [PATCH] chore(config): remove unused IConfig from constructors Signed-off-by: Christian Lorang --- lib/Chat/Changelog/Listener.php | 2 -- lib/Files/TemplateLoader.php | 2 -- lib/Manager.php | 2 -- lib/MatterbridgeManager.php | 2 -- lib/Signaling/Manager.php | 4 ---- tests/php/Controller/SignalingControllerTest.php | 1 - tests/php/MatterbridgeManagerTest.php | 2 -- tests/php/Recording/BackendNotifierTest.php | 1 - 8 files changed, 16 deletions(-) diff --git a/lib/Chat/Changelog/Listener.php b/lib/Chat/Changelog/Listener.php index 95da2ad0dc2..e44aee04a83 100644 --- a/lib/Chat/Changelog/Listener.php +++ b/lib/Chat/Changelog/Listener.php @@ -13,7 +13,6 @@ use OCP\AppFramework\Services\IAppConfig; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\IConfig; /** * @template-implements IEventListener @@ -21,7 +20,6 @@ class Listener implements IEventListener { public function __construct( private readonly Manager $manager, - private readonly IConfig $serverConfig, private readonly IAppConfig $appConfig, ) { } diff --git a/lib/Files/TemplateLoader.php b/lib/Files/TemplateLoader.php index b18a32b07c6..04d901272df 100644 --- a/lib/Files/TemplateLoader.php +++ b/lib/Files/TemplateLoader.php @@ -15,7 +15,6 @@ use OCP\AppFramework\Services\IInitialState; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\IConfig; use OCP\IRequest; use OCP\IUser; use OCP\IUserSession; @@ -30,7 +29,6 @@ class TemplateLoader implements IEventListener { public function __construct( private readonly IInitialState $initialState, private readonly Config $talkConfig, - private readonly IConfig $serverConfig, private readonly IAppConfig $appConfig, private readonly IUserSession $userSession, private readonly IRequest $request, diff --git a/lib/Manager.php b/lib/Manager.php index 8ec2179278d..eae6e3e5894 100644 --- a/lib/Manager.php +++ b/lib/Manager.php @@ -29,7 +29,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; use OCP\ICache; -use OCP\IConfig; use OCP\IDBConnection; use OCP\IGroupManager; use OCP\IL10N; @@ -42,7 +41,6 @@ class Manager { public function __construct( private readonly IDBConnection $db, - private readonly IConfig $config, private readonly Config $talkConfig, private readonly IAppConfig $appConfig, private readonly IAppManager $appManager, diff --git a/lib/MatterbridgeManager.php b/lib/MatterbridgeManager.php index 2cf3f540c8f..e88293b9d0b 100644 --- a/lib/MatterbridgeManager.php +++ b/lib/MatterbridgeManager.php @@ -25,7 +25,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; use OCP\IAvatarManager; -use OCP\IConfig; use OCP\IDBConnection; use OCP\IURLGenerator; use OCP\IUserManager; @@ -43,7 +42,6 @@ class MatterbridgeManager { public function __construct( private readonly IDBConnection $db, - private readonly IConfig $config, private readonly IAppConfig $appConfig, private readonly IURLGenerator $urlGenerator, private readonly IUserManager $userManager, diff --git a/lib/Signaling/Manager.php b/lib/Signaling/Manager.php index 483dc1db7f8..ca1fc916125 100644 --- a/lib/Signaling/Manager.php +++ b/lib/Signaling/Manager.php @@ -12,7 +12,6 @@ use OCA\Talk\CachePrefix; use OCA\Talk\Config; use OCA\Talk\Service\CertificateService; -use OCA\Talk\Service\RoomService; use OCP\AppFramework\Http; use OCP\AppFramework\Services\IAppConfig; use OCP\AppFramework\Utility\ITimeFactory; @@ -20,7 +19,6 @@ use OCP\Http\Client\IResponse; use OCP\ICache; use OCP\ICacheFactory; -use OCP\IConfig; class Manager { public const FEATURE_HEADER = 'X-Spreed-Signaling-Features'; @@ -29,10 +27,8 @@ class Manager { private readonly ICache $cache; public function __construct( - private readonly IConfig $serverConfig, private readonly IAppConfig $appConfig, private readonly Config $talkConfig, - private readonly RoomService $roomService, private readonly ITimeFactory $timeFactory, private readonly IClientService $clientService, private readonly CertificateService $certificateService, diff --git a/tests/php/Controller/SignalingControllerTest.php b/tests/php/Controller/SignalingControllerTest.php index d864ea88de0..db9f3f3323b 100644 --- a/tests/php/Controller/SignalingControllerTest.php +++ b/tests/php/Controller/SignalingControllerTest.php @@ -1396,7 +1396,6 @@ public function testLeaveRoomWithOldSession(): void { $this->manager = new Manager( $dbConnection, - \OCP\Server::get(IConfig::class), $this->createMock(Config::class), $appConfig, \OCP\Server::get(IAppManager::class), diff --git a/tests/php/MatterbridgeManagerTest.php b/tests/php/MatterbridgeManagerTest.php index 7787544ce9a..65f9f0c8d1a 100644 --- a/tests/php/MatterbridgeManagerTest.php +++ b/tests/php/MatterbridgeManagerTest.php @@ -74,7 +74,6 @@ public function setUp(): void { $this->matterbridgeManager = new MatterbridgeManager( $this->db, - $this->config, $this->appConfig, $this->url, $this->userManager, @@ -171,7 +170,6 @@ public function testDeleteBridgeOfRoomLogsCriticalAction(): void { $matterbridgeManager = $this->getMockBuilder(MatterbridgeManager::class) ->setConstructorArgs([ $this->db, - $this->config, $this->appConfig, $this->url, $this->userManager, diff --git a/tests/php/Recording/BackendNotifierTest.php b/tests/php/Recording/BackendNotifierTest.php index c9959a08dc0..6b0b008854b 100644 --- a/tests/php/Recording/BackendNotifierTest.php +++ b/tests/php/Recording/BackendNotifierTest.php @@ -109,7 +109,6 @@ public function setUp(): void { $dbConnection = \OCP\Server::get(IDBConnection::class); $this->manager = new Manager( $dbConnection, - $config, $this->config, $this->appConfig, \OCP\Server::get(IAppManager::class),