prestissimo
prestissimo copied to clipboard
Issue with PHP8 in CurlMulti
Runing composer req on PHP8 image triggers an exception in CurlMulti (when casting the resource to int)
composer init --no-interaction
composer global require hirak/prestissimo
composer req symfony/phpunit-bridge -vvv
[ErrorException]
Object of class CurlHandle could not be converted to int
Exception trace:
() at /root/.composer/vendor/hirak/prestissimo/src/CurlMulti.php:93
Composer\Util\ErrorHandler::handle() at /root/.composer/vendor/hirak/prestissimo/src/CurlMulti.php:93
Hirak\Prestissimo\CurlMulti->setupEventLoop() at /root/.composer/vendor/hirak/prestissimo/src/Prefetcher.php:29
Hirak\Prestissimo\Prefetcher->fetchAll() at /root/.composer/vendor/hirak/prestissimo/src/Prefetcher.php:87
Hirak\Prestissimo\Prefetcher->fetchAllFromOperations() at phar:///var/www/html/composer.phar/src/Composer/Plugin/PluginManager.php(196) : eval()'d code:144
Hirak\Prestissimo\Plugin_composer_tmp0->onPostDependenciesSolving() at n/a:n/a
call_user_func() at phar:///var/www/html/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:164
full reproduce-case with docker image
docker pull devilbox/php-fpm-8.0
docker run --rm -ti devilbox/php-fpm-8.0 bash
apt-get update; apt-get install -y git zip
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php composer.phar global require hirak/prestissimo
php composer.phar init --no-interaction
php composer.phar req symfony/phpunit-bridge -vvv
note: same issue with composer2 https://github.com/composer/composer/issues/8994