Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2021-08-10 14:49:10 +0300
committerGitHub <noreply@github.com>2021-08-10 14:49:10 +0300
commitb697c04905bf6b89dc36d67353f1af9037d6aebf (patch)
treed15a0b7433a7af657e14174f430a6953a287ae04
parentb116b819a5b167fe7f50acc7aacf15f123f55dd9 (diff)
parent4b8aa6b8d63267bd6995a1087f61d3149ef66c94 (diff)
Merge pull request #619 from nextcloud/bugfix/noid/app-boot
Register services during registration instead of boot
-rw-r--r--lib/AppInfo/Application.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 794ecde..bcbb084 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -48,6 +48,7 @@ use OCP\INavigationManager;
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 @@ class Application extends App implements IBootstrap {
public function register(IRegistrationContext $context): void {
$context->registerCapability(Capabilities::class);
$context->registerSearchProvider(UnifiedSearchProvider::class);
+ $this->registerServices($this->getContainer());
}
/**
@@ -84,7 +86,6 @@ class Application extends App implements IBootstrap {
* @throws Throwable
*/
public function boot(IBootContext $context): void {
- $context->injectFn(Closure::fromCallable([$this, 'registerServices']));
$context->injectFn(Closure::fromCallable([$this, 'registerNavigation']));
}
@@ -92,9 +93,9 @@ class Application extends App implements IBootstrap {
/**
* 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);