[2.7] adds deprecation notices.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

See commit https://github.com/hhamon/symfony/commit/33a53b535d1c93fc42d9705cb898cba228db95ad