diff --git a/src/Composer/Command/StatusCommand.php b/src/Composer/Command/StatusCommand.php index 274cd846d..f7b0ef37e 100644 --- a/src/Composer/Command/StatusCommand.php +++ b/src/Composer/Command/StatusCommand.php @@ -101,7 +101,9 @@ EOT if ($changes = $downloader->getLocalChanges($package, $targetDir)) { $errors[$targetDir] = $changes; } - } elseif ($downloader instanceof VcsCapableDownloaderInterface) { + } + + if ($downloader instanceof VcsCapableDownloaderInterface) { if ($currentRef = $downloader->getVcsReference($package, $targetDir)) { switch ($package->getInstallationSource()) { case 'source': @@ -129,14 +131,12 @@ EOT ); } } - } elseif ($downloader instanceof DvcsDownloaderInterface) { + } + + if ($downloader instanceof DvcsDownloaderInterface) { if ($unpushed = $downloader->getUnpushedChanges($package, $targetDir)) { $unpushedChanges[$targetDir] = $unpushed; } - } elseif ($downloader instanceof DownloaderInterface) { - if ($changes = $downloader->getLocalChanges($package, $targetDir)) { - $errors[$targetDir] = $changes; - } } } diff --git a/src/Composer/Downloader/DownloaderInterface.php b/src/Composer/Downloader/DownloaderInterface.php index d3ed12cdf..713bf36dc 100644 --- a/src/Composer/Downloader/DownloaderInterface.php +++ b/src/Composer/Downloader/DownloaderInterface.php @@ -61,13 +61,4 @@ interface DownloaderInterface * @return DownloaderInterface */ public function setOutputProgress($outputProgress); - - /** - * Checks for changes to the local copy - * - * @param PackageInterface $package package instance - * @param string $path package directory - * @return string|null changes or null - */ - public function getLocalChanges(PackageInterface $package, $path); } diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php index 11d20eb99..d2a3e7edc 100644 --- a/src/Composer/Downloader/FileDownloader.php +++ b/src/Composer/Downloader/FileDownloader.php @@ -35,7 +35,7 @@ use Composer\Util\Url as UrlUtil; * @author François Pluchino * @author Nils Adermann */ -class FileDownloader implements DownloaderInterface +class FileDownloader implements DownloaderInterface, ChangeReportInterface { protected $io; protected $config;