Skip to content

Commit a43fd3b

Browse files
committed
Remove the deprecated parameter of curl_version()
1 parent 20664d6 commit a43fd3b

File tree

5 files changed

+4
-29
lines changed

5 files changed

+4
-29
lines changed

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ PHP 8.0 UPGRADE NOTES
760760
checks for `false`. The curl_share_close() function no longer has an effect,
761761
instead the CurlShareHandle instance is automatically destroyed if it is no
762762
longer referenced.
763+
. The deprecated parameter `$version` of curl_version() has been removed.
763764

764765
- Enchant:
765766
. The enchant extension now uses libenchant-2 by default when available.

ext/curl/curl.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ function curl_share_strerror(int $error_number): ?string {}
8383

8484
function curl_strerror(int $error_number): ?string {}
8585

86-
function curl_version(int $age = UNKNOWN): array|false {}
86+
function curl_version(): array|false {}

ext/curl/curl_arginfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ ZEND_END_ARG_INFO()
137137
#define arginfo_curl_strerror arginfo_curl_multi_strerror
138138

139139
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_version, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
140-
ZEND_ARG_TYPE_INFO(0, age, IS_LONG, 0)
141140
ZEND_END_ARG_INFO()
142141

143142

ext/curl/interface.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,23 +1689,13 @@ static void curl_free_slist(zval *el)
16891689
}
16901690
/* }}} */
16911691

1692-
/* {{{ proto array curl_version([int version])
1692+
/* {{{ proto array curl_version()
16931693
Return cURL version information. */
16941694
PHP_FUNCTION(curl_version)
16951695
{
16961696
curl_version_info_data *d;
1697-
zend_long uversion = -1;
16981697

1699-
ZEND_PARSE_PARAMETERS_START(0, 1)
1700-
Z_PARAM_OPTIONAL
1701-
Z_PARAM_LONG(uversion)
1702-
ZEND_PARSE_PARAMETERS_END();
1703-
1704-
if (uversion == CURLVERSION_NOW) {
1705-
php_error_docref(NULL, E_DEPRECATED, "The $version parameter is deprecated");
1706-
} else if (ZEND_NUM_ARGS() > 0) {
1707-
php_error_docref(NULL, E_WARNING, "$version argument ignored");
1708-
}
1698+
ZEND_PARSE_PARAMETERS_NONE();
17091699

17101700
d = curl_version_info(CURLVERSION_NOW);
17111701
if (d == NULL) {

ext/curl/tests/curl_version_error_001.phpt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)