For those who stumble on notice about ReflectionType::__toString() beeing deprecated, use method ReflectionNamedType::getName() instead which is not yet documented.
(PHP 7, PHP 8)
ReflectionType ã¯ãŠãšã¯ã éĸæ°ãŽåŧæ°ãæģãå¤ãŽåã ãžãã¯ã¯ãŠãšãŽãããããŖãŽåãĢéĸããæ å ąãå ąåããžãã ãĒããŦã¯ãˇã§ãŗæĄåŧĩãĸã¸ãĨãŧãĢã§ã¯ãäģĨä¸ãŽãĩãã¯ãŠãšãåŽŖč¨ãããĻããžãã
ããŧã¸ã§ãŗ | čĒŦæ |
---|---|
8.0.0 | ReflectionType ã¯ãæŊ蹥ã¯ãŠãšãĢãĒãã ReflectionType::isBuiltin() ã¯ã ReflectionNamedType::isBuiltin() ãĢį§ģåããžããã |
For those who stumble on notice about ReflectionType::__toString() beeing deprecated, use method ReflectionNamedType::getName() instead which is not yet documented.
Method ReflectionType::getName() does not exist. This may have been virtually true in the past but not anymore. It exists on ReflectionNamedType which used to be the only child class of ReflectionType. So you could have kind of relied on that.
But in PHP 8 there's also ReflectionUnionType which doesn't have the getName() method. So in order to support PHP 8, you need to support both ReflectionNamedType and ReflectionUnionType.