-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEP Allow symfony 4 #301
DEP Allow symfony 4 #301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Process
constructor now only accepts an array. Passing the command as a string will throw a deprecation warning.
dcc5193
to
e5a4bd4
Compare
Updated it to pass an array symfony 3 array|string symfony 4 array How symfony 3 handles arrays (implodes them) |
@@ -100,7 +100,7 @@ protected function processGroup( | |||
$logger->info("Running '$cmd'"); | |||
|
|||
// Execute script via shell | |||
$process = new Process($cmd); | |||
$process = new Process([$cmd]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Symphony doc says to pass the parameters as array entries:
$process = new Process(['ls', '-lsa']);
So it probably needs to be something like this:
$process = new Process([$cmd]); | |
$process = new Process([ | |
$scriptTask, | |
"index={$indexClassEscaped}", | |
"class={$class}", | |
"group={$group}", | |
"groups={$groups}", | |
"variantstate={$statevar}", | |
"verbose=1" | |
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes agree that would be better, have updated
e5a4bd4
to
34e0594
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally with both symfony 3 and 4. Works great.
@maxime-rainville Heya, just wondering if this got tested in dev mode, as well as test/live mode? I'm having an issue at the moment after an update that includes updating symfony from 3 to 4 - in dev mode the processes don't seem to be run, though replacing that with |
Issue https://github.com/silverstripeltd/product-issues/issues/492