我正在尝试在我的 symphony 3.4 项目上安装 Sonata (sonata-project/admin-bundle)。
不幸的是,当我添加我的第一个服务时出现错误。
服务.yaml:
admin.carrier:
class: App\Admin\CarrierAdmin
arguments: [~, App\Entity\Carrier, ~]
tags:
- { name: sonata.admin, manager_type: orm, label: Carrier }
public: true
访问http://localhost/admin/dashboard时出现的错误:
1) FatalThrowableError
Type error: strlen() expects parameter 1 to be string, null given
in AddDependencyCallsCompilerPass.php (line 401)
at strlen(null)in AddDependencyCallsCompilerPass.php (line 401)
at AddDependencyCallsCompilerPass->replaceDefaultArguments(array('admin.carrier', 'SonataAdminBundle:CRUD'), object(Definition), null)in AddDependencyCallsCompilerPass.php (line 67)
at AddDependencyCallsCompilerPass->process(object(ContainerBuilder))in Compiler.php (line 141)
at Compiler->compile(object(ContainerBuilder))in ContainerBuilder.php (line 753)
at ContainerBuilder->compile()in Kernel.php (line 634)
at Kernel->initializeContainer()in Kernel.php (line 137)
at Kernel->boot()in Kernel.php (line 197)
at Kernel->handle(object(Request))in index.php (line 25)
有人可以帮助我吗?