diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-23 16:55:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 16:55:42 +0200 |
commit | b888c6146327d842e21988b0d90d6ade4f3a9435 (patch) | |
tree | aa115b3d420cb6ccfa18a6a5af146eff8578b82c /apps/user_ldap | |
parent | 5f90a6a5e2da08e7098cc44937c1713375823e74 (diff) | |
parent | 49334e4d9c278d33ce9fd4195b5a12af99821be2 (diff) | |
download | nextcloud-server-b888c6146327d842e21988b0d90d6ade4f3a9435.tar.gz nextcloud-server-b888c6146327d842e21988b0d90d6ade4f3a9435.zip |
Merge pull request #33047 from nextcloud/fix/ijob-logger-deprecated
Deprecated ILogger from IJob
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Jobs/Sync.php | 8 | ||||
-rw-r--r-- | apps/user_ldap/tests/Jobs/SyncTest.php | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php index 3d0dd88dfd2..d9171f4aab7 100644 --- a/apps/user_ldap/lib/Jobs/Sync.php +++ b/apps/user_ldap/lib/Jobs/Sync.php @@ -24,7 +24,6 @@ */ namespace OCA\User_LDAP\Jobs; -use OC\BackgroundJob\TimedJob; use OC\ServerNotAvailableException; use OCA\User_LDAP\AccessFactory; use OCA\User_LDAP\Configuration; @@ -33,6 +32,8 @@ use OCA\User_LDAP\Helper; use OCA\User_LDAP\LDAP; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User\Manager; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; use OCP\IAvatarManager; use OCP\IConfig; use OCP\IDBConnection; @@ -68,7 +69,8 @@ class Sync extends TimedJob { /** @var AccessFactory */ protected $accessFactory; - public function __construct(Manager $userManager) { + public function __construct(Manager $userManager, ITimeFactory $time) { + parent::__construct($time); $this->userManager = $userManager; $this->setInterval( \OC::$server->getConfig()->getAppValue( @@ -298,8 +300,6 @@ class Sync extends TimedJob { /** * "fixes" DI - * - * @param array $argument */ public function setArgument($argument) { if (isset($argument['config'])) { diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 5592a2531bc..8d23efb4da8 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -34,6 +34,7 @@ use OCA\User_LDAP\Jobs\Sync; use OCA\User_LDAP\LDAP; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User\Manager; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\IAvatarManager; use OCP\IConfig; use OCP\IDBConnection; @@ -98,7 +99,7 @@ class SyncTest extends TestCase { 'accessFactory' => $this->accessFactory, ]; - $this->sync = new Sync($this->userManager); + $this->sync = new Sync($this->userManager, $this->createMock(ITimeFactory::class)); } public function intervalDataProvider() { |