Skip to content

Commit

Permalink
Add new curl constants from curl until (including) 7.87 (#10459)
Browse files Browse the repository at this point in the history
Fixes GH-10454
  • Loading branch information
nielsdos authored Jul 17, 2023
1 parent db5e8ae commit de60872
Show file tree
Hide file tree
Showing 11 changed files with 462 additions and 38 deletions.
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 @@ -195,6 +195,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 @@ -361,6 +366,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

0 comments on commit de60872

Please sign in to comment.