rfc:deprecations_php_8_4

PHP RFC: Deprecations for PHP 8.4

  • Date: 2023-07-25
  • Authors: Niels Dossche nielsdos@php.net
  • Status: Draft
  • Implementation: TBD

Introduction

The RFC proposes to deprecate the listed functionality in PHP 8.4 and remove it in PHP 9.

The following list provides a short overview of the functionality targeted for deprecation, while more detailed explanation is provided in the Proposal section:

  • DOMAttr::$schemaTypeInfo and DOMElement::$schemaTypeInfo
  • DOMImplementation::getFeature($feature, $version)
  • Constant DOM_PHP_ERR
  • mysqli_ping() and mysqli::ping()

Proposal

Each feature proposed for deprecation is voted separately and requires a 2/3 majority. All votes refer to deprecation in PHP 8.4 and removal in PHP 9.

DOMAttr::$schemaTypeInfo and DOMElement::$schemaTypeInfo

schemaTypeInfo used to be a feature of DOM Core Level 3 https://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Attr-schemaTypeInfo, but it was never implemented in PHP, i.e. it always returns NULL. That return value is not even correct, as schemaTypeInfo is not supposed to be nullable. Furthermore, the feature has been removed from the current living DOM spec. It doesn't make sense to keep a feature alive that has never been implemented and is removed by the reference specification.

TODO: check impact

Deprecate DOMAttr::$schemaTypeInfo and DOMElement::$schemaTypeInfo
Real name Yes No
Final result: 0 0
This poll has been closed.

DOMImplementation::getFeature($feature, $version)

DOMImplementation::getFeature($feature, $version) used to be a feature of DOM Core Level 3 https://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-DOMImplementation3-getFeature, but it was never implemented in PHP, i.e. it always threw a “not implemented” exception. It was also never documented because of this. Furthermore, the feature has been removed from the current living DOM spec. It doesn't make sense to keep a feature alive that has never been implemented and is removed by the reference specification.

Deprecate DOMImplementation::getFeature($feature, $version)
Real name Yes No
Final result: 0 0
This poll has been closed.

Constant DOM_PHP_ERR

mysqli_ping() and mysqli::ping()

Backward Incompatible Changes

For PHP 8.4 additional deprecation notices will be emitted. The actual removal of the affected functionality will happen no earlier than PHP 9.

rfc/deprecations_php_8_4.txt · Last modified: 2023/09/25 18:51 by timwolla