isPatchUpgrade() public méthode

Is this a patch upgrade? (Semantic versioning)
public isPatchUpgrade ( string $nextVersion ) : boolean
$nextVersion string
Résultat boolean
Exemple #1
0
 /**
  * Should this automatic update be permitted?
  *
  * @param UpdateInfo $info
  * @param string $currentVersion
  * @return bool
  */
 protected function checkVersionSettings(UpdateInfo $info, string $currentVersion) : bool
 {
     $state = State::instance();
     $nextVersion = $info->getVersion();
     $version = new Version($currentVersion);
     // If this isn't an upgrade at all, don't apply it.
     if (!$version->isUpgrade($nextVersion)) {
         return false;
     }
     if ($version->isMajorUpgrade($nextVersion)) {
         return !empty($state->universal['auto-update']['major']);
     }
     if ($version->isMinorUpgrade($nextVersion)) {
         return !empty($state->universal['auto-update']['minor']);
     }
     if ($version->isPatchUpgrade($nextVersion)) {
         return !empty($state->universal['auto-update']['patch']);
     }
     return false;
 }