diff --git a/NEWS b/NEWS index 0459373092ff..a58a0692e10c 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ PHP NEWS and CURL_SEEKFUNC_CANTSEEK constants, letting libcurl rewind a streamed request body to resend it on a redirect, multi-pass authentication or a retried reused connection. (GrahamCampbell) + . 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) diff --git a/UPGRADING b/UPGRADING index a809687d1961..54690c91cf92 100644 --- a/UPGRADING +++ b/UPGRADING @@ -333,6 +333,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 70e87cc9b146..5dc9b1ce1ab4 100644 --- a/ext/curl/curl.stub.php +++ b/ext/curl/curl.stub.php @@ -2410,6 +2410,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 @@ -2430,6 +2431,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 f2929f60c4e2..27dc5aead72f 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: d55adb230c533f4dde05e95759477dd9e1dd6efb */ + * Stub hash: 84af09124e4197f9460e36e7e82bbd6b8d3fb443 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0) @@ -691,11 +691,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); @@ -1012,6 +1012,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)