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;
    }