aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bench/disable-http3.patch
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-23 19:44:56 +0900
committernsfisis <nsfisis@gmail.com>2026-07-23 19:44:56 +0900
commit770013c7097b6b5c0c49c7fa46d9235c308c4ad5 (patch)
tree8ff499a4f278d61c872bc697dfa39c895f18e9c0 /scripts/bench/disable-http3.patch
parentc899a4675ca90507a420d901ef7fa26d8b285f23 (diff)
downloadphp-shirabe-770013c7097b6b5c0c49c7fa46d9235c308c4ad5.tar.gz
php-shirabe-770013c7097b6b5c0c49c7fa46d9235c308c4ad5.tar.zst
php-shirabe-770013c7097b6b5c0c49c7fa46d9235c308c4ad5.zip
fix(bench): pin composer binary and work around HTTP/3 slowdown
Benchmarks were comparing against whatever composer happened to be on PATH instead of the pinned submodule version, and paid the HTTP/3 fallback penalty from composer/composer#12987 on every packagist request.
Diffstat (limited to 'scripts/bench/disable-http3.patch')
-rw-r--r--scripts/bench/disable-http3.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/bench/disable-http3.patch b/scripts/bench/disable-http3.patch
new file mode 100644
index 00000000..55e49f57
--- /dev/null
+++ b/scripts/bench/disable-http3.patch
@@ -0,0 +1,13 @@
+diff --git i/src/Composer/Util/Http/CurlDownloader.php w/src/Composer/Util/Http/CurlDownloader.php
+index 4f2fdb028..44e46d01d 100644
+--- i/src/Composer/Util/Http/CurlDownloader.php
++++ w/src/Composer/Util/Http/CurlDownloader.php
+@@ -242,7 +242,7 @@ private function initDownload(callable $resolve, callable $reject, string $origi
+ if (0 === strpos($url, 'https://')) {
+ $willUseProxy = $proxy->getStatus() !== '' && !$proxy->isExcludedByNoProxy();
+
+- if (!$willUseProxy && \defined('CURL_VERSION_HTTP3') && \defined('CURL_HTTP_VERSION_3') && (CURL_VERSION_HTTP3 & $features) !== 0) {
++ if (false) {
+ curl_setopt($curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);
+ } elseif (\defined('CURL_VERSION_HTTP2') && \defined('CURL_HTTP_VERSION_2_0') && (CURL_VERSION_HTTP2 & $features) !== 0) {
+ curl_setopt($curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);