diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-11-21 00:04:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-21 00:04:54 +0100 |
commit | db3a3bee377a3d4e7b5f54b863cbd8b7b2fa8607 (patch) | |
tree | 1070e67cdf79fe64e65a3d25e803844db2ef44fc /lib | |
parent | 6811274cfd642fa5a4bbfcdab46b43cfafc65441 (diff) | |
parent | 5be18215fb52f2ee907c73d6f3ee1bad5222c86d (diff) | |
download | nextcloud-server-db3a3bee377a3d4e7b5f54b863cbd8b7b2fa8607.tar.gz nextcloud-server-db3a3bee377a3d4e7b5f54b863cbd8b7b2fa8607.zip |
Merge pull request #24064 from nextcloud/techdebt/noid/auto-wire-encryption-app
Auto-wire as much as possible in the encryption app
Diffstat (limited to 'lib')
-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); } /** |