I chose CakePHP as the framework I wanted to test. (Reasons in another post.) Both Laravel and CakePHP strongly suggest installation with Composer. That’s a dependency manager for installing PHP applications. I use brew as my package manager for OS X. I’m thinking “use brew to install composer and we’re done”. Well, not so fast.
Using brew to install composer globally does not appear to work, since brew includes some version of PHP as a dependency to install composer. I already have the stock version of PHP installed on this box. Brew won’t recognize it as part of its install, which makes sense.
It’s possible to install composer locally into a project directory. I don’t want to keep installing composer locally on each project directory that I need to create
. The composer installation instructions say that composer can be installed globally and then update the PATH variable to include the composer directory. Brew is supposed to handle that. If I’m going to stick with brew, then I should keep using it.
A google search finds two options: installing php along with composer or installing composer without dependencies. I don’t like the idea of installing php again. I could go the whole MAMP route if I’m going to install php again and it would be easier. I’m going to try installing composer without dependencies and see what happens.
update 1: it did not work
I’m going to tap into additional formularies to see if that works. I’m going to try
>brew tap homebrew/homebrew-php
>brew tap homebrew/dupes
>brew tap homebrew/versions
and see it works.
update 2. This seems to have worked
> composer –version
> Composer version 1.0.0-alpha0 2014-12-07 17:15:20