Skip to content

Commit de60872

Browse files
authored
Add new curl constants from curl until (including) 7.87 (#10459)
Fixes GH-10454
1 parent db5e8ae commit de60872

11 files changed

+462
-38
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ PHP NEWS
1919
. Remove WeakMap entries whose key is only reachable through the entry value.
2020
(Arnaud)
2121

22+
- Curl:
23+
. Added Curl options and constants up to (including) version 7.87.
24+
(nielsdos, adoy)
25+
2226
- DOM:
2327
. Added DOMNode::contains() and DOMNameSpaceNode::contains(). (nielsdos)
2428
. Added DOMElement::getAttributeNames(). (nielsdos)

UPGRADING

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ PHP 8.3 UPGRADE NOTES
195195
. IntlChar::enumCharNames is now returning a boolean.
196196
Previously it returned null on success and false on failure.
197197

198+
- Curl:
199+
. curl_getinfo() now supports two new constants: CURLINFO_CAPATH and CURLINFO_CAINFO.
200+
If option is null, the following two additional keys are present:
201+
"capath" and "cainfo".
202+
198203
- MBString:
199204
. mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional
200205
casing rules for the Greek letter sigma. For mb_convert_case, conditional
@@ -361,6 +366,23 @@ PHP 8.3 UPGRADE NOTES
361366
10. New Global Constants
362367
========================================
363368

369+
- Curl:
370+
. CURLINFO_CAPATH
371+
. CURLINFO_CAINFO
372+
. CURLOPT_MIME_OPTIONS
373+
. CURLMIMEOPT_FORMESCAPE
374+
. CURLOPT_WS_OPTIONS
375+
. CURLWS_RAW_MODE
376+
. CURLOPT_SSH_HOSTKEYFUNCTION
377+
. CURLOPT_PROTOCOLS_STR
378+
. CURLOPT_REDIR_PROTOCOLS_STR
379+
. CURLOPT_CA_CACHE_TIMEOUT
380+
. CURLOPT_QUICK_EXIT
381+
. CURLKHMATCH_OK
382+
. CURLKHMATCH_MISMATCH
383+
. CURLKHMATCH_MISSING
384+
. CURLKHMATCH_LAST
385+
364386
- Intl:
365387
. MIXED_NUMBERS (Spoofchecker).
366388
. HIDDEN_OVERLAY (Spoofchecker).

ext/curl/curl.stub.php

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,18 @@
941941
*/
942942
const CURLINFO_EFFECTIVE_METHOD = UNKNOWN;
943943
#endif
944+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
945+
/**
946+
* @var int
947+
* @cvalue CURLINFO_CAPATH
948+
*/
949+
const CURLINFO_CAPATH = UNKNOWN;
950+
/**
951+
* @var int
952+
* @cvalue CURLINFO_CAINFO
953+
*/
954+
const CURLINFO_CAINFO = UNKNOWN;
955+
#endif
944956

945957
/* Other */
946958
/**
@@ -1979,6 +1991,26 @@
19791991
* @cvalue CURLOPT_SSH_KNOWNHOSTS
19801992
*/
19811993
const CURLOPT_SSH_KNOWNHOSTS = UNKNOWN;
1994+
/**
1995+
* @var int
1996+
* @cvalue CURLKHMATCH_OK
1997+
*/
1998+
const CURLKHMATCH_OK = UNKNOWN;
1999+
/**
2000+
* @var int
2001+
* @cvalue CURLKHMATCH_MISMATCH
2002+
*/
2003+
const CURLKHMATCH_MISMATCH = UNKNOWN;
2004+
/**
2005+
* @var int
2006+
* @cvalue CURLKHMATCH_MISSING
2007+
*/
2008+
const CURLKHMATCH_MISSING = UNKNOWN;
2009+
/**
2010+
* @var int
2011+
* @cvalue CURLKHMATCH_LAST
2012+
*/
2013+
const CURLKHMATCH_LAST = UNKNOWN;
19822014

19832015
/* Available since 7.20.0 */
19842016
/**
@@ -3522,6 +3554,66 @@
35223554
const CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 = UNKNOWN;
35233555
#endif
35243556

3557+
#if LIBCURL_VERSION_NUM >= 0x075100 /* Available since 7.81.0 */
3558+
/**
3559+
* @var int
3560+
* @cvalue CURLOPT_MIME_OPTIONS
3561+
*/
3562+
const CURLOPT_MIME_OPTIONS = UNKNOWN;
3563+
/**
3564+
* @var int
3565+
* @cvalue CURLMIMEOPT_FORMESCAPE
3566+
*/
3567+
const CURLMIMEOPT_FORMESCAPE = UNKNOWN;
3568+
#endif
3569+
3570+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
3571+
/**
3572+
* @var int
3573+
* @cvalue CURLOPT_SSH_HOSTKEYFUNCTION
3574+
*/
3575+
const CURLOPT_SSH_HOSTKEYFUNCTION = UNKNOWN;
3576+
#endif
3577+
3578+
#if LIBCURL_VERSION_NUM >= 0x075500 /* Available since 7.85.0 */
3579+
/**
3580+
* @var int
3581+
* @cvalue CURLOPT_PROTOCOLS_STR
3582+
*/
3583+
const CURLOPT_PROTOCOLS_STR = UNKNOWN;
3584+
/**
3585+
* @var int
3586+
* @cvalue CURLOPT_REDIR_PROTOCOLS_STR
3587+
*/
3588+
const CURLOPT_REDIR_PROTOCOLS_STR = UNKNOWN;
3589+
#endif
3590+
3591+
#if LIBCURL_VERSION_NUM >= 0x075600 /* Available since 7.86.0 */
3592+
/**
3593+
* @var int
3594+
* @cvalue CURLOPT_WS_OPTIONS
3595+
*/
3596+
const CURLOPT_WS_OPTIONS = UNKNOWN;
3597+
/**
3598+
* @var int
3599+
* @cvalue CURLWS_RAW_MODE
3600+
*/
3601+
const CURLWS_RAW_MODE = UNKNOWN;
3602+
#endif
3603+
3604+
#if LIBCURL_VERSION_NUM >= 0x075700 /* Available since 7.87.0 */
3605+
/**
3606+
* @var int
3607+
* @cvalue CURLOPT_CA_CACHE_TIMEOUT
3608+
*/
3609+
const CURLOPT_CA_CACHE_TIMEOUT = UNKNOWN;
3610+
/**
3611+
* @var int
3612+
* @cvalue CURLOPT_QUICK_EXIT
3613+
*/
3614+
const CURLOPT_QUICK_EXIT = UNKNOWN;
3615+
#endif
3616+
35253617
/**
35263618
* @var int
35273619
* @cvalue CURLOPT_SAFE_UPLOAD

ext/curl/curl_arginfo.h

Lines changed: 38 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/curl/curl_private.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ typedef struct {
7777
php_curl_callback *xferinfo;
7878
#endif
7979
php_curl_callback *fnmatch;
80+
#if LIBCURL_VERSION_NUM >= 0x075400
81+
php_curl_callback *sshhostkey;
82+
#endif
8083
} php_curl_handlers;
8184

8285
struct _php_curl_error {

0 commit comments

Comments
 (0)