要在Symfony 3中设置Sonata管理员,请按照确切的说明进行操作: 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".
答案 0 :(得分:0)
运行:
composer require sonata-project/doctrine-orm-admin-bundle