[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        | ~

Done thanks. I've created a new private `setCurrentRequest` method and replaced all calls to the `setRequest` method in the class by the new private one. The `setRequest` method now triggers the deprecation  notice and calls the private method.