gpt4 book ai didi

symfony - 服务 "admin.category"依赖于不存在的服务 "sonata.admin.manager.orm"

转载 作者:行者123 更新时间:2023-12-02 03:16:12 25 4
gpt4 key购买 nike

要在 Symfony 3 中设置 Sonata admin,我遵循了确切的说明: https://symfony.com/doc/3.x/bundles/SonataAdminBundle/getting_started/creating_an_admin.html

在第 3 步,我输入了所描述的准确配置: https://symfony.com/doc/3.x/bundles/SonataAdminBundle/getting_started/creating_an_admin.html#step-3-register-the-admin-class

services:
# ...
admin.category:
class: App\Admin\CategoryAdmin
arguments: [~, App\Entity\Category, ~]
tags:
- { name: sonata.admin, manager_type: orm, label: Category }

但现在我得到以下错误:

The service "admin.category" has a dependency on a non-existent service "sonata.admin.manager.orm".  

最佳答案

只需运行:

composer require sonata-project/doctrine-orm-admin-bundle

关于symfony - 服务 "admin.category"依赖于不存在的服务 "sonata.admin.manager.orm",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56083834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com