protected static function guessInstallName($packageName)
    {
        $name = $packageName;
        if (strpos($packageName, '/') !== false) {
            list(, $name) = explode('/', $packageName);
        }

        $name = preg_replace('/[\.\-_]+(?>plugin|theme)$/u', '', $name);
        $name = preg_replace_callback(
            '/(?>^[\.\-_]*|[\.\-_]+)(.)/u',
            function ($matches) {
                return strtoupper($matches[1]);
            },
            $name
        );

        return $name;
    }