From 635d63ebf71a925b306ba050d213c66cc4720061 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 28 Jun 2016 16:35:32 +0100 Subject: [PATCH] Add instructions on how to install from an exact version of the installer instead --- doc/faqs/how-to-install-composer-programmatically.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/faqs/how-to-install-composer-programmatically.md b/doc/faqs/how-to-install-composer-programmatically.md index dca4792a7..0d49db6fe 100644 --- a/doc/faqs/how-to-install-composer-programmatically.md +++ b/doc/faqs/how-to-install-composer-programmatically.md @@ -28,3 +28,15 @@ fi The script will exit with 1 in case of failure, or 0 on success, and is quiet if no error occurs. + +Alternatively if you want to rely on an exact copy of the installer you can fetch +a specific version from github's history. The commit hash should be enough to +give it uniqueness and authenticity as long as you can trust the GitHub servers. +For example: + +```bash +wget https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer -O - -q | php -- --quiet +``` + +You may replace the commit hash by whatever the last commit hash is on +https://github.com/composer/getcomposer.org/commits/master \ No newline at end of file