Skip to content

Commit 0aec0fa

Browse files
nielsdosTimWolla
andauthored
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 <[email protected]> --------- Co-authored-by: Tim Düsterhus <[email protected]>
1 parent 18a99a4 commit 0aec0fa

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PHP NEWS
1313
- DOM:
1414
. Fixed bug GH-15192 (Segmentation fault in dom extension
1515
(html5_serializer)). (nielsdos)
16+
. Deprecated DOM_PHP_ERR constant. (nielsdos)
1617

1718
- PHPDBG:
1819
. array out of bounds, stack overflow handled for segfault handler on windows.

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,10 @@ PHP 8.4 UPGRADE NOTES
409409
the associated date_sunset() and date_sunrise() functions in PHP 8.1.
410410
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
411411

412+
- DOM:
413+
. Deprecated DOM_PHP_ERR constant.
414+
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant
415+
412416
- Intl:
413417
. Calling intlcal_set() as well as calling IntlCalendar::set() with
414418
more than 2 arguments is deprecated. Use either IntlCalendar::setDate()

ext/dom/php_dom.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147

148148
/**
149149
* @var int
150+
* @deprecated is no longer used since 8.4
150151
* @cvalue PHP_ERR
151152
*/
152153
const DOM_PHP_ERR = UNKNOWN;

ext/dom/php_dom_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
Test deprecation emitted on accessing DOM_PHP_ERR
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
var_dump(DOM_PHP_ERR);
8+
?>
9+
--EXPECTF--
10+
Deprecated: Constant DOM_PHP_ERR is deprecated in %s on line %d
11+
int(0)

0 commit comments

Comments
 (0)