rfc:deprecations_php_8_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
rfc:deprecations_php_8_1 [2021/07/10 02:06] – Fixed typo reported by Checho Man patrickallaertrfc:deprecations_php_8_1 [2021/07/14 07:23] (current) nikic
Line 2: Line 2:
   * Date: 2021-02-23   * Date: 2021-02-23
   * Author: Nikita Popov <nikic@php.net>, George Peter Banyard <girgias@php.net>, Máté Kocsis <kocsismate@php.net>, Rowan Tommins <imsop@php.net>   * Author: Nikita Popov <nikic@php.net>, George Peter Banyard <girgias@php.net>, Máté Kocsis <kocsismate@php.net>, Rowan Tommins <imsop@php.net>
-  * Status: Voting+  * Status: Implemented
  
 ===== Introduction ===== ===== Introduction =====
Line 68: Line 68:
 This was initially discussed in: https://github.com/php/php-src/pull/4423. This was initially discussed in: https://github.com/php/php-src/pull/4423.
  
-<doodle title="Deprecate date_sunrise() and date_sunset()?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate date_sunrise() and date_sunset()?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 83: Line 83:
 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 ''get_mangled_object_vars()'', depending on what the intention is. 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 ''get_mangled_object_vars()'', depending on what the intention is.
  
-<doodle title="Deprecate key(), current(), next(), prev(), reset() on objects?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate key(), current(), next(), prev(), reset() on objects?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 112: Line 112:
 The proposal is to deprecate calling ''mb_check_encoding()'' without arguments. The proposal is to deprecate calling ''mb_check_encoding()'' without arguments.
  
-<doodle title="Deprecate mb_check_encoding() without argument?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate mb_check_encoding() without argument?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 125: Line 125:
 As a caveat, if ''get_parent_class()'' is used to check whether the class has a parent, it is necessary to use ''get_parent_class(self::class)'' instead, because ''parent::class'' will generate an error if used inside a class without parent. As a caveat, if ''get_parent_class()'' is used to check whether the class has a parent, it is necessary to use ''get_parent_class(self::class)'' instead, because ''parent::class'' will generate an error if used inside a class without parent.
  
-<doodle title="Deprecate get_class(), get_parent_class() and get_called_class() without argument?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate get_class(), get_parent_class() and get_called_class() without argument?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 138: Line 138:
 This was pointed out in: https://github.com/php/php-src/pull/5556 This was pointed out in: https://github.com/php/php-src/pull/5556
  
-<doodle title="Deprecate FILE_BINARY and FILE_TEXT constants?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate FILE_BINARY and FILE_TEXT constants?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 153: Line 153:
 While ''fopen()'' defaults to binary mode, some other functions like ''proc_open()'' on pipe descriptors still default to text mode. Cases that use ''t'' as the default mode are excluded from this deprecation for the time being. We may include them in the future, which would require explicitly specifying ''b'' mode for them during a transitionary period. While ''fopen()'' defaults to binary mode, some other functions like ''proc_open()'' on pipe descriptors still default to text mode. Cases that use ''t'' as the default mode are excluded from this deprecation for the time being. We may include them in the future, which would require explicitly specifying ''b'' mode for them during a transitionary period.
  
-<doodle title="Deprecate t fopen mode?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate t fopen mode?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 166: Line 166:
 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="Deprecate passing bool for $value argument of IntlCalendar::roll()?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate passing bool for $value argument of IntlCalendar::roll()?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 191: Line 191:
 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="Deprecate accessing static members on traits?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate accessing static members on traits?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 208: Line 208:
 The proposal is to deprecate the ''strptime()'' function in favor of portable alternatives. The proposal is to deprecate the ''strptime()'' function in favor of portable alternatives.
  
-<doodle title="Deprecate strptime()?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate strptime()?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 221: Line 221:
 The proposal is to deprecate ''strftime()'' and ''gmstrftime()'' in favor of these alternatives. The proposal is to deprecate ''strftime()'' and ''gmstrftime()'' in favor of these alternatives.
  
-<doodle title="Deprecate strftime() and gmstrftime()?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate strftime() and gmstrftime()?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 232: Line 232:
 The proposal is to deprecate ''mhash()'', ''mhash_keygen_s2k()'', ''mhash_count()'', ''mhash_get_block_size()'' and ''mhash_get_hash_name()'' in favor of the standard ext/hash functionality. The proposal is to deprecate ''mhash()'', ''mhash_keygen_s2k()'', ''mhash_count()'', ''mhash_get_block_size()'' and ''mhash_get_hash_name()'' in favor of the standard ext/hash functionality.
  
-<doodle title="Deprecate mhash*() family of functions?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate mhash*() family of functions?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 251: Line 251:
 The proposal is to deprecate passing of non-strings to ''ctype_*()'' functions. In the next major versions, ''ctype_*()'' will be changed to accept a string parameter under standard semantics. The proposal is to deprecate passing of non-strings to ''ctype_*()'' functions. In the next major versions, ''ctype_*()'' will be changed to accept a string parameter under standard semantics.
  
-<doodle title="Deprecate int parameters to ctype_*() functions?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate int parameters to ctype_*() functions?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 268: Line 268:
 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="Deprecate return by reference with void type?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate return by reference with void type?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 279: Line 279:
 The proposal is to deprecate this constant. The proposal is to deprecate this constant.
  
-<doodle title="Deprecate NIL constant defined by the IMAP extension?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate NIL constant defined by the IMAP extension?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 305: Line 305:
 The proposal is to deprecate any use of the "default connection" in ext/pgsql. A deprecation notice will be thrown if a pgsql function is called without explicitly specifying the connection. The proposal is to deprecate any use of the "default connection" in ext/pgsql. A deprecation notice will be thrown if a pgsql function is called without explicitly specifying the connection.
  
-<doodle title="Deprecate calling overloaded pgsql functions without the connection argument?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate calling overloaded pgsql functions without the connection argument?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 330: Line 330:
 </PHP> </PHP>
  
-<doodle title="Deprecate $num_points parameter of image(open|filled)polygon?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate $num_points parameter of image(open|filled)polygon?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 355: Line 355:
 </PHP> </PHP>
  
-<doodle title="Deprecate mysqli::init()?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate mysqli::init()?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 372: Line 372:
 The proposal is to emit a deprecation warning if ''filter.default'' is set to a value other than ''unsafe_raw'' (the default). No separate deprecation warning is emitted for ''filter.default_options'', but both ini settings will be removed together in the next major version. The proposal is to emit a deprecation warning if ''filter.default'' is set to a value other than ''unsafe_raw'' (the default). No separate deprecation warning is emitted for ''filter.default_options'', but both ini settings will be removed together in the next major version.
  
-<doodle title="Deprecate filter.default ini setting?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate filter.default ini setting?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 383: Line 383:
 The proposal is to emit a deprecation warning if ''auto_detect_line_endings'' is enabled. The proposal is to emit a deprecation warning if ''auto_detect_line_endings'' is enabled.
  
-<doodle title="Deprecate auto_detect_line_endings ini setting?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate auto_detect_line_endings ini setting?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 400: Line 400:
 The proposal is to deprecate passing an ''ssl_method'' option to the constructor, and recommend the use of ''context'' option instead. The proposal is to deprecate passing an ''ssl_method'' option to the constructor, and recommend the use of ''context'' option instead.
  
-<doodle title="Deprecate ssl_method option to SoapClient constructor?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate ssl_method option to SoapClient constructor?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 415: Line 415:
 The proposal is to deprecate the ''FILTER_SANITIZE_STRING'' constant, its alias ''FILTER_SANITIZE_STRIPPED'', as well as use of this filter. The proposal is to deprecate the ''FILTER_SANITIZE_STRING'' constant, its alias ''FILTER_SANITIZE_STRIPPED'', as well as use of this filter.
  
-<doodle title="Deprecate FILTER_SANITIZE_STRING?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate FILTER_SANITIZE_STRING?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 426: Line 426:
 The proposal is to throw a deprecation warning if ''oci8.old_oci_close_semantics'' is enabled. The proposal is to throw a deprecation warning if ''oci8.old_oci_close_semantics'' is enabled.
  
-<doodle title="Deprecate oci8.old_oci_close_semantics INI setting?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate oci8.old_oci_close_semantics INI setting?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 437: Line 437:
 The proposal is to deprecate the ''odbc_result_all()'' function. The proposal is to deprecate the ''odbc_result_all()'' function.
  
-<doodle title="Deprecate odbc_result_all()?" auth="nikic" voteType="single" closed="false">+<doodle title="Deprecate odbc_result_all()?" auth="nikic" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
rfc/deprecations_php_8_1.txt · Last modified: 2021/07/14 07:23 by nikic