From 20cc9b96694d5756e3b8254a5e74cdeba02c5774 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 16 Apr 2010 13:19:23 -0400 Subject: [PATCH] Changing how command names are parsed to allow multiple levels of namespaces --- src/Symfony/Components/Console/Application.php | 2 +- src/Symfony/Components/Console/Command/Command.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Components/Console/Application.php b/src/Symfony/Components/Console/Application.php index 0c93c814d8f2..0596a7b83cdb 100644 --- a/src/Symfony/Components/Console/Application.php +++ b/src/Symfony/Components/Console/Application.php @@ -496,7 +496,7 @@ public function findCommand($name) { // namespace $namespace = ''; - if (false !== $pos = strpos($name, ':')) + if (false !== $pos = strrpos($name, ':')) { $namespace = $this->findNamespace(substr($name, 0, $pos)); $name = substr($name, $pos + 1); diff --git a/src/Symfony/Components/Console/Command/Command.php b/src/Symfony/Components/Console/Command/Command.php index adca4d895c4f..e14fcc84f81b 100644 --- a/src/Symfony/Components/Console/Command/Command.php +++ b/src/Symfony/Components/Console/Command/Command.php @@ -282,7 +282,7 @@ public function addOption($name, $shortcut = null, $mode = null, $description = */ public function setName($name) { - if (false !== $pos = strpos($name, ':')) + if (false !== $pos = strrpos($name, ':')) { $namespace = substr($name, 0, $pos); $name = substr($name, $pos + 1);