0

Here is the basic layout:

mywebsite
  shared
    bundles
      MyWebsite
        CoreBundle
  src
    MyWebsite
      MyProduct
        ABundle

shared is a submodule (git) but I need Symfony to be able to locate the shared bundles under the same namespace, ie:

namespace MyWebsite\MyProduct\ABundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use MyWebsite\CoreBundle as Core;

class Recipe extends Core\Entity\SimpleEntity {}

I have tried changing the composer.json file to add the new directory:

"autoload": {
    "psr-0": { "": [ "src/", "shared/bundles/" ] }
},

Is this possible? Or am I just missing something?

Elliot Chance
  • 5,526
  • 10
  • 49
  • 80

1 Answers1

0

I found the solution, once you edit the composer.json file you have to recompile the autoloader with:

php composer.phar dump-autoload
Elliot Chance
  • 5,526
  • 10
  • 49
  • 80