commands loading issue

This commit is contained in:
Simon Vieille 2015-02-16 23:56:53 +01:00
parent 0627e50034
commit 1ef5cff8c0
2 changed files with 4 additions and 5 deletions

View file

@ -7,7 +7,6 @@ use Console\Application;
$app = new Application();
$app
->chdir(__DIR__)
->loadCommands()
->run();
$app->chdir(__DIR__);
$app->loadCommands();
$app->run();

View file

@ -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());