rfc:deprecations_php_8_1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:deprecations_php_8_1 [2021/06/28 15:01] – nikic | rfc:deprecations_php_8_1 [2021/07/14 07:23] (current) – nikic | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Deprecations for PHP 8.1 ====== | ====== PHP RFC: Deprecations for PHP 8.1 ====== | ||
- | * Date: 2019-07-23 | + | * Date: 2021-02-23 |
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
- | * Status: | + | * Status: |
===== Introduction ===== | ===== Introduction ===== | ||
Line 16: | Line 16: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * Passing bool for '' | + | * Passing bool for '' |
* Accessing static members on traits | * Accessing static members on traits | ||
* '' | * '' | ||
Line 37: | Line 37: | ||
Each feature proposed for deprecation is voted separately and requires a 2/3 majority. All votes refer to deprecation in PHP 8.1 and removal in PHP 9.0. | Each feature proposed for deprecation is voted separately and requires a 2/3 majority. All votes refer to deprecation in PHP 8.1 and removal in PHP 9.0. | ||
+ | |||
+ | Voting started on 2021-06-30 and ends on 2021-07-14. | ||
==== date_sunrise() and date_sunset() ==== | ==== date_sunrise() and date_sunset() ==== | ||
Line 65: | Line 67: | ||
The proposal is to deprecate '' | The proposal is to deprecate '' | ||
This was initially discussed in: https:// | This was initially discussed in: https:// | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== key(), current(), next(), prev(), reset() on objects ==== | ==== key(), current(), next(), prev(), reset() on objects ==== | ||
Line 75: | Line 82: | ||
As such, the proposal is to deprecate key(), current(), next(), prev() and reset() on objects. The suggested replacement is to cast the object to array first, or call '' | As such, the proposal is to deprecate key(), current(), next(), prev() and reset() on objects. The suggested replacement is to cast the object to array first, or call '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== mb_check_encoding() without argument ==== | ==== mb_check_encoding() without argument ==== | ||
Line 99: | Line 111: | ||
The proposal is to deprecate calling '' | The proposal is to deprecate calling '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== get_class(), | ==== get_class(), | ||
Line 107: | Line 124: | ||
As a caveat, if '' | As a caveat, if '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== FILE_BINARY and FILE_TEXT constants ==== | ==== FILE_BINARY and FILE_TEXT constants ==== | ||
Line 115: | Line 137: | ||
This was pointed out in: https:// | This was pointed out in: https:// | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== " | ==== " | ||
Line 122: | Line 149: | ||
> Again, for portability, | > Again, for portability, | ||
- | The proposal is to deprecate the use of '' | + | The proposal is to deprecate the use of '' |
- | There is a complication here: While '' | + | While '' |
- | ==== Passing bool for $amountOrUpOrDown | + | <doodle title=" |
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | ==== Passing bool for $value argument of IntlCalendar:: | ||
< | < | ||
Line 133: | Line 165: | ||
The proposal is to deprecate passing a boolean to this method argument. | The proposal is to deprecate passing a boolean to this method argument. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== Accessing static members on traits ==== | ==== Accessing static members on traits ==== | ||
Line 153: | Line 190: | ||
The proposal is to deprecate the ability to access static properties and static methods directly on traits. | The proposal is to deprecate the ability to access static properties and static methods directly on traits. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== strptime() ==== | ==== strptime() ==== | ||
Line 165: | Line 207: | ||
The proposal is to deprecate the '' | The proposal is to deprecate the '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== strftime() and gmstrftime() ==== | ==== strftime() and gmstrftime() ==== | ||
Line 173: | Line 220: | ||
The proposal is to deprecate '' | The proposal is to deprecate '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== mhash*() function family ==== | ==== mhash*() function family ==== | ||
Line 179: | Line 231: | ||
The proposal is to deprecate '' | The proposal is to deprecate '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== ctype_*() function family accepts int parameters ==== | ==== ctype_*() function family accepts int parameters ==== | ||
Line 193: | Line 250: | ||
The proposal is to deprecate passing of non-strings to '' | The proposal is to deprecate passing of non-strings to '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== Return by reference with void type ==== | ==== Return by reference with void type ==== | ||
Line 205: | Line 267: | ||
The proposal is to throw a compile-time deprecation for function signatures using by-reference returns in conjunction with void. | The proposal is to throw a compile-time deprecation for function signatures using by-reference returns in conjunction with void. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== NIL constant defined by the IMAP extension ==== | ==== NIL constant defined by the IMAP extension ==== | ||
- | The '' | + | The '' |
The proposal is to deprecate this constant. | The proposal is to deprecate this constant. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== Calling overloaded pgsql functions without the connection argument ==== | ==== Calling overloaded pgsql functions without the connection argument ==== | ||
Line 232: | Line 304: | ||
The proposal is to deprecate any use of the " | The proposal is to deprecate any use of the " | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== $num_points parameter of image(open|filled)polygon ==== | ==== $num_points parameter of image(open|filled)polygon ==== | ||
Line 252: | Line 329: | ||
imagepolygon($im, | imagepolygon($im, | ||
</ | </ | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== mysqli:: | ==== mysqli:: | ||
Line 272: | Line 354: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== filter.default ini setting ==== | ==== filter.default ini setting ==== | ||
Line 284: | Line 371: | ||
The proposal is to emit a deprecation warning if '' | The proposal is to emit a deprecation warning if '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== auto_detect_line_endings ini setting ==== | ==== auto_detect_line_endings ini setting ==== | ||
Line 291: | Line 383: | ||
The proposal is to emit a deprecation warning if '' | The proposal is to emit a deprecation warning if '' | ||
- | ==== 'ssl_method' | + | <doodle title=" |
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | ==== ssl_method option to SoapClient constructor ==== | ||
One of the many options which can be passed (in an associative array) to the '' | One of the many options which can be passed (in an associative array) to the '' | ||
Line 302: | Line 399: | ||
The proposal is to deprecate passing an '' | The proposal is to deprecate passing an '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== FILTER_SANITIZE_STRING ==== | ==== FILTER_SANITIZE_STRING ==== | ||
Line 312: | Line 414: | ||
The proposal is to deprecate the '' | The proposal is to deprecate the '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== oci8.old_oci_close_semantics INI setting ==== | ==== oci8.old_oci_close_semantics INI setting ==== | ||
Line 318: | Line 425: | ||
The proposal is to throw a deprecation warning if '' | The proposal is to throw a deprecation warning if '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== odbc_result_all() ==== | ==== odbc_result_all() ==== | ||
Line 324: | Line 436: | ||
The proposal is to deprecate the '' | The proposal is to deprecate the '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 379: | Line 496: | ||
$f = fopen($url, ' | $f = fopen($url, ' | ||
$response = stream_get_contents($f); | $response = stream_get_contents($f); | ||
- | $headers = stream_get_meta_data($fp)[' | + | $headers = stream_get_meta_data($f)[' |
</ | </ | ||
rfc/deprecations_php_8_1.1624892481.txt.gz · Last modified: 2021/06/28 15:01 by nikic