mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/curl: Add HTTP/3 constants (#15350)
This intends to supersede the two following PRs: - #12000 because it does not modify the stub file, but only update the arginfo file. It also proposes to merge to GA branches, and is currently marked as Requires RM Approval. - #12543 Essentially the same as this PR and from the same author, as this, but its about a year old and requires rebasing anyway. This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants on relevant versions (7.66 and 7.88 respectively). It is possible to use HTTP/3 without having these constants declared, but having them declared in PHP makes things more approachable and "official".
This commit is contained in:
committed by
GitHub
parent
6cb6cc6f74
commit
81b49cd062
4
NEWS
4
NEWS
@@ -12,6 +12,10 @@ PHP NEWS
|
||||
. Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias)
|
||||
. Fixed bug GH-15292 (Dynamic AVX detection is broken for MSVC). (nielsdos)
|
||||
|
||||
- Curl:
|
||||
. Added constants CURL_HTTP_VERSION_3 (libcurl 7.66) and CURL_HTTP_VERSION_3ONLY
|
||||
(libcurl 7.88) as options for CURLOPT_HTTP_VERSION (Ayesh Karunaratne)
|
||||
|
||||
- Date:
|
||||
. Constants SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and SUNFUNCS_RET_DOUBLE
|
||||
are now deprecated. (Jorg Sowa)
|
||||
|
||||
@@ -244,6 +244,8 @@ PHP 8.4 UPGRADE NOTES
|
||||
. curl_version() returns an additional feature_list value, which is an
|
||||
associative array of all known Curl features, and whether they are
|
||||
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.
|
||||
|
||||
- Date:
|
||||
. Added static methods
|
||||
@@ -881,6 +883,10 @@ PHP 8.4 UPGRADE NOTES
|
||||
. PHP_OUTPUT_HANDLER_PROCESSED.
|
||||
. PHP_SBINDIR.
|
||||
|
||||
- Curl:
|
||||
. CURL_HTTP_VERSION_3.
|
||||
. CURL_HTTP_VERSION_3ONLY.
|
||||
|
||||
- Intl:
|
||||
. The IntlDateFormatter class exposes now the new PATTERN constant
|
||||
reflecting udat api's UDAT_PATTERN.
|
||||
|
||||
@@ -3102,6 +3102,11 @@ const CURL_VERSION_HTTP3 = UNKNOWN;
|
||||
* @cvalue CURLINFO_RETRY_AFTER
|
||||
*/
|
||||
const CURLINFO_RETRY_AFTER = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue CURL_HTTP_VERSION_3
|
||||
*/
|
||||
const CURL_HTTP_VERSION_3 = UNKNOWN;
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x074300 /* Available since 7.67.0 */
|
||||
@@ -3547,6 +3552,14 @@ const CURLOPT_CA_CACHE_TIMEOUT = UNKNOWN;
|
||||
const CURLOPT_QUICK_EXIT = UNKNOWN;
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x075800 /* Available since 7.88.0 */
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue CURL_HTTP_VERSION_3ONLY
|
||||
*/
|
||||
const CURL_HTTP_VERSION_3ONLY = UNKNOWN;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue CURLOPT_SAFE_UPLOAD
|
||||
|
||||
8
ext/curl/curl_arginfo.h
generated
8
ext/curl/curl_arginfo.h
generated
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 92f4985790d0dad4216be837571e41c86711b6f8 */
|
||||
* Stub hash: b5a3bd62bcb62b2e7e4aacfcd4621cc632be1564 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0)
|
||||
ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0)
|
||||
@@ -848,6 +848,9 @@ static void register_curl_symbols(int module_number)
|
||||
#if LIBCURL_VERSION_NUM >= 0x074200 /* Available since 7.66.0 */
|
||||
REGISTER_LONG_CONSTANT("CURLINFO_RETRY_AFTER", CURLINFO_RETRY_AFTER, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x074200 /* Available since 7.66.0 */
|
||||
REGISTER_LONG_CONSTANT("CURL_HTTP_VERSION_3", CURL_HTTP_VERSION_3, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x074300 /* Available since 7.67.0 */
|
||||
REGISTER_LONG_CONSTANT("CURLMOPT_MAX_CONCURRENT_STREAMS", CURLMOPT_MAX_CONCURRENT_STREAMS, CONST_PERSISTENT);
|
||||
#endif
|
||||
@@ -1081,6 +1084,9 @@ static void register_curl_symbols(int module_number)
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x075700 /* Available since 7.87.0 */
|
||||
REGISTER_LONG_CONSTANT("CURLOPT_QUICK_EXIT", CURLOPT_QUICK_EXIT, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x075800 /* Available since 7.88.0 */
|
||||
REGISTER_LONG_CONSTANT("CURL_HTTP_VERSION_3ONLY", CURL_HTTP_VERSION_3ONLY, CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_LONG_CONSTANT("CURLOPT_SAFE_UPLOAD", CURLOPT_SAFE_UPLOAD, CONST_PERSISTENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user