diff --git a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php
index 5022180e77..988df98c5b 100644
--- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php
+++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php
@@ -21,6 +21,11 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface
     public function createArgumentMetadata(string|object|array $controller, \ReflectionClass $class = null, \ReflectionFunctionAbstract $reflection = null): array
     {
         $arguments = [];
+        if (\is_array($controller)) {
+            $reflection = new \ReflectionMethod($controller[0], $controller[1]);
+            $class = $reflection->class;
+        }
+
 
         if (null === $reflection) {
             $reflection = new \ReflectionFunction($controller(...));
