diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-11-11 22:04:12 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-11-20 23:13:22 +0100 |
commit | 5be18215fb52f2ee907c73d6f3ee1bad5222c86d (patch) | |
tree | 8aafe6d819e60632e9fc7be52928d3925a61eb40 /lib/private/Server.php | |
parent | c31e4266c71fa34707455fc41b728a50db2c606e (diff) | |
download | nextcloud-server-5be18215fb52f2ee907c73d6f3ee1bad5222c86d.tar.gz nextcloud-server-5be18215fb52f2ee907c73d6f3ee1bad5222c86d.zip |
Auto-wire as much as possible in the encryption app
Also cleans up only non-classname services in the server container
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 1a2085fa0bc..360d682e0dd 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -150,6 +150,8 @@ use OCP\Dashboard\IDashboardManager; use OCP\Defaults; use OCP\Diagnostics\IEventLogger; use OCP\Diagnostics\IQueryLogger; +use OCP\Encryption\IFile; +use OCP\Encryption\Keys\IStorage; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationProviderManager; @@ -334,7 +336,9 @@ class Server extends ServerContainer implements IServerContainer { /** @deprecated 19.0.0 */ $this->registerDeprecatedAlias('EncryptionManager', \OCP\Encryption\IManager::class); - $this->registerService('EncryptionFileHelper', function (ContainerInterface $c) { + /** @deprecated 21.0.0 */ + $this->registerDeprecatedAlias('EncryptionFileHelper', IFile::class); + $this->registerService(IFile::class, function (ContainerInterface $c) { $util = new Encryption\Util( new View(), $c->get(IUserManager::class), @@ -348,7 +352,9 @@ class Server extends ServerContainer implements IServerContainer { ); }); - $this->registerService('EncryptionKeyStorage', function (ContainerInterface $c) { + /** @deprecated 21.0.0 */ + $this->registerDeprecatedAlias('EncryptionKeyStorage', IStorage::class); + $this->registerService(IStorage::class, function (ContainerInterface $c) { $view = new View(); $util = new Encryption\Util( $view, @@ -1427,7 +1433,7 @@ class Server extends ServerContainer implements IServerContainer { * @deprecated 20.0.0 */ public function getEncryptionFilesHelper() { - return $this->get('EncryptionFileHelper'); + return $this->get(IFile::class); } /** @@ -1435,7 +1441,7 @@ class Server extends ServerContainer implements IServerContainer { * @deprecated 20.0.0 */ public function getEncryptionKeyStorage() { - return $this->get('EncryptionKeyStorage'); + return $this->get(IStorage::class); } /** |