Skip to content

Commit 81b49cd

Browse files
authored
ext/curl: Add HTTP/3 constants (php#15350)
This intends to supersede the two following PRs: - php#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. - php#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".
1 parent 6cb6cc6 commit 81b49cd

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ PHP NEWS
1212
. Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias)
1313
. Fixed bug GH-15292 (Dynamic AVX detection is broken for MSVC). (nielsdos)
1414

15+
- Curl:
16+
. Added constants CURL_HTTP_VERSION_3 (libcurl 7.66) and CURL_HTTP_VERSION_3ONLY
17+
(libcurl 7.88) as options for CURLOPT_HTTP_VERSION (Ayesh Karunaratne)
18+
1519
- Date:
1620
. Constants SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and SUNFUNCS_RET_DOUBLE
1721
are now deprecated. (Jorg Sowa)

UPGRADING

+6
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ PHP 8.4 UPGRADE NOTES
244244
. curl_version() returns an additional feature_list value, which is an
245245
associative array of all known Curl features, and whether they are
246246
supported (true) or not (false).
247+
. Added CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants (available
248+
since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION.
247249

248250
- Date:
249251
. Added static methods
@@ -881,6 +883,10 @@ PHP 8.4 UPGRADE NOTES
881883
. PHP_OUTPUT_HANDLER_PROCESSED.
882884
. PHP_SBINDIR.
883885

886+
- Curl:
887+
. CURL_HTTP_VERSION_3.
888+
. CURL_HTTP_VERSION_3ONLY.
889+
884890
- Intl:
885891
. The IntlDateFormatter class exposes now the new PATTERN constant
886892
reflecting udat api's UDAT_PATTERN.

ext/curl/curl.stub.php

+13
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,11 @@
31023102
* @cvalue CURLINFO_RETRY_AFTER
31033103
*/
31043104
const CURLINFO_RETRY_AFTER = UNKNOWN;
3105+
/**
3106+
* @var int
3107+
* @cvalue CURL_HTTP_VERSION_3
3108+
*/
3109+
const CURL_HTTP_VERSION_3 = UNKNOWN;
31053110
#endif
31063111

31073112
#if LIBCURL_VERSION_NUM >= 0x074300 /* Available since 7.67.0 */
@@ -3547,6 +3552,14 @@
35473552
const CURLOPT_QUICK_EXIT = UNKNOWN;
35483553
#endif
35493554

3555+
#if LIBCURL_VERSION_NUM >= 0x075800 /* Available since 7.88.0 */
3556+
/**
3557+
* @var int
3558+
* @cvalue CURL_HTTP_VERSION_3ONLY
3559+
*/
3560+
const CURL_HTTP_VERSION_3ONLY = UNKNOWN;
3561+
#endif
3562+
35503563
/**
35513564
* @var int
35523565
* @cvalue CURLOPT_SAFE_UPLOAD

ext/curl/curl_arginfo.h

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)