Merge pull request #301 from creative-commoners/pulls/3.9/symfony4

DEP Allow symfony 4
This commit is contained in:
Maxime Rainville 2021-12-10 15:57:49 +13:00 committed by GitHub
commit 5611e24e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -25,7 +25,7 @@
"silverstripe/framework": "^4.10", "silverstripe/framework": "^4.10",
"monolog/monolog": "~1.15", "monolog/monolog": "~1.15",
"ptcinc/solr-php-client": "^1.0", "ptcinc/solr-php-client": "^1.0",
"symfony/process": "^3.2", "symfony/process": "^3.2 || ^4",
"tractorcow/silverstripe-proxy-db": "~0.1" "tractorcow/silverstripe-proxy-db": "~0.1"
}, },
"require-dev": { "require-dev": {

View File

@ -95,9 +95,16 @@ class SolrReindexImmediateHandler extends SolrReindexBase
$scriptPath = sprintf("%s%scli-script.php", $frameworkPath, DIRECTORY_SEPARATOR); $scriptPath = sprintf("%s%scli-script.php", $frameworkPath, DIRECTORY_SEPARATOR);
$scriptTask = "{$php} {$scriptPath} dev/tasks/{$taskName}"; $scriptTask = "{$php} {$scriptPath} dev/tasks/{$taskName}";
$cmd = "{$scriptTask} index={$indexClassEscaped} class={$class} group={$group} groups={$groups} variantstate={$statevar}"; $cmd = [
$cmd .= " verbose=1"; $scriptTask,
$logger->info("Running '$cmd'"); "index={$indexClassEscaped}",
"class={$class}",
"group={$group}",
"groups={$groups}",
"variantstate={$statevar}",
"verbose=1"
];
$logger->info('Running ' . implode(' ', $cmd));
// Execute script via shell // Execute script via shell
$process = new Process($cmd); $process = new Process($cmd);