首页 文章

我正在使用symfony 3.4 . 我收到此错误消息 . 有什么提示?

提问于
浏览
-2

输入错误:

传递给Symfony \ Component \ Security \ Core \ Authentication \ Provider \ DaoAuthenticationProvider :: __ construct()的参数1必须是Symfony \ Component \ Security \ Core \ User \ UserProviderInterface的实例,给出FOS \ UserBundle \ Doctrine \ UserManager的实例,在第14行的C:\ projects \ sonatatest \ var \ cache \ dev \ ContainerFxwq4qg \ getSecurity_Authentication_Provider_Dao_MainService.php中调用

1 回答

  • 1

    This似乎解决了这个问题 .

    你没有确定,但你的安全配置可能有错误 . 您可以检查正确的配置here,但它基本上归结为您的配置中的以下更改(security.yml):

    以前(如果我错了,请纠正我):

    security:
        providers:
            # ...
            fos_userbundle:
                id: fos_user.user_manager # wrong value here
    

    后:

    security:
        providers:
            # ...
            fos_userbundle:
                id: fos_user.user_provider.username
    

相关问题