When running composer diagnose, I get the following error :
composer diagnose
The xdebug extension is loaded, this can slow down Composer a little. Disablin
Creating an alias for composer to disable xdebug and prevent memory errors:
Add this line to your ~/.bash_profile
alias composer='php -d xdebug.profiler_enable=0 -d memory_limit=-1 /usr/local/bin/composer'
Restart the terminal to make the new alias available.