コード例 #1
0
 /**
  * Uninstalls specific package.
  *
  * @param \Composer\Repository\InstalledRepositoryInterface $repo repository in which to check
  * @param \Composer\Package\PackageInterface $package package instance
  */
 public function uninstall(\Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package)
 {
     if (!$repo->hasPackage($package)) {
         throw new \InvalidArgumentException('Package is not installed: ' . $package);
     }
     if ($this->filesystem->someFilesExist($this->symlinks)) {
         $this->filesystem->removeSymlinks($this->symlinks);
     }
     $this->removeCode($package);
     $repo->removePackage($package);
 }