This is a long overdue change, and hardcoded stuff is making it hard to rename classes, see T166010#8349431.
Potential plan, copied from T166010#8349594:
- Copy annotations from taint-check to WebRequest (and potentially other classes, but not all of them for now)
- Backport said change to all supported releases, just to be sure.
- Add a test in core to ensure that said annotations are working (i.e., write a test file that uses the unsafe methods, make sure that it's analyzed by phan, make sure it reports issues). Ideally, this would be done for all methods hardcoded in taint-check, not just the ones we're migrating now.
- Resolve T291743 so that caused-by lines are easier to read when annotations are involved
- In taint-check, remove hardcoded taintedness from methods that are now annotated in core
- Release new version of taint-check and mw-phan, upgrade to it in core
- Finally, move the WebRequest class and its friends.