Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f7fb13e
Suppress libxml deprecations
iluuu1994 Dec 2, 2025
26b9395
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 Dec 2, 2025
685bd9d
Merge branch 'PHP-8.2' into PHP-8.3
iluuu1994 Dec 2, 2025
ed847f4
Merge branch 'PHP-8.3' into PHP-8.4
iluuu1994 Dec 2, 2025
ddc8512
Merge branch 'PHP-8.4' into PHP-8.5
iluuu1994 Dec 2, 2025
92dc0d0
Merge branch 'PHP-8.5'
iluuu1994 Dec 2, 2025
bd67ba6
dom: Fix compile warning due to misplaced const cast
ndossche Nov 6, 2025
bdc09a0
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 Dec 2, 2025
16ce2ff
Merge branch 'PHP-8.2' into PHP-8.3
iluuu1994 Dec 2, 2025
9be8e52
Merge branch 'PHP-8.3' into PHP-8.4
iluuu1994 Dec 2, 2025
4e460b2
Merge branch 'PHP-8.4' into PHP-8.5
iluuu1994 Dec 2, 2025
5a629d4
Merge branch 'PHP-8.5'
iluuu1994 Dec 2, 2025
e10f6d7
PHP-8.3 is now for PHP 8.3.30-dev
ericmann Dec 2, 2025
f940217
Merge branch 'PHP-8.3' into PHP-8.4
ericmann Dec 2, 2025
6c1edba
Merge branch 'PHP-8.4' into PHP-8.5
ericmann Dec 2, 2025
94ae775
Merge branch 'PHP-8.5'
ericmann Dec 2, 2025
903fcb4
Fix deprecation warning for libxml SAX header (#18594)
ndossche May 19, 2025
a741371
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 Dec 2, 2025
9435c06
Merge branch 'PHP-8.2' into PHP-8.3
iluuu1994 Dec 2, 2025
0cd1970
Merge branch 'PHP-8.3' into PHP-8.4
iluuu1994 Dec 2, 2025
0d364fc
Merge branch 'PHP-8.4' into PHP-8.5
iluuu1994 Dec 2, 2025
08f7323
Merge branch 'PHP-8.5'
iluuu1994 Dec 2, 2025
dd21794
xml: Backport more deprecation fixes
ndossche Dec 2, 2025
9446a8e
Merge branch 'PHP-8.1' into PHP-8.2
ndossche Dec 2, 2025
d543630
Merge branch 'PHP-8.2' into PHP-8.3
ndossche Dec 2, 2025
7658ebf
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Dec 2, 2025
cf19a8d
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Dec 2, 2025
9155a96
Merge branch 'PHP-8.5'
ndossche Dec 2, 2025
ad867ce
Tweak values for test on Windows (#20633)
ndossche Dec 2, 2025
881754e
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Dec 2, 2025
f622c39
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Dec 2, 2025
012bf8e
Merge branch 'PHP-8.5'
ndossche Dec 2, 2025
688902d
dom: Backport test for libxml changes
ndossche Dec 2, 2025
e81d808
Merge branch 'PHP-8.1' into PHP-8.2
ndossche Dec 2, 2025
d542ee1
Merge branch 'PHP-8.2' into PHP-8.3
ndossche Dec 2, 2025
0d57840
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Dec 2, 2025
5f64ee7
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Dec 2, 2025
1e7deee
Merge branch 'PHP-8.5'
ndossche Dec 2, 2025
2b04e08
intl: Fix tests for icu update
ndossche Dec 2, 2025
667b28c
Merge branch 'PHP-8.1' into PHP-8.2
ndossche Dec 2, 2025
4b63315
Merge branch 'PHP-8.2' into PHP-8.3
ndossche Dec 2, 2025
78e3d05
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Dec 2, 2025
6333ca8
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Dec 2, 2025
64d8b2a
Merge branch 'PHP-8.5'
ndossche Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ext/dom/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,12 +1597,16 @@ PHP_METHOD(DOMDocument, save)
libxml_doc_props const* doc_props = dom_get_doc_props_read_only(intern->document);
bool format = doc_props->formatoutput;
if (options & LIBXML_SAVE_NOEMPTYTAG) {
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
saveempty = xmlSaveNoEmptyTags;
xmlSaveNoEmptyTags = 1;
ZEND_DIAGNOSTIC_IGNORED_END
}
zend_long bytes = intern->document->handlers->dump_doc_to_file(file, docp, format, (const char *) docp->encoding);
if (options & LIBXML_SAVE_NOEMPTYTAG) {
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
xmlSaveNoEmptyTags = saveempty;
ZEND_DIAGNOSTIC_IGNORED_END
}
if (bytes == -1) {
RETURN_FALSE;
Expand Down Expand Up @@ -1643,10 +1647,14 @@ static void dom_document_save_xml(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry

/* Save libxml2 global, override its value, and restore after saving (don't move me or risk breaking the state
* w.r.t. the implicit return in DOM_GET_OBJ). */
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
old_xml_save_no_empty_tags = xmlSaveNoEmptyTags;
xmlSaveNoEmptyTags = (options & LIBXML_SAVE_NOEMPTYTAG) ? 1 : 0;
ZEND_DIAGNOSTIC_IGNORED_END
res = intern->document->handlers->dump_node_to_str(docp, node, format, (const char *) docp->encoding);
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
xmlSaveNoEmptyTags = old_xml_save_no_empty_tags;
ZEND_DIAGNOSTIC_IGNORED_END
} else {
int converted_options = XML_SAVE_AS_XML;
if (options & XML_SAVE_NO_DECL) {
Expand All @@ -1657,10 +1665,14 @@ static void dom_document_save_xml(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry
}

/* Save libxml2 global, override its value, and restore after saving. */
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
old_xml_save_no_empty_tags = xmlSaveNoEmptyTags;
xmlSaveNoEmptyTags = (options & LIBXML_SAVE_NOEMPTYTAG) ? 1 : 0;
ZEND_DIAGNOSTIC_IGNORED_END
res = intern->document->handlers->dump_doc_to_str(docp, converted_options, (const char *) docp->encoding);
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
xmlSaveNoEmptyTags = old_xml_save_no_empty_tags;
ZEND_DIAGNOSTIC_IGNORED_END
}

if (!res) {
Expand Down
5 changes: 4 additions & 1 deletion ext/dom/xml_serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,10 @@ static int dom_xml_serialize_element_node(
/* 14. If ns is the HTML namespace, and the node's list of children is empty, and the node's localName matches
* any one of the following void elements: ... */
if (element->children == NULL) {
if (xmlSaveNoEmptyTags) {
ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
int saveNoEmptyTags = xmlSaveNoEmptyTags;
ZEND_DIAGNOSTIC_IGNORED_END
if (saveNoEmptyTags) {
/* Do nothing, use the <x></x> closing style. */
} else if (php_dom_ns_is_fast(element, php_dom_ns_is_html_magic_token)) {
size_t name_length = strlen((const char *) element->name);
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
?>
--EXPECTF--
Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
quinta-feira, 17 de maio de 2012 5:35:36 da tarde ptlis
quinta-feira, 17 de maio de 2012 5:35:36 %r(da tarde|p.m.)%r ptlis
8 changes: 4 additions & 4 deletions ext/intl/tests/timezone_getDisplayName_variant4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED))
var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_GENERIC_LOCATION));

?>
--EXPECT--
string(3) "GMT"
--EXPECTF--
string(%d) "%r(GMT|GMT\+0)%r"
string(30) "Western European Standard Time"
string(13) "Portugal Time"
string(21) "Western European Time"
string(5) "+0000"
string(3) "GMT"
string(3) "GMT"
string(%d) "%r(GMT|GMT\+00:00)%r"
string(%d) "%r(GMT|GMT\+0)%r"
string(13) "Portugal Time"
3 changes: 3 additions & 0 deletions ext/libxml/libxml.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,12 @@ static xmlParserInputPtr php_libxml_external_entity_loader(const char *URL,
} else {
/* make stream not being closed when the zval is freed */
GC_ADDREF(stream->res);

ZEND_DIAGNOSTIC_IGNORED_START("-Wdeprecated-declarations")
pib->context = stream;
pib->readcallback = php_libxml_streams_IO_read;
pib->closecallback = php_libxml_streams_IO_close;
ZEND_DIAGNOSTIC_IGNORED_END

ret = xmlNewIOInputStream(context, pib, enc);
if (ret == NULL) {
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/tests/http/http_build_query/gh20583.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if (getenv('SKIP_ASAN')) {
}
?>
--INI--
zend.max_allowed_stack_size=512K
zend.max_allowed_stack_size=128K
--FILE--
<?php
$a = null;
for ($i = 0; $i < 5000; $i++) {
for ($i = 0; $i < 1000; $i++) {
$a = [$i => $a];
}
try {
Expand Down