-
Ignoring the cache: Composer doesn't have an option to make it ignore its cache while running a command. The Composer developers do not believe this is an important feature and they refused an issue opened to request it. However, it can be helpful for debugging dependency installation. To make a single Composer command (e.g.,
composer update) ignore the cache, use one of the following:-
This version generates innocuous, ignorable errors about the cache directory:
COMPOSER_CACHE_DIR=/dev/null composer update
The errors are because
/dev/nullis not a directory. However, anything written to/dev/nulldisappears, leaving nothing to clean up. This shorter command line changes the value ofCOMPOSER_CACHE_DIRonly while Composer is running. When it's finished,COMPOSER_CACHE_DIRwill return to its previous value, if any. -
Another version that gives clean output and uses a real directory, but doesn't bother to clean it up afterwards:
COMPOSER_CACHE_DIR=$(mktemp -d) composer updateBe careful with this one: If many of these directories are created, it could start to use up a lot of disk space.
-
-
Another note...
Last active
December 11, 2015 16:52
-
-
Save lsloan/2e3098e4d7de3640b959 to your computer and use it in GitHub Desktop.
My Composer notebook
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment