Open Schnitzel opened 5 years ago
I opened an issue at curl: https://github.com/curl/curl/issues/3629
and it seems like that the implementation of drupal-scaffold
does not correctly follow the convention of curl:
Do not rely on the contents of the buffer unless an error code was returned.
actually looking at the implementation of the multi fetcher of prestissimo itself: https://github.com/hirak/prestissimo/blob/master/src/Prefetcher.php#L20 and the one in drupal-scaffold: https://github.com/drupal-composer/drupal-scaffold/blob/master/src/PrestissimoFileFetcher.php#L44 the error handling looks quite different. This also would explain why prestissimo does not fail with the newest curl version, but just drupal-scaffold.
I think we should update the code of the implementation in drupal-scaffold to the same in prestissimo
Same issue here. Would love to see the PR merged ;-)
Same here
[0m [91mScript DrupalComposer\DrupalScaffold\Plugin::scaffold handling the post-install-cmd event terminated with an exception
[Exception]
Failed to download https://cgit.drupalcode.org/drupal/plain/sites/development.services.yml, https://cgit.drupalcode.org/drupal/plain/sites/default/default.settings.php, https://cgit.drupalcode.org/drupal/plain/sites/default/default.services.yml, https://cgit.drupalcode.org/drupal/plain/robots.txt, https://cgit.drupalcode.org/drupal/plain/index.php, https://cgit.drupalcode.org/drupal/plain/web.config, https://cgit.drupalcode.org/drupal/plain/update.php, https://cgit.drupalcode.org/drupal/plain/.htaccess, https://cgit.drupalcode.org/drupal/plain/sites/example.sites.php
The command '/bin/sh -c composer install --prefer-dist --no-dev --no-suggest --optimize-autoloader --apcu-autoloader' returned a non-zero code: 1
Except curl PHP was also patched https://github.com/php/php-src/commit/5025eb05bde83a0a51eb0668c45c240b366545bf
Anyone know what is currently the best way to get around this issue?
[EDIT] Oh right, just remove hirak/prestissimo
we're running into a strange issue with PrestissimoFileFetcher and the newest curl version:
basically it is able to download the first couple of files, but then fails to download additional files.
Actually debugging the curl process shows a very weird issue: first working requests:
additional requests:
Interestingly prestissimo works correctly for regular composer installs:
the issues seem to only cause issues with the specific usage of
drupal-scaffold
andprestissimo
I also found https://stackoverflow.com/questions/54771917/could-not-resolve-host-error-with-curl-multi-on-curl-version-7-64 which talks about the same problem.
I'm not sure if this is really a problem within
drupal-scaffold
it just seems weird to me thatprestissimo
works by itself.some more info:
how to reproduce:
docker pull amazeeio/php:7.2-cli-drupal
docker run --rm --interactive --tty amazeeio/php:7.2-cli-drupal bash
composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-interaction --ignore-platform-reqs