Skip to content

Commit 3a0a2ac

Browse files
committed
fixed deprecated ReflectionType::__toString()
1 parent 486a4e8 commit 3a0a2ac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Maker/MakeAuthenticator.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,12 @@ public function configureDependencies(DependencyBuilder $dependencies, InputInte
403403
private function providerKeyTypeHint(): string
404404
{
405405
$reflectionMethod = new \ReflectionMethod(AbstractFormLoginAuthenticator::class, 'onAuthenticationSuccess');
406-
$typeHint = (string) $reflectionMethod->getParameters()[2]->getType();
407-
if ($typeHint) {
408-
$typeHint .= ' ';
406+
$type = $reflectionMethod->getParameters()[2]->getType();
407+
408+
if (!$type instanceof \ReflectionNamedType) {
409+
return '';
409410
}
410411

411-
return $typeHint;
412+
return sprintf('%s ', $type->getName());
412413
}
413414
}

0 commit comments

Comments
 (0)