composer update is not downloading anything

39 views Asked by At

In a Symfony 5.4 project calling

composer update

stops (or is not proceeding) when the downloading part should process. It lists all the things to download like this

Downloading php-http/discovery (1.19.1)
Downloading symfony/flex (v1.20.2)
...
Downloading symfony/yaml (v5.4.23)
Downloading twig/extra-bundle (v3.7.0)
Downloading twig/string-extra (v3.7.0)

and then the line

0/82 [>---------------------------]   0%

stays like that forever not proceeding / changing. Any ideas are much appreciated.

2

There are 2 answers

0
user3440145 On BEST ANSWER

Running

composer diagnose

led me to the problem (yeah - I should have asked composer for that before...) It told me

Checking github.com oauth access: The oauth token for github.com seems invalid, run "composer config --global --unset github-oauth.github.com" to remove it

Doing that solved the problem.

1
long On

Probably composer tries to connect using http protocol. Try this to change the protocol to https: composer config --global repo.packagist composer https://packagist.org