Composer: use private repositories from GitHub

Unfortunately not all your packages can be open source. Some companies don’t join the “open source train” while other packages must remain private for other reasons. These packages can be used in several projects and it would be lovely to use it just like any other package. Off course you use the private version of packagist but that’s a bit expensive (starting at 49 euro per month) and just isn’t necessary.

Continue reading “Composer: use private repositories from GitHub”

OS X: install composer

One of the first thing to install for PHP development is Composer. The installation is pretty much straight forward, but it’s not available globally after installation.

Installing composer

  1. Download composer:
    url -sS | php
  2. Move the the bin folder:
    mv composer.phar /usr/local/bin/composer.phar

Enable globally

  1. Edit .bash_profile with the editor of your choice (nano, vim, etc.)
  2. Add:
    alias composer="php /usr/local/bin/composer.phar"
  3. Close terminal and open again

After this, Composer is available globally.