Bug #80151 [Csd]: ReflectionType::__toString() hasn't thrown E_DEPRECATED
| From: | zeriyoshi at gmail dot com | Date: | Fri, 25 Sep 2020 22:15:57 +0000 |
| Subject: | Bug #80151 [Csd]: ReflectionType::__toString() hasn't thrown E_DEPRECATED | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229221@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80151&edit=1
ID: 80151
User updated by: zeriyoshi at gmail dot com
Reported by: zeriyoshi at gmail dot com
Summary: ReflectionType::__toString() hasn't thrown
E_DEPRECATED
Status: Closed
Type: Bug
Package: Reflection related
Operating System: Linux
PHP Version: 8.0.0beta4
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
ouch. I didn't check it. sorry.
Previous Comments:
------------------------------------------------------------------------
[2020-09-25 22:08:50] nikic@php.net
ReflectionType::__toString() is no longer deprecated in PHP 8.0, cf. https://github.com/php/php-src/blob/e42abeafeca245950ebc47c7312913e68262d40e/UPGRADING#L469-L472
------------------------------------------------------------------------
[2020-09-25 21:43:07] zeriyoshi at gmail dot com
Description:
------------
ReflectionType::__toString() deprecated in PHP 7.1.0, however PHP 8.0.0beta4 has'nt thrown
E_DEPRECATED.
This is probably a side effect of Stringable implementation.
Test script:
---------------
<?php
error_reporting(E_ALL);
function foo(string $bar){};
echo (new ReflectionFunction("foo"))->getParameters()[0]->getType();
Expected result:
----------------
Deprecated: Function ReflectionType::__toString() is deprecated in Command line code on line %n
string
Actual result:
--------------
string
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80151&edit=1