Skip to content

Add new curl constants from curl > 7.80 #10459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 17, 2023
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ PHP NEWS
. Remove WeakMap entries whose key is only reachable through the entry value.
(Arnaud)

- Curl:
. Added Curl options and constants up to (including) version 7.87.
(nielsdos, adoy)

- DOM:
. Added DOMNode::contains() and DOMNameSpaceNode::contains(). (nielsdos)
. Added DOMElement::getAttributeNames(). (nielsdos)
Expand Down
22 changes: 22 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ PHP 8.3 UPGRADE NOTES
. IntlChar::enumCharNames is now returning a boolean.
Previously it returned null on success and false on failure.

- Curl:
. curl_getinfo() now supports two new constants: CURLINFO_CAPATH and CURLINFO_CAINFO.
If option is null, the following two additional keys are present:
"capath" and "cainfo".

- MBString:
. mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional
casing rules for the Greek letter sigma. For mb_convert_case, conditional
Expand Down Expand Up @@ -339,6 +344,23 @@ PHP 8.3 UPGRADE NOTES
10. New Global Constants
========================================

- Curl:
. CURLINFO_CAPATH
. CURLINFO_CAINFO
. CURLOPT_MIME_OPTIONS
. CURLMIMEOPT_FORMESCAPE
. CURLOPT_WS_OPTIONS
. CURLWS_RAW_MODE
. CURLOPT_SSH_HOSTKEYFUNCTION
. CURLOPT_PROTOCOLS_STR
. CURLOPT_REDIR_PROTOCOLS_STR
. CURLOPT_CA_CACHE_TIMEOUT
. CURLOPT_QUICK_EXIT
. CURLKHMATCH_OK
. CURLKHMATCH_MISMATCH
. CURLKHMATCH_MISSING
. CURLKHMATCH_LAST

- Intl:
. MIXED_NUMBERS (Spoofchecker).
. HIDDEN_OVERLAY (Spoofchecker).
Expand Down
92 changes: 92 additions & 0 deletions ext/curl/curl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,18 @@
*/
const CURLINFO_EFFECTIVE_METHOD = UNKNOWN;
#endif
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
/**
* @var int
* @cvalue CURLINFO_CAPATH
*/
const CURLINFO_CAPATH = UNKNOWN;
/**
* @var int
* @cvalue CURLINFO_CAINFO
*/
const CURLINFO_CAINFO = UNKNOWN;
#endif

/* Other */
/**
Expand Down Expand Up @@ -1979,6 +1991,26 @@
* @cvalue CURLOPT_SSH_KNOWNHOSTS
*/
const CURLOPT_SSH_KNOWNHOSTS = UNKNOWN;
/**
* @var int
* @cvalue CURLKHMATCH_OK
*/
const CURLKHMATCH_OK = UNKNOWN;
/**
* @var int
* @cvalue CURLKHMATCH_MISMATCH
*/
const CURLKHMATCH_MISMATCH = UNKNOWN;
/**
* @var int
* @cvalue CURLKHMATCH_MISSING
*/
const CURLKHMATCH_MISSING = UNKNOWN;
/**
* @var int
* @cvalue CURLKHMATCH_LAST
*/
const CURLKHMATCH_LAST = UNKNOWN;

/* Available since 7.20.0 */
/**
Expand Down Expand Up @@ -3522,6 +3554,66 @@
const CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x075100 /* Available since 7.81.0 */
/**
* @var int
* @cvalue CURLOPT_MIME_OPTIONS
*/
const CURLOPT_MIME_OPTIONS = UNKNOWN;
/**
* @var int
* @cvalue CURLMIMEOPT_FORMESCAPE
*/
const CURLMIMEOPT_FORMESCAPE = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
/**
* @var int
* @cvalue CURLOPT_SSH_HOSTKEYFUNCTION
*/
const CURLOPT_SSH_HOSTKEYFUNCTION = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x075500 /* Available since 7.85.0 */
/**
* @var int
* @cvalue CURLOPT_PROTOCOLS_STR
*/
const CURLOPT_PROTOCOLS_STR = UNKNOWN;
/**
* @var int
* @cvalue CURLOPT_REDIR_PROTOCOLS_STR
*/
const CURLOPT_REDIR_PROTOCOLS_STR = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x075600 /* Available since 7.86.0 */
/**
* @var int
* @cvalue CURLOPT_WS_OPTIONS
*/
const CURLOPT_WS_OPTIONS = UNKNOWN;
/**
* @var int
* @cvalue CURLWS_RAW_MODE
*/
const CURLWS_RAW_MODE = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x075700 /* Available since 7.87.0 */
/**
* @var int
* @cvalue CURLOPT_CA_CACHE_TIMEOUT
*/
const CURLOPT_CA_CACHE_TIMEOUT = UNKNOWN;
/**
* @var int
* @cvalue CURLOPT_QUICK_EXIT
*/
const CURLOPT_QUICK_EXIT = UNKNOWN;
#endif

/**
* @var int
* @cvalue CURLOPT_SAFE_UPLOAD
Expand Down
39 changes: 38 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.

3 changes: 3 additions & 0 deletions ext/curl/curl_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ typedef struct {
php_curl_callback *xferinfo;
#endif
php_curl_callback *fnmatch;
#if LIBCURL_VERSION_NUM >= 0x075400
php_curl_callback *sshhostkey;
#endif
} php_curl_handlers;

struct _php_curl_error {
Expand Down
Loading