In the current folder I've installed ZFTool
$ cat composer.json
{
"require" : {
"php" : ">=5.3.3",
"zendframework/zftool": "v0.1.0",
"zendframework/zendframework": "2.4.8"
}
}
$ /opt/lampp/bin/php ./vendor/bin/zf.php version
ZFTool - Zend Framework 2 command line Tool
The application in this folder is using Zend Framework 2.4.8
I try
First install ZF2 and later create project
$ /opt/lampp/bin/php ./vendor/bin/zf.php install zf proj000 2.4.8
The ZF library 2.4.8 has been installed in proj000.
$ /opt/lampp/bin/php ./vendor/bin/zf.php create project proj000
The directory proj000 already exists. You cannot create a ZF2 project here.
I got the right library version but cannot create project.
First create project and later install ZF2
$ /opt/lampp/bin/php ./vendor/bin/zf.php create project proj001
sh: 1: php: not found
PHP Warning: copy(/tmp/composer.phar): failed to open stream: No such file or directory in /PATH/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php on line 85
Warning: copy(/tmp/composer.phar): failed to open stream: No such file or directory in /PATH/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php on line 85
PHP Warning: chmod(): No such file or directory in /PATH/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php on line 87
Warning: chmod(): No such file or directory in /PATH/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php on line 87
ZF2 skeleton application installed in proj001.
In order to execute the skeleton application you need to install the ZF2 library.
Execute: "composer.phar install" in proj001
For more info in proj001/README.md
$ /opt/lampp/bin/php ./vendor/bin/zf.php install zf proj001 2.4.8
The directory proj001 already exists. You cannot install the ZF2 library here.
When i check proj001/composer.json i see, the ZF 2.5 settings are generated
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.5",
"zendframework/zendframework": "~2.5"
}
}
The ZFTool created project with composer.json adapted for ZF 2.5 not ZF 2.4. I cannot use it since I've hosting server with PHP 5.4