Skip to content

Commit fc16285

Browse files
divinity76devnexen
authored andcommitted
ext/curl: deprecate CURLOPT_BINARYTRANSFER
This is long overdue, CURLOPT_BINARYTRANSFER has been a no-op since PHP5.1.2 in 2004 (ref https://bugs.php.net/bug.php?id=55635 ) Close phpGH-13114.
1 parent 52cc17c commit fc16285

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Core:
88
. Enabled ifunc checks on FreeBSD from the 12.x releases. (Freaky)
99
. Changed the type of PHP_DEBUG and PHP_ZTS constants to bool. (haszi)
1010

11+
Curl:
12+
. Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76)
13+
1114
Date:
1215
. Added DateTime[Immutable]::createFromTimestamp. (Marc Bennewitz)
1316

UPGRADING

+3
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ PHP 8.4 UPGRADE NOTES
177177
4. Deprecated Functionality
178178
========================================
179179

180+
- Curl:
181+
. The CURLOPT_BINARYTRANSFER constant is deprecated.
182+
180183
- Date:
181184
. Calling DatePeriod::__construct(string $isostr, int $options = 0) is
182185
deprecated. Use DatePeriod::createFromISO8601String() instead.

ext/curl/curl.stub.php

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
const CURLOPT_AUTOREFERER = UNKNOWN;
1414
/**
1515
* @var int
16+
* @deprecated has no effect since 5.1.2
1617
* @cvalue CURLOPT_BINARYTRANSFER
1718
*/
1819
const CURLOPT_BINARYTRANSFER = UNKNOWN;

ext/curl/curl_arginfo.h

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/curl/tests/bug46711.phpt

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ foreach( $opt as $option => $value ) {
2020
var_dump($opt); // with this bug, $opt[58] becomes NULL
2121

2222
?>
23-
--EXPECT--
23+
--EXPECTF--
24+
Deprecated: Constant CURLOPT_BINARYTRANSFER is deprecated in %s on line %d
2425
array(2) {
2526
[58]=>
2627
bool(true)

0 commit comments

Comments
 (0)