Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

Information below covers what you need to know about most composer. Note: If you have installed composer globally then you can use composer instead of php composer.phar.


Facts



Add a new dependency


Adding a new dependency into composer.json with command line and install it.


php composer.phar require (or require --dev) inanzzz/inanzzz-bundle: 1.1.1 

Install manually added dependency


Installing a package which was added to composer.json manually.


php composer.phar update inanzzz/inanzzz-bundle

First time installation


Installing project first time.


php composer.phar install

Remove an existing dependency


Removing a dependency which exists in composer.json.


php composer.phar remove inanzzz/inanzzz-bundle

Remove a non-existing dependency


Removing a dependency which doesn't exist in composer.json.


php composer.phar update inanzzz/inanzzz-bundle

Remove composer cache


rm -rf ~/.composer/

Update composer itself


php composer.phar self update