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
andDOMElement::$schemaTypeInfo
DOMImplementation::getFeature($feature, $version)
- Constant
DOM_PHP_ERR
mysqli_ping()
andmysqli::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
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.
Constant DOM_PHP_ERR
TODO: See reasoning: https://github.com/php/php-src/pull/11927#issuecomment-1672129591
mysqli_ping() and mysqli::ping()
TODO: See reasoning: https://github.com/php/php-src/pull/11912#issuecomment-1671762583
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.