mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Deprecate DOM_PHP_ERR (#15234)
* Deprecate DOM_PHP_ERR RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant * Apply suggestions from code review Co-authored-by: Tim Düsterhus <timwolla@googlemail.com> --------- Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
This commit is contained in:
1
NEWS
1
NEWS
@@ -13,6 +13,7 @@ PHP NEWS
|
|||||||
- DOM:
|
- DOM:
|
||||||
. Fixed bug GH-15192 (Segmentation fault in dom extension
|
. Fixed bug GH-15192 (Segmentation fault in dom extension
|
||||||
(html5_serializer)). (nielsdos)
|
(html5_serializer)). (nielsdos)
|
||||||
|
. Deprecated DOM_PHP_ERR constant. (nielsdos)
|
||||||
|
|
||||||
- PHPDBG:
|
- PHPDBG:
|
||||||
. array out of bounds, stack overflow handled for segfault handler on windows.
|
. array out of bounds, stack overflow handled for segfault handler on windows.
|
||||||
|
|||||||
@@ -409,6 +409,10 @@ PHP 8.4 UPGRADE NOTES
|
|||||||
the associated date_sunset() and date_sunrise() functions in PHP 8.1.
|
the associated date_sunset() and date_sunrise() functions in PHP 8.1.
|
||||||
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
|
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
|
||||||
|
|
||||||
|
- DOM:
|
||||||
|
. Deprecated DOM_PHP_ERR constant.
|
||||||
|
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant
|
||||||
|
|
||||||
- Intl:
|
- Intl:
|
||||||
. Calling intlcal_set() as well as calling IntlCalendar::set() with
|
. Calling intlcal_set() as well as calling IntlCalendar::set() with
|
||||||
more than 2 arguments is deprecated. Use either IntlCalendar::setDate()
|
more than 2 arguments is deprecated. Use either IntlCalendar::setDate()
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ namespace
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
|
* @deprecated is no longer used since 8.4
|
||||||
* @cvalue PHP_ERR
|
* @cvalue PHP_ERR
|
||||||
*/
|
*/
|
||||||
const DOM_PHP_ERR = UNKNOWN;
|
const DOM_PHP_ERR = UNKNOWN;
|
||||||
|
|||||||
4
ext/dom/php_dom_arginfo.h
generated
4
ext/dom/php_dom_arginfo.h
generated
@@ -1,5 +1,5 @@
|
|||||||
/* This is a generated file, edit the .stub.php file instead.
|
/* This is a generated file, edit the .stub.php file instead.
|
||||||
* Stub hash: 9a1e6842b2c5b891e11087d40aa8c9f56a2269a3 */
|
* Stub hash: 09b3f1df4ce6b20e7d25214a522ea1e6e5faabf4 */
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0)
|
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0)
|
||||||
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
|
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
|
||||||
@@ -1973,7 +1973,7 @@ static void register_php_dom_symbols(int module_number)
|
|||||||
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_NMTOKENS", XML_ATTRIBUTE_NMTOKENS, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_NMTOKENS", XML_ATTRIBUTE_NMTOKENS, CONST_PERSISTENT);
|
||||||
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_ENUMERATION", XML_ATTRIBUTE_ENUMERATION, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_ENUMERATION", XML_ATTRIBUTE_ENUMERATION, CONST_PERSISTENT);
|
||||||
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_NOTATION", XML_ATTRIBUTE_NOTATION, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("XML_ATTRIBUTE_NOTATION", XML_ATTRIBUTE_NOTATION, CONST_PERSISTENT);
|
||||||
REGISTER_LONG_CONSTANT("DOM_PHP_ERR", PHP_ERR, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("DOM_PHP_ERR", PHP_ERR, CONST_PERSISTENT | CONST_DEPRECATED);
|
||||||
REGISTER_LONG_CONSTANT("DOM_INDEX_SIZE_ERR", INDEX_SIZE_ERR, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("DOM_INDEX_SIZE_ERR", INDEX_SIZE_ERR, CONST_PERSISTENT);
|
||||||
REGISTER_LONG_CONSTANT("DOMSTRING_SIZE_ERR", DOMSTRING_SIZE_ERR, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("DOMSTRING_SIZE_ERR", DOMSTRING_SIZE_ERR, CONST_PERSISTENT);
|
||||||
REGISTER_LONG_CONSTANT("DOM_HIERARCHY_REQUEST_ERR", HIERARCHY_REQUEST_ERR, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("DOM_HIERARCHY_REQUEST_ERR", HIERARCHY_REQUEST_ERR, CONST_PERSISTENT);
|
||||||
|
|||||||
11
ext/dom/tests/DOM_PHP_ERR_deprecated.phpt
Normal file
11
ext/dom/tests/DOM_PHP_ERR_deprecated.phpt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
--TEST--
|
||||||
|
Test deprecation emitted on accessing DOM_PHP_ERR
|
||||||
|
--EXTENSIONS--
|
||||||
|
dom
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
var_dump(DOM_PHP_ERR);
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Deprecated: Constant DOM_PHP_ERR is deprecated in %s on line %d
|
||||||
|
int(0)
|
||||||
Reference in New Issue
Block a user