parent
03fb68009c
commit
0f373e3249
|
@ -101,7 +101,9 @@ EOT
|
||||||
if ($changes = $downloader->getLocalChanges($package, $targetDir)) {
|
if ($changes = $downloader->getLocalChanges($package, $targetDir)) {
|
||||||
$errors[$targetDir] = $changes;
|
$errors[$targetDir] = $changes;
|
||||||
}
|
}
|
||||||
} elseif ($downloader instanceof VcsCapableDownloaderInterface) {
|
}
|
||||||
|
|
||||||
|
if ($downloader instanceof VcsCapableDownloaderInterface) {
|
||||||
if ($currentRef = $downloader->getVcsReference($package, $targetDir)) {
|
if ($currentRef = $downloader->getVcsReference($package, $targetDir)) {
|
||||||
switch ($package->getInstallationSource()) {
|
switch ($package->getInstallationSource()) {
|
||||||
case 'source':
|
case 'source':
|
||||||
|
@ -129,14 +131,12 @@ EOT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($downloader instanceof DvcsDownloaderInterface) {
|
}
|
||||||
|
|
||||||
|
if ($downloader instanceof DvcsDownloaderInterface) {
|
||||||
if ($unpushed = $downloader->getUnpushedChanges($package, $targetDir)) {
|
if ($unpushed = $downloader->getUnpushedChanges($package, $targetDir)) {
|
||||||
$unpushedChanges[$targetDir] = $unpushed;
|
$unpushedChanges[$targetDir] = $unpushed;
|
||||||
}
|
}
|
||||||
} elseif ($downloader instanceof DownloaderInterface) {
|
|
||||||
if ($changes = $downloader->getLocalChanges($package, $targetDir)) {
|
|
||||||
$errors[$targetDir] = $changes;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,13 +61,4 @@ interface DownloaderInterface
|
||||||
* @return DownloaderInterface
|
* @return DownloaderInterface
|
||||||
*/
|
*/
|
||||||
public function setOutputProgress($outputProgress);
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ use Composer\Util\Url as UrlUtil;
|
||||||
* @author François Pluchino <francois.pluchino@opendisplay.com>
|
* @author François Pluchino <francois.pluchino@opendisplay.com>
|
||||||
* @author Nils Adermann <naderman@naderman.de>
|
* @author Nils Adermann <naderman@naderman.de>
|
||||||
*/
|
*/
|
||||||
class FileDownloader implements DownloaderInterface
|
class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
||||||
{
|
{
|
||||||
protected $io;
|
protected $io;
|
||||||
protected $config;
|
protected $config;
|
||||||
|
|
Loading…
Reference in New Issue