Thursday, March 21, 2013

PHP ZF2 ZfcUser Installation. How composer is using git on a portable USB drive

This tutorial is an extension to my previous tutorial PHP Composer. How to install and use on a portable USB device. ZF2, Doctrine 2 ORM. I am using composer together with git to install ZfcUser module on a portable device also. In fact the most interesting part is how to allow composer to use git to clone modules.

Note: Before we even start I want to compare the files and folders in ./vendor to ./vendor in the phpcloud.com. I want to see what do I get i phpclod.com.

1) Correct the composer.json in the project folder. Add

    "require": {
...
"zf-commons/zfc-user": "dev-master"
    }

Note: You don't have to add the dependancies ZfcBase
2) The changed file
3) Note: Do composer "composer update -d C:\projects_composer\zf2-tutorial". I will get error. We have to add the path to git.exe
4) Note: pay attention to the comas in JSON
5) Note: Try to set the path to git.exe. Even if git works (e.g. "git --help") composer still can not use it
6) The right way to add the path. DO THIS.
7) Now we can install ZfcUser (composer will take care of all dependencies - e.g. ZfcBase)
8) Add the ZfcBase and ZfcUser to application.config.php
9) Create a file database.local.php
10) Import the DB.


11) Access the landing page


Note: Example of another way to install modules, not with "composer".

1 comment:

  1. I am very inspired to read your blog. I hope you would provide the great services in the field of website design and PHP Web development. I hope it will be very helpful for all.
    Dedicated php developer | Laravel development company

    ReplyDelete