Zend Framework 2 (ZF2) has finally reached stable. just a few weeks after starting a new project where I plan hitch the NoSQL bandwagon and tryout MongoDB. reading this particular FAQ on Zend Framework’s website..
We currently plan to fully support Zend Framework 1 until at least early 2014, including maintenance and security updates.
I guess I better start learning the latest version of this Framework. okay here goes.
- Same as the previous version of ZF, we need to setup the VirtualHost..
<VirtualHost *:80>
ServerAdmin me@bigwisu.com
ServerName zf2odm.local
DocumentRoot /Users/wisu/Sites/zf2odm/public
<Directory "/Users/wisu/Sites/zf2odm/public">
allow from all
Options +Indexes
</Directory>
SetEnv APPLICATION_ENV "development"
ErrorLog "logs/zf2odm-error_log"
CustomLog "logs/zf2odm-access_log" common
</VirtualHost>
- Get the ZF2 Skeleton
$ cd /path/to/zf2/project
$ git clone git://github.com/zendframework/ZendSkeletonApplication.git .
- Edit the composer.json file, my setup looks like this
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"minimum-stability": "dev",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.0.2",
"doctrine/doctrine-mongo-odm-module": "dev-master"
}
}
You must specify “minimum-stability” to dev, and add the “doctrine/doctrine-mongo-odm-module” repository. the default zendframework 2.* does not install. forcing version 2.0.2 seems to do the trick.. after editing, simply run
Continue reading