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.

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

报告相同问题?

悬赏问题

  • ¥20 关于php中URL传递GET全局变量的问题
  • ¥15 怎么改成循环输入删除(语言-c语言)
  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理
  • ¥15 STM32无法向设备写入固件