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/24 16:40] nikicrfc:deprecations_php_7_3 [2018/06/26 19:31] – Added pdo_odbc.db2_instance_name kalle
Line 12: Line 12:
   * Undocumented mbstring function aliases   * Undocumented mbstring function aliases
   * String search functions with integer needle   * String search functions with integer needle
-  * fgetss() function and string.strip_tags filter +  * ''fgetss()'' function and ''string.strip_tags'' filter 
-  * Defining a free-standing assert() function+  * Defining a free-standing ''assert()'' function 
 +  * ''FILTER_FLAG_SCHEME_REQUIRED'' and ''FILTER_FLAG_HOST_REQUIRED'' 
 +  * ''pdo_odbc.db2_instance_name'' php.ini directive
  
 ===== Proposal ===== ===== Proposal =====
Line 54: Line 56:
  
 Proposed action: Generate a compile-time deprecation warning if an ''assert()'' function is declared. In PHP 8 this becomes a compile-error. Proposed action: Generate a compile-time deprecation warning if an ''assert()'' function is declared. In PHP 8 this becomes a compile-error.
 +
 +==== FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED ====
 +
 +As of PHP 5.2.1 ''FILTER_VALIDATE_URL'' implies ''FILTER_FLAG_SCHEME_REQUIRED'' and ''FILTER_FLAG_HOST_REQUIRED''. Not only are these constants useless, they also create the incorrect impression that the scheme/host requirement can be disabled.
 +
 +Proposed action: Generate a deprecation warning if the ''FILTER_FLAG_SCHEME_REQUIRED'' or ''FILTER_FLAG_HOST_REQUIRED'' flags are explicitly set in calls to filter APIs (PHP currently has no mechanism to deprecate the constants themselves). In PHP 8 the constants will be removed.
 +
 +Implementation: https://github.com/php/php-src/pull/3322
 +
 +==== pdo_odbc.db2_instance_name php.ini directive ====
 +
 +As of PHP 5.1.1 ''pdo_odbc.db2_instance_name'' was marked as deprecated in the manual, leaning towards the removal in a future version of PHP. This ini directive modifies the DB2INSTANCE environment variable for non Windows based operating systems, allowing pdo_odbc to make cataloged connections to a DB2 database.
 +
 +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:
 +
 +  - Removal in 7.3
 +  - Deprecation if the directive is found
 +
 +Implementations:
 +
 +  - Removal - https://gist.github.com/KalleZ/b7cc6c737801ed60c7fe793ae628b0b8
 +  - 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