diff --git a/NEWS b/NEWS index f40c6dfd8da6..311ebb86087b 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ PHP NEWS . Fixed bug GH-22602 (gregoriantojd() and juliantojd() integer overflow with INT_MAX year). (arshidkv12) +- Curl: + . Deprecated the CURLAUTH_NTLM_WB and CURL_VERSION_NTLM_WB constants, as + libcurl 8.8.0 removed NTLM_WB support. (Graham Campbell) + - Date: . Update timelib to 2022.17. (Derick) . Fixed bug GH-19803 (Parsing a string with a single white space does create diff --git a/UPGRADING b/UPGRADING index 031b6751d853..54cf7de8f6ac 100644 --- a/UPGRADING +++ b/UPGRADING @@ -327,6 +327,10 @@ PHP 8.6 UPGRADE NOTES . Making __construct() and __destruct() a Generator is now deprecated. RFC: https://wiki.php.net/rfc/deprecate-return-value-from-construct +- Curl: + . The CURLAUTH_NTLM_WB and CURL_VERSION_NTLM_WB constants are deprecated, as + libcurl 8.8.0 removed NTLM_WB support. + - GMP . The shift (<<, >>) and exponentiation (**) operators on GMP objects now emit a deprecation warning when converting a float right operand to int diff --git a/ext/curl/curl.stub.php b/ext/curl/curl.stub.php index d3bd58510e40..05ec374daabb 100644 --- a/ext/curl/curl.stub.php +++ b/ext/curl/curl.stub.php @@ -2390,6 +2390,7 @@ * @var int * @cvalue CURLAUTH_NTLM_WB */ +#[\Deprecated(since: '8.6', message: 'as libcurl 8.8.0 removed NTLM_WB support')] const CURLAUTH_NTLM_WB = UNKNOWN; /** * @var int @@ -2410,6 +2411,7 @@ * @var int * @cvalue CURL_VERSION_NTLM_WB */ +#[\Deprecated(since: '8.6', message: 'as libcurl 8.8.0 removed NTLM_WB support')] const CURL_VERSION_NTLM_WB = UNKNOWN; /* Available since 7.24.0 */ diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h index 6a05b73572cb..ba7169d83ad7 100644 --- a/ext/curl/curl_arginfo.h +++ b/ext/curl/curl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit curl.stub.php instead. - * Stub hash: 1ecf692ba8494e7b486986c0170686c33768deb5 */ + * Stub hash: 814299d060bb8e348d6277b947c7c9cc50f6e397 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0) @@ -687,11 +687,11 @@ static void register_curl_symbols(int module_number) REGISTER_LONG_CONSTANT("CURL_VERSION_TLSAUTH_SRP", CURL_VERSION_TLSAUTH_SRP, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_ACCEPT_ENCODING", CURLOPT_ACCEPT_ENCODING, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_TRANSFER_ENCODING", CURLOPT_TRANSFER_ENCODING, CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("CURLAUTH_NTLM_WB", CURLAUTH_NTLM_WB, CONST_PERSISTENT); + zend_constant *const_CURLAUTH_NTLM_WB = REGISTER_LONG_CONSTANT("CURLAUTH_NTLM_WB", CURLAUTH_NTLM_WB, CONST_PERSISTENT | CONST_DEPRECATED); REGISTER_LONG_CONSTANT("CURLGSSAPI_DELEGATION_FLAG", CURLGSSAPI_DELEGATION_FLAG, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLGSSAPI_DELEGATION_POLICY_FLAG", CURLGSSAPI_DELEGATION_POLICY_FLAG, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_GSSAPI_DELEGATION", CURLOPT_GSSAPI_DELEGATION, CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("CURL_VERSION_NTLM_WB", CURL_VERSION_NTLM_WB, CONST_PERSISTENT); + zend_constant *const_CURL_VERSION_NTLM_WB = REGISTER_LONG_CONSTANT("CURL_VERSION_NTLM_WB", CURL_VERSION_NTLM_WB, CONST_PERSISTENT | CONST_DEPRECATED); REGISTER_LONG_CONSTANT("CURLOPT_ACCEPTTIMEOUT_MS", CURLOPT_ACCEPTTIMEOUT_MS, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_DNS_SERVERS", CURLOPT_DNS_SERVERS, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CURLOPT_MAIL_AUTH", CURLOPT_MAIL_AUTH, CONST_PERSISTENT); @@ -1008,6 +1008,20 @@ static void register_curl_symbols(int module_number) zend_string *attribute_Deprecated_const_CURLOPT_BINARYTRANSFER_0_arg1_str = zend_string_init("as it had no effect since 5.1.2", strlen("as it had no effect since 5.1.2"), 1); ZVAL_STR(&attribute_Deprecated_const_CURLOPT_BINARYTRANSFER_0->args[1].value, attribute_Deprecated_const_CURLOPT_BINARYTRANSFER_0_arg1_str); attribute_Deprecated_const_CURLOPT_BINARYTRANSFER_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_const_CURLAUTH_NTLM_WB_0 = zend_add_global_constant_attribute(const_CURLAUTH_NTLM_WB, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_string *attribute_Deprecated_const_CURLAUTH_NTLM_WB_0_arg0_str = zend_string_init("8.6", strlen("8.6"), 1); + ZVAL_STR(&attribute_Deprecated_const_CURLAUTH_NTLM_WB_0->args[0].value, attribute_Deprecated_const_CURLAUTH_NTLM_WB_0_arg0_str); + attribute_Deprecated_const_CURLAUTH_NTLM_WB_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zend_string *attribute_Deprecated_const_CURLAUTH_NTLM_WB_0_arg1_str = zend_string_init("as libcurl 8.8.0 removed NTLM_WB support", strlen("as libcurl 8.8.0 removed NTLM_WB support"), 1); + ZVAL_STR(&attribute_Deprecated_const_CURLAUTH_NTLM_WB_0->args[1].value, attribute_Deprecated_const_CURLAUTH_NTLM_WB_0_arg1_str); + attribute_Deprecated_const_CURLAUTH_NTLM_WB_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_const_CURL_VERSION_NTLM_WB_0 = zend_add_global_constant_attribute(const_CURL_VERSION_NTLM_WB, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + ZVAL_STR_COPY(&attribute_Deprecated_const_CURL_VERSION_NTLM_WB_0->args[0].value, attribute_Deprecated_const_CURLAUTH_NTLM_WB_0_arg0_str); + attribute_Deprecated_const_CURL_VERSION_NTLM_WB_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + ZVAL_STR_COPY(&attribute_Deprecated_const_CURL_VERSION_NTLM_WB_0->args[1].value, attribute_Deprecated_const_CURLAUTH_NTLM_WB_0_arg1_str); + attribute_Deprecated_const_CURL_VERSION_NTLM_WB_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); } static zend_class_entry *register_class_CurlHandle(void) diff --git a/ext/curl/tests/curl_ntlm_wb_deprecation.phpt b/ext/curl/tests/curl_ntlm_wb_deprecation.phpt new file mode 100644 index 000000000000..65aee3df62da --- /dev/null +++ b/ext/curl/tests/curl_ntlm_wb_deprecation.phpt @@ -0,0 +1,15 @@ +--TEST-- +CURLAUTH_NTLM_WB and CURL_VERSION_NTLM_WB constants are deprecated +--EXTENSIONS-- +curl +--FILE-- + +--EXPECTF-- +Deprecated: Constant CURLAUTH_NTLM_WB is deprecated since 8.6, as libcurl 8.8.0 removed NTLM_WB support in %s on line %d +int(%d) + +Deprecated: Constant CURL_VERSION_NTLM_WB is deprecated since 8.6, as libcurl 8.8.0 removed NTLM_WB support in %s on line %d +int(%d)