rfc:deprecations_php_7_3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:deprecations_php_7_3 [2017/09/18 13:33] – nikic | rfc:deprecations_php_7_3 [2018/07/09 08:49] – fix formatting issue nikic | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2017-08-02 | * Date: 2017-08-02 | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
- | * Status: | + | * Status: |
+ | * Implementation: | ||
+ | * Discussion: https:// | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | This is a draft RFC for multiple deprecations targeting PHP 7.3. The RFC proposes to deprecate the listed functionality in PHP 7.3 and remove it no later than in PHP 8.0. | + | This is a draft RFC for multiple deprecations targeting PHP 7.3. The RFC proposes to deprecate the listed functionality in PHP 7.3 and remove it in PHP 8. |
The following list provides a short overview of the functionality targeted for deprecation, | The following list provides a short overview of the functionality targeted for deprecation, | ||
- | * TODO | + | * Undocumented mbstring function aliases |
+ | * String search functions with integer needle | ||
+ | * '' | ||
+ | * Defining a free-standing '' | ||
+ | * '' | ||
+ | * '' | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | Each feature proposed for deprecation is voted separately. Each vote requires a 2/3 majority, independently of whether it is a language or standard library change. All votes refer to deprecation in PHP 7.3 and removal in the next major version (presumably PHP 8.0). | + | Each feature proposed for deprecation is voted separately. Each vote requires a 2/3 majority, independently of whether it is a language or standard library change. All votes refer to deprecation in PHP 7.3 and removal in the next major version (presumably PHP 8.0). The votes close on 2018-07-16. |
- | + | ||
- | ==== WDDX extension ==== | + | |
- | + | ||
- | Previous discussions: | + | |
- | + | ||
- | TODO | + | |
==== Undocumented mbstring function aliases ==== | ==== Undocumented mbstring function aliases ==== | ||
Line 28: | Line 29: | ||
Proposed action: Mark the functions as deprecated, so that a deprecation notice is emitted on every call. In PHP 8 these aliases will be removed. | Proposed action: Mark the functions as deprecated, so that a deprecation notice is emitted on every call. In PHP 8 these aliases will be removed. | ||
- | ==== mb_detect_encoding() without strict mode ==== | + | <doodle title=" |
- | + | * Yes | |
- | TODO | + | * No |
- | + | </ | |
- | ==== strip_tags() | + | |
- | + | ||
- | TODO | + | |
- | + | ||
- | From some preliminary feedback: We might want to only deprecate the insecure allowed_tags parameter, but keep the "strip all tags" functionality. This function appears to be useful as a relatively simple way of reusing code that outputs HTML in a different context (CLI output, text messages, etc.) | + | |
==== String search functions with integer needle ==== | ==== String search functions with integer needle ==== | ||
- | The following applies to the '' | + | The following applies to the '' |
String search functions usually operate on a string needle. However, if a non-string is passed, it will be converted to an integer and interpreted as an ASCII codepoint: | String search functions usually operate on a string needle. However, if a non-string is passed, it will be converted to an integer and interpreted as an ASCII codepoint: | ||
Line 54: | Line 50: | ||
Proposed action: Throw a deprecation warning if a non-string is passed as a needle to '' | Proposed action: Throw a deprecation warning if a non-string is passed as a needle to '' | ||
- | ==== Continue acting on switch ==== | + | <doodle title=" |
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
- | In PHP an argument-less '' | + | ==== fgetss() function and string.strip_tags filter ==== |
- | We cannot change these semantics for reasons of backwards-compatibility | + | The '' |
- | In the following some examples are provided to illustrate invalid usages | + | Proposed action: Mark '' |
- | <code php> | + | <doodle title=" |
- | switch | + | * Yes |
- | case "bar": | + | * No |
- | | + | </ |
- | | + | |
- | } | + | |
- | while ($foo) { | + | ==== Defining a free-standing assert() function ==== |
- | switch ($bar) { | + | |
- | case " | + | |
- | continue; | + | |
- | continue 2; // or | + | |
- | break; | + | |
- | } | + | |
- | } | + | |
- | while ($foo) { | + | Since PHP 7.0 the '' |
- | switch | + | |
- | case " | + | |
- | while ($xyz) { | + | |
- | continue 2; // INVALID. Replace with one of: | + | |
- | continue 3; | + | |
- | break 2; | + | |
- | } | + | |
- | } | + | |
- | } | + | |
- | </code> | + | |
- | Proposed action: Throw a deprecation warning from the compiler if a '' | + | To avoid confusion due to this behavior, it is suggested to forbid |
- | ==== Case-insensitive constants ==== | + | Proposed action: Generate a compile-time deprecation warning if an '' |
- | Previous discussion: https:// | + | <doodle title=" |
+ | * Yes | ||
+ | * No | ||
+ | </doodle> | ||
- | TODO (cmb does not want to pursue | + | ==== FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED ==== |
+ | |||
+ | As of PHP 5.2.1 '' | ||
+ | |||
+ | Proposed action: Generate a deprecation warning if the '' | ||
+ | |||
+ | Implementation: | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | ==== pdo_odbc.db2_instance_name php.ini directive ==== | ||
+ | |||
+ | As of PHP 5.1.1 '' | ||
+ | |||
+ | The side effect here is that this setting is process wide and also affects the ODBC extension, which can create some hard to debug situations. Besides this, the PECL package, ibm_db2 seems to implement the exact same behavior which could also conflict. | ||
+ | |||
+ | Proposed action: Add a deprecation notice if the ini directive has a value at module initialization. | ||
+ | |||
+ | Implementations: | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 105: | Line 114: | ||
Each of the bullet points above will get a separate vote. All votes will require a 2/3 supermajority, | Each of the bullet points above will get a separate vote. All votes will require a 2/3 supermajority, | ||
- | |||
- | ===== Patches and Tests ===== | ||
- | |||
- | The patches for these deprecations are for the most part trivial, as such they will be provided once the RFC is accepted (or portions of it). |
rfc/deprecations_php_7_3.txt · Last modified: 2018/07/21 21:50 by nikic