From cb51649bd6d920b61a11b6fa0583c8511181338b Mon Sep 17 00:00:00 2001 From: Nikita Pimenov Date: Fri, 22 Sep 2023 22:06:24 +0400 Subject: [PATCH 1/2] refactor: use IndexDocumentBuilder::createDocument* methods directly --- model/search/ResultIndexIterator.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/model/search/ResultIndexIterator.php b/model/search/ResultIndexIterator.php index fbe3265d..a0bb0ca0 100644 --- a/model/search/ResultIndexIterator.php +++ b/model/search/ResultIndexIterator.php @@ -21,8 +21,8 @@ namespace oat\taoOutcomeUi\model\search; use oat\tao\helpers\UserHelper; +use oat\tao\model\search\index\DocumentBuilder\IndexDocumentBuilderInterface; use oat\tao\model\search\index\IndexDocument; -use oat\tao\model\search\index\IndexService; use oat\taoDelivery\model\execution\DeliveryExecutionInterface; use oat\taoDelivery\model\execution\ServiceProxy; use oat\taoDelivery\model\execution\DeliveryExecution; @@ -254,8 +254,12 @@ protected function createDocument(DeliveryExecution $execution) 'id' => $execution->getIdentifier(), 'body' => $body ]; - /** @var IndexService $indexService */ - $indexService = $this->getServiceLocator()->get(IndexService::SERVICE_ID); - return $indexService->createDocumentFromArray($document); + + return $this->getIndexDocumentBuilder()->createDocumentFromArray($document); + } + + private function getIndexDocumentBuilder(): IndexDocumentBuilderInterface + { + return $this->getServiceLocator()->getContainer()->get(IndexDocumentBuilderInterface::class); } } From 8dad692c72a631ae85f1251fce25ec7a6e5c124b Mon Sep 17 00:00:00 2001 From: Nikita Pimenov Date: Mon, 25 Sep 2023 17:40:55 +0400 Subject: [PATCH 2/2] chore: update dependency requirement --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4ad25ac7..7283de2d 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,7 @@ "require": { "oat-sa/oatbox-extension-installer": "~1.1||dev-master", "oat-sa/generis" : ">=15.22", - "oat-sa/tao-core" : ">=50.24.6", + "oat-sa/tao-core" : ">=53.7.1", "oat-sa/extension-tao-item" : ">=11.0.0", "oat-sa/extension-tao-delivery-rdf" : ">=14.0.0", "oat-sa/extension-tao-delivery" : ">=15.0.0",