4

我尝试按照此处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
问题是什么?

4

2 回答 2

3

两者CoreBundleAdminBundle最近都进行了更新,并且此命名空间发生了变化。在解决之前,您可以通过在您的 : 中包含这些行来确保您使用的是最新版本composer.json

"require": {
    ...
    "sonata-project/core-bundle": "dev-master",
    "sonata-project/media-bundle": "dev-master"
}
于 2014-01-19T01:27:48.920 回答
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",

注意 core-bundle": "~2.2@dev",

于 2014-01-24T01:10:43.440 回答