https://getcomposer.org/doc/articles/troubleshooting.md#xdebug-impact-on-composer https://github.com/Homebrew/homebrew-php/issues/2536#issuecomment-178798390
Comment out the line enable xdebug in /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
[xdebug]
;zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
Enable the extension at the end of /usr/local/etc/php/5.6/php.ini
zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
Copy php.ini to php-cli.ini Remove the zend_extension line for xdebug
Enable xdebug for php-cli by creating an alias in ~/.zshrc or ~/.bashrc or ~/.bash_profile
alias php='php -dzend_extension=/usr/local/opt/php56-xdebug/xdebug.so'
This was helpful! Thanks for sharing this.