Last active
March 2, 2016 10:16
-
-
Save DimazzzZ/20071a7d5392ba11b692 to your computer and use it in GitHub Desktop.
Composer without XDebug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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