Skip to content

Instantly share code, notes, and snippets.

@rogerclotet
Last active February 9, 2023 13:03
Show Gist options
  • Save rogerclotet/3901b03107437b247b03 to your computer and use it in GitHub Desktop.
Save rogerclotet/3901b03107437b247b03 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