[php-src] Issue #9447: ReflectionParameter::__toString should return FQCN symbols

From: Date: Mon, 29 Aug 2022 20:54:08 +0000
Subject: [php-src] Issue #9447: ReflectionParameter::__toString should return FQCN symbols
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242333@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9447 Author: nicolas-grekas ### Description The following code: ```php namespace App; class Foo { public function baz(string $dataType = new Foo() . Foo::BAR) { } } $r = new \ReflectionMethod(Foo::class, 'baz'); echo $r->getParameters()[0]; ``` Resulted in this output: ``` Parameter #0 [ <optional> string $dataType = new \App\Foo() . App\Foo::BAR ] ``` But I expected this output instead: ``` Parameter #0 [ <optional> string $dataType = new \App\Foo() . \App\Foo::BAR ] ``` Originally reported at https://github.com/doctrine/common/issues/983 ### PHP Version 8.1+ ### Operating System _No response_

« previous php.bugs (#242333) next »