0
下面是基本布局:Symfony2捆绑在不同的目录中?
mywebsite
shared
bundles
MyWebsite
CoreBundle
src
MyWebsite
MyProduct
ABundle
shared
是一个子模块(GIT),但我需要的Symfony能够找到相同的命名空间下的共享束,即:
namespace MyWebsite\MyProduct\ABundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use MyWebsite\CoreBundle as Core;
class Recipe extends Core\Entity\SimpleEntity {}
我有尝试更改composer.json文件以添加新目录:
"autoload": {
"psr-0": { "": [ "src/", "shared/bundles/" ] }
},
这可能吗?或者我只是想念一些东西?
是的,应该这样的。 :) – Talus
只是尝试看看会发生什么:) – arnaud576875