Skip to content

Instantly share code, notes, and snippets.

@DimazzzZ
Last active March 2, 2016 10:16
Show Gist options
  • Save DimazzzZ/20071a7d5392ba11b692 to your computer and use it in GitHub Desktop.
Save DimazzzZ/20071a7d5392ba11b692 to your computer and use it in GitHub Desktop.
Composer without XDebug
# Create file /usr/sbin/composer with following content:
#!/bin/bash
options=$(ls -1 /usr/lib/php5/20131226/| \
grep --invert-match xdebug| \
# remove problematic extensions
egrep --invert-match 'mysql|wddx|pgsql|opcache'| \
sed --expression 's/\(.*\)/ --define extension=\1/'| \
# join everything together back in one big line
tr --delete '\n'
)
php -n $options /opt/composer.phar $@
# -n - disable all extensions
# /opt/composer.phar - path to composer
# $@ - catch cli arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment