fix(container): Don't use deprecated things to set up controllers for apps

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2025-08-06 16:12:44 +02:00
parent 17c40b9474
commit 2f18996347
No known key found for this signature in database
GPG key ID: F72FA5B49FFA96B0
2 changed files with 2 additions and 3 deletions

View file

@ -134,8 +134,7 @@ class App {
$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');

View file

@ -152,7 +152,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$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),