From 0c0a3e90e79b63215707ae7e92193f511cc0ec77 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 11 Jun 2013 09:34:22 +0200 Subject: [PATCH] [Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245) --- src/Symfony/Component/Console/Application.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index d4ad03a02f..9b2a9b63c8 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -573,6 +573,10 @@ class Application return $this->get($abbrevs[$searchName][0]); } + if (isset($abbrevs[$searchName]) && in_array($searchName, $abbrevs[$searchName])) { + return $this->get($searchName); + } + if (isset($abbrevs[$searchName]) && count($abbrevs[$searchName]) > 1) { $suggestions = $this->getAbbreviationSuggestions($abbrevs[$searchName]);