wiki.techinc.nl/includes/utils
Tim Starling 47a1619027 Remove terminating line breaks from debug messages
A terminating line break has not been required in wfDebug() since 2014,
however no migration was done. Some of these line breaks found their way
into LoggerInterface::debug() calls, where they mess up the formatting
of the debug log.

So, remove terminating line breaks from wfDebug() and
LoggerInterface::debug() calls.

Also:
* Fix the stripping of leading line breaks from the log header emitted
  by Setup.php. This feature, accidentally broken in 2014, allows
  requests to be distinguished in the log file.
* Avoid using the global variable $self.
* Move the logging of the client IP back to Setup.php. It was moved to
  WebRequest in the hopes that it would not always be needed, however
  $wgRequest->getIP() is now called unconditionally a few lines up in
  Setup.php. This means that it is put in its proper place after the
  "start request" message.
* Wrap the log header code in a closure so that variables like $name do
  not leak into global scope.
* In Linker.php, remove a few instances of an unnecessary second
  parameter to wfDebug().

Change-Id: I96651d3044a95b9d210b51cb8368edc76bebbb9e
2020-06-03 12:01:16 +10:00
..
AutoloadGenerator.php
AvroValidator.php
BatchRowIterator.php
BatchRowUpdate.php
BatchRowWriter.php
ClassCollector.php
ExecutableFinder.php
FileContentsHasher.php
MWCryptHKDF.php
MWCryptRand.php
MWFileProps.php mime: Document null return from MimeAnalyzer::improveTypeFromExtension() 2020-05-24 15:51:08 -04:00
MWRestrictions.php
README
RowUpdateGenerator.php
UIDGenerator.php Fix even more PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 00:51:46 +01:00
ZipDirectoryReader.php Remove terminating line breaks from debug messages 2020-06-03 12:01:16 +10:00
ZipDirectoryReaderError.php Add missing visibility on methods of class ZipDirectoryReader 2020-05-10 22:11:59 +00:00

The classes in this directory are general utilities for use by any part of
MediaWiki. They do not favour any particular user interface and are not
constrained to serve any particular feature. This is similar to includes/libs,
except that some dependency on the MediaWiki framework (such as the use of
MWException, Status or wfDebug()) disqualifies them from use outside of
MediaWiki without modification.

Utilities should not use global configuration variables, rather they should rely
on the caller to configure their behaviour.