forked from deblan/t411-console
commands loading issue
This commit is contained in:
parent
0627e50034
commit
1ef5cff8c0
7
console
7
console
|
@ -7,7 +7,6 @@ use Console\Application;
|
||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
|
||||||
$app
|
$app->chdir(__DIR__);
|
||||||
->chdir(__DIR__)
|
$app->loadCommands();
|
||||||
->loadCommands()
|
$app->run();
|
||||||
->run();
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Application extends BaseApplication
|
||||||
{
|
{
|
||||||
foreach ($this->commandsPaths as $path => $namespace) {
|
foreach ($this->commandsPaths as $path => $namespace) {
|
||||||
$finder = new Finder();
|
$finder = new Finder();
|
||||||
$finder->files('*Command.php')->in($path);
|
$finder->name('*Command.php')->in($path);
|
||||||
|
|
||||||
foreach ($finder as $file) {
|
foreach ($finder as $file) {
|
||||||
$className = $namespace.'\\'.str_replace('.php', '', $file->getFilename());
|
$className = $namespace.'\\'.str_replace('.php', '', $file->getFilename());
|
||||||
|
|
Loading…
Reference in a new issue