Appkernel cannot find my package after installing it in composer


I am trying to install a package from a local repo. composer .json of this package:

{
    "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"
        }
    }
}

      

Result Hierarchy after installation:

-Vendor
 -my
  -bundle
    -My
     -Bundle

      

And this is how I load it into Appkernel:

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

      

I am getting the error

 Class 'my\Bundle\myBundle' not found 

      

What am I doing wrong in the composer?

+3


source to share





All Articles