Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setup PHP Composer using Brew
Copy link

JohnnyWalkerDesign commented Apr 13, 2017

Why would anyone not want to install PHP 7 if they were installing it for the first time? The speed increase alone makes it preferable.

Copy link

MattWohler commented May 17, 2017

@JohnnyWalkerDesign .. you may be on a work machine working on a legacy app that is running on an older version.

Copy link

JoaoGFarias commented May 23, 2017

Always good use Bash's && command.

ruby -e "$(curl -fsSL" && brew update && brew tap homebrew/dupes && brew tap homebrew/php && brew install php71 && brew install composer && composer -V

Copy link

lacivert commented Aug 29, 2017

I see this warning, is it ok?

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.

Copy link

jonjaques commented Aug 31, 2017

Works fine for me!

Copy link

LucWollants commented Oct 2, 2017

@lacivert they are now managed inside homebrew-core

Copy link

mahmoudissmail commented Oct 12, 2017

@JoaoGFarias Works fine for me!

Copy link

M-Doja commented Nov 21, 2017

just what I was looking for. Thanks

Copy link

nic9075 commented Jan 14, 2018

How exactly is this done with a Windows 10 PC?

Copy link

ckieffer commented Jan 25, 2018

The homebrew/dupes tap was deprecated and its formulae migrated.

@nic9075 see

Copy link

fbiville commented Sep 12, 2018

Now it's simple as brew install php composer.

Copy link

hongttran commented Oct 4, 2019

Now it's simple as brew install php composer.

Still works in October of 2019
Most up to date version of php is 7.3

On Macbook:

brew install php@7.3

Copy link

hendisantika commented Nov 29, 2020

I was installing composer using brew.

But I am having this error:


Do You have any advice?

Thanks a lot

Copy link

NickM101 commented Dec 16, 2020

This Worked for me 😇
You need to edit bash_profile

  1. nano ~/.bash_profile
  2. Copy/paste export PATH=~/.composer/vendor/bin:$PATH
  3. Then run source ~/.bash_profile

Copy link

SandeepN97 commented Jul 17, 2021

should the composer be installed in the project folder or the server folder.
for example, if I am using WAMP64 as a local host inside the www folder of I have my project should I install it in the WAMP64 folder or the project folder like perfect cup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment