From dee02a12d28007806c30e745ccc1a9640c25f25a Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Tue, 16 Apr 2024 10:21:07 +0200 Subject: [PATCH] move require autoloader to Application::register Signed-off-by: Julien Veyssier --- lib/AppInfo/Application.php | 2 ++ lib/Service/AssistantService.php | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 4960cb4c..45668a92 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -68,6 +68,8 @@ public function __construct(array $urlParams = []) { } public function register(IRegistrationContext $context): void { + require_once __DIR__ . '/../../vendor/autoload.php'; + $context->registerCapability(Capabilities::class); $context->registerReferenceProvider(Text2ImageReferenceProvider::class); diff --git a/lib/Service/AssistantService.php b/lib/Service/AssistantService.php index f4572d40..21d12b69 100644 --- a/lib/Service/AssistantService.php +++ b/lib/Service/AssistantService.php @@ -2,8 +2,6 @@ namespace OCA\Assistant\Service; -require_once __DIR__ . '/../../vendor/autoload.php'; - use Html2Text\Html2Text; use OC\SpeechToText\TranscriptionJob; use OCA\Assistant\AppInfo\Application;