In the following sites there is an use of the createAccessDeniedException method that was not introduced into symfony until version 2.5. The documentation for versions 2.3 and 2.4 are wrong. - http://symfony.com/doc/2.3/best_practices/security.html#manually-checking-permissions - http://symfony.com/doc/2.4/best_practices/security.html#manually-checking-permissions