Disable XDebug when running composer
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.
# Without php.ini alias composer='php -n /path/to/composer.phar' # Or with an xdebug-disabled php.ini alias composer='php -c /path/to/xdebug-disabled-php.ini /path/to/composer.phar'
- Set COMPOSER_HOME env variable before installing global libs, for instance phpunit
- We can set COMPOSER_HOME environment variable by specifing settings in composer.json for projects
- The path of global configuration file is config.json rather than composer.json,which located at COMPOSER_HOME