Skip to content

Commit 9913bdd

Browse files
committed
chore: Cleanup DIContainer class
Also removed deprecated tag from the class as this class will not be removed, only the interface IAppContainer and associated methods should be removed. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent f05ae48 commit 9913bdd

File tree

7 files changed

+81
-168
lines changed

7 files changed

+81
-168
lines changed

apps/settings/tests/AppInfo/ApplicationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void {
3939

4040
public function testContainerAppName(): void {
4141
$this->app = new Application();
42-
$this->assertEquals('settings', $this->container->getAppName());
42+
$this->assertEquals('settings', $this->container->get('appName'));
4343
}
4444

4545
public static function dataContainerQuery(): array {

lib/private/AppFramework/App.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static function main(string $controllerName, string $methodName, DIContai
101101
$profiler->setEnabled($profiler->isEnabled() && !is_null($urlParams) && isset($urlParams['_route']) && !str_starts_with($urlParams['_route'], 'profiler.'));
102102
if ($profiler->isEnabled()) {
103103
\OC::$server->get(IEventLogger::class)->activate();
104-
$profiler->add(new RoutingDataCollector($container['AppName'], $controllerName, $methodName));
104+
$profiler->add(new RoutingDataCollector($container['appName'], $controllerName, $methodName));
105105
}
106106

107107
$eventLogger->start('app:controller:params', 'Gather controller parameters');
@@ -115,7 +115,7 @@ public static function main(string $controllerName, string $methodName, DIContai
115115
$request = $container->get(IRequest::class);
116116
$request->setUrlParameters($container['urlParams']);
117117
}
118-
$appName = $container['AppName'];
118+
$appName = $container['appName'];
119119

120120
$eventLogger->end('app:controller:params');
121121

0 commit comments

Comments
 (0)