From 8a436fbe65f9249d9988c270035b25d806e91492 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Sat, 17 Aug 2024 01:20:46 +0700 Subject: [PATCH] ext/curl: Add `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants Ref: [php/php-src#15350](https://github.com/php/php-src/pull/15350), [PHP.Watch](https://php.watch/articles/php-curl-http3) --- curl/curl_d.php | 10 ++++++++++ meta/.phpstorm.meta.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/curl/curl_d.php b/curl/curl_d.php index 52b15e8cf..e68f5cb10 100644 --- a/curl/curl_d.php +++ b/curl/curl_d.php @@ -4333,3 +4333,13 @@ * @since 8.2 */ define('CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256', 10311); + +/** + * @since 8.4 + */ +define('CURL_HTTP_VERSION_3', 30); + +/** + * @since 8.4 + */ +define('CURL_HTTP_VERSION_3ONLY', 31); diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index 130df23dc..01627ef23 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -140,7 +140,7 @@ function argumentsSet($setName) { expectedArguments(\curl_setopt(), 2, \CURLAUTH_ANY | \CURLAUTH_ANYSAFE | \CURLAUTH_BASIC | \CURLAUTH_BEARER | \CURLAUTH_DIGEST | \CURLAUTH_GSSAPI | \CURLAUTH_GSSNEGOTIATE | \CURLAUTH_NEGOTIATE | \CURLAUTH_NTLM | \CURLAUTH_NTLM_WB | \CURLSSH_AUTH_AGENT | \CURLSSH_AUTH_GSSAPI, \CURL_SSLVERSION_DEFAULT, \CURL_SSLVERSION_MAX_DEFAULT, \CURL_SSLVERSION_MAX_NONE, \CURL_SSLVERSION_MAX_TLSv1_0, \CURL_SSLVERSION_MAX_TLSv1_1, \CURL_SSLVERSION_MAX_TLSv1_2, \CURL_SSLVERSION_MAX_TLSv1_3, \CURL_SSLVERSION_SSLv2, \CURL_SSLVERSION_SSLv3, \CURL_SSLVERSION_TLSv1, \CURL_SSLVERSION_TLSv1_0, \CURL_SSLVERSION_TLSv1_1, \CURL_SSLVERSION_TLSv1_2, \CURL_SSLVERSION_TLSv1_3, \CURLFTPAUTH_DEFAULT, \CURLFTPAUTH_SSL, \CURLFTPAUTH_TLS, \CURLFTPMETHOD_MULTICWD, \CURLFTPMETHOD_NOCWD, \CURLFTPMETHOD_SINGLECWD, \CURLFTPSSL_ALL, \CURLFTPSSL_CONTROL, \CURLFTPSSL_NONE, \CURLFTPSSL_TRY, \CURLFTP_CREATE_DIR, \CURLFTP_CREATE_DIR_NONE, \CURLFTP_CREATE_DIR_RETRY, \CURLPROTO_ALL | \CURLPROTO_DICT | \CURLPROTO_FILE | \CURLPROTO_FTP | \CURLPROTO_FTPS | \CURLPROTO_HTTPS | \CURLPROTO_LDAP | \CURLPROTO_LDAPS | \CURLPROTO_SCP | \CURLPROTO_SFTP | \CURLPROTO_SMB | \CURLPROTO_SMBS | \CURLPROTO_TELNET | \CURLPROTO_TFTP, \CURLPROXY_HTTP, \CURLPROXY_HTTPS, \CURLPROXY_HTTP_1_0, \CURLPROXY_SOCKS4, \CURLPROXY_SOCKS5, - \CURL_HTTP_VERSION_1_0, \CURL_HTTP_VERSION_1_1, \CURL_HTTP_VERSION_2, \CURL_HTTP_VERSION_2TLS, \CURL_HTTP_VERSION_2_0, \CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, \CURL_HTTP_VERSION_NONE, + \CURL_HTTP_VERSION_1_0, \CURL_HTTP_VERSION_1_1, \CURL_HTTP_VERSION_2, \CURL_HTTP_VERSION_2TLS, \CURL_HTTP_VERSION_2_0, \CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, \CURL_HTTP_VERSION_3, \CURL_HTTP_VERSION_3ONLY, \CURL_HTTP_VERSION_NONE, \CURL_IPRESOLVE_V4, \CURL_IPRESOLVE_V6, \CURL_IPRESOLVE_WHATEVER, \CURL_NETRC_IGNORED, \CURL_NETRC_OPTIONAL, \CURL_NETRC_REQUIRED, \CURL_REDIR_POST_301 | \CURL_REDIR_POST_302 | \CURL_REDIR_POST_303 | \CURL_REDIR_POST_ALL, \CURL_TIMECOND_IFMODSINCE, \CURL_TIMECOND_IFUNMODSINCE, \CURL_TIMECOND_LASTMOD, \CURLCLOSEPOLICY_CALLBACK, \CURLCLOSEPOLICY_LEAST_RECENTLY_USED, \CURLCLOSEPOLICY_LEAST_TRAFFIC, \CURLCLOSEPOLICY_OLDEST, \CURLCLOSEPOLICY_SLOWEST, \CURLHEADER_SEPARATE, \CURLHEADER_UNIFIED); expectedArguments(\curl_getinfo(), 1, \CURLINFO_REDIRECT_URL, \CURLINFO_PRIMARY_IP, \CURLINFO_PRIMARY_PORT, \CURLINFO_LOCAL_IP, \CURLINFO_LOCAL_PORT, \CURLINFO_RESPONSE_CODE, \CURLINFO_HTTP_CONNECTCODE, \CURLINFO_HTTPAUTH_AVAIL, \CURLINFO_PROXYAUTH_AVAIL, \CURLINFO_OS_ERRNO, \CURLINFO_NUM_CONNECTS, \CURLINFO_SSL_ENGINES, \CURLINFO_COOKIELIST, \CURLINFO_FTP_ENTRY_PATH, \CURLINFO_APPCONNECT_TIME, \CURLINFO_CERTINFO, \CURLINFO_CONDITION_UNMET, \CURLINFO_RTSP_CLIENT_CSEQ, \CURLINFO_RTSP_CSEQ_RECV, \CURLINFO_RTSP_SERVER_CSEQ, \CURLINFO_RTSP_SESSION_ID, \CURLINFO_EFFECTIVE_URL, \CURLINFO_HTTP_CODE, \CURLINFO_HEADER_SIZE, \CURLINFO_REQUEST_SIZE, \CURLINFO_TOTAL_TIME, \CURLINFO_NAMELOOKUP_TIME, \CURLINFO_CONNECT_TIME, \CURLINFO_PRETRANSFER_TIME, \CURLINFO_SIZE_UPLOAD, \CURLINFO_SIZE_DOWNLOAD, \CURLINFO_SPEED_DOWNLOAD, \CURLINFO_SPEED_UPLOAD, \CURLINFO_FILETIME, \CURLINFO_SSL_VERIFYRESULT, \CURLINFO_CONTENT_LENGTH_DOWNLOAD, \CURLINFO_CONTENT_LENGTH_UPLOAD, \CURLINFO_STARTTRANSFER_TIME, \CURLINFO_CONTENT_TYPE, \CURLINFO_REDIRECT_TIME, \CURLINFO_REDIRECT_COUNT, \CURLINFO_HEADER_OUT, \CURLINFO_PRIVATE, \CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, \CURLINFO_CONTENT_LENGTH_UPLOAD_T, \CURLINFO_SIZE_DOWNLOAD_T, \CURLINFO_SIZE_UPLOAD_T, \CURLINFO_SPEED_DOWNLOAD_T, \CURLINFO_SPEED_UPLOAD_T, \CURLINFO_FILETIME_T, \CURLINFO_APPCONNECT_TIME_T, \CURLINFO_CONNECT_TIME_T, \CURLINFO_NAMELOOKUP_TIME_T, \CURLINFO_PRETRANSFER_TIME_T, \CURLINFO_REDIRECT_TIME_T, \CURLINFO_STARTTRANSFER_TIME_T, \CURLINFO_TOTAL_TIME_T, \CURLINFO_LASTONE, \CURLINFO_PROTOCOL, \CURLINFO_SCHEME, \CURLINFO_HTTP_VERSION, \CURLINFO_PROXY_SSL_VERIFYRESULT, \CURLINFO_EFFECTIVE_METHOD);