From a28e3b61f61c4c0bb9a2c8fd765ce2898104eb48 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Tue, 4 Dec 2018 11:46:34 +0100 Subject: [PATCH] [Form] Shortcut debug:form for partial type name --- src/Symfony/Component/Form/Command/DebugCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Component/Form/Command/DebugCommand.php b/src/Symfony/Component/Form/Command/DebugCommand.php index 6daaf793b7..87924092ed 100644 --- a/src/Symfony/Component/Form/Command/DebugCommand.php +++ b/src/Symfony/Component/Form/Command/DebugCommand.php @@ -158,6 +158,12 @@ EOF foreach ($this->namespaces as $namespace) { if (class_exists($fqcn = $namespace.'\\'.$shortClassName)) { $classes[] = $fqcn; + } elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName))) { + $classes[] = $fqcn; + } elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName).'Type')) { + $classes[] = $fqcn; + } elseif ('type' === substr($shortClassName, -4) && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) { + $classes[] = $fqcn; } }