sonata-admin - SonataAdminBundle 中的 PageableManagerInterface 错误

标签 sonata-admin symfony-2.4 sonata-user-bundle

我尝试配置 SonataAdminBundle 和 SonataUserBundle 以使用 mongodb,但收到以下错误:

ClassNotFoundException: Attempted to load interface "PageableManagerInterface" from namespace "Sonata\CoreBundle\Model" in /Users/me/Sites/mynamespace-webtools/vendor/sonata-project/user-bundle/Model/UserManagerInterface.php line 25. Do you need to "use" it from another namespace?

任何人都可以阐明可能导致此问题的原因吗?我也出现了所描述的症状here并尝试了那里建议的答案。

谁能确认 mongodb 功能是否已损坏?我还想知道这个错误是否与此 commit 有关?

最佳答案

这似乎是 Sonata 系统本身的依赖错误,与 MongoDB 模块并不严格相关。

PageableManagerInterface 类由 Sonata Core Bundle 提供。确保您的composer.json 文件中有它:

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

之后,像往常一样确保您的安装是最新的并清理缓存:

php composer.phar self-update ; php composer.phar update

关于sonata-admin - SonataAdminBundle 中的 PageableManagerInterface 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23453641/

相关文章:

symfony - Sonata - 缺少用户安全状态标签

symfony - 奏鸣曲媒体包 : acces media url

sonata-admin - Sonata User Bundle + Admin Bundle 登录后管理员重定向

symfony - 继承表单或为每个表单添加类型

symfony - 如何记录具有集合的实体?

Symfony2 : How to filter the options of an entity-choice form field by a certain attribute?

php - Sonata 管理员包 + 用户包 : Check registration by admin before allowing access to user

php - Symfony2 - Sonata Datagrid 过滤器运算符转换对 doctrine_orm_class 字段失败

Symfony Profiler 查询堆栈跟踪

sonata-admin - 奏鸣曲用户包 + Symfony 3.x