Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Notes about advanced composer
COMPOSER_TIMEOUT=600 php -d memory_limit=2G path/to/composer.phar $@
# composer_wrapper.sh
php -d memory_limit=2G /path/to/composer.phar $@
alias composer='path/to/composer_wrapper.sh'
1. Checkout just the composer.* files to the docker build dir
2. Run docker build
1. Copy just the composer.* files into the build image
2. Run composer install with flags
3. Copy in source files
4. Run composer dump-autoload --optimize
# Super GH speed
--prefer-dist
# Small deployment, ignores dev packages
--no-dev
# Power
--optimize-autoloader or dump-autoload --optimize
# Github rate limits api calls
composer config -g github-oauth.github.com <token>
# Create token at https://github.com/settings/tokens
# They fixed it in 1.3.0
composer self-update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment