Add proper alias for internal router class

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-11-23 16:14:19 +01:00
parent eddc31a07b
commit d9708ebece
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 3 additions and 1 deletions

View File

@ -117,6 +117,7 @@ use OC\Preview\GeneratorHelper;
use OC\Remote\Api\ApiFactory;
use OC\Remote\InstanceFactory;
use OC\RichObjectStrings\Validator;
use OC\Route\Router;
use OC\Security\Bruteforce\Throttler;
use OC\Security\CertificateManager;
use OC\Security\CredentialsManager;
@ -759,7 +760,7 @@ class Server extends ServerContainer implements IServerContainer {
/** @deprecated 19.0.0 */
$this->registerDeprecatedAlias('JobList', IJobList::class);
$this->registerService(IRouter::class, function (Server $c) {
$this->registerService(Router::class, function (Server $c) {
$cacheFactory = $c->get(ICacheFactory::class);
$logger = $c->get(ILogger::class);
if ($cacheFactory->isLocalCacheAvailable()) {
@ -769,6 +770,7 @@ class Server extends ServerContainer implements IServerContainer {
}
return $router;
});
$this->registerAlias(IRouter::class, Router::class);
/** @deprecated 19.0.0 */
$this->registerDeprecatedAlias('Router', IRouter::class);