]> granicus.if.org Git - php/commitdiff
Revert BC break caused by fixing bug #74035
authorMichael Moravec <mail@majkl578.cz>
Thu, 2 Nov 2017 18:22:37 +0000 (19:22 +0100)
committerSara Golemon <pollita@php.net>
Mon, 6 Nov 2017 22:52:17 +0000 (17:52 -0500)
This reverts commit 9ffc6ca62f53431a4b32b30cdda8180142f47cdb.

ext/reflection/php_reflection.c
ext/reflection/tests/ReflectionClass_toString_001.phpt
ext/reflection/tests/bug74035.phpt [deleted file]

index a87ecddae4ba324db1910c717944eada1bab511d..6cf0392a73b8c11a067a885da01dcdb18461c4f4 100644 (file)
@@ -4715,7 +4715,7 @@ ZEND_METHOD(reflection_class, isInstance)
 }
 /* }}} */
 
-/* {{{ proto public stdclass ReflectionClass::newInstance([mixed* args], ...)
+/* {{{ proto public stdclass ReflectionClass::newInstance(mixed* args, ...)
    Returns an instance of this class */
 ZEND_METHOD(reflection_class, newInstance)
 {
@@ -6419,8 +6419,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_isInstance, 0)
        ZEND_ARG_INFO(0, object)
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_class_newInstance, 0, 0, 0)
-       ZEND_ARG_VARIADIC_INFO(0, args)
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_newInstance, 0)
+       ZEND_ARG_INFO(0, args)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_newInstanceWithoutConstructor, 0)
index 5a2b4979058d5d5759df2cd8d4b867f96a256b5f..179d63afade08989907377d72260a5b94476f03d 100644 (file)
@@ -265,7 +265,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
     Method [ <internal:Reflection> public method newInstance ] {
 
       - Parameters [1] {
-        Parameter #0 [ <optional> ...$args ]
+        Parameter #0 [ <required> $args ]
       }
     }
 
diff --git a/ext/reflection/tests/bug74035.phpt b/ext/reflection/tests/bug74035.phpt
deleted file mode 100644 (file)
index 74cf03f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---TEST--
-Bug #74035: getNumberOfRequiredParameters wrong for ReflectionClass::newInstance
---FILE--
-<?php
-$r = new ReflectionClass(ReflectionClass::class);
-$m = $r->getMethod('newInstance');
-
-echo $m->getNumberOfRequiredParameters();
-?>
---EXPECT--
-0