summaryrefslogtreecommitdiff
path: root/ext/dom
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-04-06 11:02:13 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-04-08 18:37:51 +0200
commit3709e74b5e495e210ada8039ed81fafa9cbadcdb (patch)
treeb7347572b1e22a2a27a45260b4f4773bf916b158 /ext/dom
parentb0d8f012f95ba1f2d8dba238c93baf3afb73b78e (diff)
downloadphp-git-3709e74b5e495e210ada8039ed81fafa9cbadcdb.tar.gz
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Diffstat (limited to 'ext/dom')
-rw-r--r--ext/dom/attr_arginfo.h2
-rw-r--r--ext/dom/comment_arginfo.h2
-rw-r--r--ext/dom/document_arginfo.h30
-rw-r--r--ext/dom/domimplementation_arginfo.h8
-rw-r--r--ext/dom/element_arginfo.h4
-rw-r--r--ext/dom/node_arginfo.h20
-rw-r--r--ext/dom/processinginstruction_arginfo.h2
-rw-r--r--ext/dom/text_arginfo.h2
-rw-r--r--ext/dom/xpath_arginfo.h8
9 files changed, 39 insertions, 39 deletions
diff --git a/ext/dom/attr_arginfo.h b/ext/dom/attr_arginfo.h
index 4675acac7a..2a184f3d55 100644
--- a/ext/dom/attr_arginfo.h
+++ b/ext/dom/attr_arginfo.h
@@ -2,7 +2,7 @@
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMAttr___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMAttr_isId, 0, 0, 0)
diff --git a/ext/dom/comment_arginfo.h b/ext/dom/comment_arginfo.h
index 0b6e1c97c9..03b1a5a19f 100644
--- a/ext/dom/comment_arginfo.h
+++ b/ext/dom/comment_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead. */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMComment___construct, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
diff --git a/ext/dom/document_arginfo.h b/ext/dom/document_arginfo.h
index eba90752b3..0d51410b02 100644
--- a/ext/dom/document_arginfo.h
+++ b/ext/dom/document_arginfo.h
@@ -1,7 +1,7 @@
/* This is a generated file, edit the .stub.php file instead. */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument___construct, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, version, IS_STRING, 0, "\"1.0\"")
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -25,20 +25,20 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createElement, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, tagName, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createElementNS, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
#define arginfo_class_DOMDocument_createEntityReference arginfo_class_DOMDocument_createAttribute
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createProcessingInstruction, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, target, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
#define arginfo_class_DOMDocument_createTextNode arginfo_class_DOMDocument_createCDATASection
@@ -58,17 +58,17 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_importNode, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, importedNode, DOMNode, 0)
- ZEND_ARG_TYPE_INFO(0, deep, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deep, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_load, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadXML, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#define arginfo_class_DOMDocument_normalizeDocument arginfo_class_DOMDocument_createDocumentFragment
@@ -83,20 +83,20 @@ ZEND_END_ARG_INFO()
#if defined(LIBXML_HTML_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTML, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#endif
#if defined(LIBXML_HTML_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTMLFile, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#endif
#if defined(LIBXML_HTML_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveHTML, 0, 0, 0)
- ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
+ ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, node, DOMNode, 1, "null")
ZEND_END_ARG_INFO()
#endif
@@ -107,21 +107,21 @@ ZEND_END_ARG_INFO()
#endif
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveXML, 0, 0, 0)
- ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, node, DOMNode, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#if defined(LIBXML_SCHEMAS_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_schemaValidate, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_schemaValidateSource, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#endif
@@ -140,7 +140,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_DOMDocument_validate arginfo_class_DOMDocument_createDocumentFragment
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_xinclude, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_adoptNode, 0, 0, 1)
diff --git a/ext/dom/domimplementation_arginfo.h b/ext/dom/domimplementation_arginfo.h
index 1747bfb769..fabce425d1 100644
--- a/ext/dom/domimplementation_arginfo.h
+++ b/ext/dom/domimplementation_arginfo.h
@@ -9,12 +9,12 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocumentType, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 0, "\"\"")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocument, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespaceURI, IS_STRING, 0, "\"\"")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifiedName, IS_STRING, 0, "\"\"")
ZEND_ARG_OBJ_INFO(0, doctype, DOMDocumentType, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/dom/element_arginfo.h b/ext/dom/element_arginfo.h
index 2fe19baa8f..496afd45ab 100644
--- a/ext/dom/element_arginfo.h
+++ b/ext/dom/element_arginfo.h
@@ -2,8 +2,8 @@
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1)
- ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_getAttribute, 0, 0, 1)
diff --git a/ext/dom/node_arginfo.h b/ext/dom/node_arginfo.h
index 928c289d51..58c5b111c2 100644
--- a/ext/dom/node_arginfo.h
+++ b/ext/dom/node_arginfo.h
@@ -16,22 +16,22 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_appendChild, 0, 0, 1)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_C14N, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, exclusive, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, with_comments, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, xpath, IS_ARRAY, 1)
- ZEND_ARG_TYPE_INFO(0, ns_prefixes, IS_ARRAY, 1)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclusive, _IS_BOOL, 0, "false")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_comments, _IS_BOOL, 0, "false")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, xpath, IS_ARRAY, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns_prefixes, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_C14NFile, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, exclusive, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, with_comments, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, xpath, IS_ARRAY, 1)
- ZEND_ARG_TYPE_INFO(0, ns_prefixes, IS_ARRAY, 1)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, exclusive, _IS_BOOL, 0, "false")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_comments, _IS_BOOL, 0, "false")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, xpath, IS_ARRAY, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ns_prefixes, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_cloneNode, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, recursive, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_getLineNo, 0, 0, 0)
@@ -45,7 +45,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_insertBefore, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
- ZEND_ARG_OBJ_INFO(0, refChild, DOMNode, 1)
+ ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, refChild, DOMNode, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_isDefaultNamespace, 0, 0, 1)
diff --git a/ext/dom/processinginstruction_arginfo.h b/ext/dom/processinginstruction_arginfo.h
index 4cddede82e..5db080bc34 100644
--- a/ext/dom/processinginstruction_arginfo.h
+++ b/ext/dom/processinginstruction_arginfo.h
@@ -2,5 +2,5 @@
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMProcessingInstruction___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
diff --git a/ext/dom/text_arginfo.h b/ext/dom/text_arginfo.h
index 2de2464843..b81ef55a81 100644
--- a/ext/dom/text_arginfo.h
+++ b/ext/dom/text_arginfo.h
@@ -1,7 +1,7 @@
/* This is a generated file, edit the .stub.php file instead. */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMText___construct, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMText_isWhitespaceInElementContent, 0, 0, 0)
diff --git a/ext/dom/xpath_arginfo.h b/ext/dom/xpath_arginfo.h
index 64a408be99..a6574c7892 100644
--- a/ext/dom/xpath_arginfo.h
+++ b/ext/dom/xpath_arginfo.h
@@ -3,15 +3,15 @@
#if defined(LIBXML_XPATH_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath___construct, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
- ZEND_ARG_TYPE_INFO(0, registerNodeNS, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, registerNodeNS, _IS_BOOL, 0, "true")
ZEND_END_ARG_INFO()
#endif
#if defined(LIBXML_XPATH_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_evaluate, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, expr, IS_STRING, 0)
- ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
- ZEND_ARG_TYPE_INFO(0, registerNodeNS, _IS_BOOL, 0)
+ ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, context, DOMNode, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, registerNodeNS, _IS_BOOL, 0, "true")
ZEND_END_ARG_INFO()
#endif
@@ -28,6 +28,6 @@ ZEND_END_ARG_INFO()
#if defined(LIBXML_XPATH_ENABLED)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_registerPhpFunctions, 0, 0, 0)
- ZEND_ARG_INFO(0, restrict)
+ ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, restrict, "null")
ZEND_END_ARG_INFO()
#endif