src/Viserio/Component/WebServer/WebServer.php
private static function createServerProcess(WebServerConfig $config): Process
    {
        $finder = new PhpExecutableFinder();

        if (($binary = $finder->find(false)) === false) {
            throw new RuntimeException('Unable to find the PHP binary.');
        }

        $xdebugArgs = [];

        if ($config->hasXdebug() && \extension_loaded('xdebug')) {
            $xdebugArgs = ['-dxdebug.profiler_enable_trigger=1'];
        }

        $process = new Process(\array_merge([$binary], $finder->findArguments(), $xdebugArgs, ['-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()]));
        $process->setWorkingDirectory($config->getDocumentRoot());
        $process->setTimeout(null);

        return $process;
    }
private static function createServerProcess(WebServerConfig $config): Process
    {
        $finder = new PhpExecutableFinder();

        if (($binary = $finder->find(false)) === false) {
            throw new RuntimeException('Unable to find the PHP binary.');
        }

        $xdebugArgs = [];

        if ($config->hasXdebug() && \extension_loaded('xdebug')) {
            $xdebugArgs = ['-dxdebug.profiler_enable_trigger=1'];
        }

        $process = new Process(\array_merge([$binary], $finder->findArguments(), $xdebugArgs, ['-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()]));
        $process->setWorkingDirectory($config->getDocumentRoot());
        $process->setTimeout(null);

        return $process;
    }
Create a new server command process.

@param \Viserio\Component\WebServer\WebServerConfig $config

@return \Symfony\Component\Process\Process