Symfony\Component\Process\Process::setEnhanceWindowsCompatibility PHP Method

setEnhanceWindowsCompatibility() public method

Sets whether or not Windows compatibility is enabled.
public setEnhanceWindowsCompatibility ( boolean $enhance ) : self
$enhance boolean
return self The current Process instance
    public function setEnhanceWindowsCompatibility($enhance)
    {
        $this->enhanceWindowsCompatibility = (bool) $enhance;
        return $this;
    }

Usage Example

 /**
  * Starts a wiremock process.
  *
  * @param string $jarPath
  * @param string $logsPath
  * @param string $arguments
  *
  * @throws \Exception
  */
 public function start($ip, $port, $path, $logsPath, $debug)
 {
     $phiremockPath = is_file($path) ? $path : "{$path}/phiremock";
     $this->process = new Process($this->getCommandPrefix() . "{$phiremockPath} -i {$ip} -p {$port}" . ($debug ? ' -d' : ''));
     if ($debug) {
         echo 'Executing: ' . $this->process->getCommandLine() . PHP_EOL;
     }
     $logFile = $logsPath . DIRECTORY_SEPARATOR . self::LOG_FILE_NAME;
     $this->process->start(function ($type, $buffer) use($logFile) {
         file_put_contents($logFile, $buffer, FILE_APPEND);
     });
     $this->process->setEnhanceSigchildCompatibility(true);
     if ($this->isWindows()) {
         $this->process->setEnhanceWindowsCompatibility(true);
     }
 }
All Usage Examples Of Symfony\Component\Process\Process::setEnhanceWindowsCompatibility