I was trying to evaluate the best among JMSSecurityExtraBundle and SensioFrameworkExtraBundle. First is a popular security bundle and the other listed in symfony2 website.
While both provide the annotations to secure the methods of a controller via @Secure in JMS and @Security in Sensio, JMS security bundle provides more security options See here
I would like to ask the community which is the best bundle for Symfony 2.4
The
@Securityannotation was added toSensioFrameworkExtraBundlein version2.4of the bundle !That means it does NOT work with a Symfony version < 2.4 because this version of the bundle requires the
ExpressionLanguagecomponent that was added in Symfony 2.4 to work.Have a look at the bundle's composer.json.
Further the
@Securityannotation only works for controller classes because the check is performed in a subscriber that listens for thekernel.controllerevent.The
JMSSecurityExtraBundlecan be configured to work with all defined services (not just controller classes). Further it ...is_expr_grantedtwig function for symfony versions < 2.4)Hope that clarifies it a bit.