JMSSecuritybundle arrojando "security.expressions.expression" definido para la definición "security.expressions.expression

i recently configured JMSSecurityExtraBundle and when i try to add an expression to my firewall rules it throws me this error:

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\RuntimeException' with message 'The parent definition "security.expressions.expression" defined for definition "security.expressions.expression.3b9a3b9db79b52922a36b870bc46e5b114425575" does not exist.'

I followed the exact description as described on this page:

http://jmsyst.com/bundles/JMSSecurityExtraBundle/master/installation

This is when the error occurs:

security:
    access_control:
        - { path: ^/foo, access: "hasRole('FOO') and hasRole('BAR')" }

preguntado el 22 de septiembre de 13 a las 13:09

hmh, really can't find a solution to this -

1 Respuestas

You have to activate the expressions for it to work. add

jms_security_extra:
    expressions: true

to your config.yml and try it out

contestado el 09 de mayo de 14 a las 06:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.