1
0
Fork 0

Fix project installer, fixes #587

pull/585/merge
Jordi Boggiano 2012-04-17 10:52:08 +02:00
parent 7837be0621
commit e12b0e842d
1 changed files with 9 additions and 21 deletions

View File

@ -15,6 +15,7 @@ namespace Composer\Installer;
use Composer\DependencyResolver\Operation\OperationInterface; use Composer\DependencyResolver\Operation\OperationInterface;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
use Composer\Downloader\DownloadManager; use Composer\Downloader\DownloadManager;
use Composer\Repository\WritableRepositoryInterface;
/** /**
* Project Installer is used to install a single package into a directory as * Project Installer is used to install a single package into a directory as
@ -45,23 +46,17 @@ class ProjectInstaller implements InstallerInterface
} }
/** /**
* Checks that provided package is installed. * {@inheritDoc}
*
* @param PackageInterface $package package instance
*
* @return Boolean
*/ */
public function isInstalled(PackageInterface $package) public function isInstalled(WritableRepositoryInterface $repo, PackageInterface $package)
{ {
return false; return false;
} }
/** /**
* Installs specific package. * {@inheritDoc}
*
* @param PackageInterface $package package instance
*/ */
public function install(PackageInterface $package) public function install(WritableRepositoryInterface $repo, PackageInterface $package)
{ {
$installPath = $this->installPath; $installPath = $this->installPath;
if (file_exists($installPath)) { if (file_exists($installPath)) {
@ -75,24 +70,17 @@ class ProjectInstaller implements InstallerInterface
} }
/** /**
* Updates specific package. * {@inheritDoc}
*
* @param PackageInterface $initial already installed package version
* @param PackageInterface $target updated version
*
* @throws InvalidArgumentException if $from package is not installed
*/ */
public function update(PackageInterface $initial, PackageInterface $target) public function update(WritableRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
{ {
throw new \InvalidArgumentException("not supported"); throw new \InvalidArgumentException("not supported");
} }
/** /**
* Uninstalls specific package. * {@inheritDoc}
*
* @param PackageInterface $package package instance
*/ */
public function uninstall(PackageInterface $package) public function uninstall(WritableRepositoryInterface $repo, PackageInterface $package)
{ {
throw new \InvalidArgumentException("not supported"); throw new \InvalidArgumentException("not supported");
} }