Fix usage of react/promise resolve() to prepare for v3
parent
96ad838686
commit
e63e15aea8
|
@ -202,7 +202,7 @@ class DownloadManager
|
|||
|
||||
$downloader = $this->getDownloaderForPackage($package);
|
||||
if (!$downloader) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$handleError = function ($e) use ($sources, $source, $package, $io, $download) {
|
||||
|
@ -258,7 +258,7 @@ class DownloadManager
|
|||
return $downloader->prepare($type, $package, $targetDir, $prevPackage);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -279,7 +279,7 @@ class DownloadManager
|
|||
return $downloader->install($package, $targetDir);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,7 +300,7 @@ class DownloadManager
|
|||
|
||||
// no downloaders present means update from metapackage to metapackage, nothing to do
|
||||
if (!$initialDownloader && !$downloader) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
// if we have a downloader present before, but not after, the package became a metapackage and its files should be removed
|
||||
|
@ -349,7 +349,7 @@ class DownloadManager
|
|||
return $downloader->remove($package, $targetDir);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -370,7 +370,7 @@ class DownloadManager
|
|||
return $downloader->cleanup($type, $package, $targetDir, $prevPackage);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -296,7 +296,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
|||
*/
|
||||
public function prepare(string $type, PackageInterface $package, string $path, PackageInterface $prevPackage = null): PromiseInterface
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -327,7 +327,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
|||
}
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -355,7 +355,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
|
|||
}
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,7 @@ class FossilDownloader extends VcsDownloader
|
|||
*/
|
||||
protected function doDownload(PackageInterface $package, string $path, string $url, PackageInterface $prevPackage = null): PromiseInterface
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ class FossilDownloader extends VcsDownloader
|
|||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -78,7 +78,7 @@ class FossilDownloader extends VcsDownloader
|
|||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,7 +77,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
throw new \RuntimeException('git was not found in your PATH, skipping source download');
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,7 +142,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
$package->setSourceReference($newRef);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -207,7 +207,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
$this->updateOriginUrl($path, $target->getSourceUrl());
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -341,7 +341,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
}
|
||||
|
||||
if (null === ($changes = $this->getLocalChanges($package, $path))) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
if (!$this->io->isInteractive()) {
|
||||
|
@ -411,7 +411,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
}
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -564,7 +564,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
|
||||
$this->hasDiscardedChanges[$path] = true;
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -583,7 +583,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
|
||||
$this->hasStashedChanges[$path] = true;
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,14 +34,14 @@ class GzipDownloader extends ArchiveDownloader
|
|||
$command = 'gzip -cd -- ' . ProcessExecutor::escape($file) . ' > ' . ProcessExecutor::escape($targetFilepath);
|
||||
|
||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
if (extension_loaded('zlib')) {
|
||||
// Fallback to using the PHP extension.
|
||||
$this->extractUsingExt($file, $targetFilepath);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
||||
|
@ -51,7 +51,7 @@ class GzipDownloader extends ArchiveDownloader
|
|||
// Windows version of PHP has built-in support of gzip functions
|
||||
$this->extractUsingExt($file, $targetFilepath);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,7 +31,7 @@ class HgDownloader extends VcsDownloader
|
|||
throw new \RuntimeException('hg was not found in your PATH, skipping source download');
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ class HgDownloader extends VcsDownloader
|
|||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,7 +76,7 @@ class HgDownloader extends VcsDownloader
|
|||
|
||||
$hgUtils->runCommand($command, $url, $path);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,7 +53,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
|||
}
|
||||
|
||||
if (realpath($path) === $realUrl) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
if (strpos(realpath($path) . DIRECTORY_SEPARATOR, $realUrl . DIRECTORY_SEPARATOR) === 0) {
|
||||
|
@ -69,7 +69,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
|||
));
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
|||
$this->io->writeError(" - " . InstallOperation::format($package) . $this->getInstallOperationAppendix($package, $path));
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
// Get the transport options with default values
|
||||
|
@ -155,7 +155,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
|||
$this->io->writeError('');
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -182,7 +182,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
|||
throw new \RuntimeException('Could not reliably remove junction for package ' . $package->getName());
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
// ensure that the source path (dist url) is not the same as the install path, which
|
||||
|
@ -197,7 +197,7 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
|
|||
$this->io->writeError(" - " . UninstallOperation::format($package).", source is still present in $path");
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
return parent::remove($package, $path, $output);
|
||||
|
|
|
@ -30,7 +30,7 @@ class PerforceDownloader extends VcsDownloader
|
|||
*/
|
||||
protected function doDownload(PackageInterface $package, string $path, string $url, PackageInterface $prevPackage = null): PromiseInterface
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ class PerforceDownloader extends VcsDownloader
|
|||
$this->perforce->syncCodeBase($label);
|
||||
$this->perforce->cleanupClientSpec();
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,6 +36,6 @@ class PharDownloader extends ArchiveDownloader
|
|||
* http://blog.kotowicz.net/2010/08/hardening-php-how-to-securely-include.html
|
||||
*/
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class RarDownloader extends ArchiveDownloader
|
|||
$command = 'unrar x -- ' . ProcessExecutor::escape($file) . ' ' . ProcessExecutor::escape($path) . ' >/dev/null && chmod -R u+w ' . ProcessExecutor::escape($path);
|
||||
|
||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
||||
|
@ -77,6 +77,6 @@ class RarDownloader extends ArchiveDownloader
|
|||
|
||||
$rarArchive->close();
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class SvnDownloader extends VcsDownloader
|
|||
throw new \RuntimeException('svn was not found in your PATH, skipping source download');
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ class SvnDownloader extends VcsDownloader
|
|||
$this->io->writeError(" Checking out ".$package->getSourceReference());
|
||||
$this->execute($package, $url, "svn co", sprintf("%s/%s", $url, $ref), null, $path);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +85,7 @@ class SvnDownloader extends VcsDownloader
|
|||
$this->io->writeError(" Checking out " . $ref);
|
||||
$this->execute($target, $url, "svn switch" . $flags, sprintf("%s/%s", $url, $ref), $path);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,7 +133,7 @@ class SvnDownloader extends VcsDownloader
|
|||
protected function cleanChanges(PackageInterface $package, string $path, bool $update): PromiseInterface
|
||||
{
|
||||
if (null === ($changes = $this->getLocalChanges($package, $path))) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
if (!$this->io->isInteractive()) {
|
||||
|
@ -185,7 +185,7 @@ class SvnDownloader extends VcsDownloader
|
|||
}
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -242,7 +242,7 @@ class SvnDownloader extends VcsDownloader
|
|||
throw new \RuntimeException("Could not reset changes\n\n:".$this->process->getErrorOutput());
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,6 +31,6 @@ class TarDownloader extends ArchiveDownloader
|
|||
$archive = new \PharData($file);
|
||||
$archive->extractTo($path, null, true);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
}
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +104,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
$this->cleanChanges($package, $path, false);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,7 +117,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
unset($this->hasCleanedChanges[$prevPackage->getUniqueName()]);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -152,7 +152,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
}
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -216,7 +216,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
throw $exception;
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -271,7 +271,7 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
|
|||
throw new \RuntimeException('Source directory ' . $path . ' has uncommitted changes.');
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,7 @@ class XzDownloader extends ArchiveDownloader
|
|||
$command = 'tar -xJf ' . ProcessExecutor::escape($file) . ' -C ' . ProcessExecutor::escape($path);
|
||||
|
||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
||||
|
|
|
@ -185,7 +185,7 @@ class ZipDownloader extends ArchiveDownloader
|
|||
if (true === $extractResult) {
|
||||
$zipArchive->close();
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$processError = new \RuntimeException(rtrim("There was an error extracting the ZIP file, it is either corrupted or using an invalid format.\n"));
|
||||
|
|
|
@ -440,7 +440,7 @@ class InstallationManager
|
|||
|
||||
$promise = $installer->prepare($opType, $package, $initialPackage);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$promise = $promise->then(function () use ($opType, $repo, $operation) {
|
||||
|
@ -544,7 +544,7 @@ class InstallationManager
|
|||
} else {
|
||||
$promise = $this->getInstaller($initialType)->uninstall($repo, $initial);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$installer = $this->getInstaller($targetType);
|
||||
|
@ -554,7 +554,7 @@ class InstallationManager
|
|||
return $promise;
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
|
|||
|
||||
$promise = $this->installCode($package);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$binaryInstaller = $this->binaryInstaller;
|
||||
|
@ -170,7 +170,7 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
|
|||
$this->binaryInstaller->removeBinaries($initial);
|
||||
$promise = $this->updateCode($initial, $target);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$binaryInstaller = $this->binaryInstaller;
|
||||
|
@ -196,7 +196,7 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
|
|||
|
||||
$promise = $this->removeCode($package);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
$binaryInstaller = $this->binaryInstaller;
|
||||
|
@ -285,7 +285,7 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
|
|||
) {
|
||||
$promise = $this->removeCode($initial);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
return $promise->then(function () use ($target): PromiseInterface {
|
||||
|
@ -294,7 +294,7 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface
|
|||
return $promise;
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class MetapackageInstaller implements InstallerInterface
|
|||
public function download(PackageInterface $package, PackageInterface $prevPackage = null)
|
||||
{
|
||||
// noop
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,7 @@ class MetapackageInstaller implements InstallerInterface
|
|||
public function prepare($type, PackageInterface $package, PackageInterface $prevPackage = null)
|
||||
{
|
||||
// noop
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,7 +74,7 @@ class MetapackageInstaller implements InstallerInterface
|
|||
public function cleanup($type, PackageInterface $package, PackageInterface $prevPackage = null)
|
||||
{
|
||||
// noop
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ class MetapackageInstaller implements InstallerInterface
|
|||
|
||||
$repo->addPackage(clone $package);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,7 +103,7 @@ class MetapackageInstaller implements InstallerInterface
|
|||
$repo->removePackage($initial);
|
||||
$repo->addPackage(clone $target);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +119,7 @@ class MetapackageInstaller implements InstallerInterface
|
|||
|
||||
$repo->removePackage($package);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,7 +45,7 @@ class NoopInstaller implements InstallerInterface
|
|||
*/
|
||||
public function download(PackageInterface $package, PackageInterface $prevPackage = null)
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ class NoopInstaller implements InstallerInterface
|
|||
*/
|
||||
public function prepare($type, PackageInterface $package, PackageInterface $prevPackage = null)
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ class NoopInstaller implements InstallerInterface
|
|||
*/
|
||||
public function cleanup($type, PackageInterface $package, PackageInterface $prevPackage = null)
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ class NoopInstaller implements InstallerInterface
|
|||
$repo->addPackage(clone $package);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,7 +90,7 @@ class NoopInstaller implements InstallerInterface
|
|||
$repo->addPackage(clone $target);
|
||||
}
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,7 +103,7 @@ class NoopInstaller implements InstallerInterface
|
|||
}
|
||||
$repo->removePackage($package);
|
||||
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,7 +63,7 @@ class PluginInstaller extends LibraryInstaller
|
|||
{
|
||||
$promise = parent::install($repo, $package);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
return $promise->then(function () use ($package, $repo): void {
|
||||
|
@ -83,7 +83,7 @@ class PluginInstaller extends LibraryInstaller
|
|||
{
|
||||
$promise = parent::update($repo, $initial, $target);
|
||||
if (!$promise instanceof PromiseInterface) {
|
||||
$promise = \React\Promise\resolve();
|
||||
$promise = \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
return $promise->then(function () use ($initial, $target, $repo): void {
|
||||
|
|
|
@ -224,7 +224,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -275,7 +275,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -333,7 +333,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -370,7 +370,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -437,7 +437,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -475,7 +475,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -513,7 +513,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -575,7 +575,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('update')
|
||||
->with($initial, $target, 'vendor/bundles/FOS/UserBundle')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
$zipDownloader
|
||||
->expects($this->any())
|
||||
->method('getInstallationSource')
|
||||
|
@ -614,7 +614,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('remove')
|
||||
->with($initial, 'vendor/bundles/FOS/UserBundle')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
$xzDownloader
|
||||
->expects($this->any())
|
||||
->method('getInstallationSource')
|
||||
|
@ -625,7 +625,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('install')
|
||||
->with($target, 'vendor/bundles/FOS/UserBundle')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
$zipDownloader
|
||||
->expects($this->any())
|
||||
->method('getInstallationSource')
|
||||
|
@ -786,7 +786,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -830,7 +830,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -877,7 +877,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -925,7 +925,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -973,7 +973,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -1021,7 +1021,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -1065,7 +1065,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
@ -1109,7 +1109,7 @@ class DownloadManagerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('download')
|
||||
->with($package, 'target_dir')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$manager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($this->io, false, $this->filesystem))
|
||||
|
|
|
@ -337,12 +337,12 @@ class MockedZipDownloader extends ZipDownloader
|
|||
{
|
||||
public function download(PackageInterface $package, $path, PackageInterface $prevPackage = null, $output = true): PromiseInterface
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
public function install(PackageInterface $package, $path, $output = true): PromiseInterface
|
||||
{
|
||||
return \React\Promise\resolve();
|
||||
return \React\Promise\resolve(null);
|
||||
}
|
||||
|
||||
public function extract(PackageInterface $package, $file, $path): PromiseInterface
|
||||
|
|
|
@ -152,7 +152,7 @@ class LibraryInstallerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('install')
|
||||
->with($package, $this->vendorDir.'/some/package')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$this->repository
|
||||
->expects($this->once())
|
||||
|
@ -192,7 +192,7 @@ class LibraryInstallerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('update')
|
||||
->with($initial, $target, $this->vendorDir.'/vendor/package1/newtarget')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$this->repository
|
||||
->expects($this->once())
|
||||
|
@ -229,7 +229,7 @@ class LibraryInstallerTest extends TestCase
|
|||
->expects($this->once())
|
||||
->method('remove')
|
||||
->with($package, $this->vendorDir.'/vendor/pkg')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$this->repository
|
||||
->expects($this->once())
|
||||
|
|
|
@ -85,13 +85,13 @@ class PluginInstallerTest extends TestCase
|
|||
->getMock();
|
||||
$dm->expects($this->any())
|
||||
->method('install')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
$dm->expects($this->any())
|
||||
->method('update')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
$dm->expects($this->any())
|
||||
->method('remove')
|
||||
->will($this->returnValue(\React\Promise\resolve()));
|
||||
->will($this->returnValue(\React\Promise\resolve(null)));
|
||||
|
||||
$this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock();
|
||||
|
||||
|
|
Loading…
Reference in New Issue