Download Composer Latest: v1.9.3

To quickly install Composer in the current directory, run the following script in your terminal. To automate the installation, use the guide on installing Composer programmatically.

php -r "copy('https://mirror.telkomuniversity.ac.id/apps/getcomposer/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

This installer script will simply check some php.ini settings, warn you if they are set incorrectly, and then download the latest composer.phar in the current directory. The 4 lines above will, in order:

  • Download the installer to the current directory
  • Verify the installer SHA-384, which you can also cross-check here
  • Run the installer
  • Remove the installer

WARNING: Please do not redistribute the install code. It will change with every version of the installer. Instead, please link to this page or check how to install Composer programmatically.

Installer Options

--install-dir

You can install composer to a specific directory by using the --install-dir option and providing a target directory. Example:

php composer-setup.php --install-dir=bin

--filename

You can specify the filename (default: composer.phar) using the --filename option. Example:

php composer-setup.php --filename=composer

--version

You can install composer to a specific release by using the --version option and providing a target release. Example:

php composer-setup.php --version=1.0.0-alpha8

Preview / Snapshot Releases

By default the installer and composer self-update will download stable versions only. If you would like to help test pre-release versions you can use the --preview flag on either installer or self-update. For snapshot builds which are done from the latest Composer commit, you can use the --snapshot flag.

Manual Download

If you prefer to download the phar manually, here are the available versions:

Latest Snapshot
Latest Stable