Installing Composer on Mac os X

If you’re a web-developer like me, you probably work alot with either Symfony, Laravell, or Composer; and getting composer to work on a new installation of Mac os X can be quite tricky.

There are a few methods of installing composer onto your mac os x, one of the prefered ways would be to use homebrew, but it requires xcode and xcode command-line-tools and from experience, often breaks when os x / xcode updates.
Anyway, I wrote a simple script for installing composer and adding an alias to the bash-profile within os x.


It appears that ‘copy’ is no longer useable, please replace it with ‘cp’ instead.
And the alias seems a bit funky when adding it to the ~./bash_profile, just edit the bash_profile and source the profile again, reload the terminal and it will work.

Download the script, make it executable and execute the script.
Restart the terminal, and now you can access composer as a “program”.

Update 2!

I would advise using homebrew for installing composer, as it does these things for you.

Leave a Reply

Your email address will not be published. Required fields are marked *