gpt4 book ai didi

php - Composer 包的自定义安装路径

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:08:58 24 4
gpt4 key购买 nike

您好,我正在尝试使用 composer 设置一个项目.我能够安装 CakePHP但我很难安装 cakephp/debug_kit在自定义目录上。我正在尝试将它安装在“vendor/cakephp/cakephp/app/Plugin/DebugKit/”上,因为 CakePHP要求其插件安装在其“app”文件夹的插件目录中。

我已经根据 this 设置了我的 composer.json网站,但插件仍然安装在“vendor/cakephp/debug_kit”

这是我的 composer.json 可能我的代码有问题。我只是使用 composer.json 的新手。

{    "name" : "notmii/pse",    "repositories" :    [{        "type": "package",        "package":        {            "name" : "cakephp/cakephp",            "version" : "2.3.5",            "source" :            {                "type" : "git",                "url" : "git://github.com/cakephp/cakephp.git",                "reference" : "2.3.5"            },            "bin" : ["lib/Cake/Console/cake"]        }    },    {        "type": "package",        "package":        {            "name" : "cakephp/debug_kit",            "version" : "2.2.0",            "source" :            {                "type" : "git",                "url" : "https://github.com/cakephp/debug_kit.git",                "reference" : "2.2.0"            }        }    }],    "extra":    {        "installer-paths":        {            "vendor/cakephp/cakephp/app/Plugin/DebugKit/": ["cakephp/debug_kit"]        }    },    "require" :    {        "php": ">=5.3",        "cakephp/cakephp" : ">=2.3.5",        "cakephp/debug_kit": "2.2.*"    }}

最佳答案

将您的额外 block 更改为:

"extra":
{
"installer-paths":
{
"app/Plugin/DebugKit": ["cakephp/debug_kit"]
}
},

这对我有用。

关于php - Composer 包的自定义安装路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16506865/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com