0

The ZFTool isn't working (anymore) on my Debian VM.

$ which zf
/usr/local/bin/zf
$ ls -lia /usr/local/bin/ | grep "zf"
... zf -> /usr/share/.composer/vendor/bin/zf.php
$ cd /usr/share/.composer
$ composer info | grep "zftool"
zendframework/zftool  v0.1.0  Utility module for Zend Framework 2 applications.
$ echo $COMPOSER_HOME
/usr/share/.composer

Now when I start it:

$ zf create module Foo
OR
$ $COMPOSER_HOME/vendor/bin/zf.php create module Foo
OR
$ php $COMPOSER_HOME/vendor/bin/zf.php create module Foo

I get this error:

Reason for failure: Invalid arguments or no arguments provided

So I cannot run the ZFTool jobs like config, classmap generate etc.

What is the issues caused by and how to get the ZFTool working?

automatix
  • 14,018
  • 26
  • 105
  • 230

1 Answers1

0

You're simply providing incorrect arguments as it says. That error is coming from withing ZF2 so you're triggering it, but there's There's no -h option.

try

./vendor/zendframework/zftool/zf.php

or

./vendor/bin/zf.php

no arguments and from within your root directory, you'll get a list of options.

Andrew
  • 12,617
  • 1
  • 34
  • 48
  • Thank you for your answer! Your are right, there is no parameter `-h`. I've just edited the question and replaced the `-h` by `create module Foo`. But the issue is remaining the same. – automatix Nov 14 '16 at 10:10
  • Just installed ZFTool locally and tried it out, as you suggested. Both attempts (`./vendor/zendframework/zftool/zf.php create module Foo` and `./vendor/bin/zf.php create module Foo`) failed: `Reason for failure: Invalid arguments or no arguments provided`. – automatix Nov 14 '16 at 10:46
  • if you pass no parameters do you get a list of options? – Andrew Nov 14 '16 at 13:41
  • Yes, I get it (and the `Reason for failure ...` under it) always -- with and also without parameters. – automatix Nov 14 '16 at 14:17
  • seems like an issue with the cli roots, have you written any code that overrides the default zftool routes maybe? – Andrew Nov 17 '16 at 11:57
  • Hm... Actually not. I didn't define any CLI routes in this project. – automatix Nov 20 '16 at 10:47