dongxi8993 2013-06-30 16:44
浏览 370
已采纳

每次创建一个新的Laravel项目时,Composer都会重新安装所有内容 - 为什么?

I'm messing about with Laravel 4, which looks great.

However, every time I create a new project I have to wait 10 minutes while Composer downloads all the dependencies. Surely they needn't be downloaded more than once?

05:36:49 ~/projects$ composer create-project laravel/laravel myproject
Installing laravel/laravel (v4.0.5)
  - Installing laravel/laravel (v4.0.5)
    Loading from cache

Created project in myproject
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing doctrine/lexer (dev-master bc0e1f0)
    Cloning bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94

[.. installs for 10 minutes ... ]

Any way around this?

  • 写回答

1条回答 默认 最新

  • donglian6625 2013-06-30 16:58
    关注

    Try adding the --prefer-dist switch to the command line. That should force Composer to download ready-made ZIPs with the required versions.

    But do note that you have a dependency on "dev-master" for doctrine/lexer - these will usually only be resolved by cloning the GIT repository instead of always downloading the latest tip of that branch. Try to require a known version tag or version wildcard instead.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料