diff --git a/NEWS b/NEWS index 897b3f7226708..3488723b8a43b 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,10 @@ PHP NEWS EAI_SYSTEM not found). (nielsdos) . Implemented asymmetric visibility for properties. (ilutov) +- Curl: + . Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as + CURLOPT_FTP_RESPONSE_TIMEOUT. (Ayesh Karunaratne) + - Date: . Fixed bug GH-13773 (DatePeriod not taking into account microseconds for end date). (Mark Bennewitz, Derick) diff --git a/UPGRADING b/UPGRADING index 048049b96642d..890d33b05aa76 100644 --- a/UPGRADING +++ b/UPGRADING @@ -292,6 +292,8 @@ PHP 8.4 UPGRADE NOTES supported (true) or not (false). . Added CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants (available since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION. + . Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as + CURLOPT_FTP_RESPONSE_TIMEOUT. Both constants hold the same value. - Date: . Added static methods @@ -996,6 +998,7 @@ PHP 8.4 UPGRADE NOTES . CURL_HTTP_VERSION_3. . CURL_HTTP_VERSION_3ONLY. . CURL_TCP_KEEPCNT + . CURLOPT_SERVER_RESPONSE_TIMEOUT. - Intl: . The IntlDateFormatter class exposes now the new PATTERN constant diff --git a/ext/curl/curl.stub.php b/ext/curl/curl.stub.php index c7eba7394843c..e6245aab073e2 100644 --- a/ext/curl/curl.stub.php +++ b/ext/curl/curl.stub.php @@ -84,7 +84,8 @@ const CURLOPT_EGDSOCKET = UNKNOWN; /** * @var int - * @cvalue CURLOPT_ENCODING + * @cvalue CURLOPT_ACCEPT_ENCODING + * @alias CURLOPT_ACCEPT_ENCODING */ const CURLOPT_ENCODING = UNKNOWN; /** @@ -1291,9 +1292,15 @@ const CURLINFO_PROXYAUTH_AVAIL = UNKNOWN; /** * @var int - * @cvalue CURLOPT_FTP_RESPONSE_TIMEOUT + * @cvalue CURLOPT_SERVER_RESPONSE_TIMEOUT + * @alias CURLOPT_SERVER_RESPONSE_TIMEOUT */ const CURLOPT_FTP_RESPONSE_TIMEOUT = UNKNOWN; +/** + * @var int + * @cvalue CURLOPT_SERVER_RESPONSE_TIMEOUT + */ +const CURLOPT_SERVER_RESPONSE_TIMEOUT = UNKNOWN; /** * @var int * @cvalue CURLOPT_IPRESOLVE diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h index f3f13ae3b4ca0..6c444ebbf7440 100644 --- a/ext/curl/curl_arginfo.h +++ b/ext/curl/curl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3a5bd4e561f08f0dbd26383132a771acc8192fff */ + * Stub hash: 5aa5f230880f8373ef8ec378f7e600247332136e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0) @@ -242,7 +242,7 @@ static void register_curl_symbols(int module_number) REGISTER_LONG_CONSTANT("CURLOPT_DNS_CACHE_TIMEOUT", CURLOPT_DNS_CACHE_TIMEOUT, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_DNS_USE_GLOBAL_CACHE", CURLOPT_DNS_USE_GLOBAL_CACHE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_EGDSOCKET", CURLOPT_EGDSOCKET, CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("CURLOPT_ENCODING", CURLOPT_ENCODING, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CURLOPT_ENCODING", CURLOPT_ACCEPT_ENCODING, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_FAILONERROR", CURLOPT_FAILONERROR, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_FILE", CURLOPT_FILE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_FILETIME", CURLOPT_FILETIME, CONST_PERSISTENT); @@ -484,7 +484,8 @@ static void register_curl_symbols(int module_number) REGISTER_LONG_CONSTANT("CURLINFO_HTTPAUTH_AVAIL", CURLINFO_HTTPAUTH_AVAIL, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLINFO_RESPONSE_CODE", CURLINFO_RESPONSE_CODE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLINFO_PROXYAUTH_AVAIL", CURLINFO_PROXYAUTH_AVAIL, CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("CURLOPT_FTP_RESPONSE_TIMEOUT", CURLOPT_FTP_RESPONSE_TIMEOUT, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CURLOPT_FTP_RESPONSE_TIMEOUT", CURLOPT_SERVER_RESPONSE_TIMEOUT, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CURLOPT_SERVER_RESPONSE_TIMEOUT", CURLOPT_SERVER_RESPONSE_TIMEOUT, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_IPRESOLVE", CURLOPT_IPRESOLVE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_MAXFILESIZE", CURLOPT_MAXFILESIZE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURL_IPRESOLVE_V4", CURL_IPRESOLVE_V4, CONST_PERSISTENT); diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 4697f468098d6..ba3c9667d559e 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1695,7 +1695,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue case CURLOPT_HTTPAUTH: case CURLOPT_FTP_CREATE_MISSING_DIRS: case CURLOPT_PROXYAUTH: - case CURLOPT_FTP_RESPONSE_TIMEOUT: + case CURLOPT_SERVER_RESPONSE_TIMEOUT: case CURLOPT_IPRESOLVE: case CURLOPT_MAXFILESIZE: case CURLOPT_TCP_NODELAY: