diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-06-22 18:19:00 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-06-22 21:58:13 +0200 |
commit | 6e531b5ab5a29b40fb4ad555eb33374e0c89bdea (patch) | |
tree | a0a1e753085fbedffbb11d7b24ca0385c7aee304 /lib | |
parent | 523572fcea39814794399aab46239e068ba54a22 (diff) | |
download | nextcloud-server-6e531b5ab5a29b40fb4ad555eb33374e0c89bdea.tar.gz nextcloud-server-6e531b5ab5a29b40fb4ad555eb33374e0c89bdea.zip |
avoid early DI of IAppManager
- might break install
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Dashboard/Manager.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Dashboard/Manager.php b/lib/private/Dashboard/Manager.php index e75a36b137f..2aeedf3174e 100644 --- a/lib/private/Dashboard/Manager.php +++ b/lib/private/Dashboard/Manager.php @@ -44,11 +44,10 @@ class Manager implements IManager { private $widgets = []; private ContainerInterface $serverContainer; - private IAppManager $appManager; + private ?IAppManager $appManager = null; - public function __construct(ContainerInterface $serverContainer, IAppManager $appManager) { + public function __construct(ContainerInterface $serverContainer) { $this->serverContainer = $serverContainer; - $this->appManager = $appManager; } private function registerWidget(IWidget $widget): void { @@ -64,6 +63,9 @@ class Manager implements IManager { } public function loadLazyPanels(): void { + if ($this->appManager === null) { + $this->appManager = $this->serverContainer->get(IAppManager::class); + } $services = $this->lazyWidgets; foreach ($services as $service) { /** @psalm-suppress InvalidCatch */ |