From 75ccf6557a64c4ac273e0e1ad170bf76c2683317 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 20 Mar 2024 12:32:54 +0100 Subject: [PATCH] Use reactphp/promise v2 compatible code --- src/Composer/Downloader/FileDownloader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php index 97cf134fe..a4f13f309 100644 --- a/src/Composer/Downloader/FileDownloader.php +++ b/src/Composer/Downloader/FileDownloader.php @@ -496,7 +496,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface } $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(); @@ -504,7 +504,7 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface 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();