yannoff/console

Error when application invoked without command

yannoff opened this issue · 1 comments

Actual behavior:
When invoking the application script without passing a command name, an exception raise.

yannoff@laptop:/www/yannoff/console (master) $ bin/demo 
PHP Fatal error:  Uncaught RuntimeException: Command with name "" not found by the application. in /www/yannoff/console/src/Application.php:190
Stack trace:
#0 /www/yannoff/console/src/Application.php(128): Yannoff\Component\Console\Application->get(NULL)
#1 /www/yannoff/console/bin/demo(26): Yannoff\Component\Console\Application->run()
#2 {main}
  thrown in /www/yannoff/console/src/Application.php on line 190
yannoff@laptop:/www/yannoff/console (master) $ 

Expected behavior:
Command-less invocation should display usage/help message.

Fixed by #2