Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save markshust/c16c56525f55b71527f36faa4bd166ab to your computer and use it in GitHub Desktop.
Save markshust/c16c56525f55b71527f36faa4bd166ab to your computer and use it in GitHub Desktop.
Execute PHPUnit disabling xdebug
# Before using these aliases and function you must make a backup of your xdebug.ini
# (in this case /etc/php/conf.d/xdebug.ini.back)
# You will also need to be able to edit xdebug.ini
alias xdebug-disable='echo "" > /etc/php/conf.d/xdebug.ini'
alias xdebug-restore='cat /etc/php/conf.d/xdebug.ini.back > /etc/php/conf.d/xdebug.ini'
phpu() {
xdebug-disable
phpunit "$@"
xdebug-restore
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment