diff --git a/composer.json b/composer.json index 7876b6e..b30882f 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "silverstripe/framework": "^4.10", "monolog/monolog": "~1.15", "ptcinc/solr-php-client": "^1.0", - "symfony/process": "^3.2", + "symfony/process": "^3.2 || ^4", "tractorcow/silverstripe-proxy-db": "~0.1" }, "require-dev": { diff --git a/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php b/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php index 8bd2520..ca610cd 100644 --- a/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php +++ b/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php @@ -95,9 +95,16 @@ class SolrReindexImmediateHandler extends SolrReindexBase $scriptPath = sprintf("%s%scli-script.php", $frameworkPath, DIRECTORY_SEPARATOR); $scriptTask = "{$php} {$scriptPath} dev/tasks/{$taskName}"; - $cmd = "{$scriptTask} index={$indexClassEscaped} class={$class} group={$group} groups={$groups} variantstate={$statevar}"; - $cmd .= " verbose=1"; - $logger->info("Running '$cmd'"); + $cmd = [ + $scriptTask, + "index={$indexClassEscaped}", + "class={$class}", + "group={$group}", + "groups={$groups}", + "variantstate={$statevar}", + "verbose=1" + ]; + $logger->info('Running ' . implode(' ', $cmd)); // Execute script via shell $process = new Process($cmd);