| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We will soon be converting $wgUser to be a stub
object wrapping a User, and we want to be able
to access the public properties of that object
(doing so will still trigger deprecation warnings,
but it won't break). This will also work for
non-existent properties that are handled via
the __get() and __set() methods of whatever
inner object the StubObject is wrapping.
Bug: T267861
Change-Id: I4c29c615bcb107d4ef8bf4b8e48db2ecf863e5f7
|
|
|
|
|
|
| |
Some classes still needs exclude for the sniff
Change-Id: I9536c2ee84f6fb4c83cf862a152cf6b00344cb97
|
|
|
|
|
|
| |
Bug: T267074
Change-Id: Ic9cf63249744cd61bbe238c005630fc82db41d41
Depends-On: I2eac3e96eafdb540824bbc3ddc0b6cc1aed76bf2
|
|
|
|
|
|
|
|
|
|
|
| |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: If560596f5e1e0a3da91afc36e656e7c27f040968
|
|
|
|
|
|
|
|
| |
This annotates classes that can safely be instantiated by
extensions, per the Stable Interface Policy.
Bug: T247862
Change-Id: Ia280f559874fc0750265ddeb7f831e65fd7d7d6a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
'self' is only 4 chars (shorter to type) and reduces risk (if class name
is changed) which is very unlikely to break things. PHP replaces self with
the actual class name. Plus we're already using this in our code base.
Change-Id: Ia565ab2e4258d0ac201b14b712d1bc3bfe4e4d94
|
|
|
|
| |
Change-Id: If00625b700962a1c6d6412c6de30c28fa3df9f81
|
|
|
|
|
|
| |
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff
Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
|
|
|
|
|
|
|
|
| |
Deprecate the unnamespaced version and move it to includes/compat.
Bug: T147167
Depends-On: I39c805bfb98b32f32f3d0dc1eee9e823afe1c21a
Change-Id: I3780c7adf51683f3f7adb35a88f9a25a0a2e2530
|
|
|
|
| |
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
|
|
|
|
|
|
|
|
| |
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.
Change-Id: I994d11e05f202b880390723e148d79c72cca29f0
|
|
|
|
|
|
|
| |
If $class is a callable, then assume it is a factory function, and pass
that onto ObjectFactory.
Change-Id: I20c3650843c2803e0f9521d67bb037abfc28e1d9
|
|
|
|
| |
Change-Id: I1a90d888b1b17e21b54b90f3665c63edd1f21195
|
|
|
|
|
|
| |
Already exists the same way in the base class.
Change-Id: If6c89cf42f11655ea45a1d6e1660f6e5e2593169
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
| |
Change-Id: I095ba37ceb150fcb7bee9df80201437c78426938
|
|
|
|
| |
Change-Id: I31c81c78715048004fc8fca0f27d09c1fa71c118
|
|
|
|
|
|
|
|
|
| |
Add the full signature of Language::findVariantLink to StubUserLang so
that pass-by-reference variables are properly passed to the un-stubbed
Language object.
Bug: T78427
Change-Id: I51f57a17c814c43742f514df0e42a1760c406c48
|
|
|
|
| |
Change-Id: Iaa803311409cf7b649f64f69bafe2935a418d31c
|
|
|
|
| |
Change-Id: Ie4c1aabd966fcdf87a9129ceb59c058740292f2e
|
|
|
|
|
|
|
|
|
|
| |
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
|
|
|
|
| |
Change-Id: I4569f5d59018f0d5082888fdc737cf30370bcbdd
|
|
|
|
|
|
|
|
| |
Previously, only the global was unstubbed when StubObject::unstub() was
called. Now, the object given as a parameter will also be unstubbed.
(What about other references to the object, though?)
Change-Id: I431ddd61e24686fc2f014c30064808ce57fe1706
|
|
|
|
|
|
| |
Nothing uses them outside of these two classes
Change-Id: I83a8eaff0d2d2d60592106d0e37572f898e482e9
|
|
|
|
| |
Change-Id: Ibf86d03b5479c47ee72c0dafea6777ef8178fe68
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PHP's __call magic method can't handle functions with reference
parameters correctly,[1] which means that we need to manually unstub
StubObjects before calling such a method. Or you could use call-time
pass by reference with call_user_func_array, which is rather backwards
and verbose.
This change adds a convenience function to do this, and applies it to
the two calls which brought it to my attention.
[1]: https://bugs.php.net/bug.php?id=40694,
https://bugs.php.net/bug.php?id=62455
Change-Id: I74a0c04bf358e164f753b82fbefbd6205d9b2451
|
|
|
|
|
|
|
|
| |
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
|
|
|
|
| |
Change-Id: I1d830da0597f19efd0b2ae48642389975e736e23
|
|
|
|
|
|
|
|
|
| |
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
|
|
|
|
| |
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
|
|
|
|
|
|
|
| |
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.
Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
|
|
|
|
|
|
| |
Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php.
Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111103
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/106070
|
|
|
|
|
|
|
| |
I'll be amazed if this doens't break any tests.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103817
|
|
|
|
|
|
|
| |
Remove a couple of unused variables
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103323
|
|
|
|
|
|
|
|
|
| |
Fix document comment blocks
Tweak some returns
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/100778
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89477
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89474
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cleanup before applying code like this
Per CR http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89406#c17545 :
'Here is a third one: Strict Standards: Only variables should be passed by reference in /www/sandwiki/includes/Wiki.php on line 177 '
Offending bit is this:
- SpecialPageFactory::executePath( $this->context->title, $this->context );
+ SpecialPageFactory::executePath( $this->getTitle(), $this->getContext() );
That function demands reference paramters for $title and $context, which is being violated here where we now pass function return values:
public static function executePath( Title &$title, RequestContext &$context, $including = false ) {
The $title does sometimes get replaced within the function body, but $context does not appear to ever be replaced (its *contents* are modified, which does not require passing by reference)
If replacing it is something it should be doing, then we need to be able to replace it upstream presumably, so $this->getTitle() probably isn't appropriate.
The $context probably should have the reference simply removed.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89430
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89414
|
|
|
|
|
|
|
| |
I can't see how to avoid the circular dependencies on it *without* stubbing it. Probably easier to just continue the drive to deprecate the global variable altogether.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/86809
|
|
|
|
|
|
|
| |
do not call either $wgLang or $wgContLang at least once. All index.php calls unstub $wgContLang from MediaWiki::parseTitle() except in the edgecase of viewing pages referenced only by "curid=123", and since those will end up calling OutputPage::output() they will eventually be unstubbed at some point as well. All calls through load.php unstub $wgLang in ResourceLoaderContext::getLanguage() from ResouceLoader::respond() --> ResourceLoader::preloadModuleInfo(). All calls through api.php unstub $wgContLang in ApiResult::cleanUpUTF8() from ApiMain::printResult().
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/86775
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/85299
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't stub RequestContext. The chances of us getting away without needing to access *any* of the six major globals is nil, and in the meantime it's screwing up strong function typing and throwing catchable fatals everywhere.
* Stop stubbing $wgOut. The only path where we can avoid unstubbing it is if we immediately die due to maxlag overflow, and that's a) a pretty uncommon code path, and b) a DB issue which won't be affected by a tiny bit of extra apache load. That allows us to do strong typing on function parameters with it, which is a Good Thing (TM).
Also make OutputPage::getContext() private; I'm not convinced that a context belongs here (it's *part of* the context, not a consumer of it), let's work through it a it more before we advertise its existence.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/85278
|
|
|
|
|
|
|
|
|
| |
for me and that plethora of bugs and hicoughs I had to deal with in impelenting it.
http://www.mediawiki.org/wiki/Requests_for_comment/Context_object (it's little different though)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/85240
|