Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/private/AppFramework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ public static function main(string $controllerName, string $methodName, DIContai
$eventLogger->start('app:controller:dispatcher', 'Initialize dispatcher and pre-middleware');

// initialize the dispatcher and run all the middleware before the controller
/** @var Dispatcher $dispatcher */
$dispatcher = $container['Dispatcher'];
$dispatcher = $container->get(Dispatcher::class);

$eventLogger->end('app:controller:dispatcher');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
use Psr\Log\LoggerInterface;

class DIContainer extends SimpleContainer implements IAppContainer {
private string $appName;
protected string $appName;
private array $middleWares = [];
private ServerContainer $server;

Expand Down Expand Up @@ -152,7 +152,7 @@ public function __construct(string $appName, array $urlParams = [], ?ServerConta
$this->registerDeprecatedAlias('Dispatcher', Dispatcher::class);
$this->registerService(Dispatcher::class, function (ContainerInterface $c) {
return new Dispatcher(
$c->get('Protocol'),
$c->get(Http::class),
$c->get(MiddlewareDispatcher::class),
$c->get(IControllerMethodReflector::class),
$c->get(IRequest::class),
Expand Down
4 changes: 3 additions & 1 deletion lib/private/AppFramework/Utility/SimpleContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ protected function registerDeprecatedAlias(string $alias, string $target): void
$this->registerService($alias, function (ContainerInterface $container) use ($target, $alias): mixed {
try {
$logger = $container->get(LoggerInterface::class);
$logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
$logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', [
'app' => $this->appName ?? 'serverDI',
]);
} catch (ContainerExceptionInterface $e) {
// Could not get logger. Continue
}
Expand Down
Loading