Slow updating of composer dependencies, despite --prefer-dist flag

后端 未结 10 1780
走了就别回头了
走了就别回头了 2020-12-22 18:42

Why does it take up to two minutes for my composer dependencies to update, even when there have been no changes?

A popular suggestion is to append the --prefer-

10条回答
  •  渐次进展
    2020-12-22 19:30

    MY SOLUTION WINDOWS 10 x 64 bits WAMP user with Laravel, after weeks of slow composer update and composer require

    you use need a thing called cacert.pem

    https://curl.haxx.se/docs/caextract.html
    

    then paste that file in your wamp main directory C:\wamp64\cacert.pem

    then in the search tab search for php.ini open all the files with that name on sublime or any text editor

    find a line called curl.cainfo and openssl.cafile

    PUT YOUR PATH TO THIS FILE - see the example on my case:

    curl.cainfo="C:\wamp64\cacert.pem"
    

    and

    openssl.cafile="C:\wamp64\cacert.pem"
    

    do this on all the php.ini files you search before, in all the files!

    OKAY RESTART SERVER that work for me, hope for you I wish someone before would make this comment! so I would not spend 2 weeks fixing it

    also call

    composer config --global repo.packagist composer https://packagist.org
    

    this make the connection on https run this too

    composer install --prefer-dist -vvv --profile
    

提交回复
热议问题