当我在symfony2.0中运行init:acl时 我收到此错误,有人知道如何修复它!
You have requested a non-existent service "security.acl.dbal.connection"
答案 0 :(得分:18)
您需要在应用程序中启用ACL支持。将此行添加到security.yml
配置文件中:
acl:
connection: default
然后再次运行php app/console init:acl
。
答案 1 :(得分:2)
只是提醒一下,acl
关键字应放在security
关键字后面的行上。如果你只是把
acl:
connection: default
在security.yml
文件的顶部,您可能会收到此错误消息。我引用它以便人们可以通过谷歌搜索错误来到这个线程。
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Cannot import resource "/home/jupiter/symfony/cupon/app/config/secu
rity.yml" from "/home/jupiter/symfony/cupon/app/config/config.yml".
(There is no extension able to load the configuration for "acl"
(in /home/jupiter/symfony/cupon/app/config/security.yml). Looked for
namespace "acl", found "framework", "security", "twig", "monolog",
"swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "ci
udad", "usuario", "tienda", "oferta", "backend", "ideup_simple_pagi
nator", "web_profiler", "sensio_distribution")
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
There is no extension able to load the configuration for "acl" (in
/home/jupiter/symfony/cupon/app/config/security.yml). Looked for na
mespace "acl", found "framework", "security", "twig", "monolog", "s
wiftmailer", "assetic", "doctrine", "sensio_framework_extra", "ciud
ad", "usuario", "tienda", "oferta", "backend", "ideup_simple_pagina
tor", "web_profiler", "sensio_distribution"
因此,请确保acl
关键字位于security
之后:
security:
acl:
connection: default
答案 2 :(得分:0)
两者都不适合我。这项服务实际上不可用......