diff --git a/composer.json b/composer.json index aedd0cde8..84cf82b17 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/ece-tools", "description": "Provides tools to build and deploy Magento 2 Enterprise Edition", "type": "magento2-component", - "version": "2002.1.3", + "version": "2002.1.4", "license": "OSL-3.0", "repositories": { "repo.magento.com": { diff --git a/src/Config/Validator/Deploy/SearchConfiguration.php b/src/Config/Validator/Deploy/SearchConfiguration.php index dd6dfd850..8e774bd94 100644 --- a/src/Config/Validator/Deploy/SearchConfiguration.php +++ b/src/Config/Validator/Deploy/SearchConfiguration.php @@ -10,13 +10,13 @@ use Magento\MagentoCloud\App\Error; use Magento\MagentoCloud\App\GenericException; use Magento\MagentoCloud\Config\ConfigMerger; +use Magento\MagentoCloud\Config\SearchEngine; use Magento\MagentoCloud\Config\Stage\DeployInterface; use Magento\MagentoCloud\Config\Validator; use Magento\MagentoCloud\Config\Validator\ResultFactory; use Magento\MagentoCloud\Config\ValidatorException; use Magento\MagentoCloud\Config\ValidatorInterface; use Magento\MagentoCloud\Package\MagentoVersion; -use Magento\MagentoCloud\Service\ElasticSearch; /** * Validates SEARCH_CONFIGURATION variable @@ -74,7 +74,7 @@ public function validate(): Validator\ResultInterface if ($this->magentoVersion->isGreaterOrEqual('2.4.0') && isset($searchConfig['engine']) - && $searchConfig['engine'] != ElasticSearch::ENGINE_NAME + && $searchConfig['engine'] == SearchEngine::ENGINE_MYSQL ) { return $this->resultFactory->errorByCode(Error::DEPLOY_WRONG_SEARCH_ENGINE); } diff --git a/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php b/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php index 29001079f..c7c62d59e 100644 --- a/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php +++ b/src/Test/Unit/Config/Validator/Deploy/SearchConfigurationTest.php @@ -174,6 +174,20 @@ public function validateDataProvider(): array Success::class, true ], + [ + [ + 'engine' => 'elasticsearch7', + ], + Success::class, + true + ], + [ + [ + 'engine' => 'elasticsuite', + ], + Success::class, + true + ], ]; }