From 3518314272507f430c54155de168420906c266bb Mon Sep 17 00:00:00 2001 From: "A. Stewart" Date: Fri, 3 Sep 2021 13:49:03 -0400 Subject: [PATCH] Fix TypeError thrown during install This change solves the problem of a fatal error thrown during the execution of the post-install/update script. Specifically: ``` Fatal error: Uncaught TypeError: Composer\Downloader\DownloadManager::download(): Argument #3 ($prevPackage) must be of type ?Composer\Package\PackageInterface, bool given, called in ...\jakoch\phantomjs-installer\src\PhantomInstaller\Installer.php on line 192 and defined in .../Composer/Downloader/DownloadManager.php:182 ``` --- src/PhantomInstaller/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhantomInstaller/Installer.php b/src/PhantomInstaller/Installer.php index 4b2b5c5..079b426 100644 --- a/src/PhantomInstaller/Installer.php +++ b/src/PhantomInstaller/Installer.php @@ -204,7 +204,7 @@ public function downloadUsingComposerVersion1($targetDir, $version) $package = $this->createComposerInMemoryPackage($targetDir, $version); try { - $downloadManager->download($package, $targetDir, false); + $downloadManager->download($package, $targetDir, null); return true; } catch (TransportException $e) { if ($e->getStatusCode() === 404) {