Skip to content
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

Cache downloaded patches #35

Closed
cweagans opened this issue Mar 3, 2016 · 4 comments
Closed

Cache downloaded patches #35

cweagans opened this issue Mar 3, 2016 · 4 comments

Comments

@cweagans
Copy link
Owner

cweagans commented Mar 3, 2016

Right now, all patches are downloaded unconditionally every time they're applied. We should download them once and store them in the Composer cache. If we store the SHA-1 of the patch in composer.lock, and then save the patch as $sha1OfPatch.patch in the cache dir, offline installs with patches are possible.

Obviously, this wouldn't need to happen for local patches - only ones where we'd normally download them.

@cweagans cweagans mentioned this issue Jun 2, 2018
36 tasks
@mustanggb
Copy link

This would be welcome.

@sminnee
Copy link

sminnee commented Jul 27, 2020

Would it be possible/desirable to inline the entirety of the patch into the composer.lock file itself? Then you would be able to run "composer update" on your local environment, and distribute your composer.lock file to other environments with more confidence of the patches integrity when composer install is run.

It would bloat out the length of composer.lock, but does that actually have any practical downside?

@cweagans
Copy link
Owner Author

cweagans commented Feb 7, 2023

main now caches patch downloads. It uses the global composer cache, so if you're already caching this in your builds to speed up composer install, it should Just Work ™️

@cweagans cweagans closed this as completed Feb 7, 2023
@mustanggb
Copy link

Haven't tested it yet, but great news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants