Skip to content

Instantly share code, notes, and snippets.

@fjogeleit
Forked from tommy-muehle/composer
Created April 27, 2016 06:30
Show Gist options
  • Save fjogeleit/d52776f99905f73b309b5147d4f659e2 to your computer and use it in GitHub Desktop.
Save fjogeleit/d52776f99905f73b309b5147d4f659e2 to your computer and use it in GitHub Desktop.
/usr/local/bin/composer
#!/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)"
$PHP -d allow_url_fopen=On -d detect_unicode=Off -d memory_limit=-1 /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