-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add download-only mode #11041
Add download-only mode #11041
Conversation
One thing left to consider fixing is this leaves the |
c4517bc
to
c10b5d4
Compare
It now cleans the tmp files. |
5460a6d
to
75db49b
Compare
75db49b
to
91b6a1b
Compare
src/Composer/Installer.php
Outdated
$this->runScripts = false; | ||
$this->writeLock = false; | ||
$this->dumpAutoloader = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so sure about thse..
Removing autoload dumping sure, makes sense.
Disabling scripts I think that is a mistake as plugins and whatever might depend on those scripts to do the downloading correctly.
And writeLock I think I would leave it on, as if you do an update with download only (not possible via CLI, but possible if you do this programmatically) it should still persist the update result to the lock file IMO.
if ($downloadOnly) { | ||
$this->download($package); | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a gut feeling this isn't the best way to bypass the operations here.. But I gotta try it myself, if I can improve I'll add a commit to your branch.
…but reuse existing cleanup promises, and avoid writing the installed repo
Thanks! |
composer install --download-only to prime the cache/download archives but not do any actual of the actual installing Fixes composer#11035 Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
Fixes #11035