Skip to content

Commit 2b38ce2

Browse files
Fix PHP 8 deprecations
1 parent 19612b2 commit 2b38ce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/AutowirePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ private static function getResourceMetadataForMethod(\ReflectionMethod $method)
528528
if (method_exists($parameter, 'getType')) {
529529
$type = $parameter->getType();
530530
if ($type && !$type->isBuiltin()) {
531-
$class = new \ReflectionClass(method_exists($type, 'getName') ? $type->getName() : (string) $type);
531+
$class = new \ReflectionClass($type instanceof \ReflectionNamedType ? $type->getName() : (string) $type);
532532
} else {
533533
$class = null;
534534
}

0 commit comments

Comments
 (0)