问题描述
我看到已经有一个问题,但它没有回答这个问题
I see there is already a question but it did not answer the question
如何在 /src
目录中安装包?
How can I install a bundle in the /src
directory?
我想这样做的原因是为了开发和部署,所以
Reason I would like to do this is for development and deployment, so
- 我不必将 Symfony 的基本代码签入我的 subversion 存储库中
- 我可以使用 Composer 来部署
查看 Composer 文档后,我确实遇到了这个问题:
Looking over the Composer docs some more I did come across this:
vendor-dir:默认为供应商.您可以将依赖项安装到如果您愿意,可以使用不同的目录.
我可以在 Bundle 级别设置它吗?还是用于整体安装?
Could I set this at a Bundle level? or is this for the overall install?
推荐答案
我知道这已经晚了,但万一有人在寻找我煞费苦心(几个小时)找到的答案:供应商目录
I know this is late, but in case anyone is searching for an answer that I painstakingly (hours and hours) found: vendor-dir
文档说:
通过设置这个变量,你可以让 composer 将依赖项安装到供应商以外的目录中
例子:
{
"config": {
"vendor-dir": "website/password/vendor/"
}
}
再次,希望能为其他人节省几个小时.
Again, hope to save anyone else a couple hours.
这篇关于使用 composer 在自定义目录中安装包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!