예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function migrate($targetVersion)
 {
     $previousVersion = $this->rootModuleFile->getVersion();
     if ($previousVersion === $targetVersion) {
         return;
     }
     $this->rootModuleFile->setVersion($targetVersion);
     try {
         $this->jsonStorage->saveRootModuleFile($this->rootModuleFile);
     } catch (Exception $e) {
         $this->rootModuleFile->setVersion($previousVersion);
         throw $e;
     }
 }