How to Install Composer on Mac OS (M1, 2020)
You must install php before install composer. You can use php on xampp to install composer.
- Download Composer
You can download composer with your terminal
After running command, you can see the file composer.phar in the current directory.
2. Composer Global
To make it global, all you have to do is move the composer.phar file to /usr/local/bin/composer
mv composer.phar /usr/local/bin/composer
If the composer folder is not found, then you have to create the folder first.
Now, you must setting on your shell profile
sudo nano ~/.zshrc
Add alias composer=”php /usr/local/bin/composer/composer.phar”
After you saving, and restart your terminal. You can you will be able to access composer like below:
composer install
Reference