在作曲家中安装后,Appkernel无法找到我的包

时间:2014-10-01 10:48:27

标签: symfony bundle composer-php


我试图从本地仓库安装捆绑包。 这个bundle的composer.json是:

{
    "name" : "my/bundle",
    "description" : "My Bundle",
    "type" : "symfony-bundle",
    "authors" : [{
        "name" : "Sekai",
        "email" : "admin.admina@gmail.com"
    }],
    "keywords" : [
        "my bundle"
    ],
    "license" : [
        "Proprietary"
    ],
    "require" : {
    },
    "autoload" : {
        "psr-0" : {
            "my\\Bundle" : ""
        }
    },
    "target-dir" : "my/Bundle",
    "extra" : {
    "branch-alias" : {
            "dev-master" : "1.0-dev"
        }
    }
}

安装后的结果层次结构:

-Vendor
 -my
  -bundle
    -My
     -Bundle

这就是我在Appkernel中加载它的方式:

...
            new my\Bundle\myBundle(),
...

我收到错误

 Class 'my\Bundle\myBundle' not found 

AmI在作曲家做错了什么?

0 个答案:

没有答案
相关问题