Skip to content

Commit

Permalink
ext/curl: Bump minimim Curl version to >= 7.61.0
Browse files Browse the repository at this point in the history
Bumps the minimum required libcurl version to 7.61.0.

Please also see #4917, which bumped minimum libcurl version to the current >= 7.29.0.
This bumps the minimum requirement to Curl 7.61.0 (released 2018 Sept).

Ubuntu, Debian, RHEL, and RHEL derivatives have major and LTS version bumps this year. Following are the
libcurl-dev/libcurl-devel versions available in the oldest supported (LTS or otherwise) in major OSs.

 - Debian buster: [7.64](https://packages.debian.org/buster/libcurl4-openssl-dev)
 - Ubuntu 20.04: [7.68](https://packages.ubuntu.com/focal/libcurl-dev)
 - CentOS/RHEL 7: 7.29
 - RHEL 8/Rocky 8/EL 8: 7.61
 - Fedora 38: 7.87

RHEL/CentOS 7 reaches EOL mid 2024, so for PHP 8.4 scheduled towards the end of this year, we can safely
bump the minimum libcurl version.

7.61.0 was selected as the new minimum because RHEL and derivatives have libcurl-devel version 7.61. RHEL 8 is
a current and supported RHEL version.
  • Loading branch information
Ayesh committed Jan 28, 2024
1 parent b06fedb commit a3d14a5
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 160 deletions.
2 changes: 1 addition & 1 deletion ext/curl/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PHP_ARG_WITH([curl],
[Include cURL support])])

if test "$PHP_CURL" != "no"; then
PKG_CHECK_MODULES([CURL], [libcurl >= 7.29.0])
PKG_CHECK_MODULES([CURL], [libcurl >= 7.61.0])
PKG_CHECK_VAR([CURL_FEATURES], [libcurl], [supported_features])

PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
Expand Down
14 changes: 0 additions & 14 deletions ext/curl/curl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,11 @@
* @cvalue CURLOPT_WRITEHEADER
*/
const CURLOPT_WRITEHEADER = UNKNOWN;
#if LIBCURL_VERSION_NUM >= 0x072000
/**
* @var int
* @cvalue CURLOPT_XFERINFOFUNCTION
*/
const CURLOPT_XFERINFOFUNCTION = UNKNOWN;
#endif

/* */
/**
Expand Down Expand Up @@ -776,13 +774,11 @@
* @cvalue CURLE_SSL_PEER_CERTIFICATE
*/
const CURLE_SSL_PEER_CERTIFICATE = UNKNOWN;
#if LIBCURL_VERSION_NUM >= 0x072700 /* Available since 7.39.0 */
/**
* @var int
* @cvalue CURLE_SSL_PINNEDPUBKEYNOTMATCH
*/
const CURLE_SSL_PINNEDPUBKEYNOTMATCH = UNKNOWN;
#endif
/**
* @var int
* @cvalue CURLE_TELNET_OPTION_SYNTAX
Expand Down Expand Up @@ -2421,7 +2417,6 @@
const CURLOPT_SASL_IR = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072100 /* Available since 7.33.0 */
/**
* @var int
* @cvalue CURLOPT_DNS_INTERFACE
Expand Down Expand Up @@ -2453,7 +2448,6 @@
* @cvalue CURL_VERSION_HTTP2
*/
const CURL_VERSION_HTTP2 = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */
/**
Expand All @@ -2479,7 +2473,6 @@
const CURL_SSLVERSION_TLSv1_2 = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */
/**
* @var int
* @cvalue CURLOPT_EXPECT_100_TIMEOUT_MS
Expand All @@ -2495,7 +2488,6 @@
* @cvalue CURLOPT_SSL_ENABLE_NPN
*/
const CURLOPT_SSL_ENABLE_NPN = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072500 /* Available since 7.37.0 */
/**
Expand All @@ -2520,7 +2512,6 @@
const CURLOPT_PROXYHEADER = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072600 /* Available since 7.38.0 */
/**
* @var int
* @cvalue CURLAUTH_NEGOTIATE
Expand All @@ -2531,7 +2522,6 @@
* @cvalue CURL_VERSION_GSSAPI
*/
const CURL_VERSION_GSSAPI = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072700 /* Available since 7.39.0 */
/**
Expand All @@ -2541,7 +2531,6 @@
const CURLOPT_PINNEDPUBLICKEY = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072800 /* Available since 7.40.0 */
/**
* @var int
* @cvalue CURLOPT_UNIX_SOCKET_PATH
Expand All @@ -2567,15 +2556,12 @@
* @cvalue CURL_VERSION_UNIX_SOCKETS
*/
const CURL_VERSION_UNIX_SOCKETS = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072900 /* Available since 7.41.0 */
/**
* @var int
* @cvalue CURLOPT_SSL_VERIFYSTATUS
*/
const CURLOPT_SSL_VERIFYSTATUS = UNKNOWN;
#endif

#if LIBCURL_VERSION_NUM >= 0x072a00 /* Available since 7.42.0 */
/**
Expand Down
40 changes: 1 addition & 39 deletions ext/curl/curl_arginfo.h

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

2 changes: 0 additions & 2 deletions ext/curl/curl_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ typedef struct {
php_curl_read *read;
zval std_err;
php_curl_callback *progress;
#if LIBCURL_VERSION_NUM >= 0x072000
php_curl_callback *xferinfo;
#endif
php_curl_callback *fnmatch;
#if LIBCURL_VERSION_NUM >= 0x075400
php_curl_callback *sshhostkey;
Expand Down

0 comments on commit a3d14a5

Please sign in to comment.