public static function greaterThan(Version $v1, Version $v2)
    {
        // If they are equal, they can not be greater/smaller than each other
        if (self::equals($v1,  $v2)) {
            return false;
        }

        // Compare on the major/minor/patch level if we can
        if (!self::versionableEquals($v1, $v2)) {
            return self::versionableGreaterThan($v1, $v2);
        }

        // v1 has a pre-release, but v2 does not, v2 is bigger
        if ($v1->hasPreRelease() && !$v2->hasPreRelease()) {
            return false;
        }

        // v1 does not have a pre-release, but v2 does, v1 is bigger
        if (!$v1->hasPreRelease() && $v2->hasPreRelease()) {
            return true;
        }

        // Compare on the re-release level if possible
        if ($v1->hasPreRelease() && $v2->hasPreRelease()) {
            if (!self::preReleaseEquals($v1->getPreRelease(), $v2->getPreRelease())) {

                // If v1 has a larger pre-release than v2, it's bigger
                if (self::preReleaseGreaterThan($v1->getPreRelease(), $v2->getPreRelease())) {
                    return true;
                }

                // v2 has a larger pre-release than v1, v2 is bigger.
                return false;
            }
        }

        // Both have the same pre-release version, but only one has a build
        // Version with a build is bigger
        if ($v1->hasBuild() && !$v2->hasBuild()) {
            return true;
        }
        if (!$v1->hasBuild() && $v2->hasBuild()) {
            return false;
        }

        // Compare the build version
        if ($v1->hasBuild() && $v2->hasBuild()) {
            return self::buildGreaterThan($v1->getBuild(), $v2->getBuild());
        }

        return true;
    }