AjaxResponse::checkLastModified uses global $wgUser
In looking into callers, I found that the whole system of ajax callable functions is deprecated[1]
I propose that the system be removed.
For WMF deployed extensions, this means updating Collection and FlaggedRevs to no longer use it (instead, whatever the intended replacement was)
My understanding is that, without Ajax functions, the entire AjaxResponse class can be removed, removing the use of $wgUser
Alternatively, since the function has no known callers[2] and no declared scope, I suggest it simply be removed without deprecation (i.e. breaking change)
I (DannyS712) have not assigned this to myself, since if the ajax system will be removed (option 1) its something I'm not familiar with
See also T42786 - does removing the dispatcher mean that the response can be removed as well?
[1] wgUseAjax was deprecated in 1.31 and ignored since 1.32; wgAjaxExportList was deprecated in 1.27 (T42786)
[2] Calls listed in the code search are for OutputPage::checkLastModified, which appears to be unrelated