From 1ef5cff8c08bd2eafb4ce83b820ccc7fb1b1e540 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 16 Feb 2015 23:56:53 +0100 Subject: [PATCH] commands loading issue --- console | 7 +++---- src/Console/Application.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/console b/console index fa3fe68..f682396 100755 --- a/console +++ b/console @@ -7,7 +7,6 @@ use Console\Application; $app = new Application(); -$app - ->chdir(__DIR__) - ->loadCommands() - ->run(); +$app->chdir(__DIR__); +$app->loadCommands(); +$app->run(); diff --git a/src/Console/Application.php b/src/Console/Application.php index d31ce38..f32bba6 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -29,7 +29,7 @@ class Application extends BaseApplication { foreach ($this->commandsPaths as $path => $namespace) { $finder = new Finder(); - $finder->files('*Command.php')->in($path); + $finder->name('*Command.php')->in($path); foreach ($finder as $file) { $className = $namespace.'\\'.str_replace('.php', '', $file->getFilename());