/**
  * {@inheritdoc}
  */
 public function clearExtraKeys()
 {
     $previousValues = $this->rootPackageFile->getExtraKeys();
     if (!$previousValues) {
         return;
     }
     $this->rootPackageFile->clearExtraKeys();
     try {
         $this->packageFileStorage->saveRootPackageFile($this->rootPackageFile);
     } catch (Exception $e) {
         $this->rootPackageFile->setExtraKeys($previousValues);
         throw $e;
     }
 }