Hello, this is my first post, so bear with me. :)
We're working with a HMVC architecture, and a solid bootstraping platform above phalcon's bootstrapping process. I'm currently trying to get the application to be environment call agnostic, and respond to web calls and CLI calls. What I stumbled on, is this error:
php index.php cms cron backup session
Invalid module definition path in file phalcon/cli/console.zep on line 190
0 /www/tmd/stormy/public/core/classes/Loader/Loader.php(135): Phalcon\Cli\Console->handle(Array)
1 /www/tmd/stormy/public/index.php(16): TMD\Core\Loader->handle()
2 {main}%
Which I thought was strange, since this is what's on that line:
let module = modules[moduleName];
if typeof module != "array" {
throw new Exception("Invalid module definition path");
}
The modules array I'm passing is an array of callbacks, which is working fine in the regular web call, and the \Phalcon\Mvc\Application.
tl;dr: Why should I pass the module callbacks as an array when I'm in a console call? Is this check needed at all? If it is - why?