diff --git a/src/bundle/DependencyInjection/IbexaSolrExtension.php b/src/bundle/DependencyInjection/IbexaSolrExtension.php index 5d04213..8bb5757 100644 --- a/src/bundle/DependencyInjection/IbexaSolrExtension.php +++ b/src/bundle/DependencyInjection/IbexaSolrExtension.php @@ -20,12 +20,12 @@ use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension; /** * @phpstan-type SolrHttpClientConfigArray = array{timeout: int, max_retries: int} */ -class IbexaSolrExtension extends Extension +class IbexaSolrExtension extends ConfigurableExtension { /** * Main Solr search handler service ID. @@ -103,15 +103,13 @@ public function getServicePrefix(): string } /** + * @param array $mergedConfig + * * @throws \InvalidArgumentException When provided tag is not defined in this extension * @throws \Exception */ - public function load(array $configs, ContainerBuilder $container): void + public function loadInternal(array $mergedConfig, ContainerBuilder $container): void { - $configuration = $this->getConfiguration($configs, $container); - assert($configuration !== null); - $config = $this->processConfiguration($configuration, $configs); - // Loading configuration from lib/Resources/config/container $loader = new YamlFileLoader( $container, @@ -125,7 +123,7 @@ public function load(array $configs, ContainerBuilder $container): void ); $loader->load('services.yml'); - $this->processConnectionConfiguration($container, $config); + $this->processConnectionConfiguration($container, $mergedConfig); $container ->registerForAutoconfiguration(UpdateSerializerInterface::class)