Skip to content

Instantly share code, notes, and snippets.

@yusufhm
Last active June 7, 2017 17:26
Show Gist options
  • Select an option

  • Save yusufhm/fb7a2d46fbaaf08ea15afbbf599c0da9 to your computer and use it in GitHub Desktop.

Select an option

Save yusufhm/fb7a2d46fbaaf08ea15afbbf599c0da9 to your computer and use it in GitHub Desktop.
Disable xdebug for composer in Homebrew

References

https://getcomposer.org/doc/articles/troubleshooting.md#xdebug-impact-on-composer https://github.com/Homebrew/homebrew-php/issues/2536#issuecomment-178798390

Do it

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'
Copy link
Copy Markdown

ghost commented Jun 7, 2017

This was helpful! Thanks for sharing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment