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

后端 未结 10 1769
走了就别回头了
走了就别回头了 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:18

    This problem is often related to xdebug being loaded in your CLI environment. (It doesn't matter if xdebug is enabled or not.)

    You can check whether xdebug is enabled using one of the followinc commands.

    // Unix
    php -m | grep xdebug
    // Windows
    php -m | findstr xdebug
    

    Further information on what operations take so long can be gained by enabling maximum verbosity and profiling information. (Replace install with update if you are updating the packages.)

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

提交回复
热议问题