Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Argument 3 passed to Composer\Downloader\DownloadManager - Composer 2.0.7 #288

Open
PitBult opened this issue Nov 30, 2020 · 5 comments

Comments

@PitBult
Copy link

PitBult commented Nov 30, 2020

Composer 2.0.7 - Error

PHP Fatal error: Uncaught TypeError: Argument 3 passed to Composer\Downloader\DownloadManager::download() must implement interface Composer\Package\PackageInterface or be null, bool given, called in /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php

PhantomInstaller\Installer::installPhantomJS
PHP Fatal error:  Uncaught TypeError: Argument 3 passed to Composer\Downloader\DownloadManager::download() must implement interface Composer\Package\PackageInterface or be null, bool given, called in /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php on line 192 and defined in phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:182
Stack trace:
#0 /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(192): Composer\Downloader\DownloadManager->download()
#1 /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(121): PhantomInstaller\Installer->download()
#2 /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(94): PhantomInstaller\Installer->__invoke()
#3 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(323): PhantomInstaller\Installer::installPhantomJS()
#4  in phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php on line 182


Fatal error: Uncaught TypeError: Argument 3 passed to Composer\Downloader\DownloadManager::download() must implement interface Composer\Package\PackageInterface or be null, bool given, called in /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php on line 192 and defined in phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:182
Stack trace:
#0 /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(192): Composer\Downloader\DownloadManager->download()
#1 /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(121): PhantomInstaller\Installer->download()
#2 /vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(94): PhantomInstaller\Installer->__invoke()
#3 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(323): PhantomInstaller\Installer::installPhantomJS()
#4  in phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php on line 182

Composer 1.10.17 - OK

PhantomInstaller\Installer::installPhantomJS
  - Installing phantomjs (2.1.1)
@Seldaek
Copy link

Seldaek commented Feb 16, 2021

jakoch/phantomjs-installer has been updated to support Composer2 in 3.0.0, so the require here should be updated.

michaeluno added a commit to michaeluno/php-simple-web-scraper that referenced this issue Jun 21, 2021
The PhantomJS dependency, jakoch/phantomjs-installer, is incompatible with Composer v2.

See composer/composer#9698 and jonnnnyw/php-phantomjs#288

Resolves #2.

This change set an alias for phantomjs-installer v2 to v3 to avoid conflicts.
@jovylle
Copy link

jovylle commented Aug 31, 2022

on v2.4.1 not installing it too.

@Marcel031
Copy link

not installing with composer v2.6.3 and jonnyw/php-phantomjs v4.5.1
[TypeError] Composer\Downloader\DownloadManager::download(): Argument #3 ($prevPackage) must be of type ?Composer\Package\PackageInterface, bool given, called in /vendor/ja koch/phantomjs-installer/src/PhantomInstaller/Installer.php on line 69

@ping-yee
Copy link

ping-yee commented May 8, 2024

also not installing with composer v2.7.6 and jonnyw/php-phantomjs: 4.6.1

[TypeError]                                                                                                                                                                                    
  Argument 3 passed to Composer\Downloader\DownloadManager::download() must implement interface Composer\Package\PackageInterface or be null, bool given, called in /Users/xxx/Desktop/xxx/Not_on_Server/xxx/api/vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php on line 69 

@Seldaek
Copy link

Seldaek commented May 8, 2024

This is unlikely to ever get fixed IMO. I'd recommend switching to wkhtmltopdf + https://packagist.org/packages/knplabs/knp-snappy or similar alternative solutions as phantomjs is itself also EOL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants