Fatal error: Class 'Sonata\jQueryBundle\SonatajQueryBundle' not found in /Users/.../app/AppKernel.php on line 21
将我的 composer.json 中的 SonataAdminBundle 版本升级到 dev-master 后,出现上述错误并进行 composer 更新
以尝试新的 Bootstrap3 布局。
现在是否必须手动将其添加为依赖项?看来 jquery 包现在已被删除,就好像我注释掉第 21 行一样,站点加载了,但没有加载任何 jquery 资源。
最佳答案
Assets 管理在即将发布的稳定版本中得到了改进。 SonataAdminBundle 现在使用 Bower 来处理资源 ( https://github.com/sonata-project/SonataAdminBundle/issues/2036 )。
因此,如果您更新代码,则需要删除 SonatajQueryBundle。此外,还有一个新的配置部分可用于在 AdminBundle 中添加您的 Assets 。因此,您可以精细控制项目中加载的资源。 (https://github.com/sonata-project/SonataAdminBundle/blob/master/Resources/doc/reference/configuration.rst)。
最后一点,如果您覆盖了默认模板,您可能需要调整它以正确加载资源。
关于symfony - SonatajQueryBundle 不再作为依赖项安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23149771/