Fixes#19345
Basically just a stupid wrapper with extra logging. So that we can at
least inform people they are using the wrong methods.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
private function registerDeprecatedAlias(string $alias, string $target) {
$this->registerService($alias, function (IContainer $container) use ($target, $alias) {
try {
/** @var ILogger $logger */
$logger = $container->query(ILogger::class);
$logger->debug('The requested alias "' . $alias . '" is depreacted. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);