php-ref icon indicating copy to clipboard operation
php-ref copied to clipboard

ReflectionType::__toString() is deprecated

Open alystair opened this issue 5 years ago • 3 comments
trafficstars

Deprecated: Function ReflectionType::__toString() is deprecated in \vendor\digitalnature\php-ref\ref.phpon line 2060

alystair avatar Feb 24 '20 21:02 alystair

This deprecated message occurs on PHP7.4+

CodeBrauer avatar Aug 31 '20 13:08 CodeBrauer

How to fix it ?

kgnfth avatar Jan 28 '21 22:01 kgnfth

Change file ref.php on line 2019: $type = $parameter->getType(); to $type = $parameter->getName(); And line 2057 $type = $method->getReturnType(); to $type = $method->getName();

Solved on PHP 7.4.19

ahmaddzidan avatar Jul 25 '21 08:07 ahmaddzidan