Skip to content

Commit

Permalink
ext/curl: Add HTTP/3 constants
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
Ayesh committed Aug 11, 2024
1 parent 693ec80 commit 32b8616
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions ext/curl/curl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3102,6 +3102,11 @@
* @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 */
Expand Down Expand Up @@ -3547,6 +3552,14 @@
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
Expand Down
8 changes: 7 additions & 1 deletion ext/curl/curl_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32b8616

Please sign in to comment.