php-phantomjs
php-phantomjs copied to clipboard
Uncaught TypeError: Argument 3 passed to Composer\Downloader\DownloadManager - Composer 2.0.7
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)
jakoch/phantomjs-installer has been updated to support Composer2 in 3.0.0, so the require here should be updated.
on v2.4.1 not installing it too.
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
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
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.