Use ReflectionParameter::getType() instead of getClass()

`iReflectionParameter::getClass()` is deprecated as of PHP 8 and will
trigger a warning.
This commit is contained in:
Martin Rademacher
2020-07-06 17:20:21 +12:00
committed by DerManoMann
parent 41f77e8697
commit 65a85616f4
+3 -3
View File
@@ -254,10 +254,10 @@ final class StandardTagFactory implements TagFactory
{ {
$arguments = []; $arguments = [];
foreach ($parameters as $parameter) { foreach ($parameters as $parameter) {
$class = $parameter->getClass(); $type = $parameter->getType();
$typeHint = null; $typeHint = null;
if ($class !== null) { if ($type instanceof \ReflectionNamedType) {
$typeHint = $class->getName(); $typeHint = $type->getName();
} }
if (isset($locator[$typeHint])) { if (isset($locator[$typeHint])) {