Step-by-step – PHP Composer Mac Catalina Installation Guide

Downloading

  1. Then Download PHP Composer
    Here is described a System wide Installation, for a Local one adapt the commands accordingly.

    sudo php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"

    If Got “User is Not in Sudoers file” then Look: Solution
    And Verify the Download:

    sudo php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

    Next Install Composer:

    sudo php composer-setup.php

    Finally Clean up:

    sudo php -r "unlink('composer-setup.php');"