aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-11 22:04:12 +0100
committerMorris Jobke <hey@morrisjobke.de>2020-11-20 23:13:22 +0100
commit5be18215fb52f2ee907c73d6f3ee1bad5222c86d (patch)
tree8aafe6d819e60632e9fc7be52928d3925a61eb40 /lib/private/Server.php
parentc31e4266c71fa34707455fc41b728a50db2c606e (diff)
downloadnextcloud-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.php14
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);
}
/**