-
git clone the ZF2 Skeleton Application
git clone git://github.com/zendframework/ZendSkeletonApplication.git
-
cd into the ZendSkeletonApplication directory and open the composer.json in your favourite text editor.
{ "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.*", "doctrine/doctrine-mongo-odm-module": "dev-master" } }
-
Update your composer.json and run
php composer.phar self-update php composer.phar install
-
If you are success with installing all dependencies using composer follow the official guide here to set up virtual-host and update hosts file.
-
If you are unable to update those dependencies and found something similar to this,
Check your composer.json for any mistakes, or follow my previous blog post.
-
Add the doctrine modules to your config file, config/application.config.php. Update the modules array similar to this, here im adding zend module named course as well.
'modules' => array( 'Application', 'Course', 'DoctrineModule', 'DoctrineMongoODMModule', ),
-
Copy the doctrine-odm config file to your config directory, and update according to your environment.This is where you set your server hosts, ports, username, and passwords etc.
cp vendor/doctrine/doctrine-mongo-odm-module/config/module.doctrine-mongo-odm.local.php.dist config/module.doctrine-mongo-odm.local.php
and update,
- You can try the course module I have created here with course add and retrieve course data.