Skip to content

Commit c05d97f

Browse files
committed
Fix "Function ReflectionType::__toString() is deprecated" warnings
1 parent 9bce701 commit c05d97f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/lang/ClassLoader.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ protected static function defineForward($name, $func, $invoke) {
230230
} else if ($t->isBuiltin()) {
231231
$constraint= (string)$t;
232232
} else {
233-
$constraint= '\\'.(string)$t;
233+
$constraint= '\\'.(PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString());
234234
}
235235

236236
if ($param->isVariadic()) {

0 commit comments

Comments
 (0)