From 02b4f19d52da6ddf04f6aae01d0b26d0f3c87032 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 25 Jul 2024 10:33:45 +0200 Subject: [PATCH] IBX-8394: Used new RepositoryConfigurationProviderInterface contract (#74) For more details see https://issues.ibexa.co/browse/IBX-8394 and https://github.com/ibexa/solr/pull/74 Key changes: * [Rector] Used new RepositoryConfigurationProviderInterface contract * Replaced `$repositoryConfigurationProvider` PHPDoc with strict type --------- Co-Authored-By: Konrad Oboza --- src/bundle/ApiLoader/BoostFactorProviderFactory.php | 9 +++------ src/bundle/ApiLoader/IndexingDepthProviderFactory.php | 9 +++------ src/bundle/ApiLoader/SolrEngineFactory.php | 7 +++---- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/bundle/ApiLoader/BoostFactorProviderFactory.php b/src/bundle/ApiLoader/BoostFactorProviderFactory.php index 8c74159d..cd054f66 100644 --- a/src/bundle/ApiLoader/BoostFactorProviderFactory.php +++ b/src/bundle/ApiLoader/BoostFactorProviderFactory.php @@ -7,7 +7,7 @@ namespace Ibexa\Bundle\Solr\ApiLoader; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Solr\FieldMapper\BoostFactorProvider; use LogicException; use Symfony\Component\DependencyInjection\ContainerAwareInterface; @@ -20,10 +20,7 @@ class BoostFactorProviderFactory implements ContainerAwareInterface { use ContainerAwareTrait; - /** - * @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider - */ - private $repositoryConfigurationProvider; + private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; /** * @var string @@ -40,7 +37,7 @@ class BoostFactorProviderFactory implements ContainerAwareInterface * @param string $boostFactorProviderClass */ public function __construct( - RepositoryConfigurationProvider $repositoryConfigurationProvider, + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, $defaultConnection, $boostFactorProviderClass ) { diff --git a/src/bundle/ApiLoader/IndexingDepthProviderFactory.php b/src/bundle/ApiLoader/IndexingDepthProviderFactory.php index 13843675..a78722bc 100644 --- a/src/bundle/ApiLoader/IndexingDepthProviderFactory.php +++ b/src/bundle/ApiLoader/IndexingDepthProviderFactory.php @@ -8,7 +8,7 @@ namespace Ibexa\Bundle\Solr\ApiLoader; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Solr\FieldMapper\IndexingDepthProvider; use LogicException; use Symfony\Component\DependencyInjection\ContainerAwareInterface; @@ -18,10 +18,7 @@ class IndexingDepthProviderFactory implements ContainerAwareInterface { use ContainerAwareTrait; - /** - * @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider - */ - private $repositoryConfigurationProvider; + private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; /** * @var string @@ -34,7 +31,7 @@ class IndexingDepthProviderFactory implements ContainerAwareInterface private $indexingDepthProviderClass; public function __construct( - RepositoryConfigurationProvider $repositoryConfigurationProvider, + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, string $defaultConnection, string $indexingDepthProviderClass ) { diff --git a/src/bundle/ApiLoader/SolrEngineFactory.php b/src/bundle/ApiLoader/SolrEngineFactory.php index 7352e535..dbb72533 100644 --- a/src/bundle/ApiLoader/SolrEngineFactory.php +++ b/src/bundle/ApiLoader/SolrEngineFactory.php @@ -7,7 +7,7 @@ namespace Ibexa\Bundle\Solr\ApiLoader; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Solr\DocumentMapper; use Ibexa\Solr\CoreFilter\CoreFilterRegistry; @@ -16,8 +16,7 @@ class SolrEngineFactory { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; + private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; /** @var string */ private $defaultConnection; @@ -44,7 +43,7 @@ class SolrEngineFactory private $locationResultExtractor; public function __construct( - RepositoryConfigurationProvider $repositoryConfigurationProvider, + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, $defaultConnection, $searchEngineClass, GatewayRegistry $gatewayRegistry,