Skip to content

Commit 34490f3

Browse files
committed
register commands from kernel when accessing list
1 parent 9a51db6 commit 34490f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Application.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public function has($name)
436436
public function getNamespaces()
437437
{
438438
$namespaces = array();
439-
foreach ($this->commands as $command) {
439+
foreach ($this->all() as $command) {
440440
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName()));
441441

442442
foreach ($command->getAliases() as $alias) {
@@ -530,7 +530,7 @@ public function find($name)
530530

531531
// name
532532
$commands = array();
533-
foreach ($this->commands as $command) {
533+
foreach ($this->all() as $command) {
534534
$extractedNamespace = $this->extractNamespace($command->getName());
535535
if ($extractedNamespace === $namespace
536536
|| !empty($namespace) && 0 === strpos($extractedNamespace, $namespace)
@@ -556,7 +556,7 @@ public function find($name)
556556

557557
// aliases
558558
$aliases = array();
559-
foreach ($this->commands as $command) {
559+
foreach ($this->all() as $command) {
560560
foreach ($command->getAliases() as $alias) {
561561
$extractedNamespace = $this->extractNamespace($alias);
562562
if ($extractedNamespace === $namespace
@@ -1028,7 +1028,7 @@ private function findAlternativeCommands($name, $abbrevs)
10281028
return $item->getName();
10291029
};
10301030

1031-
return $this->findAlternatives($name, $this->commands, $abbrevs, $callback);
1031+
return $this->findAlternatives($name, $this->all(), $abbrevs, $callback);
10321032
}
10331033

10341034
/**

0 commit comments

Comments
 (0)