Skip to content

Commit 5f9c523

Browse files
authored
Add compatibility with symfony 5 process (#35)
* add compatibility with symfony 5 process * add check method exists
1 parent 4d67cab commit 5f9c523

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Extension/PhiremockProcess.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ private function initProcess($ip, $port, $debug, $expectationsPath, $phiremockPa
9393
$commandline[] = $logFile;
9494
$commandline[] = '2>&1';
9595

96-
$this->process = new Process(implode(' ', $commandline));
96+
if (method_exists(Process::class, 'fromShellCommandline')) {
97+
$this->process = Process::fromShellCommandline(implode(' ', $commandline));
98+
} else {
99+
$this->process = new Process(implode(' ', $commandline));
100+
}
97101
}
98102

99103
/**

0 commit comments

Comments
 (0)