Skip to content

Commit 5b80d07

Browse files
Fix
1 parent 10d379a commit 5b80d07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/FactoryReturnTypePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private function updateDefinition(ContainerBuilder $container, $id, Definition $
9393

9494
$returnType = $m->getReturnType();
9595
if (null !== $returnType && !$returnType->isBuiltin()) {
96-
$returnType = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType->__toString();
96+
$returnType = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
9797
if (null !== $class) {
9898
$declaringClass = $m->getDeclaringClass()->getName();
9999
if ('self' === strtolower($returnType)) {

0 commit comments

Comments
 (0)