Skip to content

Instantly share code, notes, and snippets.

@frederick-greenacademy
Last active June 29, 2021 08:28
Show Gist options
  • Save frederick-greenacademy/850529108943e882d6c190e9892a68cc to your computer and use it in GitHub Desktop.
Save frederick-greenacademy/850529108943e882d6c190e9892a68cc to your computer and use it in GitHub Desktop.
Best practices installing Composer on Mac

Composer is a PHP tool to manage dependencies in your PHP project. Using simple commands you can add, update or remove the dependencies

need brew installed on mac before

then,

brew install composer

Make sure composer was installed successful

composer --version

Continue download directly from the composer website https://getcomposer.org/composer.phar

After getting it, open your terminal to test it

php ~/Downloads/composer.phar --version

Then run command to copy composer.phar to bin and makes your composer executable cp ~/Downloads/composer.phar /usr/local/bin/composer sudo chmod +x /usr/local/bin/composer

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