commit
d51ebb9650
|
@ -64,7 +64,7 @@ class FileDownloader implements DownloaderInterface
|
||||||
|
|
||||||
$fileName = $this->getFileName($package, $path);
|
$fileName = $this->getFileName($package, $path);
|
||||||
|
|
||||||
$this->io->write(" - Package <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
|
$this->io->write(" - Installing <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
|
||||||
|
|
||||||
$processUrl = $this->processUrl($url);
|
$processUrl = $this->processUrl($url);
|
||||||
|
|
||||||
|
@ -101,6 +101,7 @@ class FileDownloader implements DownloaderInterface
|
||||||
*/
|
*/
|
||||||
public function remove(PackageInterface $package, $path)
|
public function remove(PackageInterface $package, $path)
|
||||||
{
|
{
|
||||||
|
$this->io->write(" - Removing <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
|
||||||
if (!$this->filesystem->removeDirectory($path)) {
|
if (!$this->filesystem->removeDirectory($path)) {
|
||||||
throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
|
throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ abstract class VcsDownloader implements DownloaderInterface
|
||||||
throw new \InvalidArgumentException('Package '.$package->getPrettyName().' is missing reference information');
|
throw new \InvalidArgumentException('Package '.$package->getPrettyName().' is missing reference information');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->io->write(" - Package <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
|
$this->io->write(" - Installing <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
|
||||||
$this->filesystem->removeDirectory($path);
|
$this->filesystem->removeDirectory($path);
|
||||||
$this->doDownload($package, $path);
|
$this->doDownload($package, $path);
|
||||||
$this->io->write('');
|
$this->io->write('');
|
||||||
|
@ -65,7 +65,7 @@ abstract class VcsDownloader implements DownloaderInterface
|
||||||
throw new \InvalidArgumentException('Package '.$target->getPrettyName().' is missing reference information');
|
throw new \InvalidArgumentException('Package '.$target->getPrettyName().' is missing reference information');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->io->write(" - Package <info>" . $target->getName() . "</info> (<comment>" . $target->getPrettyVersion() . "</comment>)");
|
$this->io->write(" - Installing <info>" . $target->getName() . "</info> (<comment>" . $target->getPrettyVersion() . "</comment>)");
|
||||||
$this->enforceCleanDirectory($path);
|
$this->enforceCleanDirectory($path);
|
||||||
$this->doUpdate($initial, $target, $path);
|
$this->doUpdate($initial, $target, $path);
|
||||||
$this->io->write('');
|
$this->io->write('');
|
||||||
|
@ -77,6 +77,7 @@ abstract class VcsDownloader implements DownloaderInterface
|
||||||
public function remove(PackageInterface $package, $path)
|
public function remove(PackageInterface $package, $path)
|
||||||
{
|
{
|
||||||
$this->enforceCleanDirectory($path);
|
$this->enforceCleanDirectory($path);
|
||||||
|
$this->io->write(" - Removing <info>" . $package->getName() . "</info> (<comment>" . $package->getPrettyVersion() . "</comment>)");
|
||||||
if (!$this->filesystem->removeDirectory($path)) {
|
if (!$this->filesystem->removeDirectory($path)) {
|
||||||
throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
|
throw new \RuntimeException('Could not completely delete '.$path.', aborting.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,9 +242,11 @@ class Installer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix the version all installed packages that are not in the current local repo to prevent rogue updates
|
// fix the version of all installed packages (+ platform) that are not
|
||||||
|
// in the current local repo to prevent rogue updates (e.g. non-dev
|
||||||
|
// updating when in dev)
|
||||||
foreach ($installedRepo->getPackages() as $package) {
|
foreach ($installedRepo->getPackages() as $package) {
|
||||||
if ($package->getRepository() === $localRepo || $package->getRepository() instanceof PlatformRepository) {
|
if ($package->getRepository() === $localRepo) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,13 @@ class LibraryInstaller implements InstallerInterface
|
||||||
$this->downloadManager->remove($package, $downloadPath);
|
$this->downloadManager->remove($package, $downloadPath);
|
||||||
$this->removeBinaries($package);
|
$this->removeBinaries($package);
|
||||||
$repo->removePackage($package);
|
$repo->removePackage($package);
|
||||||
|
|
||||||
|
if (strpos($package->getName(), '/')) {
|
||||||
|
$packageVendorDir = dirname($downloadPath);
|
||||||
|
if (is_dir($packageVendorDir) && !glob($packageVendorDir.'/*')) {
|
||||||
|
@rmdir($packageVendorDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue