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