composer init code example
Example 1: composer autoload dump
composer dump-autoload
Example 2: composer clear cache
$ composer clearcache
Example 3: composer update
php composer.phar update
Example 4: composer install without dependencies
composer install --ignore-platform-reqs
Example 5: upgrade composer
To update composer command just find location of composer.phar and update as:
where composer
cd path_to_composer.phar
php composer.phar self-update
Example 6: composer install package with specific version
composer require PACKAGE_NAME "PACKAGE_VERSION"