Skip to content

Commit d61d21a

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: SimpleXMLElement::addAttribute() is a void function
2 parents dff0798 + 24d9527 commit d61d21a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ext/simplexml/simplexml.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function __construct(string $data, int $options = 0, bool $dataIsURL = fa
4242
/** @return SimpleXMLElement|null */
4343
public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
4444

45-
/** @return SimpleXMLElement|null */
46-
public function addAttribute(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
45+
/** @return void */
46+
public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null) {}
4747

4848
/** @return string */
4949
public function getName() {}

ext/simplexml/simplexml_arginfo.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: c30a80ee59a984f53d89f8de0019be2ac8feb94f */
2+
* Stub hash: a15b1397538882bf618a4963193a63be8d893842 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_file, 0, 1, SimpleXMLElement, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -67,7 +67,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_addChild, 0, 0, 1)
6767
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
6868
ZEND_END_ARG_INFO()
6969

70-
#define arginfo_class_SimpleXMLElement_addAttribute arginfo_class_SimpleXMLElement_addChild
70+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_addAttribute, 0, 0, 2)
71+
ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
72+
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
73+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
74+
ZEND_END_ARG_INFO()
7175

7276
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_getName, 0, 0, 0)
7377
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)