8000 Fix PHP 8 deprecations · Jeroeny/symfony@3db0684 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 3db0684

Browse files
Fix PHP 8 deprecations
1 parent 207b0b5 commit 3db0684

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ private function createContextListener($container, $contextKey, $logoutUserOnCha
520520
return $this->contextListeners[$contextKey] = $listenerId;
521521
}
522522

523-
private function createAuthenticationListeners($container, $id, $firewall, &$authenticationProviders, $defaultProvider = null, array $providerIds, $defaultEntryPoint, $contextListenerId = null)
523+
private function createAuthenticationListeners($container, $id, $firewall, &$authenticationProviders, $defaultProvider, array $providerIds, $defaultEntryPoint, $contextListenerId = null)
524524
{
525525
$listeners = [];
526526
$hasListeners = false;

src/Symfony/Component/DependencyInjection/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
}

src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ private function typeMatchesRequestClass(\ReflectionParameter $param, Request $r
274274
return false;
275275
}
276276

277-
$class = new \ReflectionClass(method_exists($type, 'getName') ? $type->getName() : (string) $type);
277+
$class = new \ReflectionClass($type instanceof \ReflectionNamedType ? $type->getName() : (string) $type);
278278

279279
return $class && $class->isInstance($request);
280280
}

src/Symfony/Component/OptionsResolver/OptionsResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,6 @@ private function getParameterClassName(\ReflectionParameter $parameter)
10801080
return null;
10811081
}
10821082

1083-
return method_exists($type, 'getName') ? $type->getName() : (string) $type;
1083+
return $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type;
10841084
}
10851085
}

0 commit comments

Comments
 (0)
0