There are plenty of methods in User class that call $this->getRequest() to retrieve information about the current Request. Those methods should expect WebReqest as argument instead of calling $this->getRequest().
Removal plan
- Add an optional parameter WebRequest $request = null to those methods. When $request is passed use it, otherwise use $this->getRequest()
- Update all places/extensions that call those methods and pass the $request.
- Update methods updated in point 1. and add a deprecation warning that from now the $request argument is required.