The following glasses are marked as newable per the
Stable Interface Policy, even though logically, they should not be
newable. This is done for classes that are currently instantiated
by extensions, and lack an alternative.
A better way for obtaining an instance of these classes should be
created in the future. At that point, direct instantiation should
be deprecated and replaced.
- includes/ApiMain.php - needs factory
- includes/media/BitmapMetadataHandler.php - should become a stateless service or use handler pattern
- includes/GitInfo.php - should become a stateless service
- includes/logging/LogPage.php - should become a stateless service or use command pattern
- includes/logging/ManualLogEntry.php - should become a stateless service or use command pattern
- includes/poolcounter/PoolCounterWorkViaCallback.php - needs a factory
- includes/context/RequestContext.php - needs to be narrowed down, and should use a factory
- includes/search/SearchHighlighter.php - should have a factory
- includes/TitleArrayFromResult.php - should perhaps be part of TitleFactory
- includes/user/User.php - should at least get a factory method for anons
- includes/diff/Diff.php: needs a TextDiffGenerator service or a factory
- includes/EditPage.php: needs a factory
Bug: T247862
Change-Id: I033158e693c98630ee167d9528fc8c9936f978d4
This is a line-by-line conversion to append to a string property rather
than print into a PHP output buffer.
The changes to the base class break subclasses such as MobileFrontend's
InlineDiffFormatter, which is updated in I81dd01cb.
Depends-On: I81dd01cbb9ce11b87115fb1fed511027aee436a1
Change-Id: Idf2a6c593b81a152edec923d4db6272ca1f3f545
GNU 'diff -u' prefixes each line with either a space, a '+', or a '-'.
UnifiedDiffFormatter does the same, but it also adds an additional column of
whitespace between the prefix and the line. GNU diff only does that in
non-unified mode.
Fix this by implementing lines() in UnifiedDiffFormatter, overriding the parent
class implementation.
Bug: T100069
Change-Id: I1bf1b8e6d1d5aceb2c3836548f492f7edebe5a12
Reasons for touching this are:
* "@param type $var" were mixed in a lot of places. Both works but the
MediaWiki coding conventions suggest that specific order.
* Things like String and Bool aren't objects and shouldn't be uppercase.
* Tried to fill missing types in "@param $var".
* Tried to fill missing descriptions in "@return type" when I could.
* Removed duplicate descriptions if a @see is sufficend.
* Removed useless descriptions ("isUsefull returns true if usefull").
* Removed useless @return void.
* Replaces mixed[] with array (does have the exact same meaning).
* Tried to find better replacements for "varargs", phpDocumentor
suggest $var,...
* Order should be @since, @param, @throws, @return, @see. This is the
order Doxygen renders this.
There is always more to do but I think this is already much better
than before. Please feel free to put more change sets on top of mine
or request more changes by adding comments.
Change-Id: I05262ce06caabf79f68772302524ac91bbead1c6
* Move some classes to separate files to avoid having a monstrous file with a
dozen classes.
* Remove weird underscores from class names.
* Instead of prefixing members with underscores, specify visibility explicitly.
* Rename c_style -> camelCase per coding conventions.
* Throw exceptions instead of fataling out with trigger_error().
* Remove pointless constant used only once.
Change-Id: Icac23c0f6259c73f5fe07f201b83b9c332ba0469