Skip to content

Commit e081cf6

Browse files
Merge pull request #1776 from specialtactics/feature/further-php-8-support
Further php 8 support
2 parents 7c6068e + 1346c2b commit e081cf6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"league/fractal": "^0.19"
2121
},
2222
"require-dev": {
23-
"phpdocumentor/reflection-docblock": "3.3.2",
2423
"friendsofphp/php-cs-fixer": "~2",
2524
"illuminate/auth": "^7.0|^8.0",
2625
"illuminate/cache": "^7.0|^8.0",

src/Exception/Handler.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,15 @@ protected function handlerHint(callable $callback)
370370
$reflection = new ReflectionFunction($callback);
371371

372372
$exception = $reflection->getParameters()[0];
373+
$reflectionType = $exception->getType();
373374

374-
return $exception->getClass()->getName();
375+
if ($reflectionType && ! $reflectionType->isBuiltin()) {
376+
if ($reflectionType instanceof \ReflectionNamedType) {
377+
return $reflectionType->getName();
378+
}
379+
}
380+
381+
return '';
375382
}
376383

377384
/**

0 commit comments

Comments
 (0)