diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-05-09 11:02:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 11:02:02 +0200 |
commit | 0659656c722268f624fdbfd495825b4fb4b15574 (patch) | |
tree | 434177522457e147a7ebf9452ac0f591ba97bd31 | |
parent | 10f62eb2a4bdb359594f066b49673374373d6f98 (diff) | |
parent | 32c93ee08ea8ac457de262b9f5ba7dbfbe765178 (diff) | |
download | nextcloud-server-0659656c722268f624fdbfd495825b4fb4b15574.tar.gz nextcloud-server-0659656c722268f624fdbfd495825b4fb4b15574.zip |
Merge pull request #20786 from nextcloud/enh/dicontainer_cleanup
DI Cleanup
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 8 | ||||
-rw-r--r-- | lib/private/Server.php | 4 |
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index a9d06fac22c..b3a9ae99be3 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -58,7 +58,6 @@ use OCP\AppFramework\Utility\IControllerMethodReflector; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\Folder; use OCP\Files\IAppData; -use OCP\GlobalScale\IConfig; use OCP\Group\ISubAdmin; use OCP\IL10N; use OCP\ILogger; @@ -154,10 +153,6 @@ class DIContainer extends SimpleContainer implements IAppContainer { return $c->getServer()->getThemingDefaults(); }); - $this->registerService(IConfig::class, function ($c) { - return $c->query(OC\GlobalScale\Config::class); - }); - $this->registerService('Protocol', function ($c) { /** @var \OC\Server $server */ $server = $c->query('ServerContainer'); @@ -293,9 +288,6 @@ class DIContainer extends SimpleContainer implements IAppContainer { return $dispatcher; }); - $this->registerAlias(\OCP\Collaboration\Resources\IProviderManager::class, OC\Collaboration\Resources\ProviderManager::class); - $this->registerAlias(\OCP\Collaboration\Resources\IManager::class, OC\Collaboration\Resources\Manager::class); - $this->registerAlias(IAppConfig::class, OC\AppFramework\Services\AppConfig::class); $this->registerAlias(IInitialState::class, OC\AppFramework\Services\InitialState::class); } diff --git a/lib/private/Server.php b/lib/private/Server.php index 4fe89e3098e..9c3c6391c34 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -1281,9 +1281,7 @@ class Server extends ServerContainer implements IServerContainer { return new CloudIdManager(); }); - $this->registerService(IConfig::class, function (Server $c) { - return new GlobalScale\Config($c->getConfig()); - }); + $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); $this->registerService(ICloudFederationProviderManager::class, function (Server $c) { return new CloudFederationProviderManager($c->getAppManager(), $c->getHTTPClientService(), $c->getCloudIdManager(), $c->getLogger()); |