保安";AccessDecisionManager.php第52行“InvalidArgumentException”中的InvalidArgumentException:“战略”;“肯定”;不支持
我已将我的第一个symfony项目上载到 所以,我有一个空白页 当我使用app_dev.php时,我遇到了以下问题: /dns/in/olympe/loicg/vendor/symfony/symfony/src/symfony/Component/Security/Core/Authorization/AccessDecisionManager.php 第52行:不支持“肯定”战略保安";AccessDecisionManager.php第52行“InvalidArgumentException”中的InvalidArgumentException:“战略”;“肯定”;不支持,php,symfony,frameworks,Php,Symfony,Frameworks,我已将我的第一个symfony项目上载到 所以,我有一个空白页 当我使用app_dev.php时,我遇到了以下问题: /dns/in/olympe/loicg/vendor/symfony/symfony/src/symfony/Component/Security/Core/Authorization/AccessDecisionManager.php 第52行:不支持“肯定”战略 in AccessDecisionManager.php line 52 at AccessDecisionMa
in AccessDecisionManager.php line 52
at AccessDecisionManager->__construct(array(object(RoleHierarchyVoter),
对象(ExpressionVoter),对象(AuthenticatedVoter)),“肯定”,
在AppDevDebBugProjectContainer.php第3456行中
在appDevDebugProjectContainer->getSecurity\u Access\u DecisionManagerService()中
在bootstrap.php.cache行2097中
在appDevDebugProjectContainer.php行1933中的Container->get('security.access.decision_manager')
在appDevDebugProjectContainer->getSecurity_AuthorizationCheckerService()上
在bootstrap.php.cache行2097中
在appDevDebugProjectContainer.php行1946中的Container->get('security.authorization_checker')
在bootstrap.php.cache行2097中的appDevDebugProjectContainer->getSecurity_ContextService()
在appDevDebugProjectContainer.php第3103行的Container->get('security.context',2')
在bootstrap.php.cache行2097中的appDevDebugProjectContainer->getTwigService()
在appDevDebugProjectContainer.php第316行中的Container->get('twig')
在bootstrap.php.cache行2097中的appDevDebugProjectContainer->getAssetManager服务()
在appDevDebugProjectContainer.php行1902中的Container->get('assetic.asset_manager')
在bootstrap.php.cache行2097中的appDevDebugProjectContainer->getRouting_LoaderService()
在Router.php第54行的Container->get('routing.loader')
在Router.php第344行的Router->getRouteCollection()处
在Router.php第267行的Router->getMatcherDumperInstance()处
在Router.php第233行的Router->getMatcher()处
在RouterListener.php第125行的Router->matchRequest(对象(请求))处
在RouterListener->onKernelRequest(对象(GetResponseEvent),'kernel.request',对象(ContainerWareeEventDispatcher))
在调用_user_func(数组(对象(RouterListener),'onKernelRequest')、对象(GetResponseEvent),'kernel.request',
WrappedListener.php第59行中的对象(ContainerWareeventdispatcher
在WrappedListener->u调用(对象(GetResponseEvent),'kernel.request',对象(ContainerWareEventDispatcher))
在调用_user _func(对象(WrappedListener)、对象(GetResponseEvent)和“kernel.request”时,
EventDispatcher.php第164行中的对象(ContainerWareeventDispatcher
在EventDispatcher->doDispatch(数组(对象(WrappedListener)、对象(WrappedListener)、对象(WrappedListener),
对象(WrappedListener),对象(WrappedListener),
对象(WrappedListener),对象(WrappedListener),
对象(WrappedListener),对象(WrappedListener),
对象(WrappedListener)),'kernel.request',对象(GetResponseEvent))
在EventDispatcher.php第53行中
在ContainerAwareEventDispatcher.php行中的EventDispatcher->dispatch('kernel.request',object(GetResponseEvent))处
167
在traceableventdispatcher.php第112行的ContainerAwareEventDispatcher->dispatch('kernel.request',object(GetResponseEvent))处
在bootstrap.php.cache行3009中的TraceableEventDispatcher->dispatch('kernel.request',object(GetResponseEvent))处
在bootstrap.php.cache行2982中的HttpKernel->handleRaw(对象(请求),'1')
在bootstrap.php.cache行3131中的HttpKernel->handle(对象(请求),'1',true)
在bootstrap.php.cache行2376中的containerWarehttpkernel->handle(对象(请求),'1',true)
在app_dev.php第21行的Kernel->handle(对象(请求))处
注意:我以前删除过缓存
这是prod.log:
[2015-01-12 20:11:12] request.INFO: Matched route "home" (parameters: "_controller": "AppBundle\Controller\IndexController::indexAction", "_route": "home") [] []
[2015-01-12 20:11:12] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "The strategy "affirmative" is not supported." at /dns/in/olympe/loicg/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php line 52 {"exception":"[object] (InvalidArgumentException(code: 0): The strategy \"affirmative\" is not supported. at /dns/in/olympe/loicg/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php:52)"} []
[2015-01-12 20:11:12] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The strategy "affirmative" is not supported.) {"exception":"[object] (InvalidArgumentException(code: 0): The strategy \"affirmative\" is not supported. at /dns/in/olympe/loicg/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php:52)"} []
我已经启用了php错误报告,一切似乎都正常
security.yml:
# security:
# providers:
# in_memory:
# memory: ~
# firewalls:
# dev:
# pattern: ^/(_(profiler|wdt|error)|css|images|js)/
# security: false
# default:
# anonymous: ~
是否启用了错误显示?你检查过错误日志了吗?我对security.yml中的所有行都进行了注释,我的页面工作!但是是解决方案吗?请复制并粘贴问题中
security.yml
文件的内容好吗?
# security:
# providers:
# in_memory:
# memory: ~
# firewalls:
# dev:
# pattern: ^/(_(profiler|wdt|error)|css|images|js)/
# security: false
# default:
# anonymous: ~