Skip to content

Instantly share code, notes, and snippets.

@jbboehr
Created April 3, 2015 06:04
Show Gist options
  • Save jbboehr/5f8a03b49b1cbe613fb3 to your computer and use it in GitHub Desktop.
Save jbboehr/5f8a03b49b1cbe613fb3 to your computer and use it in GitHub Desktop.
Composer xdebug unloader
#!/bin/sh
COMPOSER_BIN=`which composer.phar`
PHP_BIN=`which php`
PHP_EXTENSION_DIR=`php -r 'echo ini_get("extension_dir");'`
EXTENSIONS=`find $PHP_EXTENSION_DIR -name "*.so" | egrep -v '(xdebug|opcache)'`
PHP_ARGS=' -n -d allow_url_fopen=On -d detect_unicode=Off '
for x in $EXTENSIONS; do
PHP_ARGS="$PHP_ARGS -d extension=$x "
done
COMMAND="$PHP_BIN $PHP_ARGS $COMPOSER_BIN"
exec $COMMAND "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment