Install Composer.phar locally
If you do not have a composer built-in to your computer, you can install it locally in the project.
Installing Composer locally is simply starting the installer in your project directory ( https://getcomposer.org/doc/00-intro.md ).
curl -sS https://getcomposer.org/installer | php
Note If for some reason you cannot do this, you can download the installer instead of php:
php -r "readfile('https://getcomposer.org/installer');" | php
Install ZF2
git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive cd ZendSkeletonApplication php composer.phar self-update php composer.phar install
Install ZFTools (installation using Composer )
php composer.phar require zendframework/zftool:dev-master php composer.phar install
Create a symbolic link
zf.php (Zend Tool) will be installed in the / bin provider folder. You can run it with php vendor / bin / zf.php.
ln -s vendor/zendframework/zftool/zf2.bat zftools chmod +x zftools ./zftools
In this case, I prefer a symlink, to update the zftools repository I no longer need to copy the file.
Without installation using a PHAR file
Another alternative to using ZF tools without creating scripts or aliases and downloading the PHAR format.
wget https://packages.zendframework.com/zftool.phar --no-check-certificate php zftool.phar version ZFTool - Zend Framework 2 command line Tool The ZFTool is using Zend Framework 2.2.4
Or you can download zftool.phar and use it.
Note 1: @ akond's answer is very good, I just present an alternative answer that I like to use.
Note 2: This example was run on a Windows machine using cygwin.
Good installation tutorial (ZF2 and ZF3)
Getting started: skeletal application
Ref:
Zend Framework Tool (ZFTool)