Skip to content

Commit ac90a26

Browse files
committed
[Form] Shortcut debug:form for partial type name
1 parent 0cd8a24 commit ac90a26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Command/DebugCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ private function getFqcnTypeClass(InputInterface $input, SymfonyStyle $io, $shor
158158
foreach ($this->namespaces as $namespace) {
159159
if (class_exists($fqcn = $namespace.'\\'.$shortClassName)) {
160160
$classes[] = $fqcn;
161+
} elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName))) {
162+
$classes[] = $fqcn;
163+
} elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName).'Type')) {
164+
$classes[] = $fqcn;
165+
} elseif ('type' === substr($shortClassName, -4) && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) {
166+
$classes[] = $fqcn;
161167
}
162168
}
163169

0 commit comments

Comments
 (0)