首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Composer不缓存提交引用的包。

Composer不缓存提交引用的包。
EN

Stack Overflow用户
提问于 2014-01-09 15:09:54
回答 1查看 978关注 0票数 0

我的项目自动化部署依赖于Composer来安装所有依赖项。

每次部署时,部署脚本都要求重新安装,但是composer.lock总是相同的,部署之间没有依赖关系的变化。

从缓存加载版本号("twig/twig": "1.12.*")时引用的Librairies。但是,使用分支/提交引用("dompdf/dompdf" : "dev-master#424c235")的方法总是会触发git克隆到GitHub。

至于其他库,这些版本没有改变,但没有从缓存中加载。

代码语言:javascript
复制
Loading composer repositories with package information
Installing dependencies from lock file

- Installing phenx/php-font-lib (0.2.1)
Loading from cache

- Installing dompdf/dompdf (dev-master 424c235)
Cloning 424c235

- Installing endroid/qrcode (dev-master 4eb83c9)
Cloning 4eb83c9

- Installing j4mie/idiorm (v1.3.0)
Loading from cache

- Installing j4mie/paris (v1.3.0)
Loading from cache

- Installing jamesiarmes/php-ews (master edbcb65)
Cloning edbcb65

- Installing symfony/process (v2.3.1)
Loading from cache

- Installing kriswallsmith/assetic (dev-master 0a55a9b)
Cloning 0a55a9b

- Installing kriswallsmith/buzz (v0.10)
Loading from cache

- Installing psr/log (1.0.0)
Loading from cache

- Installing monolog/monolog (1.5.0)
Loading from cache

- Installing mtdowling/cron-expression (v1.0.1)
Loading from cache

- Installing respect/validation (0.4.4)
Loading from cache

- Installing ruudk/twitter-oauth (dev-master a4c0094)
Cloning a4c0094

- Installing slim/slim (2.2.0)
Loading from cache

- Installing slim/extras (2.0.1)
Loading from cache

- Installing symfony/console (v2.2.2)
Loading from cache

- Installing tedivm/jshrink (v0.5.1)
Loading from cache

- Installing twig/twig (v1.12.3)
Loading from cache

- Installing zendframework/zend-stdlib (2.1.5)
Loading from cache

- Installing zendframework/zend-authentication (2.1.5)
Loading from cache

- Installing zendframework/zend-permissions-acl (2.1.5)
Loading from cache

- Installing zendframework/zend-session (2.1.5)
Loading from cache

TL;DR;

如何使Composer从本地缓存获取提交所引用的依赖项?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-09 23:35:43

不要克隆从Github,而是下载ZIPs。当您更新时,标志--prefer-dist将触发此操作。如果没有此操作,则该包没有缓存条目,只有vendor文件夹中的克隆爬虫会输入任何更改,然后检出所需的提交id。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21023918

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档