From 459092dd50c133b9d7f174527837322a4a56558e Mon Sep 17 00:00:00 2001 From: Chris Moutsos Date: Wed, 6 May 2020 09:54:44 -0400 Subject: [PATCH 1/2] [Platform.sh] Only enable Solr if parameter 'search_engine' is 'solr' --- config/packages/overrides/platformsh.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/packages/overrides/platformsh.php b/config/packages/overrides/platformsh.php index 47a7bedd12..22dfd469f5 100644 --- a/config/packages/overrides/platformsh.php +++ b/config/packages/overrides/platformsh.php @@ -105,7 +105,10 @@ } } -if (isset($relationships['solr'])) { +if ( + isset($relationships['solr']) && + (!$container->hasParameter('search_engine') || $container->getParameter('search_engine') === 'solr') +) { foreach ($relationships['solr'] as $endpoint) { if ($endpoint['scheme'] !== 'solr') { continue; From 8b8dd88a2e0e31b3aca74b3faea00d87ca235d54 Mon Sep 17 00:00:00 2001 From: Chris Moutsos Date: Thu, 7 May 2020 10:23:08 -0400 Subject: [PATCH 2/2] [Platform.sh] Check env var 'SEARCH_ENGINE' instead of parameter 'search_engine' --- config/packages/overrides/platformsh.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/packages/overrides/platformsh.php b/config/packages/overrides/platformsh.php index 22dfd469f5..6ac2d6fc8d 100644 --- a/config/packages/overrides/platformsh.php +++ b/config/packages/overrides/platformsh.php @@ -105,10 +105,7 @@ } } -if ( - isset($relationships['solr']) && - (!$container->hasParameter('search_engine') || $container->getParameter('search_engine') === 'solr') -) { +if (isset($relationships['solr']) && ($_SERVER['SEARCH_ENGINE'] ?? false) === 'solr') { foreach ($relationships['solr'] as $endpoint) { if ($endpoint['scheme'] !== 'solr') { continue;