minor #27877 improve deprecation messages (xabbuh)
minor #27877 improve deprecation messages (xabbuh)

This PR was merged into the 4.1 branch.

Discussion
----------

improve deprecation messages

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

Commits
-------

e4ae5a4ca9 improve deprecation messages

symfony/HttpFoundation,symfony/http-foundation