Skip to content

Update ext/xsl parameter names #6295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions ext/xmlreader/php_xmlreader.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function getAttribute(string $name) {}
public function getAttributeNo(int $index) {}

/** @return string|null */
public function getAttributeNs(string $name, string $uri) {}
public function getAttributeNs(string $name, string $namespace) {}

/** @return bool */
public function getParserProperty(int $property) {}
Expand All @@ -32,7 +32,7 @@ public function moveToAttribute(string $name) {}
public function moveToAttributeNo(int $index) {}

/** @return bool */
public function moveToAttributeNs(string $name, string $uri) {}
public function moveToAttributeNs(string $name, string $namespace) {}

/** @return bool */
public function moveToElement() {}
Expand Down
4 changes: 2 additions & 2 deletions ext/xmlreader/php_xmlreader_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: b5860285a7554c75780be7989bcbdeced6b557c8 */
* Stub hash: 0188a53f262d3f8e19b5b64d163bdee84f1be6b8 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_close, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand All @@ -14,7 +14,7 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNs, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getParserProperty, 0, 0, 1)
Expand Down
2 changes: 1 addition & 1 deletion ext/xmlreader/tests/015-get-errors.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ $reader->close();
unlink(__DIR__.'/015-get-errors.xml');
?>
--EXPECT--
XMLReader::getAttributeNs(): Argument #2 ($uri) cannot be empty
XMLReader::getAttributeNs(): Argument #2 ($namespace) cannot be empty
ns1:num: 1
2 changes: 1 addition & 1 deletion ext/xmlreader/tests/015-move-errors.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ $reader->close();
unlink(__DIR__.'/015-move-errors.xml');
?>
--EXPECT--
XMLReader::moveToAttributeNs(): Argument #2 ($uri) cannot be empty
XMLReader::moveToAttributeNs(): Argument #2 ($namespace) cannot be empty
16 changes: 8 additions & 8 deletions ext/xmlwriter/php_xmlwriter.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ function xmlwriter_end_attribute(XMLWriter $writer): bool {}

function xmlwriter_write_attribute(XMLWriter $writer, string $name, string $value): bool {}

function xmlwriter_start_attribute_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $uri): bool {}
function xmlwriter_start_attribute_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $namespace): bool {}

function xmlwriter_write_attribute_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $uri, string $value): bool {}
function xmlwriter_write_attribute_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $namespace, string $value): bool {}

function xmlwriter_start_element(XMLWriter $writer, string $name): bool {}

function xmlwriter_end_element(XMLWriter $writer): bool {}

function xmlwriter_full_end_element(XMLWriter $writer): bool {}

function xmlwriter_start_element_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $uri): bool {}
function xmlwriter_start_element_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $namespace): bool {}

function xmlwriter_write_element(XMLWriter $writer, string $name, ?string $content = null): bool {}

function xmlwriter_write_element_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $uri, ?string $content = null): bool {}
function xmlwriter_write_element_ns(XMLWriter $writer, ?string $prefix, string $name, ?string $namespace, ?string $content = null): bool {}

function xmlwriter_start_pi(XMLWriter $writer, string $target): bool {}

Expand Down Expand Up @@ -116,10 +116,10 @@ public function endAttribute(): bool {}
public function writeAttribute(string $name, string $value): bool {}

/** @alias xmlwriter_start_attribute_ns */
public function startAttributeNs(?string $prefix, string $name, ?string $uri): bool {}
public function startAttributeNs(?string $prefix, string $name, ?string $namespace): bool {}

/** @alias xmlwriter_write_attribute_ns */
public function writeAttributeNs(?string $prefix, string $name, ?string $uri, string $value): bool {}
public function writeAttributeNs(?string $prefix, string $name, ?string $namespace, string $value): bool {}

/** @alias xmlwriter_start_element */
public function startElement(string $name): bool {}
Expand All @@ -131,13 +131,13 @@ public function endElement(): bool {}
public function fullEndElement(): bool {}

/** @alias xmlwriter_start_element_ns */
public function startElementNs(?string $prefix, string $name, ?string $uri): bool {}
public function startElementNs(?string $prefix, string $name, ?string $namespace): bool {}

/** @alias xmlwriter_write_element */
public function writeElement(string $name, ?string $content = null): bool {}

/** @alias xmlwriter_write_element_ns */
public function writeElementNs(?string $prefix, string $name, ?string $uri, ?string $content = null): bool {}
public function writeElementNs(?string $prefix, string $name, ?string $namespace, ?string $content = null): bool {}

/** @alias xmlwriter_start_pi */
public function startPi(string $target): bool {}
Expand Down
14 changes: 7 additions & 7 deletions ext/xmlwriter/php_xmlwriter_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: d265aff62d6dcd195c65e6205cc4cac063f5f237 */
* Stub hash: 891054e4aaf1d24b0965828de8287392b6a389a3 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_xmlwriter_open_uri, 0, 1, XMLWriter, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
Expand Down Expand Up @@ -41,14 +41,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_start_attribute_ns, 0,
ZEND_ARG_OBJ_INFO(0, writer, XMLWriter, 0)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_attribute_ns, 0, 5, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, writer, XMLWriter, 0)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_END_ARG_INFO()

Expand All @@ -70,7 +70,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_element_ns, 0, 4
ZEND_ARG_OBJ_INFO(0, writer, XMLWriter, 0)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()

Expand Down Expand Up @@ -208,13 +208,13 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startAttributeNs, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeAttributeNs, 0, 4, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_END_ARG_INFO()

Expand All @@ -234,7 +234,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeElementNs, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()

Expand Down
11 changes: 7 additions & 4 deletions ext/xsl/php_xsl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

class XSLTProcessor
{
/** @return bool */
/**
* @param DOMDocument|SimpleXMLElement $stylesheet
* @return bool
*/
public function importStylesheet(object $stylesheet) {}

/**
* @param DOMDocument|SimpleXMLElement $document
* @return DOMDocument|false
*/
public function transformToDoc(object $document, ?string $return_class = null) {}
public function transformToDoc(object $document, ?string $returnClass = null) {}

/**
* @param DOMDocument|SimpleXMLElement $document
Expand All @@ -38,13 +41,13 @@ public function removeParameter(string $namespace, string $name) {}
public function hasExsltSupport() {}

/** @return void */
public function registerPHPFunctions(array|string|null $restrict = null) {}
public function registerPHPFunctions(array|string|null $functions = null) {}

/** @return bool */
public function setProfiling(?string $filename) {}

/** @return int */
public function setSecurityPrefs(int $securityPrefs) {}
public function setSecurityPrefs(int $preferences) {}

/** @return int */
public function getSecurityPrefs() {}
Expand Down
8 changes: 4 additions & 4 deletions ext/xsl/php_xsl_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4a3997bafb6c17714ee94443837be2d2842386e2 */
* Stub hash: a119247725ff61dbd615cb86ee6201ee6603ba51 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_importStylesheet, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, stylesheet, IS_OBJECT, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToDoc, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, document, IS_OBJECT, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_class, IS_STRING, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, returnClass, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToUri, 0, 0, 2)
Expand Down Expand Up @@ -36,15 +36,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_hasExsltSupport, 0, 0, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_registerPHPFunctions, 0, 0, 0)
ZEND_ARG_TYPE_MASK(0, restrict, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null")
ZEND_ARG_TYPE_MASK(0, functions, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_setProfiling, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_setSecurityPrefs, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, securityPrefs, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, preferences, IS_LONG, 0)
ZEND_END_ARG_INFO()

#define arginfo_class_XSLTProcessor_getSecurityPrefs arginfo_class_XSLTProcessor_hasExsltSupport
Expand Down