From 39baea2669be29d5f97f1c2215e984f15ca74db3 Mon Sep 17 00:00:00 2001 From: Joseph Scott Date: Sat, 30 Dec 2023 13:43:57 -0700 Subject: [PATCH] Add the curl microsecond timing fields for HTTP requests These are the `*_TIME_T` fields that are included in the results from `curl_getinfo()`, when no option is provided. See https://www.php.net/manual/en/function.curl-getinfo.php for more info on each field. --- .../Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php b/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php index ed0ade9930..2913ad33f8 100644 --- a/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php +++ b/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php @@ -190,6 +190,13 @@ private function createAllComponentsReturnType(): Type 'protocol' => $integerType, 'ssl_verifyresult' => $integerType, 'scheme' => $stringType, + 'appconnect_time_us' => $integerType, + 'connect_time_us' => $integerType, + 'namelookup_time_us' => $integerType, + 'pretransfer_time_us' => $integerType, + 'redirect_time_us' => $integerType, + 'starttransfer_time_us' => $integerType, + 'total_time_us' => $integerType, ]; foreach ($componentTypesPairedStrings as $componentName => $componentValueType) { $builder->setOffsetValueType(new ConstantStringType($componentName), $componentValueType);