Skip to content
Snippets Groups Projects
Unverified Commit 59b936d0 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3162045 by andypost, ravi.shankar, catch, longwave: [Symfony 5]...

Issue #3162045 by andypost, ravi.shankar, catch, longwave: [Symfony 5] TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given
parent 0c30b0d6
No related branches found
No related tags found
8 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage",!13Resolve #2903456
......@@ -148,8 +148,8 @@ protected function openBrowser($url, SymfonyStyle $io) {
$url = escapeshellarg($url);
}
$is_linux = (new Process('which xdg-open'))->run();
$is_osx = (new Process('which open'))->run();
$is_linux = Process::fromShellCommandline('which xdg-open')->run();
$is_osx = Process::fromShellCommandline('which open')->run();
if ($is_linux === 0) {
$cmd = 'xdg-open ' . $url;
}
......
......@@ -311,7 +311,7 @@ public function assertCommandExitCode($expected_code) {
* @return \Symfony\Component\Process\Process
*/
public function executeCommand($command_line, $working_dir = NULL) {
$this->commandProcess = new Process($command_line);
$this->commandProcess = Process::fromShellCommandline($command_line);
$this->commandProcess->setWorkingDirectory($this->getWorkingPath($working_dir))
->setTimeout(300)
->setIdleTimeout(300);
......
......@@ -23,7 +23,7 @@ trait ExecTrait {
* Standard output from the command
*/
protected function mustExec($cmd, $cwd, array $env = []) {
$process = new Process($cmd, $cwd, $env + ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')]);
$process = Process::fromShellCommandline($cmd, $cwd, $env + ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')]);
$process->setTimeout(300)->setIdleTimeout(300)->run();
$exitCode = $process->getExitCode();
if (0 != $exitCode) {
......
......@@ -20,7 +20,7 @@ public function testPhpUnitListTests() {
// duplicate namespace errors or so forth. This keeps us from committing
// tests which don't break under run-tests.sh, but do break under the
// phpunit test runner tool.
$process = new Process('vendor/bin/phpunit --configuration core --verbose --list-tests');
$process = Process::fromShellCommandline('vendor/bin/phpunit --configuration core --verbose --list-tests');
$process->setWorkingDirectory($this->root)
->setTimeout(300)
->setIdleTimeout(300);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment