From 352666cdf8903d1d53179fc9f903febec59b756e Mon Sep 17 00:00:00 2001 From: Holger Veltrup Date: Wed, 15 May 2024 15:54:37 +0200 Subject: [PATCH] fix: indexer config loading for resource-layout channels --- src/Service/Indexer/IndexerConfigurationLoader.php | 4 ++-- test/Service/Indexer/IndexerConfigurationLoaderTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Service/Indexer/IndexerConfigurationLoader.php b/src/Service/Indexer/IndexerConfigurationLoader.php index fe9dfb9..6cb1c5f 100644 --- a/src/Service/Indexer/IndexerConfigurationLoader.php +++ b/src/Service/Indexer/IndexerConfigurationLoader.php @@ -21,7 +21,7 @@ public function __construct( */ public function loadAll(): array { - $dir = $this->resourceChannel->resourceDir . '/indexer'; + $dir = $this->resourceChannel->baseDir . '/indexer'; if (!is_dir($dir)) { return []; } @@ -38,7 +38,7 @@ public function loadAll(): array private function getFile(string $source): string { - return $this->resourceChannel->resourceDir . + return $this->resourceChannel->baseDir . '/indexer/' . $source . '.php'; } diff --git a/test/Service/Indexer/IndexerConfigurationLoaderTest.php b/test/Service/Indexer/IndexerConfigurationLoaderTest.php index c61f907..9765991 100644 --- a/test/Service/Indexer/IndexerConfigurationLoaderTest.php +++ b/test/Service/Indexer/IndexerConfigurationLoaderTest.php @@ -122,7 +122,7 @@ public function testLoadAllWithConfigReturnString(): void } private function createLoader( - string $resourceDir + string $baseDir ): IndexerConfigurationLoader { $resourceChannel = new ResourceChannel( '', @@ -132,8 +132,8 @@ private function createLoader( false, '', '', + $baseDir, '', - $resourceDir, '', [] );