Bug #80151 [NEW]: ReflectionType::__toString() hasn't thrown E_DEPRECATED
| From: | zeriyoshi at gmail dot com | Date: | Fri, 25 Sep 2020 21:43:07 +0000 |
| Subject: | Bug #80151 [NEW]: ReflectionType::__toString() hasn't thrown E_DEPRECATED | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-229219@lists.php.net to get a copy of this message | ||
From: zeriyoshi at gmail dot com
Operating system: Linux
PHP version: 8.0.0beta4
Package: Reflection related
Bug Type: Bug
Bug description:ReflectionType::__toString() hasn't thrown E_DEPRECATED
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 bug report at https://bugs.php.net/bug.php?id=80151&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80151&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80151&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80151&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80151&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80151&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80151&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80151&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80151&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80151&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80151&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80151&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80151&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80151&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80151&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80151&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80151&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80151&r=mysqlcfg