Skip to content

Commit

Permalink
Merge pull request #682 from wturrell/patch-1
Browse files Browse the repository at this point in the history
Composer - safer download, installation
  • Loading branch information
philsturgeon committed Oct 6, 2016
2 parents 566ac01 + ed5686f commit f1b3aee
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions _posts/04-02-01-Composer-and-Packagist.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ There are already a lot of PHP libraries that are compatible with Composer, read

### How to Install Composer

You can install Composer locally (in your current working directory) or globally (e.g. /usr/local/bin, recommended).
Let's assume you want to install Composer globally:
The safest way to download composer is by [following the official instructions](https://getcomposer.org/download/).
This will verify the installer is not corrupt or tampered with.
The installer installs Composer *locally*, in your current working directory.

We recommend installing it *globally* (e.g. a single copy in /usr/local/bin) - to do so, run this afterwards:

{% highlight console %}
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
{% endhighlight %}

**Note:** If the above fails due to permissions, run the `mv` line again with `sudo`.

This will download `composer.phar` (a PHP binary archive). You can run this with `php` to manage your project
dependencies.
**Note:** If the above fails due to permissions, prefix with `sudo`.

**Please Note:** If you pipe downloaded code directly into an interpreter, please read the
code online first to confirm it is safe.
To run a locally installed Composer you'd use `php composer.phar`, globally it's simply `composer`.

#### Installing on Windows

Expand Down

0 comments on commit f1b3aee

Please sign in to comment.