Last active
May 10, 2016 08:41
-
-
Save tommy-muehle/595b7ec4d3ae15a9f644 to your computer and use it in GitHub Desktop.
/usr/local/bin/composer
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
#!/usr/bin/env bash | |
PHP=/usr/local/opt/php70/bin/php | |
ARGUMENTS="--ignore-platform-reqs --optimize-autoloader" | |
EXCLUDE_COMMANDS=(init selfupdate dumpautoload diagnose) | |
for item in "${EXCLUDE_COMMANDS[@]}"; do | |
if [[ $1 == "$item" ]]; then ARGUMENTS=""; fi | |
done | |
echo "Running composer with $($PHP -v)" | |
COMPOSER_DISABLE_XDEBUG_WARN=1 $PHP -d allow_url_fopen=On -d detect_unicode=Off -d memory_limit=-1 -d xdebug.remote_enable=0 -d xdebug.profiler_enable=0 -d xdebug.default_enable=0 /usr/local/opt/composer/libexec/composer.phar $ARGUMENTS "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment