diff --git a/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php b/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php index 134dc2f..1e516e2 100644 --- a/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php +++ b/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php @@ -83,7 +83,7 @@ class AutoPrefixNamespaceManager implements IAutoPrefixManager { $commandClass = new ReflectionClass($command); $commandNamespace = '\\' . $commandClass->getNamespaceName(); - if ($commandNamespace !== $this->getNamespace() && mb_substr($commandNamespace, mb_strlen($this->getNamespace() . '\\')) !== $this->getNamespace() . '\\') { + if ($commandNamespace !== $this->getNamespace() && mb_substr($commandNamespace, 0, mb_strlen($this->getNamespace() . '\\')) !== $this->getNamespace() . '\\') { return null; } return implode(