]> source.dussan.org Git - nextcloud-server.git/commitdiff
Deprecate the named alias of IBus 23245/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 7 Oct 2020 07:19:10 +0000 (09:19 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 7 Oct 2020 16:58:05 +0000 (18:58 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/Server.php

index 213ae7a83e0fc6c6064e14e5d6fac11a9e24ad30..55a3d2da7d885e0dd56bd7a8de9297a0569c79b9 100644 (file)
@@ -911,7 +911,7 @@ class Server extends ServerContainer implements IServerContainer {
 
                /** @deprecated 20.0.0 */
                $this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class);
-               $this->registerService('AsyncCommandBus', function (Server $c) {
+               $this->registerService(IBus::class, function (Server $c) {
                        $busClass = $c->getConfig()->getSystemValue('commandbus');
                        if ($busClass) {
                                [$app, $class] = explode('::', $busClass, 2);
@@ -926,7 +926,7 @@ class Server extends ServerContainer implements IServerContainer {
                                return new CronBus($jobList);
                        }
                });
-               $this->registerAlias(IBus::class, 'AsyncCommandBus');
+               $this->registerDeprecatedAlias('AsyncCommandBus', IBus::class);
                /** @deprecated 20.0.0 */
                $this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class);
                /** @deprecated 19.0.0 */
@@ -1959,7 +1959,7 @@ class Server extends ServerContainer implements IServerContainer {
         * @deprecated 20.0.0
         */
        public function getCommandBus() {
-               return $this->query('AsyncCommandBus');
+               return $this->get(IBus::class);
        }
 
        /**