| Q | A | ---------------- | ----- | Bug report? | yes | Feature request? | no | BC Break report? | no | RFC? | no | Symfony version | 3.2.9 It's exactly the same problem of this issue : https://github.com/symfony/symfony/issues/21305 Except i using it in securty.yml allow_if and i got : Error: The function "test" does not exist around position 1. With @Security annotation everything is ok.