/**
  * Returns the highest version category difference between two Release instances.
  *
  * @param Release      $release1
  * @param Release|null $release2
  *
  * @return string|null
  */
 public static function getDifference(Release $release1, Release $release2 = null)
 {
     if ($release2 === null) {
         return self::MAJOR;
     }
     $version1 = explode('.', $release1->getVersion());
     $version2 = explode('.', $release2->getVersion());
     if (isset($version1[0]) === false || isset($version2[0]) === false || $version1[0] != $version2[0]) {
         return self::MAJOR;
     } elseif (isset($version1[1]) === false || isset($version2[1]) === false || $version1[1] != $version2[1]) {
         return self::MINOR;
     } elseif (isset($version1[2]) === false || isset($version2[2]) === false || $version1[2] != $version2[2]) {
         return self::PATCH;
     }
 }
 /**
  * Gathers environment variables to use in the YAML configuration.
  *
  * @param Release $release
  */
 private function gatherEnvironmentVariables(Release $release)
 {
     $this->environmentVariables = array('%stage%' => $release->getWorkspace()->getHost()->getStage(), '%version%' => $release->getVersion());
 }