changing from CLI tool (ZF1) to ZendTool (ZF2)

I had some problems testing the new ZF2, one of them being that the zf.sh tool that I had installed was configured to use the old ZF 1.12.

This was my existing version

$ zf show version
Zend Framework Version: 1.11.11

First thing that I did it was to remove the old one:

$ sudo rm /usr/bin/zf
$ sudo rm /usr/bin/zf.sh

// alternatively

$ sudo apt-get remove zf

I already had the new tool installed, but you can install it like this, in the folder of your new project:

composer require zendframework/zftool:dev-master

And then create a system link for it.

sudo ln -s /var/www/rype/vendor/bin/zf.php /usr/local/bin/zf

// this should be the output

$ zf version
ZFTool - Zend Framework 2 command line Tool
The ZFTool is using Zend Framework 2.1.5


About this entry