Skip to content

Commit 7fbb831

Browse files
author
Alexander Miertsch
authored
Merge pull request #2 from bitExpert-forks/fix-reflectiontype-tostring
Replace ReflectionType's deprecated __toString() with getName()
2 parents 97699d9 + e8daa9e commit 7fbb831

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ImmutableRecordLogic.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ private static function buildPropTypeMap()
299299
);
300300
}
301301

302-
$type = (string) $method->getReturnType();
302+
/** @var \ReflectionNamedType $returnType */
303+
$returnType = $method->getReturnType();
304+
305+
$type = $returnType->getName();
303306

304307
$propTypeMap[$prop->getName()] = [$type, self::isScalarType($type), $method->getReturnType()->allowsNull()];
305308
}

0 commit comments

Comments
 (0)