我尝试配置 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/