composer install example
Example 1: install composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '795f976fe0ebd8b75f26a6dd68f78fd3453ce79f32ecb33e7fd087d39bfeb978342fb73ac986cd4f54edd0dc902601dc') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Example 2: composer don't load class
composer dumpautoload -o
Example 3: upgrade composer
To update composer command just find location of composer.phar and update as:
where composer #Retrieves you location of your composer.phar
cd path_to_composer.phar #Move to directory with composer.phar
php composer.phar self-update #Update your composer
Example 4: composer install
getcomposer.org