I understand zend-mvc-console is deprecated. Usage of zend-console is encouraged. According to the official current docs MVC-integration is still possible. So I followed the docs and just added console config im my
return [ 'router' => [ 'routes' => [ // HTTP routes are defined here ], ], 'console' => [ 'router' => [ 'routes' => [ 'foo' => [ 'options' => [ 'route' => 'foo', 'defaults' => [ 'controller' => Foo\Controller\Index::class, 'action' => 'index', ], ], ], ], ], ], /* ... */ ];
However: Whatever I enter in the terminal (
$ php public/index.php foo or just
$ php public/index.php,
$ php7.2 public/index.php doesn’t help either) it doesn’t matter index,php just always prints out HTML-Code into my terminal as if I would enter
http://localhost/fooapp/public/ (with successful Code 200) in my browser.
I’m really getting desperate, why doesn’t it work? What’s missing? Glad for any helpful hint or link.