I'm running ubuntu 14.04 and noticed that when I run composer.phar update
for packages having dependency for vendors like google
, doctrine
, twig
, etc. it stores its downloaded files in my local ~/.composer/cache/files/vendor
. However, when I created a library package myself, and "required" it in another test package, it did not download these in the /cache/files/
folder (but did add entries to /repo/https---packagist.org/*.json
files).
I would like to know under what circumstances does composer.phar download the files and stores in cache? I'm asking this because I'm going to build a lot of apps in future including components like doctrine, symfony and zend frameworks and I don't want composer.phar
to waste internet bandwidth by downloading a copy of each of these frameworks again and again for each app. Of course, another advantage is that in case I decide to switch ubuntu and move on to some other distro, I don't want to download a ton of composer packages all over again.
My personal guess is that since I haven't tagged my lib package in the github repo (it is still dev-master
) it is not storing in cache. Can someone confirm that please?
1.composer.json require
section of app having dependency on google/apiclient
:
"require": {
"google/apiclient": "1.*.*"
}
2.composer.json require
section of app having dependency on prahladyeri/indiegogo
:
"require": {
"prahladyeri/indiegogo": "dev-master"
},
"license": "MIT",
"minimum-stability": "dev"