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

ComposerRepository::loadAsyncPackages() fails when the network is down #10116

Closed
nicolas-grekas opened this issue Sep 21, 2021 · 2 comments
Closed
Labels
Milestone

Comments

@nicolas-grekas
Copy link
Contributor

With a warm HTTP cache, I expected composer to still be able to proceed.

But after I shutdown my local network, eg composer create-project symfony/skeleton fails with a curl error.

I suspect that the promises in ComposerRepository::loadAsyncPackages() are missing the part to reuse the data from the cache when an transport exception occurs.

@nicolas-grekas
Copy link
Contributor Author

(this works in composer 1 btw)

@Seldaek Seldaek added this to the 2.1 milestone Oct 2, 2021
@Seldaek Seldaek added the Bug label Oct 2, 2021
@Seldaek
Copy link
Member

Seldaek commented Oct 2, 2021

Setting COMPOSER_DISABLE_NETWORK=1 should fix this in composer 2, but anyway I agree it should behave nicer by default if possible. Will fix this.

@Seldaek Seldaek closed this as completed in a7963b7 Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants