[英]You have requested a non-existent service "security.access.decision_manager"
I am trying to build a project without using security (no login and register form in my project).我正在尝试在不使用安全性的情况下构建项目(我的项目中没有登录和注册表单)。 When I remove
- { resource: security.yml }
on my config.yml
, I get this error.当我在
config.yml
上删除- { resource: security.yml }
时,出现此错误。
You have requested a non-existent service "security.access.decision_manager"
I have tried to search for using Symfony without security, but there is none.我试图在没有安全性的情况下搜索使用 Symfony,但没有。
Is there anything that I missing?有什么我想念的吗?
You can just disable it.你可以禁用它。 Comment/ remove file works fine on symfony standard edition without throwing errors.
注释/删除文件在 symfony 标准版上运行良好,不会引发错误。 If it does not, you are most likely using some component of it (or even in a service you are using).
如果没有,您很可能正在使用它的某些组件(甚至在您正在使用的服务中)。
Also just commenting it out does not disable it - it would just load the default config settings as defined in the bundle.此外,仅将其注释掉并不会禁用它 - 它只会加载包中定义的默认配置设置。 To remove it from loading:
要将其从加载中移除:
// remove/ comment in AppKernel.php
$bundles[] = new Symfony\Bundle\SecurityBundle\SecurityBundle();
Also another option you might want to consider is starting off with the MicroKernelTrait and extend that with what you need instead of getting everything and trying to remove bits.您可能还想考虑的另一个选择是从MicroKernelTrait开始,并根据需要扩展它,而不是获取所有内容并尝试删除位。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.