DEP Allow symfony 4

This commit is contained in:
Steve Boyd 2021-12-08 15:24:29 +13:00
parent 2ee17c33a3
commit 34e0594e48
2 changed files with 11 additions and 4 deletions

View File

@ -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": {

View File

@ -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);