Fix PHP 8 deprecations
This commit is contained in:
parent
207b0b5996
commit
3db0684037
|
@ -520,7 +520,7 @@ class SecurityExtension extends Extension
|
|||
return $this->contextListeners[$contextKey] = $listenerId;
|
||||
}
|
||||
|
||||
private function createAuthenticationListeners($container, $id, $firewall, &$authenticationProviders, $defaultProvider = null, array $providerIds, $defaultEntryPoint, $contextListenerId = null)
|
||||
private function createAuthenticationListeners($container, $id, $firewall, &$authenticationProviders, $defaultProvider, array $providerIds, $defaultEntryPoint, $contextListenerId = null)
|
||||
{
|
||||
$listeners = [];
|
||||
$hasListeners = false;
|
||||
|
|
|
@ -528,7 +528,7 @@ class AutowirePass extends AbstractRecursivePass
|
|||
if (method_exists($parameter, 'getType')) {
|
||||
$type = $parameter->getType();
|
||||
if ($type && !$type->isBuiltin()) {
|
||||
$class = new \ReflectionClass(method_exists($type, 'getName') ? $type->getName() : (string) $type);
|
||||
$class = new \ReflectionClass($type instanceof \ReflectionNamedType ? $type->getName() : (string) $type);
|
||||
} else {
|
||||
$class = null;
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve
|
|||
return false;
|
||||
}
|
||||
|
||||
$class = new \ReflectionClass(method_exists($type, 'getName') ? $type->getName() : (string) $type);
|
||||
$class = new \ReflectionClass($type instanceof \ReflectionNamedType ? $type->getName() : (string) $type);
|
||||
|
||||
return $class && $class->isInstance($request);
|
||||
}
|
||||
|
|
|
@ -1080,6 +1080,6 @@ class OptionsResolver implements Options
|
|||
return null;
|
||||
}
|
||||
|
||||
return method_exists($type, 'getName') ? $type->getName() : (string) $type;
|
||||
return $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue