作曲家包的自定义安装路径

not*_*mii 4 php cakephp composer-php

嗨,我正在尝试使用composer设置项目.我能够安装CakePHP,但是我很难在自定义direcoty上安装cakephp / debug_kit.我试图在"vendor/cakephp/cakephp/app/Plugin/DebugKit /"上安装它,因为CakePHP要求将其插件安装在其"app"文件夹的Plugin目录中.

我已经根据这个网站设置了我的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.*"
    }
}

Kri*_*ris 8

将您的额外块更改为:

"extra":
{
    "installer-paths":
    {
        "app/Plugin/DebugKit": ["cakephp/debug_kit"]
    }
},
Run Code Online (Sandbox Code Playgroud)

这对我有用.