Bug #80247 [NEW]: ReflectionUnionType class does not contain isBuiltin method
From: info at chrisdoehring dot de
Operating system: Linux
PHP version: 8.0.0RC2
Package: Reflection related
Bug Type: Bug
Bug description:ReflectionUnionType class does not contain isBuiltin method
Description:
------------
The in php 8 added "ReflectionUnionType" class should extend the
ReflectionType class according to the RFC proposal
(https://wiki.php.net/rfc/union_types_v2#reflection), but the inherited
"isBuiltin" method
(https://www.php.net/manual/de/reflectiontype.isbuiltin.php) does not
exist.
Example script: https://3v4l.org/5BDRn
How it looks like without union type: https://3v4l.org/TGkX2
Test script:
---------------
<?php
class SomeClass
{
protected string|stdClass $a;
}
$unionType = (new
\ReflectionClass(SomeClass::class))->getProperty('a')->getType();
var_dump($unionType->isBuiltin());
Expected result:
----------------
bool(false)
Actual result:
--------------
Fatal error: Uncaught Error: Call to undefined method
ReflectionUnionType::isBuiltin() in /in/5BDRn:8
Stack trace:
#0 {main}
thrown in /in/5BDRn on line 8
Process exited with code 255.
--
Edit bug report at https://bugs.php.net/bug.php?id=80247&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80247&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80247&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80247&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80247&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80247&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80247&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80247&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80247&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80247&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80247&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80247&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80247&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80247&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80247&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80247&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80247&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80247&r=mysqlcfg
Thread (1 message)
- info at chrisdoehring dot de