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
symfony bundle composer-php


source to share


No one has answered this question yet

Check out similar questions:

ten
Use composer to install a package in a custom directory
3
Composer creates a local package
1
Unfortunate Composite Polynomial Dependency
1
composer cannot set knp buttonset in symfony 3.4
1
"No branch" when installing with composer.json
0
installing composer doesn't update psr4 autoloader
0
How can I get the version of a package installed by Composer in Symfony?
0
Symfony2 project, Composer does not install a package that cannot find any version,
0
custom symfony2 installation with composer from Bitbucket private repository
0
How to autoload a self-made Symfony 4 bundle with composer



All Articles
Loading...
X
Show
Funny
Dev
Pics