I have just started to explore zf2 and trying to install modules. have downloaded zip for ZfcAdmin and ZfcUser and added them manually but no luck. I think it can be installed by using composer.phar but how I have skeleton application running perfectly.
I know php composer.phar self-update / install but how to write composer.json is my question
You open the
composer.jsonfile with a text-editor of your choice. Then you’ll be able to see the json formatted data, that will be passed tocomposer.pharIf you wish to add new modules, you’ll see the
require: {}block, to which you simply add the namespaces/modules you wish to include. For example extend yourcomposer.jsonto something like this:Seeing this i install both
zend-developer-toolsandzendframeworkfrom thezendframeworkGit-Repositories and additionally i installdoctrine-orm-modulefromdoctrine-repository.A little catch: Some repositories / modules are under heavy development and there will be no stable version yet. Personally i run with the additional parameter
"minimum-stability": "alpha",to tell composer to include all alpha repositories for downloading.If you just need a single alpha-version, you’d much likely need to re-write the
composer.jsona couple of times.Last but not least,
php composer.phar updatewill do the trick and you’ll always be up to date with the repositories.Some additional notes for windows users
PATHHope this gets you running 😉