replaced deprecated Twig features

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

As Symfony depends on Twig 1.11+, removing the usage of deprecated features will allow Symfony 2.2+ to work with Twig 2.0.