Add missing alias for OCP\Settings\IManager and deprecate the old one

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-09-04 16:39:01 +02:00
parent 3c62767873
commit 770d12d191
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 3 additions and 10 deletions

View File

@ -1226,15 +1226,8 @@ class Server extends ServerContainer implements IServerContainer {
$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->registerService('SettingsManager', function (Server $c) {
$manager = new \OC\Settings\Manager(
$c->getLogger(),
$c->getL10NFactory(),
$c->getURLGenerator(),
$c
);
return $manager;
});
$this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class);
$this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class);
$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
return new \OC\Files\AppData\Factory(
$c->getRootFolder(),
@ -2198,7 +2191,7 @@ class Server extends ServerContainer implements IServerContainer {
* @deprecated
*/
public function getSettingsManager() {
return $this->query('SettingsManager');
return $this->query(\OC\Settings\Manager::class);
}
/**