Moved warning stuff into MWDebug class.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 25 Aug 2012 11:09:46 +0000 (13:09 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 28 Aug 2012 13:33:44 +0000 (15:33 +0200)
commit5af21595121168fb29c4662f7d00226b3a1fe379
tree201163452fec679d146778f09c40ec8b24c72518
parent5aabfd92060989db57f8d968c7f9d7efe9a1ac26
Moved warning stuff into MWDebug class.

- Group common code in one instead of doing checks one
  time in GlobalFunctions.php and another time in Debug.php
- Remove the code catching the fact that a warning is due
  to a deprecation warning, no longer needed
- Pass the caller offset from wfDeprecated() to
  MWDebug::deprecated(); this was breaking deprecation
  notices for global objects.
- Changed PHP error level for deprecation notices (when
  $wgDevelopmentWarnings is set to true) from E_USER_NOTICE
  to E_USER_DEPRECATED since we now require PHP 5.3+
- Added E_USER_DEPRECATED to wfSuppressWarnings() and
  removed the check for the E_DEPRECATED constant being set
  now that we require PHP 5.3+
- Fixed MWDebugTest by calling wfSuppressWarnings() and
  wfRestoreWarnings() in setUp() and tearDown()

Change-Id: I6810b57c90d384de55a2cf177047767cdb734f79
includes/GlobalFunctions.php
includes/debug/Debug.php
tests/phpunit/includes/debug/MWDebugTest.php