diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index 353a76f8f1a..fc28d0e7393 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -44,7 +44,6 @@ use OCP\Files\IMimeTypeDetector; use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; -use OCP\ITempManager; use phpseclib\Crypt\RSA; use phpseclib\File\X509; @@ -66,14 +65,12 @@ class Checker { private $appLocator; /** @var FileAccessHelper */ private $fileAccessHelper; - /** @var IConfig */ + /** @var IConfig|null */ private $config; /** @var ICache */ private $cache; - /** @var IAppManager */ + /** @var IAppManager|null */ private $appManager; - /** @var ITempManager */ - private $tempManager; /** @var IMimeTypeDetector */ private $mimeTypeDetector; @@ -81,19 +78,17 @@ class Checker { * @param EnvironmentHelper $environmentHelper * @param FileAccessHelper $fileAccessHelper * @param AppLocator $appLocator - * @param IConfig $config + * @param IConfig|null $config * @param ICacheFactory $cacheFactory - * @param IAppManager $appManager - * @param ITempManager $tempManager + * @param IAppManager|null $appManager * @param IMimeTypeDetector $mimeTypeDetector */ public function __construct(EnvironmentHelper $environmentHelper, FileAccessHelper $fileAccessHelper, AppLocator $appLocator, - IConfig $config = null, + ?IConfig $config, ICacheFactory $cacheFactory, - IAppManager $appManager = null, - ITempManager $tempManager, + ?IAppManager $appManager, IMimeTypeDetector $mimeTypeDetector) { $this->environmentHelper = $environmentHelper; $this->fileAccessHelper = $fileAccessHelper; @@ -101,7 +96,6 @@ class Checker { $this->config = $config; $this->cache = $cacheFactory->createDistributed(self::CACHE_KEY); $this->appManager = $appManager; - $this->tempManager = $tempManager; $this->mimeTypeDetector = $mimeTypeDetector; } diff --git a/lib/private/Server.php b/lib/private/Server.php index 680eea3beca..1114e60f475 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -942,7 +942,6 @@ class Server extends ServerContainer implements IServerContainer { $config, $c->get(ICacheFactory::class), $appManager, - $c->get(ITempManager::class), $c->get(IMimeTypeDetector::class) ); }); diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index 995b0c68e30..bc1987bedab 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -77,7 +77,6 @@ class CheckerTest extends TestCase { $this->config, $this->cacheFactory, $this->appManager, - \OC::$server->getTempManager(), $this->mimeTypeDetector ); } @@ -1279,7 +1278,6 @@ class CheckerTest extends TestCase { $this->config, $this->cacheFactory, $this->appManager, - \OC::$server->getTempManager(), $this->mimeTypeDetector, ]) ->setMethods([