OSがなんらかの理由でアップデートできない場合
xcodeが入れられない場合
error文とOSバージョン名でぐぐってみる。
解決できなかったら
xcode-select --install
できなかったらxammp
xammpでphp7系インストール
xammpはMac OS X 10.6 or later. 10.6以上だとできるらしい
https://www.apachefriends.org/jp/index.html
composer install
https://getcomposer.org/download/
https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos