public function compare(SchemaVersion $version)
    {
        return version_compare(
            str_replace('-', '.', $this->toString()),
            str_replace('-', '.', $version->toString())
        );
    }
public function compare(SchemaVersion $version)
    {
        return version_compare(
            str_replace('-', '.', $this->toString()),
            str_replace('-', '.', $version->toString())
        );
    }
public function compare ( SchemaVersion $ version ) { return version_compare ( str_replace ( '-' , '.' , $ this -> toString ( ) ) , str_replace ( '-' , '.' , $ version -> toString ( ) ) ) ; }
Returns -1 if the current version is lower than the second, 0 if they are equal,
and 1 if the second is lower.

@param SchemaVersion $version

@return int
Returns - 1 if the current version is lower than the second 0 if they are equal and 1 if the second is lower .