diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 794ecde2..bcbb0845 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -48,6 +48,7 @@ use OCP\IServerContainer; use OCP\IURLGenerator; use Symfony\Component\Routing\Exception\RouteNotFoundException; +use Psr\Container\ContainerInterface; use Throwable; require_once __DIR__ . '/../../vendor/autoload.php'; @@ -76,6 +77,7 @@ public function __construct(array $params = []) { public function register(IRegistrationContext $context): void { $context->registerCapability(Capabilities::class); $context->registerSearchProvider(UnifiedSearchProvider::class); + $this->registerServices($this->getContainer()); } /** @@ -84,7 +86,6 @@ public function register(IRegistrationContext $context): void { * @throws Throwable */ public function boot(IBootContext $context): void { - $context->injectFn(Closure::fromCallable([$this, 'registerServices'])); $context->injectFn(Closure::fromCallable([$this, 'registerNavigation'])); } @@ -92,9 +93,9 @@ public function boot(IBootContext $context): void { /** * Register Navigation Tab * - * @param IServerContainer $container + * @param ContainerInterface $container */ - protected function registerServices(IServerContainer $container) { + protected function registerServices(ContainerInterface $container) { /** @var IFullTextSearchManager $fullTextSearchManager */ $fullTextSearchManager = $container->get(IFullTextSearchManager::class);