Reputation: 489
I'm creating a new application in Zend Framework 3 and I have a question about zftool. Is zftool works with zend framework 3? Because I have googled and found that zend framework 3 does not supports zftool.
If zend framework does not support zftool then how we can create modules?
Another issue: I have installed zend framework 3 using composer. Here is my composer.json file...
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for Zend Framework zend-mvc applications",
"type": "project",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"mvc",
"zf"
],
"homepage": "http://framework.zend.com/",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-component-installer": "^1.0 || ^0.3 || ^1.0.0-dev@dev",
"zendframework/zend-mvc": "^3.0.1",
"zfcampus/zf-development-mode": "^3.0",
"zendframework/zend-cache": "^2.7.1",
"zendframework/zend-db": "^2.8.1",
"zendframework/zend-json": "^3.0",
"zendframework/zend-log": "^2.9",
"zendframework/zend-mvc-console": "^1.1.10",
"zendframework/zend-session": "^2.7.1",
"doctrine/doctrine-orm-module": "^1.1"
},
"autoload": {
"psr-4": {
"User\\": "module/User/src/",
"Application\\": "module/Application/src/"
}
},
"autoload-dev": {
"psr-4": {
"ApplicationTest\\": "module/Application/test/"
}
},
"extra": [],
"scripts": {
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"development-disable": "zf-development-mode disable",
"development-enable": "zf-development-mode enable",
"development-status": "zf-development-mode status",
"post-create-project-cmd": [
"@development-enable"
],
"serve": "php -S 0.0.0.0:8080 -t public/ public/index.php",
"test": "phpunit"
},
"require-dev": {
"zendframework/zend-developer-tools": "^1.1.0",
"zendframework/zend-test": "^3.0.1"
}
}
When I uses echo zend_version();
method it show result 2.6.0. So I am confuse that which zend version I am using?
Do you have any suggestion about this?
Thank You!
Upvotes: 2
Views: 1395
Reputation:
Additions to what narf said:
Since the 2.5 release, the zendframework package has been essentially a "metapackage", defining no code, and only dependencies on the various component packages: https://docs.zendframework.com/tutorials/migration/to-v3/application/.
The recommended way is installing only the packages you need (which you are already doing). Hence there is no real zendframework version 3.0. Only individual packages have versions. All packages have been updated to work with zend-mvc 3, zend-servicemanager 3 and zend-eventmager 3. Those packages with braking changes had their version incremented to 3.x. Others still have the 2.x version.
The zend_version()
function you are using is displaying the PHP zend engine version, not from the framework.
Upvotes: 2
Reputation: 14752
Is zftool works with zend framework 3? Because I have googled and found that zend framework 3 does not supports zftool.
I suppose zftool will be updated in the future to support ZF3, but until then ... If you've found out yourself that it is not supported yet, then you already have an answer to that question.
If zend framework does not support zftool then how we can create modules?
There's a tutorial ZF3 docs site, showing this: https://docs.zendframework.com/tutorials/getting-started/modules/
This is the problem with over-reliance on tools - they are there to help, not to do all the work. You should learn how to do such things by yourself.
When I uses echo
zend_version();
method it show result 2.6.0. So I am confuse that which zend version I am using?
zend_version() is a core PHP function, not a Zend Framework function.
2.6.0 basically means that you're running PHP 5.6.
Upvotes: 1