Skip to content

Commit

Permalink
Use reactphp/promise v2 compatible code
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Mar 20, 2024
1 parent 59152ad commit 75ccf65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Composer/Downloader/FileDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,15 @@ public function getLocalChanges(PackageInterface $package, string $path): ?strin
}

$promise = $this->download($package, $targetDir.'_compare', null, false);
$promise->catch(function ($ex) use (&$e) {
$promise->then(null, function ($ex) use (&$e) {
$e = $ex;
});
$this->httpDownloader->wait();
if ($e !== null) {
throw $e;
}
$promise = $this->install($package, $targetDir.'_compare', false);
$promise->catch(function ($ex) use (&$e) {
$promise->then(null, function ($ex) use (&$e) {
$e = $ex;
});
$this->process->wait();
Expand Down

0 comments on commit 75ccf65

Please sign in to comment.