com php-src: Merge branch 'PHP-7.0' into PHP-7.1: ext/reflection/tests/bug69802.phpt
| From: | Xinchen Hui | Date: | Thu, 27 Jul 2017 04:50:28 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0' into PHP-7.1: ext/reflection/tests/bug69802.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98832@lists.php.net to get a copy of this message | ||
Commit: 0ddda0dcb73502d33bc89696f0a625cbae35d2a3
Author: Xinchen Hui <laruence@gmail.com> Thu, 27 Jul 2017 12:50:28 +0800
Parents: efb1be547c1f7f37dbb08f980e15e01490aff6ca 9fcfe52d03bc40cfce8306debe2e91d83a560683
Branches: PHP-7.1 PHP-7.2 master
Link: http://git.php..net/?p=php-src.git;a=commitdiff;h=0ddda0dcb73502d33bc89696f0a625cbae35d2a3
Log:
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed test
Changed paths:
AM ext/reflection/tests/bug69802.phpt
Diff:
diff --cc ext/reflection/tests/bug69802.phpt
index 0000000,e71ac1a..0a58d0b
mode 000000,100644..100644
--- a/ext/reflection/tests/bug69802.phpt
+++ b/ext/reflection/tests/bug69802.phpt
@@@ -1,0 -1,27 +1,27 @@@
+ --TEST--
+ Bug #69802 (Reflection on Closure::__invoke borks type hint class name)
+ --FILE--
+ <?php
+ $f = function(stdClass $x): stdClass {};
+ $r = new ReflectionMethod($f, '__invoke');
+ var_dump($r->getParameters()[0]->getName());
+ var_dump($r->getParameters()[0]->getClass());
+ echo $r->getParameters()[0], "\n";
-echo $r->getReturnType(),"\n";
++echo $r->getReturnType()->getName(), "\n";
+ echo $r,"\n";
+ ?>
+ --EXPECT--
+ string(1) "x"
+ object(ReflectionClass)#4 (1) {
+ ["name"]=>
+ string(8) "stdClass"
+ }
+ Parameter #0 [ <required> stdClass $x ]
+ stdClass
+ Method [ <internal> public method __invoke ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> stdClass $x ]
+ }
+ - Return [ stdClass ]
+ }