使用SonataMediaBundle找不到ManagerInterface

时间:2014-01-17 22:06:47

标签: php symfony sonata-media-bundle

我尝试按照here所述安装SonataMediaBundle 安装后我收到此错误:

PHP Fatal error:  Interface 'Sonata\CoreBundle\Model\ManagerInterface' not found in /var/www/prj/vendor/sonata-project/media-bundle/Sonata/MediaBundle/Model/MediaManagerInterface.php on line 20

Sonata\CoreBundle\Entity\ManagerInterface但没有Sonata\CoreBundle\Model\ManagerInterface
问题是什么?

2 个答案:

答案 0 :(得分:3)

最近更新了CoreBundleAdminBundle,并更改了此命名空间。在它解决之前,您可以通过在composer.json中包含这些行来确保您使用的是最新版本:

"require": {
    ...
    "sonata-project/core-bundle": "dev-master",
    "sonata-project/media-bundle": "dev-master"
}

答案 1 :(得分:1)

从Sonata的沙盒中更新你的composer.json; https://github.com/sonata-project/sandbox/blob/2.3-develop/composer.json#L45-L63

    "sonata-project/easy-extends-bundle": "~2.1@dev",
    "sonata-project/seo-bundle": "~1@dev",
    "sonata-project/admin-bundle": "~2.2@dev",
    "sonata-project/doctrine-orm-admin-bundle": "~2.2@dev",
    "sonata-project/block-bundle": "~2.2@dev",
    "sonata-project/media-bundle": "~2.2@dev",
    "sonata-project/user-bundle": "~2.2@dev",
    "sonata-project/cache-bundle": "~2.1@dev",
    "sonata-project/page-bundle": "~2.3@dev",
    "sonata-project/core-bundle": "~2.2@dev",

关注核心捆绑":" ~2.2@dev",