I am using the ZFTool 2 to create modules and controllers in my projects. When I try to use it to create an action, I encounter an error.
In the documentation it says the following:
Action creation:
zftool create action <name> <controllerName> <module> [<path>] create an action in a controller
<name> The name of the action to be created
<controllerName> The name of the controller in which the action should be created
<module> The module containing the controller
<path> The root path of a ZF2 application where to create the action
So I entered the following into Terminal:
zftool create action test Index Mymodule my-project-root
I get the following (not that helpful) error message back:
Reason for failure: Invalid arguments or no arguments provided
I also tried it like this, with the same result:
zftool create action testAction IndexController Mymodule my-project-root
Am I doing something wrong here? Why is my action not created? What arguments are invalid?
EDIT
As suggested in the comments I also tried to create the action after changing into the project root to make sure the path is not the problem. I got the following error message:
Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (ZFTool) could not be initialized.' in /Applications/AMPPS/www/myProject/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:189