使用composer在自定义目录中安装软件包 [英] Use composer to install bundle in custom directory

查看:255
本文介绍了使用composer在自定义目录中安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到已经有一个问题,但它没有回答问题。

I see there is already a question but it did not answer the question

  • How can I install a composer package into the /src dir?

如何在 / src 目录中安装软件包?

How can I install a bundle in the /src directory?

原因我想这样做是为了开发和部署,因此

Reason I would like to do this is for development and deployment, so


  • 我没有检查Symphony的基本代码到我的subversion库中

  • 我可以使用Composer来部署

查看Composer文档我还遇到了一些问题:

Looking over the Composer docs some more I did come across this:

  • http://getcomposer.org/doc/04-schema.md#config

vendor-dir :默认为vendor。您可以将依赖关系安装到
不同的目录中。

vendor-dir: Defaults to vendor. You can install dependencies into a different directory if you want to.

我可以在Bundle级别设置吗?或者是整体安装的?

Could I set this at a Bundle level? or is this for the overall install?

  • https://github.com/composer/composer/blob/master/res/composer-schema.json

推荐答案

我知道这是晚了,但是如果任何人正在寻找一个 (小时和小时): vendor-dir

I know this is late, but in case anyone is searching for an answer that I painstakingly (hours and hours) found: vendor-dir

文档说:


通过设置此var,您可以让composer将依赖关系安装到vendor以外的目录

By setting this var you can make composer install the dependencies into a directory other than vendor

示例:

{
    "config": {
        "vendor-dir": "website/password/vendor/"
    }
}

href =https://getcomposer.org/doc/04-schema.md#config>此文档和此文档

From this doc and this doc

同样,希望在几个小时内保存其他人。

Again, hope to save anyone else a couple hours.

这篇关于使用composer在自定义目录中安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆