== Change ==
Remove integration from MWDebug methods in favour of capturing
messages from the 'error' channel. This way we fix the following
that we were all blind to:
* PHP built-in errors for native notices and deprecation warnings.
* trigger_error calls from our own code such as in standolone libs,
where we can't use wfLogWarning or wfDeprecated, and instead use
E_USER_WARNING and E_USER_DEPRECATED instead.
* trigger_error calls from third-party Composer libraries, which
similarly can't and don't know about these at all.
I removed support for including a backtrace. XDebug does a better job
of this nowadays, and the information is also available in
mw-error.log already in a more readable manner. Cramming it into a
100px scrollable area made the "Console" tab much less readable in
my opinion. To make it work, we'd need to duplicate the pretty
string formatting code of wfBacktrace() and make it re-usable when
given only a trace array (rather than capture a new backtrace). I
considered re-using MWExceptionHandler::prettyPrintTrace but that is
far more verbose than the string format in wfBacktrace. Creating yet
another untested error pretty print function seemed not worthwhile
as imho in the majority of cases the $caller suffices, and when not,
the toolbar suffices as a nudge to take a look in mw-debug.log, or
check XDebug display_errors, or engage an IDE.
== Test plan ==
1. Add the following to MediaWiki.php#main() as example:
```
wfLogWarning('Hello');
wfDeprecated('Something');
trigger_error('Goodbye');
$x = []; $a = $x['a'];
```
2. Before this change, your native display_errors=1 or XDebug shows
all four. With $wgDebugToolbar enabled, the "Console" tab
showed only the wfLogWarning and wfDeprecated entry.
3. After this change, all four are included
Change-Id: I62d864823ec8ab9b940aae0e0f47b47a728ba861