composer self-update
#install packages.
composer install
#update all packages
composer.phar update
# update a few packages
update vendor/package vendor/package2
# use wildcards to update a bunch of packages
update vendor/*
# add new packages
require vendor/package:2.* vendor/package2:dev-master
# with version
php composer.phar require doctrine/mongodb-odm-bundle 3.0
composer require refinery29/test-util:0.10.2
# use caret operator in version number
composer require middlewares/whoops "^0.4"
[remove package]
remove vendor/package vendor/package2
# remove with version
php composer.phar remove guzzlehttp/guzzle 6.3.0
# show package version
composer show package_name