rfc:deprecations_php_7_3

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:deprecations_php_7_3 [2018/06/26 19:31] – Added pdo_odbc.db2_instance_name kallerfc:deprecations_php_7_3 [2018/07/04 21:23] – Add gzgetss() to the fgetss() point nikic
Line 15: Line 15:
   * Defining a free-standing ''assert()'' function   * Defining a free-standing ''assert()'' function
   * ''FILTER_FLAG_SCHEME_REQUIRED'' and ''FILTER_FLAG_HOST_REQUIRED''   * ''FILTER_FLAG_SCHEME_REQUIRED'' and ''FILTER_FLAG_HOST_REQUIRED''
 +  * ''FILTER_SANITIZE_MAGIC_QUOTES''
   * ''pdo_odbc.db2_instance_name'' php.ini directive   * ''pdo_odbc.db2_instance_name'' php.ini directive
  
Line 47: Line 48:
 The ''fgetss()'' function and the ''string.strip_tags'' stream filters expose the functionality of ''strip_tags()'' in a streaming matter. The need to support these makes the implementation of ''strip_tags()'' more complicated, as a streaming state machine is necessary. On the other hand, these functions seem to be of very little utility. ''strip_tags()'' itself, due to its limitations and known bugs, already has very few legitimate applications. There is no need to provide native support for streaming application on top of that. The ''fgetss()'' function and the ''string.strip_tags'' stream filters expose the functionality of ''strip_tags()'' in a streaming matter. The need to support these makes the implementation of ''strip_tags()'' more complicated, as a streaming state machine is necessary. On the other hand, these functions seem to be of very little utility. ''strip_tags()'' itself, due to its limitations and known bugs, already has very few legitimate applications. There is no need to provide native support for streaming application on top of that.
  
-Proposed action: Mark ''fgetss()'' and ''SplFileObject::fgetss()'' as deprecated, so that a deprecation notice is emitted on every call. Generate a deprecation notice if the ''string.strip_tags'' stream filter is created. In PHP 8 the functions and the stream filter are removed.+Proposed action: Mark ''fgetss()'', ''gzgetss()'' and ''SplFileObject::fgetss()'' as deprecated, so that a deprecation notice is emitted on every call. Generate a deprecation notice if the ''string.strip_tags'' stream filter is created. In PHP 8 the functions and the stream filter are removed.
  
 ==== Defining a free-standing assert() function ==== ==== Defining a free-standing assert() function ====
Line 64: Line 65:
  
 Implementation: https://github.com/php/php-src/pull/3322 Implementation: https://github.com/php/php-src/pull/3322
 +
 +==== FILTER_SANITIZE_MAGIC_QUOTES ====
 +
 +Magic quotes were deprecated all the way back in PHP 5.3.0 and later removed in PHP 5.4.0, however the FILTER_SANITIZE_MAGIC_QUOTES were never deprecated. This filter basically mimics calling addslashes() to the input in question.
 +
 +Proposed action: Add a deprecation notice for each time the FILTER_SANITIZE_MAGIC_QUOTES is used.
 +
 +Implementation: https://gist.github.com/KalleZ/c38cc6ff421d1e565dcbd13166db8693
  
 ==== pdo_odbc.db2_instance_name php.ini directive ==== ==== pdo_odbc.db2_instance_name php.ini directive ====
Line 71: Line 80:
 The side effect here is that this setting is per process wide and also affects the ODBC extension, which can create some hard to debug siturations. Besides this, the PECL package, ibm_db2 seems to implement the exact same behavior which could also conflict. The side effect here is that this setting is per process wide and also affects the ODBC extension, which can create some hard to debug siturations. Besides this, the PECL package, ibm_db2 seems to implement the exact same behavior which could also conflict.
  
-Proposed action: Given this feature has been marked as deprecated for so long in the manual, I think it is fair to have 2 options: +Proposed action: Add a deprecation notice if the ini directive has a value at module initialization.
- +
-  - Removal in 7.3 +
-  - Deprecation if the directive is found +
- +
-Implementations:+
  
-  - Removal - https://gist.github.com/KalleZ/b7cc6c737801ed60c7fe793ae628b0b8 +Implementations: https://gist.github.com/KalleZ/424ea78492cd5f4c2198cba6b25403d9
-  - Deprecation - https://gist.github.com/KalleZ/424ea78492cd5f4c2198cba6b25403d9+
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
rfc/deprecations_php_7_3.txt · Last modified: 2018/07/21 21:50 by nikic