From d2bc5f4563553fce770f19b7f51becbeee6c96d0 Mon Sep 17 00:00:00 2001 From: Chiao Date: Thu, 12 May 2016 13:46:59 +0800 Subject: [PATCH] Add aliases for composer to disable xdebug. --- doc/articles/troubleshooting.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/articles/troubleshooting.md b/doc/articles/troubleshooting.md index 75f281e79..42749dd7a 100644 --- a/doc/articles/troubleshooting.md +++ b/doc/articles/troubleshooting.md @@ -190,6 +190,18 @@ composer update php /usr/local/bin/composer update ``` +Or, you can add aliases for composer to run with an xdebug-disabled `php.ini` file. +Running php without a `php.ini` file should also do the trick in most cases. + +Example: + +```sh +# Without php.ini +alias comp='php -n /path/to/composer.phar' +# Or with an xdebug-disabled php.ini +alias comp='php -c /path/to/xdebug-disabled-php.ini /path/to/composer.phar' +``` + As a workaround in bash (and other shells) you can create a function which is named `composer`, which disables xdebug before it executes composer, and then enables it afterwards.