protected function formatPeclPackages(array $values)
    {
        $packages = [];

        foreach ($values as $package) {
            list($name, $version) = strpos($package, ':') !== false
                ? explode(':', $package)
                : [$package, null];

            if ($name === 'xdebug' && !isset($version)) {
                $version = version_compare($this->getVersion(), 7.0, '<')
                    ? '2.5.5'
                    : null;
            }
            $version = isset($version) ? "-{$version}" : null;
            $packages[] = "pecl install {$name}{$version} \\" ;
        }

        if (empty($packages)) {
            return null;
        }

        return "&& " . implode("\r\n  && ", $packages);
    }