hhvm / hhvm-docker

Dockerfiles for HHVM
MIT License
55 stars 11 forks source link

Add php-curl to the image to speed up composer #21

Closed lexidor closed 2 years ago

lexidor commented 2 years ago

The reason to have PHP installed in the base hhvm image is to run composer. Composer can work without php-curl, but it is way slower when doing so. Composer can fetch multiple resources in parallel when php-curl is installed.

From: https://github.com/composer/composer/blob/012556daeea9011c202dd07a8a226caad98664ac/src/Composer/Command/InstallCommand.php#L104 <warning>Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.</warning>

lexidor commented 2 years ago

I don't have a testing strategy. I ran composer update -vvv on a fresh 4.138.0 docker image. The warning was shown. After running apt update && apt install php-curl, composer update -vvv did not have the warning anymore and the download verbose debug messages became a lot faster.