Fix issue where none root composer.json could be used by ArtifactRepository http://www.php.net/manual/en/ziparchive.locatename.php#85512
Improved variable name.
Composer supports four types.
Merge pull request #2405 from discordier/fix-upgrade-cache

Fix cache directory upgrading - do not try to (re)move the active cache dir.
Merge pull request #2406 from websafe/patch-1

Composer supports four types.
Add stronger warning in docs about #<ref> hack, refs #2410
If installer sets prefer option to false, the manager should too. Fixes #2359
Minor typo fix

introduced from 6ce0bf7cbf5edc622a8ccfbca226ffc825ca699e with #2314
Merge pull request #2414 from matthieuauger/fix/2359/config-option-overwrite-cli

If installer sets prefer to false, the manager should too. Fixes #2359
Merge pull request #2417 from glensc/patch-2

Minor typo fix
drop ^A

added probably mistakenly in e34dae4d42a2bbe2ed9eb581f371ae3b00b8c4e2
Merge pull request #2421 from glensc/patch-3

drop ^A
Fail hard if anything attempts to wipe the entire filesystem/partition, fixes #2409
No need to create hg working copies just to parse tags/branches
Merge pull request #2427 from webfactory/hg-no-working-copy

No need to create hg working copies just to parse tags/branches
Use cache directory when downloading composer.phar

Since there is a cache dir there is no need to populate the project
directory with temp files. Plus the permissions on the project dir
might not allow that.
Check if current dir is writable and if not try the cache dir from settings
Cache path never ends with '/'
Merge remote-tracking branch 'jimmykane/master'
Add preFileDownload event on package.json fetch