replaced deprecated Twig features
merged branch fabpot/twig-deprecated-features (PR #8675)

This PR was merged into the 2.2 branch.

Discussion
----------

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.

Commits
-------

322f880 replaced deprecated Twig features