[php-src] master: Merge branch 'PHP-8.6'
| From: | Daniel Scherzer | Date: | Sun, 01 Nov 2026 02:56:40 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143108@lists.php.net to get a copy of this message | ||
Author: Daniel Scherzer (DanielEScherzer)
Date: 2026-10-31T19:55:55-07:00
Commit: https://github.com/php/php-src/commit/e991020d7055213fd8d73cf4039136b3a72d4d5d
Raw diff: https://github.com/php/php-src/commit/e991020d7055213fd8d73cf4039136b3a72d4d5d.diff
Merge branch 'PHP-8.6'
* PHP-8.6:
[
%pS migration] Use %pS in ext/dom/xml_common.h
[%pS migration] Use %pS in ext/dom/php_dom.h
[%pS migration] Use %pS in ext/dom/php_dom.c
[%pS migration] Use %pS in ext/dom/nodelist.c
[%pS migration] Use %pS in ext/dom/node.c
[%pS migration] Use %pS in ext/dom/html_collection.c
[%pS migration] Use %pS in ext/dom/document.c
[%pS migration] Use %pS in ext/dom/parentnode/tree.c
Changed paths:
M ext/dom/document.c
M ext/dom/html_collection.c
M ext/dom/node.c
M ext/dom/nodelist.c
M ext/dom/parentnode/tree.c
M ext/dom/php_dom.c
M ext/dom/php_dom.h
M ext/dom/xml_common.h
Diff:
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 605c4dae782b..ccb2c08bc815 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -2315,7 +2315,7 @@ static void dom_document_register_node_class(INTERNAL_FUNCTION_PARAMETERS,
bool
return;
}
- zend_argument_error(NULL, 2, "must be a class name derived from %s or null, %s given",
ZSTR_VAL(basece->name), ZSTR_VAL(ce->name));
+ zend_argument_error(NULL, 2, "must be a class name derived from %pS or null, %pS given",
basece->name, ce->name);
RETURN_THROWS();
}
diff --git a/ext/dom/html_collection.c b/ext/dom/html_collection.c
index 6310aef54bc2..89dbf9f2765f 100644
--- a/ext/dom/html_collection.c
+++ b/ext/dom/html_collection.c
@@ -100,7 +100,7 @@ PHP_METHOD(Dom_HTMLCollection, namedItem)
zval *dom_html_collection_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
- zend_throw_error(NULL, "Cannot append to %s", ZSTR_VAL(object->ce->name));
+ zend_throw_error(NULL, "Cannot append to %pS", object->ce->name);
return NULL;
}
diff --git a/ext/dom/node.c b/ext/dom/node.c
index a3d40a92bfb7..a562328cd26e 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -2691,14 +2691,14 @@ PHP_METHOD(Dom_Node, compareDocumentPosition)
PHP_METHOD(Dom_Node, __construct)
{
- zend_throw_error(NULL, "Cannot directly construct %s, use document methods instead",
ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
+ zend_throw_error(NULL, "Cannot directly construct %pS, use document methods instead",
Z_OBJCE_P(ZEND_THIS)->name);
}
PHP_METHOD(DOMNode, __sleep)
{
ZEND_PARSE_PARAMETERS_NONE();
- zend_throw_exception_ex(NULL, 0, "Serialization of '%s' is not allowed, unless
serialization methods are implemented in a subclass", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
+ zend_throw_exception_ex(NULL, 0, "Serialization of '%pS' is not allowed, unless
serialization methods are implemented in a subclass", Z_OBJCE_P(ZEND_THIS)->name);
RETURN_THROWS();
}
@@ -2706,7 +2706,7 @@ PHP_METHOD(DOMNode, __wakeup)
{
ZEND_PARSE_PARAMETERS_NONE();
- zend_throw_exception_ex(NULL, 0, "Unserialization of '%s' is not allowed, unless
unserialization methods are implemented in a subclass",
ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
+ zend_throw_exception_ex(NULL, 0, "Unserialization of '%pS' is not allowed, unless
unserialization methods are implemented in a subclass", Z_OBJCE_P(ZEND_THIS)->name);
RETURN_THROWS();
}
diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c
index 197ff3ceb880..d311c2c110e2 100644
--- a/ext/dom/nodelist.c
+++ b/ext/dom/nodelist.c
@@ -116,7 +116,7 @@ dom_nodelist_dimension_index dom_modern_nodelist_get_index(const zval *offset)
zval *dom_modern_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
- zend_throw_error(NULL, "Cannot append to %s", ZSTR_VAL(object->ce->name));
+ zend_throw_error(NULL, "Cannot append to %pS", object->ce->name);
return NULL;
}
diff --git a/ext/dom/parentnode/tree.c b/ext/dom/parentnode/tree.c
index 13a99023781f..aacc991cc735 100644
--- a/ext/dom/parentnode/tree.c
+++ b/ext/dom/parentnode/tree.c
@@ -465,7 +465,7 @@ static zend_result dom_sanity_check_node_list_types(zval *nodes, uint32_t nodesc
const zend_class_entry *ce = Z_OBJCE(nodes[i]);
if (!instanceof_function(ce, node_ce)) {
- zend_argument_type_error(i + 1, "must be of type %s|string, %s given",
ZSTR_VAL(node_ce->name), zend_zval_type_name(&nodes[i]));
+ zend_argument_type_error(i + 1, "must be of type %pS|string, %s given",
node_ce->name, zend_zval_type_name(&nodes[i]));
return FAILURE;
}
} else if (type == IS_STRING) {
@@ -474,7 +474,7 @@ static zend_result dom_sanity_check_node_list_types(zval *nodes, uint32_t nodesc
return FAILURE;
}
} else {
- zend_argument_type_error(i + 1, "must be of type %s|string, %s given",
ZSTR_VAL(node_ce->name), zend_zval_type_name(&nodes[i]));
+ zend_argument_type_error(i + 1, "must be of type %pS|string, %s given",
node_ce->name, zend_zval_type_name(&nodes[i]));
return FAILURE;
}
}
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 845507924c1e..4e55b04ac0d4 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -482,7 +482,7 @@ static void dom_unset_property(zend_object *object, zend_string *member, void **
dom_object *obj = php_dom_obj_from_obj(object);
if (obj->prop_handler != NULL && zend_hash_exists(obj->prop_handler, member)) {
- zend_throw_error(NULL, "Cannot unset %s::$%s", ZSTR_VAL(object->ce->name),
ZSTR_VAL(member));
+ zend_throw_error(NULL, "Cannot unset %pS::$%pS", object->ce->name, member);
return;
}
@@ -2307,7 +2307,7 @@ static bool dom_nodemap_or_nodelist_process_offset_as_named(zval *offset,
zend_l
static zval *dom_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
- zend_throw_error(NULL, "Cannot access %s without offset",
ZSTR_VAL(object->ce->name));
+ zend_throw_error(NULL, "Cannot access %pS without offset", object->ce->name);
return NULL;
}
@@ -2399,7 +2399,7 @@ void php_dom_get_content_into_zval(const xmlNode *nodep, zval *return_value,
boo
static zval *dom_nodemap_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
- zend_throw_error(NULL, "Cannot access %s without offset",
ZSTR_VAL(object->ce->name));
+ zend_throw_error(NULL, "Cannot access %pS without offset", object->ce->name);
return NULL;
}
@@ -2443,7 +2443,7 @@ static int dom_nodemap_has_dimension(zend_object *object, zval *member, int
chec
static zval *dom_modern_nodemap_read_dimension(zend_object *object, zval *offset, int type, zval
*rv)
{
if (UNEXPECTED(!offset)) {
- zend_throw_error(NULL, "Cannot append to %s", ZSTR_VAL(object->ce->name));
+ zend_throw_error(NULL, "Cannot append to %pS", object->ce->name);
return NULL;
}
diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h
index 445081203afe..a45fdb0aa59e 100644
--- a/ext/dom/php_dom.h
+++ b/ext/dom/php_dom.h
@@ -207,7 +207,7 @@ xmlNodePtr dom_nodelist_iter_start_first_child(xmlNodePtr nodep);
#define DOM_GET_INTERN(__id, __intern) { \
__intern = Z_DOMOBJ_P(__id); \
if (UNEXPECTED(__intern->ptr == NULL)) { \
- zend_throw_error(NULL, "Couldn't fetch %s",
ZSTR_VAL(__intern->std.ce->name));\
+ zend_throw_error(NULL, "Couldn't fetch %pS", __intern->std.ce->name);\
RETURN_THROWS();\
} \
}
diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h
index ec45fcc08342..2c16b3efc41e 100644
--- a/ext/dom/xml_common.h
+++ b/ext/dom/xml_common.h
@@ -55,8 +55,8 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj);
#define NODE_GET_OBJ(__ptr, __id, __prtype, __intern) { \
__intern = Z_LIBXML_NODE_P(__id); \
if (UNEXPECTED(__intern->node == NULL)) { \
- php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", \
- ZSTR_VAL(Z_OBJCE_P(__zv)->name));\
+ php_error_docref(NULL, E_WARNING, "Couldn't fetch %pS", \
+ Z_OBJCE_P(__zv)->name);\
RETURN_NULL();\
} \
__ptr = (__prtype)__intern->node->node; \